Skip to content

Column completion never appears, and no popup after an empty prefix in FROM (MySQL) #2915

Closed

Description

@jiangjc3

What happened?

Environment

  • TablePro 0.74.0 (build 130)
  • macOS 15.7.9 (24G830), Apple Silicon (arm64)
  • MySQL connections: a local one (localhost, database product_center_core) and a remote one (database cdfsh_shared)
  • SQL editor, Vim mode on (the bugs below reproduce with it on; see notes)

Summary

Keywords and table names complete, but column completion after a qualifier never appears — there is no popup at all. Separately, select * FROM with an empty prefix also shows no popup.

Steps to reproduce

  1. Connect to MySQL and open a query tab on the database that contains the table (the database picker at the top of the editor shows that database; the table is visible in the sidebar and queries against it run fine).
  2. Type select * FROM (nothing after FROM) and wait.
  3. Type select * FROM categor — category is suggested here, so table completion works.
  4. Continue the statement to select * FROM category t where and then type t..
  5. Also try select * FROM category where category. (table name + dot, no alias).

Expected

  • After FROM with an empty prefix, the table list should pop up (the Autocomplete docs show SELECT * FROM | -- All tables).
  • After t. / category., the columns of category should be suggested.

Actual

  • After FROM with an empty prefix: no popup at all.
  • After t.: no popup at all and no column suggestions.
  • After category.: same — no popup at all.

Both the alias form and the plain table-name form fail, so this doesn't look like alias parsing. Keywords and table names complete normally throughout.

Timeline within the session

Column completion did work once: with two connection windows open, select * from spu t where t. suggested columns. After I toggled Insert/Normal mode a few times it stopped, and it has not worked since — including after a full app restart. After the restart, keywords and table names complete again, but column completion still does not.

Workarounds tried

  • Using a table name picked from the completion popup instead of typing it: no change.
  • Confirmed the table exists in the current database and the editor's database picker points at that database: both fine.
  • Opening the table's Structure/Columns tab in the sidebar: columns are listed there, so the metadata is readable from the app.

Additional context (source reading, 0.74.0 tag)

  • SQLCompletionService.isSuppressedEmptyPrefix explicitly does not suppress an empty prefix for .from/.join, so the missing popup after FROM looks like a bug rather than intended behavior.
  • CompletionEngine.getCompletions returns nil when the item list is empty (CompletionEngine.swift:141), so any empty column result surfaces as "no popup at all" rather than an empty popup.
  • The dot path goes context.dotPrefix → SQLSchemaProvider.resolveAlias → columnCompletionItems → getColumns, where a miss on the cache runs the engine's own column metadata fetch — for MySQL SHOW FULL COLUMNS FROM <table> (MySQLPluginDriver+Schema.swift:51). getColumns swallows fetch errors and returns [].

Logs: log show --last 10m --predicate 'subsystem == "com.TablePro"' returned nothing on my machine, and a live log stream capture was also empty, so I couldn't attach Column fetch failed for autocomplete: …. If it helps I can run SHOW FULL COLUMNS FROM <table> in a query tab on the same connection and report the result.

Steps to reproduce

No response

Expected behavior

No response

Database type

None

TablePro version

0.74.0

macOS version & chip

macOS 15.7.9 (24G830), Apple Silicon (arm64)

Screenshots / Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions