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
commit128216d35b077afbb7f135ff368d6712638c3cc2 (patch)
treebc4c01b5f7d3d6b35e3a5b758f8973c67f4a882d /client
parentbe128c547fc614349695208f37fccf2a86e2139a (diff)
downloadmariadb-git-128216d35b077afbb7f135ff368d6712638c3cc2.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));