Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
None
-
None
Description
CREATE TABLE A ( |
id bigint NOT NULL AUTO_INCREMENT PRIMARY KEY |
);
|
|
CREATE TABLE B ( |
what tinyint NOT NULL, |
a bigint NOT NULL, |
CONSTRAINT x FOREIGN KEY (a) REFERENCES A(id), |
CONSTRAINT y CHECK (what > 0) |
);
|
|
-- Uncommenting the next line "fixes" an error
|
-- INSERT INTO И VALUES (1,1);
|
|
SELECT b.a FROM B b; |
|
-- the next statement produces an error
|
-- Unknown column '`db_name`.`b`.`what`' in 'CHECK'
|
ALTER TABLE B DROP CONSTRAINT x; |
online fiddle: https://dbfiddle.uk/?rdbms=mariadb_10.3&rdbms2=mariadb_10.5&fiddle=eefa7abc9c4eab79dcef5e0c79e1e985
Attachments
Issue Links
- is duplicated by
-
MDEV-25672 table alias from previous statement interferes later commands
- Closed