mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
04c5af1802
MASTER_POS_WAIT return values are different than expected when the server is not a slave. It returns -1 instead of NULL. Fixed with correcting st_relay_log_info::wait_for_pos() to return the proper value in the case of rli info is not inited. mysql-test/r/rpl_master_pos_wait.result: results changed mysql-test/t/rpl_master_pos_wait.test: the new test to check that select master_pos_wait() to a server does not have master info returns NULL as specified. sql/slave.cc: changing the return value to correspond the specification.
24 lines
803 B
Text
24 lines
803 B
Text
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;
|
|
select master_pos_wait('master-bin.999999',0,2);
|
|
master_pos_wait('master-bin.999999',0,2)
|
|
-1
|
|
explain extended select master_pos_wait('master-bin.999999',0,2);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)`
|
|
select master_pos_wait('master-bin.999999',0);
|
|
stop slave sql_thread;
|
|
master_pos_wait('master-bin.999999',0)
|
|
NULL
|
|
"*** must be empty ***"
|
|
show slave status;
|
|
"*** must be NULL ***"
|
|
select master_pos_wait('foo', 98);
|
|
master_pos_wait('foo', 98)
|
|
NULL
|