fix(ios): read MySQL and MariaDB column defaults the way the Mac app does - #3091
Merged
Merged
Conversation
datlechin
force-pushed
the
fix/mysql-no-backslash-escapes
branch
from
September 23, 2026 15:35
3abeac4 to
765d484
Compare
datlechin
force-pushed
the
fix/ios-mysql-column-defaults
branch
from
September 23, 2026 15:35
9cec39d to
15247d0
Compare
datlechin
force-pushed
the
fix/mysql-no-backslash-escapes
branch
from
September 23, 2026 15:37
765d484 to
4a30d97
Compare
datlechin
force-pushed
the
fix/ios-mysql-column-defaults
branch
from
September 23, 2026 15:38
15247d0 to
e6e21d5
Compare
datlechin
changed the base branch from
fix/mysql-no-backslash-escapes
to
main
September 23, 2026 15:38
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.
Problem
The iOS MySQL driver passed
SHOW FULL COLUMNS'Defaultvalue through unread. The Mac decoder from #3067 was not shared with the app. So on iPhone and iPad:DEFAULT NULLshowed no default (Can't set default value of column to Null via query or via Inspector. It remains as empty. #3058's symptom)'NULL'showed asNULL, andDEFAULT ''showed an empty valueSHOW FULL COLUMNSquotes nothingFix
MySQLCatalogDefault.swift,MySQLGeneratedColumnClassification.swift,MySQLServerVersion.swiftandOceanBaseColumnDefaults.swiftare shared.nonisolated, andcheck-ios-shared-isolation.pypasses.MySQLColumnDefinitionSQL.swiftinto a Foundation-onlyMySQLLiteralSQL.swift. The DDL writers stay on the Mac.accountSyntaxmoved into the plugin-only account file, soMySQLServerVersionshares without dragging it in.mysqlShowColumnsDefaultis the one function the Mac per-table read and the iOS driver both call.MySQLColumnListingpicks the source by flavor:SHOW FULL COLUMNSin its bare formINFORMATION_SCHEMA.COLUMNSdefault, the only read there that tells an expression from a string. A refused catalog falls back to the bare value, as on the Mac.OceanBaseColumnDefaults.columnDefault'abc',NULL,CURRENT_TIMESTAMP), the same as the Mac Structure tab.The iOS app does not read
SHOW CREATE TABLE. On MariaDB before 10.2.7, and for a MySQL expression default holding non-ASCII text, a default reads as the catalog states it.Tests
MySQLColumnListingTests(9) useSHOW FULL COLUMNSand catalog rows captured verbatim from MySQL 8.4.11 and MariaDB 13.0.2.MySQLColumnDefinitionSQLTests,OceanBaseColumnDefaultsTests,ColumnDefaultRoundTripTests,MySQLCreateTableTests) did not run locally. The shared build was stuck behind a stalled package download, so CI is their first run.