diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index 389f20e04077d267137b8db6c8e1cea797733bc4..6f283677bf746852ef33e762ef2143f4e4ad5df1 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -410,7 +410,6 @@ mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a
 mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a 1'
 mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1 b c '
 mysqltest: At line 1: Invalid integer argument "10!"
-mysqltest: At line 1: End of line junk detected: "!"
 mysqltest: At line 1: Invalid integer argument "a"
 mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
 mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 42541dea22688c964ce1bd5ab496caf8f58d1dae..2b2f1348417afaa1aebfbe1d53189f292a551943 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -1227,11 +1227,9 @@ select "a" as col1, "c" as col2;
 # Test sync_with_master
 # ----------------------------------------------------------------------------
 --error 1
---exec echo "save_master_pos; sync_with_master 10!;" | $MYSQL_TEST 2>&1
+--exec echo "sync_with_master 10!;" | $MYSQL_TEST 2>&1
 --error 1
---exec echo "save_master_pos; sync_with_master 10 !;" | $MYSQL_TEST 2>&1
---error 1
---exec echo "save_master_pos; sync_with_master a;" | $MYSQL_TEST 2>&1
+--exec echo "sync_with_master a;" | $MYSQL_TEST 2>&1
 
 # ----------------------------------------------------------------------------
 # Test connect