Loading mysql-test/r/information_schema.result +1 −1 Original line number Diff line number Diff line Loading @@ -57,8 +57,8 @@ TABLES TABLE_CONSTRAINTS TABLE_PRIVILEGES TRIGGERS VIEWS USER_PRIVILEGES VIEWS binlog_index columns_priv db Loading mysql-test/r/information_schema_db.result +1 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ TABLES TABLE_CONSTRAINTS TABLE_PRIVILEGES TRIGGERS VIEWS USER_PRIVILEGES VIEWS show tables from INFORMATION_SCHEMA like 'T%'; Tables_in_information_schema (T%) TABLES Loading mysql-test/r/join_nested.result +23 −0 Original line number Diff line number Diff line Loading @@ -1481,3 +1481,26 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref a a 5 test.t1.a 1 1 SIMPLE t3 ref a a 5 test.t2.a 1 drop table t1, t2, t3; CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10)); CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10)); CREATE TABLE t3 (cid int NOT NULL PRIMARY KEY, id int NOT NULL, pid int NOT NULL); INSERT INTO t1 VALUES (1, 'A'), (3, 'C'); INSERT INTO t2 VALUES (1, 'A'), (3, 'C'); INSERT INTO t3 VALUES (1, 1, 1), (3, 3, 3); SELECT * FROM t1 p LEFT JOIN (t3 JOIN t1) ON (t1.id=t3.id AND t1.type='B' AND p.id=t3.id) LEFT JOIN t2 ON (t3.pid=t2.pid) WHERE p.id=1; id type cid id pid id type pid type 1 A NULL NULL NULL NULL NULL NULL NULL CREATE VIEW v1 AS SELECT t3.* FROM t3 JOIN t1 ON t1.id=t3.id AND t1.type='B'; SELECT * FROM t1 p LEFT JOIN v1 ON p.id=v1.id LEFT JOIN t2 ON v1.pid=t2.pid WHERE p.id=1; id type cid id pid pid type 1 A NULL NULL NULL NULL NULL DROP VIEW v1; DROP TABLE t1,t2,t3; mysql-test/r/rpl_ignore_table.result 0 → 100644 +16 −0 Original line number Diff line number Diff line stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; **** Test case for BUG#16487 **** **** Master **** CREATE TABLE test.t4 (a int); CREATE TABLE test.t1 (a int); UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5; **** Slave **** SELECT * FROM t4; a DROP TABLE t1; DROP TABLE t4; mysql-test/t/join_nested.test +28 −0 Original line number Diff line number Diff line Loading @@ -914,3 +914,31 @@ explain select * from t1 left join on (t1.a = t2.a); drop table t1, t2, t3; # # Bug #16260: single row table in the inner nest of an outer join # CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10)); CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10)); CREATE TABLE t3 (cid int NOT NULL PRIMARY KEY, id int NOT NULL, pid int NOT NULL); INSERT INTO t1 VALUES (1, 'A'), (3, 'C'); INSERT INTO t2 VALUES (1, 'A'), (3, 'C'); INSERT INTO t3 VALUES (1, 1, 1), (3, 3, 3); SELECT * FROM t1 p LEFT JOIN (t3 JOIN t1) ON (t1.id=t3.id AND t1.type='B' AND p.id=t3.id) LEFT JOIN t2 ON (t3.pid=t2.pid) WHERE p.id=1; CREATE VIEW v1 AS SELECT t3.* FROM t3 JOIN t1 ON t1.id=t3.id AND t1.type='B'; SELECT * FROM t1 p LEFT JOIN v1 ON p.id=v1.id LEFT JOIN t2 ON v1.pid=t2.pid WHERE p.id=1; DROP VIEW v1; DROP TABLE t1,t2,t3; Loading
mysql-test/r/information_schema.result +1 −1 Original line number Diff line number Diff line Loading @@ -57,8 +57,8 @@ TABLES TABLE_CONSTRAINTS TABLE_PRIVILEGES TRIGGERS VIEWS USER_PRIVILEGES VIEWS binlog_index columns_priv db Loading
mysql-test/r/information_schema_db.result +1 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ TABLES TABLE_CONSTRAINTS TABLE_PRIVILEGES TRIGGERS VIEWS USER_PRIVILEGES VIEWS show tables from INFORMATION_SCHEMA like 'T%'; Tables_in_information_schema (T%) TABLES Loading
mysql-test/r/join_nested.result +23 −0 Original line number Diff line number Diff line Loading @@ -1481,3 +1481,26 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref a a 5 test.t1.a 1 1 SIMPLE t3 ref a a 5 test.t2.a 1 drop table t1, t2, t3; CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10)); CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10)); CREATE TABLE t3 (cid int NOT NULL PRIMARY KEY, id int NOT NULL, pid int NOT NULL); INSERT INTO t1 VALUES (1, 'A'), (3, 'C'); INSERT INTO t2 VALUES (1, 'A'), (3, 'C'); INSERT INTO t3 VALUES (1, 1, 1), (3, 3, 3); SELECT * FROM t1 p LEFT JOIN (t3 JOIN t1) ON (t1.id=t3.id AND t1.type='B' AND p.id=t3.id) LEFT JOIN t2 ON (t3.pid=t2.pid) WHERE p.id=1; id type cid id pid id type pid type 1 A NULL NULL NULL NULL NULL NULL NULL CREATE VIEW v1 AS SELECT t3.* FROM t3 JOIN t1 ON t1.id=t3.id AND t1.type='B'; SELECT * FROM t1 p LEFT JOIN v1 ON p.id=v1.id LEFT JOIN t2 ON v1.pid=t2.pid WHERE p.id=1; id type cid id pid pid type 1 A NULL NULL NULL NULL NULL DROP VIEW v1; DROP TABLE t1,t2,t3;
mysql-test/r/rpl_ignore_table.result 0 → 100644 +16 −0 Original line number Diff line number Diff line stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; **** Test case for BUG#16487 **** **** Master **** CREATE TABLE test.t4 (a int); CREATE TABLE test.t1 (a int); UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5; **** Slave **** SELECT * FROM t4; a DROP TABLE t1; DROP TABLE t4;
mysql-test/t/join_nested.test +28 −0 Original line number Diff line number Diff line Loading @@ -914,3 +914,31 @@ explain select * from t1 left join on (t1.a = t2.a); drop table t1, t2, t3; # # Bug #16260: single row table in the inner nest of an outer join # CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10)); CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10)); CREATE TABLE t3 (cid int NOT NULL PRIMARY KEY, id int NOT NULL, pid int NOT NULL); INSERT INTO t1 VALUES (1, 'A'), (3, 'C'); INSERT INTO t2 VALUES (1, 'A'), (3, 'C'); INSERT INTO t3 VALUES (1, 1, 1), (3, 3, 3); SELECT * FROM t1 p LEFT JOIN (t3 JOIN t1) ON (t1.id=t3.id AND t1.type='B' AND p.id=t3.id) LEFT JOIN t2 ON (t3.pid=t2.pid) WHERE p.id=1; CREATE VIEW v1 AS SELECT t3.* FROM t3 JOIN t1 ON t1.id=t3.id AND t1.type='B'; SELECT * FROM t1 p LEFT JOIN v1 ON p.id=v1.id LEFT JOIN t2 ON v1.pid=t2.pid WHERE p.id=1; DROP VIEW v1; DROP TABLE t1,t2,t3;