List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:May 19 2009 6:53am
Subject:bzr commit into mysql-6.0-bugteam branch (Sergey.Glukhov:3299)
View as plain text  
#At file:///home/gluh/MySQL/mysql-6.0-bugteam/ based on revid:ramil@stripped

 3299 Sergey Glukhov	2009-05-19 [merge]
      5.1-bugteam->6.0-bugteam merge
     @ mysql-test/include/mix1.inc
        5.1-bugteam->6.0-bugteam merge
     @ mysql-test/r/innodb_mysql.result
        5.1-bugteam->6.0-bugteam merge
     @ storage/innobase/dict/dict0dict.c
        5.1-bugteam->6.0-bugteam merge

    modified:
      mysql-test/include/mix1.inc
      mysql-test/r/innodb_mysql.result
      storage/innobase/dict/dict0dict.c
=== modified file 'mysql-test/include/mix1.inc'
--- a/mysql-test/include/mix1.inc	2009-05-15 13:45:06 +0000
+++ b/mysql-test/include/mix1.inc	2009-05-19 06:52:26 +0000
@@ -1164,6 +1164,15 @@ 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
 
 # Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY

=== modified file 'mysql-test/r/innodb_mysql.result'
--- a/mysql-test/r/innodb_mysql.result	2009-05-15 13:45:06 +0000
+++ b/mysql-test/r/innodb_mysql.result	2009-05-19 06:52:26 +0000
@@ -1411,6 +1411,18 @@ SAVEPOINT s4;
 ROLLBACK;
 ROLLBACK TO SAVEPOINT s4;
 ERROR 42000: SAVEPOINT s4 does not exist
+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;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `f1` int(11) NOT NULL COMMENT 'My ID#',
+  `f2` int(11) DEFAULT NULL,
+  `f3` char(10) DEFAULT 'My ID#',
+  PRIMARY KEY (`f1`),
+  KEY `f2_ref` (`f2`),
+  CONSTRAINT `f2_ref` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
 End of 5.0 tests
 CREATE TABLE `t2` (
 `k` int(11) NOT NULL auto_increment,

=== modified file 'storage/innobase/dict/dict0dict.c'
--- a/storage/innobase/dict/dict0dict.c	2009-01-26 16:03:39 +0000
+++ b/storage/innobase/dict/dict0dict.c	2009-05-19 06:52:26 +0000
@@ -2616,7 +2616,7 @@ scan_more:
 		} else if (quote) {
 			/* Within quotes: do not look for
 			starting quotes or comments. */
-		} else if (*sptr == '"' || *sptr == '`') {
+		} else if (*sptr == '"' || *sptr == '`' || *sptr == '\'') {
 			/* Starting quote: remember the quote character. */
 			quote = *sptr;
 		} else if (*sptr == '#'


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20090519065226-xiqkneemx6qce6ih.bundle
Thread
bzr commit into mysql-6.0-bugteam branch (Sergey.Glukhov:3299)Sergey Glukhov19 May