mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
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
This commit is contained in:
parent
ad0a7a3034
commit
55dc3dcb82
2 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue