mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#19890 mysqltest: "query" command is broken
- Allow "query" to be used as a prefix for focing a command to be sent to server - Add testcases
This commit is contained in:
@@ -4757,6 +4757,14 @@ int main(int argc, char **argv)
|
||||
q->require_file=require_file;
|
||||
save_file[0]=0;
|
||||
}
|
||||
/*
|
||||
To force something being sent as a query to the mysqld one can
|
||||
use the prefix "query". Remove "query" from string before executing
|
||||
*/
|
||||
if (strncmp(q->query, "query ", 6) == 0)
|
||||
{
|
||||
q->query= q->first_argument;
|
||||
}
|
||||
run_query(&cur_con->mysql, q, flags);
|
||||
query_executed= 1;
|
||||
q->last_argument= q->end;
|
||||
|
||||
@@ -441,3 +441,9 @@ select-me
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz error query' at line 1
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
sleep;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sleep' at line 1
|
||||
sleep;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sleep' at line 1
|
||||
;
|
||||
ERROR 42000: Query was empty
|
||||
|
||||
@@ -1125,3 +1125,18 @@ drop table t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# Bug#19890 mysqltest: "query" command is broken
|
||||
#
|
||||
|
||||
# It should be possible to use the command "query" to force mysqltest to
|
||||
# send the command to the server although it's a builtin mysqltest command.
|
||||
--error 1064
|
||||
query sleep;
|
||||
|
||||
--error 1064
|
||||
--query sleep
|
||||
|
||||
# Just an empty query command
|
||||
--error 1065
|
||||
query ;
|
||||
|
||||
Reference in New Issue
Block a user