GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Table editor tab shows stale structure after ALTER TABLE in Query tab – no automatic reload · Issue #2661 · HeidiSQL/HeidiSQL

Table editor tab shows stale structure after ALTER TABLE in Query tab – no automatic reload #2661

New issue
Copy link
New issue
Copy link
Open
Open
Table editor tab shows stale structure after ALTER TABLE in Query tab – no automatic reload#2661
Copy link
Labels
featureA new feature to implementA new feature to implement

Description

@q2apro
q2apro
opened on Nov 6, 2026
Issue body actions

Description

Steps to reproduce

  1. Select a table in the tree (e.g. my_translations), so the "Table: …" editor tab is populated.
  2. Switch to a Query tab and run
    ALTER TABLE my_translations ADD mapid INT UNSIGNED NULL, ADD boxid INT UNSIGNED NULL;
    – succeeds, server confirms.
  3. Click on the "Table: my_translations" tab.

Expected

The column list shows the new columns mapid and boxid (or the tab reloads the structure when it is activated).

Actual

The tab still shows the old structure without the new columns. Nothing indicates that it is stale. Only after pressing F5 does the new structure appear.

Also affected: Data tab

With the structure still stale, pressing F5 on the "Data" tab re-runs the SELECT but builds the column list from the cached structure – the new columns mapid and boxid do not appear in the grid either. So even an explicit refresh on the Data tab does not pick up the altered structure. Expected: F5 on the Data tab reloads the table structure first and then selects all current columns.

Why this matters

There is no hint that the displayed structure is cached. I assumed the ALTER had not been applied, ran it again and got "Duplicate column name" from the server – that was the only way to notice the tab was outdated. Worse cases are easy to imagine: adding a column again with IF NOT EXISTS, or dropping/renaming the "missing" column based on what the tab shows.

Suggestion

Either:

  • after a successful DDL statement (ALTER/CREATE/DROP/RENAME TABLE) executed in a Query tab, invalidate the cached structure of the affected table so the Table tab reloads on next activation, or
  • reload the structure whenever the "Table: …" tab is (re)activated, or at least
  • show a "structure may be outdated – press F5" hint on the tab when DDL has been run in the meantime.

Version

HeidiSQL: [your version]
Server: MySQL [your version]
OS: Windows [10/11]

HeidiSQL version and OS

[your version, e.g. 12.11] Windows 10

Database server version

MySQL 8.0.42

Reproduction recipe

  1. Select a table in the tree (e.g. my_translations), so the "Table: …" editor tab is populated.
  2. Switch to a Query tab and run
    ALTER TABLE my_translations ADD mapid INT UNSIGNED NULL, ADD boxid INT UNSIGNED NULL;
    – succeeds, server confirms.
  3. Click on the "Table: my_translations" tab.
  4. Switch to the "Data" tab and press F5.

Expected
Step 3: the column list shows the new columns mapid and boxid (or the tab reloads the structure when activated).
Step 4: F5 on the Data tab reloads the table structure first and then selects all current columns, so mapid and boxid appear in the grid.

Actual
Step 3: the Table tab still shows the old structure without the new columns. Nothing indicates that it is stale.
Step 4: F5 on the Data tab re-runs the SELECT but builds the column list from the cached structure – the new columns do not appear in the grid either. So even an explicit refresh on the Data tab does not pick up the altered structure.
Only after pressing F5 on the Table tab does the new structure appear everywhere.

Why this matters
There is no hint that the displayed structure is cached. I assumed the ALTER had not been applied, ran it again and got "Duplicate column name" from the server – that was the only way to notice. Worse cases are easy to imagine: dropping or renaming a column based on what the Table tab shows.

Suggestion

  • After a successful DDL statement (ALTER/CREATE/DROP/RENAME TABLE) executed in a Query tab, invalidate the cached structure of the affected table so Table and Data tab reload it on next activation / F5, or
  • reload the structure whenever the "Table: …" tab is activated, or at least
  • show a "structure may be outdated – press F5" hint on the tab when DDL has been run in the meantime.

Error/Backtrace

Activity

  1. q2apro
    added
    bugDefective behaviour in HeidiSQLDefective behaviour in HeidiSQL
    on Nov 6, 2026
  2. q2apro commented on Nov 6, 2026

    @q2apro
    q2apro
    on Nov 6, 2026
    Author
    More actions

    Same cache problem, different tab: I ran TRUNCATE edu_translations in a Query tab, then switched to the "Data" tab of that table – it still shows all the old rows as if the table were full. Nothing marks the grid as stale; only F5 on the Data tab clears it.

    For plain DML one could argue the grid shouldn't re-select on every tab switch, but after TRUNCATE / DROP / ALTER / RENAME of the selected table, the Table and Data tabs should at least be flagged as outdated or reloaded on next activation. Same invalidation hook as above would cover it.

  3. ansgarbecker commented on Nov 6, 2026

    @ansgarbecker
    ansgarbecker
    on Nov 6, 2026
    Collaborator
    More actions

    Caching is intentionally done, this is not a bug. The table tab needs an F5 to update after manual changes. Parsing user queries for specific ALTER/... things would add significant overhead.

  4. q2apro commented on Nov 6, 2026

    @q2apro
    q2apro
    on Nov 6, 2026
    Author
    More actions

    Thanks for the quick reply. I understand the caching – I'm not asking to re-query on every tab switch.

    Two cheap variants that need no real parsing:

    1. The query runner already knows each statement's first keyword. If it is ALTER / TRUNCATE / DROP / RENAME / CREATE, mark the structure of the selected table as dirty, so the Table/Data tab reload on the next activation. One string compare per statement.
    2. Even simpler: any statement run from a Query tab marks the selected table's tabs as dirty. Cost is the same SHOW CREATE TABLE / SELECT that F5 triggers, only when something ran in between.

    The problem isn't the F5, it's that nothing tells the user the tab is stale. I ran the ALTER twice because the Table tab "showed" it had not been applied. A small "outdated – press F5" marker on the tab would already solve it.

  5. ansgarbecker
    added
    featureA new feature to implementA new feature to implement
    and removed
    bugDefective behaviour in HeidiSQLDefective behaviour in HeidiSQL
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new feature to implementA new feature to implement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.