mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge 49837
This commit is contained in:
@ -2662,6 +2662,10 @@ void do_exec(struct st_command *command)
|
|||||||
#endif
|
#endif
|
||||||
#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'",
|
DBUG_PRINT("info", ("Executing '%s' as '%s'",
|
||||||
command->first_argument, ds_cmd.str));
|
command->first_argument, ds_cmd.str));
|
||||||
|
|
||||||
|
@ -216,6 +216,12 @@ source database
|
|||||||
echo message echo message
|
echo message echo message
|
||||||
|
|
||||||
mysqltest: At line 1: Missing argument in exec
|
mysqltest: At line 1: Missing argument in exec
|
||||||
|
1
|
||||||
|
1
|
||||||
|
2
|
||||||
|
2
|
||||||
|
X
|
||||||
|
3
|
||||||
MySQL
|
MySQL
|
||||||
"MySQL"
|
"MySQL"
|
||||||
MySQL: The
|
MySQL: The
|
||||||
|
@ -605,6 +605,15 @@ echo ;
|
|||||||
--error 1
|
--error 1
|
||||||
--exec echo "--exec " | $MYSQL_TEST 2>&1
|
--exec echo "--exec " | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# Multi-line exec
|
||||||
|
exec $MYSQL
|
||||||
|
test -e "select 1";
|
||||||
|
exec $MYSQL test -e "select
|
||||||
|
2";
|
||||||
|
let $query = select 3
|
||||||
|
as X;
|
||||||
|
exec $MYSQL test -e "$query";
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Test let command
|
# Test let command
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user