Skip to content

Fix quoted table options and add missing options in CREATE TABLE statement - #686

Open
M393 wants to merge 3 commits into
phpmyadmin:5.11.xfrom
M393:fix-quoted-table-options
Open

M393 wants to merge 3 commits into
phpmyadmin:5.11.xfrom
M393:fix-quoted-table-options

Conversation

@M393

@M393 M393 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Quoted options in CREATE TABLE statement

MariaDB 11.4 quotes some options in the CREATE statement, e. g.:

SHOW CREATE TABLE t;

CREATE TABLE `t` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`),
) ENGINE=InnoDB AUTO_INCREMENT=104448239 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci `PAGE_COMPRESSED`=1

Some missing options added

MariaDB:
PAGE_CHECKSUM
TRANSACTIONAL
ENCRYPTED
ENCRYPTION_KEY_ID
STATS_AUTO_RECALC
STATS_PERSISTENT
STATS_SAMPLE_PAGES
IETF_QUOTES
SEQUENCE

MySQL:
https://dev.mysql.com/doc/refman/8.4/en/create-table.html#create-table-options
AUTOEXTENT_SIZE
COMPRESSION
ENCRYPTION
ENGINE_ATTRIBUTE
SECONDARY_ENGINE_ATTRIBUTE
ADAPTIVE_HASH_INDEX

M393 and others added 3 commits October 27, 2026 11:46
Most table options were not covered by any test.
The data provider replaces testBuilderCompressed and checks that each
option is rebuilt and does not consume the tokens following it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
Options not in the list were dropped when building the statement,
together with all the options following them.

Added options documented by MySQL and MariaDB:
PAGE_CHECKSUM, TRANSACTIONAL, ENCRYPTED, ENCRYPTION_KEY_ID, ENCRYPTION,
COMPRESSION, STATS_AUTO_RECALC, STATS_PERSISTENT, STATS_SAMPLE_PAGES,
AUTOEXTEND_SIZE, IETF_QUOTES, SEQUENCE, ENGINE_ATTRIBUTE,
SECONDARY_ENGINE_ATTRIBUTE and ADAPTIVE_HASH_INDEX.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
MariaDB quotes engine-defined table options in SHOW CREATE TABLE, e.g.
`PAGE_COMPRESSED`='ON'. These were not recognized, so they were dropped
together with all the options following them. phpMyAdmin rebuilds the
statement when exporting the table structure, losing these options.

Quoted names are only accepted where the options array enables it with
`_ALLOW_QUOTED`, so quoted identifiers like SELECT `DISTINCT` are not
mistaken for options.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.50%. Comparing base (18d63ad) to head (45312e6).

Additional details and impacted files
@@             Coverage Diff              @@
##             5.11.x     #686      +/-   ##
============================================
- Coverage     96.51%   96.50%   -0.01%     
+ Complexity     2352     2345       -7     
============================================
  Files            71       71              
  Lines          5187     5184       -3     
============================================
- Hits           5006     5003       -3     
  Misses          181      181              
Flag Coverage Δ
unit-7.2-ubuntu-latest ?
unit-7.3-ubuntu-latest ?
unit-7.4-ubuntu-latest 96.48% <100.00%> (+<0.01%) ⬆️
unit-8.0-ubuntu-latest ?
unit-8.1-ubuntu-latest 96.47% <100.00%> (+<0.01%) ⬆️
unit-8.2-ubuntu-latest ?
unit-8.3-ubuntu-latest ?
unit-8.4-ubuntu-latest ?
unit-8.5-ubuntu-latest ?
unit-8.6-ubuntu-latest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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.

1 participant