mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
c61fb3c359
Evaluate commands passed to "exec" and "system" to expand any $variables before executing command. client/mysqltest.c: do_exec, do_system - call do_eval on the command to be executed in order to expand any $variables - Remove old subst_env_var and my_popen, not needed anymore Rewrite 'replace_strings' into 'replace_strings_append' - copy whole strings instead of byte by byte copy - insert result directly inito dynamic_string, no need to check if out string needs to be realloced for every byte. - Add comments and DBUG_PRINT's New function 'fix_win_paths', detect filenames in win format that should be converted do_eval - Only set "escaped" if next char is \ or $ mysql-test/mysql-test-run.pl: Always pass path for DBUG .trace file in unix format Add search path client_debug to find debug compiled windows binaries Remove unused MYSQL_TEST_WINDIR and MASTER_WINMYSOCK mysql-test/r/mysqldump.result: Update test result mysql-test/t/client_xml.test: Use " instead of ' mysql-test/t/mysql_client_test.test: Remove the useless "exec echo" command mysql-test/t/mysqltest.test: Escape $variables passed to --exec, that should not be evaluated in exec. mysql-test/t/rpl000015.test: Remove unneccessary replace mysql-test/t/system_mysql_db_fix.test: Call the "shell script" $MYSQL_FIX_SYSTEM_TABLE using --system
41 lines
1.2 KiB
Text
41 lines
1.2 KiB
Text
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
|
|
connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock);
|
|
connection master;
|
|
reset master;
|
|
show master status;
|
|
save_master_pos;
|
|
connection slave;
|
|
reset slave;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
--replace_column 1 # 8 # 9 # 23 # 33 #
|
|
show slave status;
|
|
|
|
change master to master_host='127.0.0.1';
|
|
# The following needs to be cleaned up when change master is fixed
|
|
--replace_result $MYSQL_TCP_PORT MASTER_PORT
|
|
--replace_column 1 # 8 # 9 # 23 # 33 #
|
|
show slave status;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
eval change master to master_host='127.0.0.1',master_user='root',
|
|
master_password='',master_port=$MASTER_MYPORT;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
--replace_column 1 # 8 # 9 # 23 # 33 #
|
|
show slave status;
|
|
start slave;
|
|
sync_with_master;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
--replace_column 1 # 8 # 9 # 23 # 33 #
|
|
show slave status;
|
|
connection master;
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
create table t1 (n int);
|
|
insert into t1 values (10),(45),(90);
|
|
sync_slave_with_master;
|
|
select * from t1;
|
|
connection master;
|
|
drop table t1;
|
|
sync_slave_with_master;
|
|
|
|
# End of 4.1 tests
|