1 #############################################################################
2 # Original Author: JBM #
3 # Original Date: Aug/15/2005 #
4 # Update: 08/29/2005 Remove sleep #
5 #############################################################################
6 # TEST: Use SQL_CALC_FOUND_ROWS and insert results into a table inside a sp #
7 #############################################################################
11 -- source include/have_binlog_format_row.inc
12 -- source include/master-slave.inc
14 # Begin clean up test section
17 DROP PROCEDURE IF EXISTS test.p1;
18 DROP TABLE IF EXISTS test.t2;
24 # Begin test section 1
25 CREATE TABLE test.t1 (a INT,PRIMARY KEY(a));
26 CREATE TABLE test.t2 (a INT,PRIMARY KEY(a));
27 INSERT INTO test.t1 VALUES(1),(2);
30 CREATE PROCEDURE test.p1()
32 SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1;
33 INSERT INTO test.t2 VALUES(FOUND_ROWS());
37 let $message=< ---- Master selects-- >;
38 --source include/show_msg.inc
40 SELECT * FROM test.t2;
42 let $message=< ---- Slave selects-- >;
43 --source include/show_msg.inc
47 SELECT * FROM test.t2;
52 DROP PROCEDURE IF EXISTS test.p1;
53 DROP TABLE IF EXISTS test.t1;
54 DROP TABLE IF EXISTS test.t2;
55 sync_slave_with_master;
57 # End of 5.0 test case
58 --source include/rpl_end.inc