diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
commit | 76f0b94bb0b2994d639353530c5b251d0f1a204b (patch) | |
tree | 9ed50628aac34f89a37637bab2fc4915b86b5eb4 /mysql-test/suite/rpl/r/rpl_row_index_choice.result | |
parent | 4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff) | |
parent | 5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff) | |
download | mariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz |
merge with 5.3
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_row_index_choice.result')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_row_index_choice.result | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_row_index_choice.result b/mysql-test/suite/rpl/r/rpl_row_index_choice.result new file mode 100644 index 00000000000..2d955299e6e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_index_choice.result @@ -0,0 +1,140 @@ +include/master-slave.inc +[connection master] +CREATE TABLE t1 (a int, b varchar(100), fulltext(b)) engine=MyISAM; +INSERT INTO t1 VALUES (1,"a"), (2,"b"); +UPDATE t1 SET b='A' WHERE a=1; +DELETE FROM t1 WHERE a=2; +SELECT * FROM t1 ORDER BY a; +a b +1 A +DROP TABLE t1; +CREATE TABLE t1 (d INT PRIMARY KEY) ENGINE=myisam; +INSERT INTO t1 VALUES (0); +INSERT INTO t1 SELECT d+1 FROM t1; +INSERT INTO t1 SELECT d+2 FROM t1; +INSERT INTO t1 SELECT d+4 FROM t1; +INSERT INTO t1 SELECT d+8 FROM t1; +INSERT INTO t1 SELECT d+16 FROM t1; +INSERT INTO t1 SELECT d+32 FROM t1; +INSERT INTO t1 SELECT d+64 FROM t1; +INSERT INTO t1 SELECT d+128 FROM t1; +INSERT INTO t1 SELECT d+256 FROM t1; +INSERT INTO t1 SELECT d+512 FROM t1; +CREATE TABLE t2 (a INT, b INT, c INT, d INT, +KEY wrong_key(a), +KEY expected_key(b,c), +KEY wrong_key2(c)) ENGINE=myisam; +INSERT INTO t2 SELECT d DIV 10, d MOD 41, d MOD 37, d FROM t1; +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +# Slave will crash if using the wrong or no index +SET GLOBAL debug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; +UPDATE t2 SET d=10042 WHERE d=42; +DELETE FROM t2 WHERE d=53; +SET GLOBAL debug=""; +SELECT * FROM t2 WHERE d IN (10042,53); +a b c d +4 1 5 10042 +DROP TABLE t2; +CREATE TABLE t2 (a INT, b INT, c INT, d INT NOT NULL, e INT, +UNIQUE wrong_key3(a,e), +KEY wrong_key4(b,c), +UNIQUE expected_key(d)) ENGINE=myisam; +INSERT INTO t2 SELECT d DIV 10, d MOD 41, d MOD 37, d, NULL FROM t1; +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +# Slave will crash if using the wrong or no index +SET GLOBAL debug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; +UPDATE t2 SET d=10042 WHERE d=42; +DELETE FROM t2 WHERE d=53; +SET GLOBAL debug=""; +SELECT * FROM t2 WHERE d IN (10042,53); +a b c d e +4 1 5 10042 NULL +DROP TABLE t2; +CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT NOT NULL, +KEY wrong_key5(b), +UNIQUE expected_key(d), +KEY wrong_key6(c)) ENGINE=myisam; +INSERT INTO t2 SELECT d DIV 10, d MOD 41, d MOD 37, d FROM t1; +# Slave will crash if using the wrong or no index +SET GLOBAL debug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; +UPDATE t2 SET d=10042 WHERE d=42; +DELETE FROM t2 WHERE d=53; +SET GLOBAL debug=""; +SELECT * FROM t2 WHERE d IN (10042,53); +a b c d +4 1 5 10042 +DROP TABLE t2; +CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT NOT NULL, +KEY expected_key(b), +KEY wrong_key7(d), +KEY wrong_key8(c)) ENGINE=myisam; +INSERT INTO t2 SELECT d DIV 10, d MOD 41, d MOD 37, d FROM t1; +# Slave will crash if using the wrong or no index +SET GLOBAL debug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; +UPDATE t2 SET d=10042 WHERE d=42; +DELETE FROM t2 WHERE d=53; +SET GLOBAL debug=""; +SELECT * FROM t2 WHERE d IN (10042,53); +a b c d +4 1 5 10042 +DROP TABLE t2; +CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT, +UNIQUE wrong_key9(d), +KEY wrong_key10(a), +PRIMARY KEY expected_key(c,b)) ENGINE=innodb; +INSERT INTO t2 SELECT d DIV 10, d MOD 41, d MOD 37, d FROM t1; +# Slave will crash if using the wrong or no index +SET GLOBAL debug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan,slave_crash_if_index_scan"; +UPDATE t2 SET d=10042 WHERE d=42; +DELETE FROM t2 WHERE d=53; +SET GLOBAL debug=""; +SELECT * FROM t2 WHERE d IN (10042,53); +a b c d +4 1 5 10042 +DROP TABLE t2; +CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT, e INT, +UNIQUE wrong_key11(e), +KEY wrong_key12(a), +KEY expected_key(c,b)) ENGINE=innodb; +INSERT INTO t2 SELECT d DIV 10, d MOD 41, d MOD 37, d, IF(d<10, d, NULL) FROM t1; +ANALYZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +# Slave will crash if using the wrong or no index +SET GLOBAL debug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; +UPDATE t2 SET d=10042 WHERE d=42; +DELETE FROM t2 WHERE d=53; +SET GLOBAL debug=""; +SELECT * FROM t2 WHERE d IN (10042,53); +a b c d e +4 1 5 10042 NULL +DROP TABLE t2; +CREATE TABLE t2 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT, e INT, +KEY wrong_key13(a), +UNIQUE expected_key(e), +KEY wrong_key14(c,b)) ENGINE=innodb; +INSERT INTO t2 SELECT d DIV 10, d MOD 41, d MOD 37, d, IF(d<10, d, NULL) FROM t1; +# Slave will crash if using the wrong or no index +SET GLOBAL debug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; +UPDATE t2 SET d=10042 WHERE d=42; +DELETE FROM t2 WHERE d=53; +SET GLOBAL debug=""; +SELECT * FROM t2 WHERE d IN (10042,53); +a b c d e +4 1 5 10042 NULL +DROP TABLE t2; +CREATE TABLE t2 (a INT NOT NULL, d INT) ENGINE=innodb; +INSERT INTO t2 SELECT d DIV 10, d FROM t1; +UPDATE t2 SET d=10042 WHERE d=42; +DELETE FROM t2 WHERE d=53; +SELECT * FROM t2 WHERE d IN (10042,53); +a d +4 10042 +DROP TABLE t2; +DROP TABLE t1; +SET GLOBAL debug=""; +include/rpl_end.inc |