Browse Source
MDEV-20729 Fix REFERENCES constraint in column definition
MDEV-20729 Fix REFERENCES constraint in column definition
Add support of referential constraints directly in column defininions: create table t1 (id1 int primary key); create table t2 (id2 int references t1(id1)); Referenced field name can be omitted if equal to foreign field name: create table t1 (id int primary key); create table t2 (id int references t1); Until 10.5 this syntax was understood by the parser but was silently ignored. In case of generated columns this syntax is disabled at parser level by ER_PARSE_ERROR. Note that separate FOREIGN KEY clause for generated columns is disabled at storage engine level.pull/1415/head
20 changed files with 274 additions and 65 deletions
-
2libmariadb
-
2mysql-test/main/foreign_key.result
-
2mysql-test/main/foreign_key.test
-
1mysql-test/suite/funcs_1/r/is_statistics.result
-
1mysql-test/suite/funcs_1/r/is_statistics_mysql.result
-
2mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
-
6mysql-test/suite/gcol/inc/gcol_column_def_options.inc
-
4mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
-
4mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
-
44mysql-test/suite/innodb/r/foreign_key.result
-
23mysql-test/suite/innodb/t/foreign_key.test
-
6mysql-test/suite/vcol/inc/vcol_column_def_options.inc
-
6mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result
-
6mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result
-
38mysql-test/suite/versioning/r/foreign.result
-
43mysql-test/suite/versioning/t/foreign.test
-
68sql/sql_lex.cc
-
9sql/sql_lex.h
-
36sql/sql_yacc.yy
-
36sql/sql_yacc_ora.yy
@ -1 +1 @@ |
|||
Subproject commit 980f2dbea6586091333057bb2994b18747466942 |
|||
Subproject commit 261a5c435581c8d6c6341afac95bcc5c96d1435c |
Write
Preview
Loading…
Cancel
Save
Reference in new issue