Commit 33781f64 authored by jmiller@mysql.com's avatar jmiller@mysql.com

Missed a check in of new results for rpl_relay_space_myisam

parent ea22f9ea
......@@ -7,7 +7,7 @@ start slave;
SHOW VARIABLES LIKE 'relay_log_space_limit';
Variable_name Value
relay_log_space_limit 0
CREATE TABLE t1 (name varchar(64), age smallint(3));
CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM;
INSERT INTO t1 SET name='Andy', age=31;
INSERT t1 SET name='Jacob', age=2;
INSERT into t1 SET name='Caleb', age=1;
......
......@@ -17,8 +17,8 @@ BEGIN
DECLARE done INT DEFAULT 0;
DECLARE spa CHAR(16);
DECLARE spb,spc INT;
DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1;
DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2;
DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1 ORDER BY id;
DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2 ORDER BY id2;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
OPEN cur1;
OPEN cur2;
......@@ -46,13 +46,13 @@ END|
< ---- Master selects-- >
-------------------------
CALL test.p2();
SELECT * FROM test.t1;
SELECT * FROM test.t1 ORDER BY id;
id data
8 MySQL
20 ROCKS
11 Texas
10 kyle
SELECT * FROM test.t2;
11 Texas
20 ROCKS
SELECT * FROM test.t2 ORDER BY id2;
id2
1
2
......@@ -61,13 +61,13 @@ id2
< ---- Slave selects-- >
------------------------
SELECT * FROM test.t1;
SELECT * FROM test.t1 ORDER BY id;
id data
8 MySQL
20 ROCKS
11 Texas
10 kyle
SELECT * FROM test.t2;
11 Texas
20 ROCKS
SELECT * FROM test.t2 ORDER BY id2;
id2
1
2
......@@ -77,21 +77,21 @@ id2
< ---- Master selects-- >
-------------------------
CALL test.p1();
SELECT * FROM test.t3;
SELECT * FROM test.t3 ORDER BY id3;
id3 c
1 MySQL
2 ROCKS
2 kyle
3 Texas
4 kyle
4 ROCKS
< ---- Slave selects-- >
------------------------
SELECT * FROM test.t3;
SELECT * FROM test.t3 ORDER BY id3;
id3 c
1 MySQL
2 ROCKS
2 kyle
3 Texas
4 kyle
4 ROCKS
ALTER PROCEDURE test.p1 MODIFIES SQL DATA;
DROP PROCEDURE IF EXISTS test.p1;
DROP PROCEDURE IF EXISTS test.p2;
......
......@@ -49,28 +49,28 @@ END;
END IF;
END|
CALL test.p1('a');
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
a
1
3
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
a
1
3
truncate test.t2;
call test.p1('b');
select * from test.t2;
select * from test.t2 ORDER BY a;
a
2
4
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
a
2
4
truncate test.t2;
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
a
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
a
DROP PROCEDURE test.p1;
DROP TABLE test.t1;
......
......@@ -21,15 +21,15 @@ CREATE TABLE mysqltest1.t5 (qty INT, price INT, total INT, PRIMARY KEY(qty));
INSERT INTO mysqltest1.t1 VALUES (1,'Thank'),(2,'it'),(3,'Friday');
INSERT INTO mysqltest1.t2 VALUES (1,'GOD'),(2,'is'),(3,'TGIF');
INSERT INTO mysqltest1.t4 VALUES(1, 3, 50),(2, 18, 3),(4, 4, 4);
CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4;
CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a;
CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4 ORDER BY qty;
CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a ORDER BY a;
CREATE VIEW mysqltest1.v3 AS SELECT * FROM mysqltest1.t1;
CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL CHECK OPTION;
SELECT * FROM mysqltest1.v2;
qty price value
3 50 150
18 3 54
4 4 16
18 3 54
SELECT * FROM mysqltest1.v1;
a c c2
1 Thank GOD
......@@ -38,8 +38,8 @@ a c c2
SELECT * FROM mysqltest1.v2;
qty price value
3 50 150
18 3 54
4 4 16
18 3 54
SELECT * FROM mysqltest1.v1;
a c c2
1 Thank GOD
......@@ -47,45 +47,45 @@ a c c2
3 Friday TGIF
INSERT INTO mysqltest1.t5 SELECT * FROM mysqltest1.v2;
INSERT INTO mysqltest1.t3 SELECT * FROM mysqltest1.v1;
SELECT * FROM mysqltest1.t5;
SELECT * FROM mysqltest1.t5 ORDER BY qty;
qty price total
3 50 150
18 3 54
4 4 16
SELECT * FROM mysqltest1.t3;
18 3 54
SELECT * FROM mysqltest1.t3 ORDER BY a;
a c c2
1 Thank GOD
2 it is
3 Friday TGIF
SELECT * FROM mysqltest1.t5;
SELECT * FROM mysqltest1.t5 ORDER BY qty;
qty price total
3 50 150
18 3 54
4 4 16
SELECT * FROM mysqltest1.t3;
18 3 54
SELECT * FROM mysqltest1.t3 ORDER BY a;
a c c2
1 Thank GOD
2 it is
3 Friday TGIF
INSERT INTO mysqltest1.v4 VALUES (4,'TEST');
SELECT * FROM mysqltest1.t1;
SELECT * FROM mysqltest1.t1 ORDER BY a;
a c
1 Thank
2 it
3 Friday
4 TEST
SELECT * FROM mysqltest1.v4;
SELECT * FROM mysqltest1.v4 ORDER BY a;
a c
2 it
3 Friday
4 TEST
SELECT * FROM mysqltest1.t1;
SELECT * FROM mysqltest1.t1 ORDER BY a;
a c
1 Thank
2 it
3 Friday
4 TEST
SELECT * FROM mysqltest1.v4;
SELECT * FROM mysqltest1.v4 ORDER BY a;
a c
2 it
3 Friday
......
......@@ -6,7 +6,8 @@
# Test: Tests SPs with cursors, flow logic, and alter sp. In addition the #
# tests SPs with insert and update operations. #
#############################################################################
# 2006-02-08 By JBM added ORDER BY for use with NDB engine
#############################################################################
# Includes
-- source include/have_binlog_format_row.inc
......@@ -35,8 +36,8 @@ BEGIN
DECLARE done INT DEFAULT 0;
DECLARE spa CHAR(16);
DECLARE spb,spc INT;
DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1;
DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2;
DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1 ORDER BY id;
DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2 ORDER BY id2;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
OPEN cur1;
......@@ -68,28 +69,28 @@ delimiter ;|
let $message=< ---- Master selects-- >;
--source include/show_msg.inc
CALL test.p2();
SELECT * FROM test.t1;
SELECT * FROM test.t2;
SELECT * FROM test.t1 ORDER BY id;
SELECT * FROM test.t2 ORDER BY id2;
let $message=< ---- Slave selects-- >;
--source include/show_msg.inc
save_master_pos;
connection slave;
sync_with_master;
SELECT * FROM test.t1;
SELECT * FROM test.t2;
SELECT * FROM test.t1 ORDER BY id;
SELECT * FROM test.t2 ORDER BY id2;
let $message=< ---- Master selects-- >;
--source include/show_msg.inc
connection master;
CALL test.p1();
sleep 6;
SELECT * FROM test.t3;
SELECT * FROM test.t3 ORDER BY id3;
let $message=< ---- Slave selects-- >;
--source include/show_msg.inc
connection slave;
SELECT * FROM test.t3;
SELECT * FROM test.t3 ORDER BY id3;
connection master;
......
......@@ -5,6 +5,8 @@
#############################################################################
#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=12168 #
#############################################################################
# 2006-02-08 By JBM : Added order by for ndb engine use
#############################################################################
# Includes
-- source include/have_binlog_format_row.inc
......@@ -68,29 +70,29 @@ END|
delimiter ;|
CALL test.p1('a');
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
save_master_pos;
connection slave;
sync_with_master;
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
connection master;
truncate test.t2;
# this next call fails, but should not
call test.p1('b');
select * from test.t2;
select * from test.t2 ORDER BY a;
save_master_pos;
connection slave;
sync_with_master;
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
connection master;
truncate test.t2;
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
save_master_pos;
connection slave;
sync_with_master;
SELECT * FROM test.t2;
SELECT * FROM test.t2 ORDER BY a;
connection master;
......
......@@ -5,7 +5,8 @@
#############################################################################
#TEST: row based replication of views #
#############################################################################
# 2006-02-08 By JBM added order by and sleep for use with ndb engine
#############################################################################
# Includes
-- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
......@@ -34,14 +35,19 @@ INSERT INTO mysqltest1.t2 VALUES (1,'GOD'),(2,'is'),(3,'TGIF');
INSERT INTO mysqltest1.t4 VALUES(1, 3, 50),(2, 18, 3),(4, 4, 4);
CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4;
CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a;
CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4 ORDER BY qty;
CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a ORDER BY a;
CREATE VIEW mysqltest1.v3 AS SELECT * FROM mysqltest1.t1;
CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL CHECK OPTION;
SELECT * FROM mysqltest1.v2;
SELECT * FROM mysqltest1.v1;
# Had to add a sleep for use with NDB
# engine. Injector thread would have not
# populated biblog and data would not be on
# the slave.
sleep 10;
sync_slave_with_master;
SELECT * FROM mysqltest1.v2;
SELECT * FROM mysqltest1.v1;
......@@ -50,20 +56,20 @@ connection master;
INSERT INTO mysqltest1.t5 SELECT * FROM mysqltest1.v2;
INSERT INTO mysqltest1.t3 SELECT * FROM mysqltest1.v1;
SELECT * FROM mysqltest1.t5;
SELECT * FROM mysqltest1.t3;
SELECT * FROM mysqltest1.t5 ORDER BY qty;
SELECT * FROM mysqltest1.t3 ORDER BY a;
sync_slave_with_master;
SELECT * FROM mysqltest1.t5;
SELECT * FROM mysqltest1.t3;
SELECT * FROM mysqltest1.t5 ORDER BY qty;
SELECT * FROM mysqltest1.t3 ORDER BY a;
connection master;
INSERT INTO mysqltest1.v4 VALUES (4,'TEST');
SELECT * FROM mysqltest1.t1;
SELECT * FROM mysqltest1.v4;
SELECT * FROM mysqltest1.t1 ORDER BY a;
SELECT * FROM mysqltest1.v4 ORDER BY a;
sync_slave_with_master;
SELECT * FROM mysqltest1.t1;
SELECT * FROM mysqltest1.v4;
SELECT * FROM mysqltest1.t1 ORDER BY a;
SELECT * FROM mysqltest1.v4 ORDER BY a;
connection master;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment