1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-08 15:01:49 +03:00
mariadb/mysql-test/t/rpl_redirect.test
monty@mysql.com 6fbc869d18 A lot of fixes for prepared statements (PS):
New mysqltest that can run mysqltest with PS
Added support for ZEROFILL in PS
Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result()
Updated test cases to support --ps-protocol
(Some tests are still run using old protocol)
Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2...
Fixed crash in PS when using sub queries
Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever"
Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries)
Fix for PS and SELECT ... PROCEDURE
Reset all warnings when executing a new PS query
group_concat(...ORDER BY) didn't work with PS
Fixed problem with test suite when not using innodb
2004-10-26 19:30:01 +03:00

44 lines
997 B
Plaintext

#
# Test of automatic redirection of queries to master/slave.
#
source include/master-slave.inc;
# We disable this for now as PS doesn't handle redirection
--disable_ps_protocol
#first, make sure the slave has had enough time to register
save_master_pos;
connection slave;
sync_with_master;
#discover slaves
connection master;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 33 #
SHOW SLAVE STATUS;
--replace_result $SLAVE_MYPORT SLAVE_PORT
SHOW SLAVE HOSTS;
rpl_probe;
#turn on master/slave query direction auto-magic
enable_rpl_parse;
create table t1 ( n int);
insert into t1 values (1),(2),(3),(4);
disable_rpl_parse;
save_master_pos;
connection slave;
sync_with_master;
insert into t1 values(5);
connection master;
enable_rpl_parse;
# The first of the queries will be sent to the slave, the second to the master.
select * from t1;
select * from t1;
disable_rpl_parse;
select * from t1;
connection slave;
select * from t1;
drop table t1;
connection master;
drop table t1;