[Commits] 100249b: Merge branch '5.5-galera' into 10.0-galera

Nirbhay Choubey nirbhay at mariadb.com
Tue Mar 10 15:23:04 EET 2015


revision-id: 100249be6aa00288081b2374db105a81cc525daf
parent(s): 56bbc0a2308355d0d40d0222a399aac3149c5022 07ff90e99b40f86511651415d13a3299a45a01d4
committer: Nirbhay Choubey
branch nick: 5.5-galera
timestamp: 2015-03-10 09:23:03 -0400
message:

Merge branch '5.5-galera' into 10.0-galera

Conflicts:
	storage/innobase/dict/dict0dict.c
	storage/xtradb/dict/dict0dict.c


 mysql-test/suite/galera/galera_2nodes.cnf  |  4 +--
 mysql-test/suite/innodb/r/innodb-fk.result | 34 +++++++++++++++++++++++++
 mysql-test/suite/innodb/t/innodb-fk.test   | 40 ++++++++++++++++++++++++++++++
 mysql-test/suite/wsrep/my.cnf              |  2 +-
 4 files changed, 77 insertions(+), 3 deletions(-)

diff --cc mysql-test/suite/galera/galera_2nodes.cnf
index 57546c3,91f9861..38a5775
--- a/mysql-test/suite/galera/galera_2nodes.cnf
+++ b/mysql-test/suite/galera/galera_2nodes.cnf
@@@ -16,9 -16,8 +16,9 @@@ wsrep-sync-wait=
  #galera_port=@OPT.port
  #ist_port=@OPT.port
  #sst_port=@OPT.port
- wsrep_provider_options='base_port=@mysqld.1.#galera_port'
+ wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
  wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
 +wsrep_node_incoming_address=127.0.0.1
  
  [mysqld.2]
  #galera_port=@OPT.port
diff --cc mysql-test/suite/innodb/r/innodb-fk.result
index cf883d8,3c55753..82ac412
--- a/mysql-test/suite/innodb/r/innodb-fk.result
+++ b/mysql-test/suite/innodb/r/innodb-fk.result
@@@ -33,3 -33,35 +33,37 @@@ select * from fk_29
  f1
  29
  drop table t1;
+ CREATE TABLE t1 (
+ id int(11) NOT NULL AUTO_INCREMENT,
+ f1 int(11) DEFAULT NULL,
+ PRIMARY KEY (id),
+ CONSTRAINT fk1 FOREIGN KEY (f1) REFERENCES t1 (id) ON DELETE CASCADE
+ ) ENGINE=InnoDB;
+ CREATE TABLE t2 (
+ id int(11) NOT NULL AUTO_INCREMENT,
+ f2 int(11) NOT NULL,
+ f3 int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE,
+ CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
+ ) ENGINE=InnoDB;
 -ERROR HY000: Can't create table 'test.t2' (errno: 150)
++ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+ show warnings;
+ Level	Code	Message
 -Error	1005	Can't create table 'test.t2' (errno: 150)
++Error	1005	Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
++Warning	1215	Cannot add foreign key constraint
+ CREATE TABLE t2 (
+ id int(11) NOT NULL AUTO_INCREMENT,
+ f2 int(11) NOT NULL,
+ f3 int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
+ ) ENGINE=InnoDB;
+ ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE;
 -ERROR HY000: Can't create table '#sql-temporary' (errno: 150)
++ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
+ show warnings;
+ Level	Code	Message
 -Error	1005	Can't create table '#sql-temporary' (errno: 150)
++Error	1005	Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
++Warning	1215	Cannot add foreign key constraint
+ drop table t2;
+ drop table t1;
diff --cc mysql-test/suite/innodb/t/innodb-fk.test
index 9839cd2,9bfd16b..2c2a8c7
--- a/mysql-test/suite/innodb/t/innodb-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-fk.test
@@@ -84,3 -84,43 +84,43 @@@ while ($i
  
  drop table t1;
  
+ #
+ # MDEV-7672: Crash creating an InnoDB table with foreign keys
+ #
+ 
+ CREATE TABLE t1 (
+   id int(11) NOT NULL AUTO_INCREMENT,
+   f1 int(11) DEFAULT NULL,
+   PRIMARY KEY (id),
+   CONSTRAINT fk1 FOREIGN KEY (f1) REFERENCES t1 (id) ON DELETE CASCADE
+ ) ENGINE=InnoDB;
+ 
+ --error 1005
+ CREATE TABLE t2 (
+   id int(11) NOT NULL AUTO_INCREMENT,
+   f2 int(11) NOT NULL,
+   f3 int(11) NOT NULL,
+   PRIMARY KEY (`id`),
+   CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE,
+   CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
+ ) ENGINE=InnoDB;
+ 
+ show warnings;
+ 
+ CREATE TABLE t2 (
+   id int(11) NOT NULL AUTO_INCREMENT,
+   f2 int(11) NOT NULL,
+   f3 int(11) NOT NULL,
+   PRIMARY KEY (`id`),
+   CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
+ ) ENGINE=InnoDB;
+ 
 ---replace_regex /'test\.#sql-[0-9_a-f-]*'/'#sql-temporary'/
++--replace_regex /#sql-[0-9_a-f-]*/#sql-temporary/
+ --error 1005
+ ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE;
+ 
 ---replace_regex /'test\.#sql-[0-9_a-f-]*'/'#sql-temporary'/
++--replace_regex /#sql-[0-9_a-f-]*/#sql-temporary/
+ show warnings;
+ 
+ drop table t2;
+ drop table t1;


More information about the commits mailing list