You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: the CHECK keyword creates syntax error since last week #20572
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)
Activity