Skip to content

[Bug]: the CHECK keyword creates syntax error since last week #20572

Open
phpmyadmin/sql-parser
#688

Description

@ZogRox

Describe the bug

Hello,
I am experiencing a SQL compatibility issue when importing a script through cPanel phpMyAdmin since last week.

The following named table-level CHECK constraint is rejected when included inside the CREATE TABLE statement:

CREATE TABLE table_name (
PrimaryKeyId INT UNSIGNED NOT NULL,
NextSequence INT UNSIGNED NOT NULL DEFAULT 1,
CreatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
UpdatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (PrimaryKeyId),
CONSTRAINT chk_next_sequence CHECK (NextSequence >= 1),
CONSTRAINT fk_name FOREIGN KEY (PrimaryKeyId) REFERENCES foreign_table_name (PrimaryKeyId)
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB;

A symbol name was expected! A reserved keyword can not be used as a column name without backquotes. (near "CHECK" at position xyz)
Unexpected beginning of statement. (near "NextSequence" at position 213)
Unexpected beginning of statement. (near "1" at position 229)
Unrecognized statement type. (near "ENGINE" at position 235)

How to Reproduce

No response

Expected behavior

No response

Screenshots

No response

Operating System

No response

Web Server

No response

Database Server

MariaDB

Database version

10.6.28-MariaDB

PHP version

8.4.27

phpMyAdmin version

5.2.3

browser

Microsoft Edge. But not sure if it is relevant in this case.

Additional context

Hi,
Using the CHECK keyword used to work perfectly fine until last week. Here is more information:

Database Server:
Server: Localhost via UNIX socket
Server type: MariaDB
Server connection: SSL is not being used Documentation
Server version: 10.6.28-MariaDB - MariaDB Server
Protocol version: 10
Server charset: cp1252 West European (latin1)

Web server:
cpsrvd 11.136.0.50
Database client version: libmysql - mysqlnd 8.4.27
PHP extension: mysqli Documentation curl Documentation mbstring Documentation
PHP version: 8.4.27

phpMyAdmin:
Version information: 5.2.3

Activity

  1. added
    BugA problem or regression with an existing feature
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA problem or regression with an existing feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions