mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Merge branch '5.5-galera' into 10.0-galera
Conflicts: storage/innobase/dict/dict0dict.c storage/xtradb/dict/dict0dict.c
This commit is contained in:
@@ -16,7 +16,7 @@ wsrep-sync-wait=7
|
||||
#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
|
||||
|
||||
@@ -25,7 +25,7 @@ wsrep_node_incoming_address=127.0.0.1
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
|
||||
[ENV]
|
||||
|
@@ -33,3 +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 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
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 `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
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;
|
||||
|
@@ -84,3 +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 /#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 /#sql-[0-9_a-f-]*/#sql-temporary/
|
||||
show warnings;
|
||||
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
|
@@ -5,5 +5,5 @@
|
||||
#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'
|
||||
|
||||
|
Reference in New Issue
Block a user