summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2010-01-20 12:51:18 +0100
committerBjorn Munch <Bjorn.Munch@sun.com>2010-01-20 12:51:18 +0100
commit5ae2eda776477494af7dfe2cad9d50bb4ad8d9eb (patch)
treebc4c01b5f7d3d6b35e3a5b758f8973c67f4a882d /client
parent9ada265d39f290f9388e64e3ac723e3ee2fd9997 (diff)
downloadmariadb-git-5ae2eda776477494af7dfe2cad9d50bb4ad8d9eb.tar.gz
Bug #49837 mysqltest exec cannot handle multi-line command correctly
Since the exec command line is passed on externally, it cannot take newlines Simply replace \n with space Now also added test case
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 45f94982472..e88414a44e7 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -2661,6 +2661,10 @@ void do_exec(struct st_command *command)
#endif
#endif
+ /* exec command is interpreted externally and will not take newlines */
+ while(replace(&ds_cmd, "\n", 1, " ", 1) == 0)
+ ;
+
DBUG_PRINT("info", ("Executing '%s' as '%s'",
command->first_argument, ds_cmd.str));