Commit 55dc3dcb authored by unknown's avatar unknown

Added resetting of replace_result patterns after --exec command in mysqltest...

Added resetting of replace_result patterns after --exec command in mysqltest (in order to be consistent with ordinary query execution).


client/mysqltest.c:
  Now resetting replace_result patterns after --exec command (in order to be consistent with ordinary query execution).
mysql-test/t/mysqlbinlog.test:
  Added additional replaces potentially needed after adding reset of replace conditions for exec
parent ad0a7a30
......@@ -866,6 +866,10 @@ int do_exec(struct st_query* q)
while (fgets(buf, sizeof(buf), res_file))
replace_dynstr_append_mem(ds, buf, strlen(buf));
pclose(res_file);
if (glob_replace)
free_replace();
if (record)
{
if (!q->record_file[0] && !result_file)
......
......@@ -40,10 +40,12 @@ select "--- Local --" as "";
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.001
# this should not fail but shouldn't produce any working statements
--disable_query_log
select "--- Broken LOAD DATA --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.002
# this should show almost nothing
......@@ -73,24 +75,28 @@ select "--- Remote --" as "";
# This is broken now
# By the way it seems that remote version fetches all events with name >= master-bin.001
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.001
# This is broken too
--disable_query_log
select "--- Broken LOAD DATA --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.002
# And this too ! (altough it is documented)
--disable_query_log
select "--- --database --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --database=nottest master-bin.001
# Strangely but this works
--disable_query_log
select "--- --position --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --position=27 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.002
# clean up
......
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