mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixed temp tables to work with replication. It will not work if you stop the slave
while slave thread has temp tables - not hard to fix though, but it is time to go to bed added a new test case for temp table replication and Slave_open_temp_tables status variable. Misc fixes client/mysqltest.c: added disconnect command mysql-test/create-test-result: fixed bugs so it actually works mysql-test/t/include/master-slave.inc: establish alternate connections to master and slave sql/mysql_priv.h: Slave_open_temp_tables sql/mysqlbinlog.cc: fixed a bug in reading local binlogs sql/mysqld.cc: added Slave_open_temp_tables status variable sql/slave.cc: fixed freed memory reference in the error message sql/sql_class.cc: slave_proxy_id sql/sql_class.h: slave_proxy_id sql/sql_parse.cc: small optimization - reorder eval in && BitKeeper/etc/ignore: Added mysql-test/r/3.23/rpl000001.b.result.reject mysql-test/r/3.23/rpl000012.result.reject to the ignore list sql/sql_table.cc: added THD arg to rename_temporary_table sql/unireg.h: the table_cache_key is now 4 bytes longer
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
# to start mysqld yourself and run mysqltest -r
|
||||
|
||||
RESULT_DIR=r/3.23
|
||||
if [ -z $EDITOR] then;
|
||||
if [ -z $EDITOR] ; then
|
||||
EDITOR=vi
|
||||
fi
|
||||
|
||||
@@ -26,7 +26,7 @@ test_name=$1
|
||||
|
||||
[ -z $test_name ] && usage
|
||||
|
||||
result_file=$result_dir/$test_name.result
|
||||
result_file=$RESULT_DIR/$test_name.result
|
||||
|
||||
[ -f $result_file ] && die "result file $result_file has already been created"
|
||||
|
||||
@@ -39,11 +39,11 @@ reject_file=$result_file.reject
|
||||
if [ -f $reject_file ] ; then
|
||||
echo "Below are the contents of the reject file:"
|
||||
echo "-----start---------------------"
|
||||
cat $result_file.
|
||||
cat $reject_file
|
||||
echo "-----end-----------------------"
|
||||
echo "Is this the output you expected from your test case?(y/n)[n]"
|
||||
read yes_no
|
||||
if [ x$yes_no = xy ] then;
|
||||
if [ x$yes_no = xy ] ; then
|
||||
echo "Press any key to edit it in $EDITOR, or Ctrl-C to abort"
|
||||
read junk
|
||||
$EDITOR $reject_file
|
||||
|
||||
7
mysql-test/r/3.23/rpl000012.result
Normal file
7
mysql-test/r/3.23/rpl000012.result
Normal file
@@ -0,0 +1,7 @@
|
||||
n
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
2
mysql-test/r/3.23/rpl000012.status.result
Normal file
2
mysql-test/r/3.23/rpl000012.status.result
Normal file
@@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 0
|
||||
19
mysql-test/t/3.23/rpl000012.test
Normal file
19
mysql-test/t/3.23/rpl000012.test
Normal file
@@ -0,0 +1,19 @@
|
||||
source t/include/master-slave.inc;
|
||||
connection master;
|
||||
drop table if exists x;
|
||||
create table x(n int);
|
||||
create temporary table t(n int);
|
||||
insert into t values(1),(2),(3);
|
||||
insert into x select * from t;
|
||||
connection master1;
|
||||
create temporary table t (n int);
|
||||
insert into t values (4),(5);
|
||||
insert into x select * from t;
|
||||
disconnect master;
|
||||
connection master1;
|
||||
insert into x values(6);
|
||||
disconnect master1;
|
||||
connection slave;
|
||||
sleep 1;
|
||||
@r/3.23/rpl000012.result select * from x;
|
||||
@r/3.23/rpl000012.status.result show status like 'Slave_open_temp_tables';
|
||||
@@ -1,5 +1,7 @@
|
||||
connect (master,localhost,root,,test,0,var/tmp/mysql.sock);
|
||||
connect (master1,localhost,root,,test,0,var/tmp/mysql.sock);
|
||||
connect (slave,localhost,root,,test,0,var/tmp/mysql-slave.sock);
|
||||
connect (slave1,localhost,root,,test,0,var/tmp/mysql-slave.sock);
|
||||
connection slave;
|
||||
!slave stop;
|
||||
connection master;
|
||||
|
||||
Reference in New Issue
Block a user