Serialize metadata cursor queries via ExplorerSchemaService and use in Tree mixin#12
Merged
koianaoki merged 2 commits intoMay 11, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
SHOWstatements) are executed through the session's serialized executor so they participate in the same retry/reconnect logic as other schema operations.Description
ExplorerSchemaService.execute_cursor_query(query, database)which runs a cursor query through the service's serialized executor, returns(columns, rows), and always closes the cursor.TreeMixin._fetch_cursor_resultsignature to accept an optionaldatabaseand prefer callingschema_service.execute_cursor_query(...)when available, falling back to the direct connection otherwise.data.databasewhen invoking_fetch_cursor_resultfor MySQLSHOW FULL COLUMNSandSHOW INDEXcode paths.tests/ui/explorer/test_table_metadata_shortcuts.pyto assert calls toexecute_cursor_queryand addtests/unit/test_explorer_schema_service.pyto verify executor usage and cursor closure.Testing
tests/ui/explorer/test_table_metadata_shortcuts.pywere run and assert thatexecute_cursor_queryis invoked for MySQLSHOWqueries and that error paths notify appropriately, and they passed.tests/unit/test_explorer_schema_service.pywas run and verifies thatexecute_cursor_queryschedules work on the session executor and closes the cursor, and it passed.Codex Task