Skip to content

Conversation

@yonaadug
Copy link
Contributor

@yonaadug yonaadug commented Feb 11, 2026

Summary

  • Fix \dt+ table_name returning empty results
  • The bug occurred because the cursor was reused for SHOW CREATE TABLE, overwriting the SHOW FIELDS results
  • Fix by fetching results before executing the second query

Test plan

  • Added unit test test_list_tables_verbose_preserves_field_results
  • Manual testing with MySQL database confirms fix works
  • Existing tests pass

Generated with Claude Code

ykebed12 and others added 2 commits February 11, 2026 15:37
The \dt+ command executes two queries: SHOW FIELDS and SHOW CREATE TABLE.
The second query was overwriting the cursor's results, causing the field
data to be lost when using table_format=ascii.

Fix by fetching SHOW FIELDS results before executing SHOW CREATE TABLE.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rolandwalker
Copy link
Contributor

Hi! Thanks! What does this have to do with table_format=ascii ?

@yonaadug
Copy link
Contributor Author

Hi, table_format=ascii just happens to expose the error whereas table_format=vertical doesn't. Although, I guess I shouldn't add that to the changelog

Copy link
Contributor

@rolandwalker rolandwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciated!

@rolandwalker rolandwalker merged commit 580d6be into dbcli:main Feb 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants