1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#39793 Foreign keys not constructed when column has a '#' in a comment or default value

Internal InnoDN FK parser does not recognize '\'' as quotation symbol.
Suggested fix is to add '\'' symbol check for quotation condition
(dict_strip_comments() function).


innobase/dict/dict0dict.c:
  Internal InnoDN FK parser does not recognize '\'' as quotation symbol.
  Suggested fix is to add '\'' symbol check for quotation condition
  (dict_strip_comments() function).
mysql-test/r/innodb_mysql.result:
  test result
mysql-test/t/innodb_mysql.test:
  test case
This commit is contained in:
Sergey Glukhov
2009-05-19 11:32:21 +05:00
parent a7294532b2
commit 0a892c46e0
3 changed files with 22 additions and 1 deletions

View File

@ -1054,4 +1054,13 @@ ROLLBACK;
--error 1305
ROLLBACK TO SAVEPOINT s4;
#
# Bug#39793 Foreign keys not constructed when column has a '#' in a comment or default value
#
#This statement should be written on a single line for proper testing
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY COMMENT 'My ID#', f2 INTEGER DEFAULT NULL, f3 CHAR(10) DEFAULT 'My ID#', CONSTRAINT f2_ref FOREIGN KEY (f2) REFERENCES t1 (f1)) ENGINE=INNODB;
SHOW CREATE TABLE t1;
DROP TABLE t1;
--echo End of 5.0 tests