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 — Add support for MariaDB system-versioned tables and the SEQUENCE table option by xmaks82 · Pull Request #683 · phpmyadmin/sql-parser

Conversation

@xmaks82

@xmaks82 xmaks82 commented Oct 23, 2026

Copy link
Copy Markdown

Fixes #235

SHOW CREATE TABLE of a system-versioned table (MariaDB 10.3.4+) could not be parsed. Checked with MariaDB 11.8:

CREATE TABLE `t` (
  `x` int(11) DEFAULT NULL,
  `row_start` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE,
  `row_end` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
  PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
) ENGINE=InnoDB WITH SYSTEM VERSIONING;

Before (context MariaDb110800):

A comma or a closing bracket was expected. (near "START")
Unexpected beginning of statement. (near "6")
Unrecognized statement type. (near "GENERATED ALWAYS")

and build() returned the table cut after `row_start` timestamp(6) GENERATED ALWAYS AS ROW. After: no errors, and the statement is built back with all columns, the period and the table option.

Changes:

  • AS ROW START, AS ROW END, WITH SYSTEM VERSIONING, WITHOUT SYSTEM VERSIONING and PERIOD FOR SYSTEM_TIME (K) added to the MariaDB 10.3+ files in tools/contexts, contexts regenerated with tools/ContextGenerator.php. MySQL contexts are not changed.
  • Column options AS ROW START, AS ROW END, WITH SYSTEM VERSIONING, WITHOUT SYSTEM VERSIONING; table option WITH SYSTEM VERSIONING.
  • Second commit: table option SEQUENCE. MariaDB prints ) ENGINE=InnoDB SEQUENCE=1 for a sequence, and the option was silently dropped from the built statement.

Docs:

  • https://mariadb.com/docs/server/reference/sql-structure/temporal-tables/system-versioned-tables
  • https://mariadb.com/docs/server/reference/sql-structure/sequences/create-sequence

Tests: parser fixtures parseCreateTableSystemVersioning_mariadb_100300, parseCreateTableSystemVersioning2_mariadb_100300 (column WITHOUT SYSTEM VERSIONING), parseCreateTableSequence_mariadb_100300, and two round-trip tests in tests/Builder/CreateStatementTest.php.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Магда М.Г. added 2 commits October 23, 2026 12:29
Магда М.Г.
Add support for MariaDB system-versioned tables
f7598f5
Parse the column options AS ROW START, AS ROW END and
WITH/WITHOUT SYSTEM VERSIONING, the PERIOD FOR SYSTEM_TIME
definition and the WITH SYSTEM VERSIONING table option.
They are available since MariaDB 10.3.4.

Fixes phpmyadmin#235

Signed-off-by: Магда М.Г. <[email protected]>
Магда М.Г.
Add the MariaDB SEQUENCE table option
247aabe
SHOW CREATE TABLE prints SEQUENCE=1 for sequence tables
since MariaDB 10.3. The option was silently dropped.

Signed-off-by: Магда М.Г. <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@xmaks82
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.
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.