Skip to content

[Bug]: Visual Query Builder omits database/schema qualifiers for tables from different MySQL databases #480

Description

@jfernandogg

Describe the bug

When using the visual query builder in MySQL, dragging and dropping tables from different databases into the canvas generates SQL that omits the database/schema qualifier in the FROM clause. For example, it produces FROM table_a, table_b instead of FROM db_a.table_a, db_b.table_b. This can cause queries to resolve incorrectly or fail when tables with the same name exist in different databases.

To Reproduce

  1. Open a MySQL connection with access to multiple databases.
  2. Open the visual query builder.
  3. Drag and drop two tables from different databases into the canvas.
  4. Observe the generated SQL in the query editor.
  5. The generated FROM clause uses unqualified table names instead of including the corresponding database/schema prefix

I have attached a posible fix for this issue as a patch over v0.15.0

fix-visual-query-builder.patch

OS Version

Windows 11 and Mac OS 14

Tabularis Version

v0.15.0

Relevant Log Output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions