mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
upmerge 56753
This commit is contained in:
@@ -2185,8 +2185,14 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
|
|||||||
DBUG_ENTER("var_query_set");
|
DBUG_ENTER("var_query_set");
|
||||||
LINT_INIT(res);
|
LINT_INIT(res);
|
||||||
|
|
||||||
|
/* Only white space or ) allowed past ending ` */
|
||||||
while (end > query && *end != '`')
|
while (end > query && *end != '`')
|
||||||
|
{
|
||||||
|
if (*end && (*end != ' ' && *end != '\t' && *end != '\n' && *end != ')'))
|
||||||
|
die("Spurious text after `query` expression");
|
||||||
--end;
|
--end;
|
||||||
|
}
|
||||||
|
|
||||||
if (query == end)
|
if (query == end)
|
||||||
die("Syntax error in query, missing '`'");
|
die("Syntax error in query, missing '`'");
|
||||||
++query;
|
++query;
|
||||||
|
@@ -177,6 +177,9 @@ mysqltest: At line 1: End of line junk detected: "disconnect default # comment
|
|||||||
"
|
"
|
||||||
mysqltest: At line 1: Extra delimiter ";" found
|
mysqltest: At line 1: Extra delimiter ";" found
|
||||||
mysqltest: At line 1: Extra delimiter ";" found
|
mysqltest: At line 1: Extra delimiter ";" found
|
||||||
|
mysqltest: At line 1: Spurious text after `query` expression
|
||||||
|
mysqltest: At line 1: Spurious text after `query` expression
|
||||||
|
mysqltest: At line 2: Spurious text after `query` expression
|
||||||
mysqltest: At line 1: Missing argument(s) to 'error'
|
mysqltest: At line 1: Missing argument(s) to 'error'
|
||||||
mysqltest: At line 1: Missing argument(s) to 'error'
|
mysqltest: At line 1: Missing argument(s) to 'error'
|
||||||
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
|
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
|
||||||
|
@@ -205,7 +205,7 @@ DROP TABLE `t1`;
|
|||||||
|
|
||||||
-- echo === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail.
|
-- echo === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail.
|
||||||
|
|
||||||
-- let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
-- let $MYSQLD_DATADIR= `SELECT @@datadir`
|
||||||
-- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog
|
-- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog
|
||||||
-- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog
|
-- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ while($ntables)
|
|||||||
-- echo ### assertion: check that binlog is not corrupt. Using mysqlbinlog to
|
-- echo ### assertion: check that binlog is not corrupt. Using mysqlbinlog to
|
||||||
-- echo ### detect failure. Before the patch mysqlbinlog would find
|
-- echo ### detect failure. Before the patch mysqlbinlog would find
|
||||||
-- echo ### a corrupted event, thence would fail.
|
-- echo ### a corrupted event, thence would fail.
|
||||||
-- let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
-- let $MYSQLD_DATADIR= `SELECT @@datadir`
|
||||||
-- exec $MYSQL_BINLOG -v --hex $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog
|
-- exec $MYSQL_BINLOG -v --hex $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog
|
||||||
|
|
||||||
## clean up
|
## clean up
|
||||||
|
@@ -494,6 +494,23 @@ remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
|
|||||||
--error 1
|
--error 1
|
||||||
--exec echo "--disable_query_log;" | $MYSQL_TEST 2>&1
|
--exec echo "--disable_query_log;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Extra text after ``
|
||||||
|
#
|
||||||
|
--error 1
|
||||||
|
-- exec echo "let \$x= \`select 1\` BOO ;" | $MYSQL_TEST 2>&1
|
||||||
|
--error 1
|
||||||
|
-- exec echo "--let \$x= \`select 1\`;" | $MYSQL_TEST 2>&1
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
||||||
|
# Missing ; in next line should be detected and cause failure
|
||||||
|
let $x= `select 1`
|
||||||
|
let $x= 2;
|
||||||
|
echo $x;
|
||||||
|
EOF
|
||||||
|
--error 1
|
||||||
|
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
|
||||||
|
|
||||||
|
|
||||||
# Allow trailing # comment
|
# Allow trailing # comment
|
||||||
--sleep 1 # Wait for insert delayed to be executed.
|
--sleep 1 # Wait for insert delayed to be executed.
|
||||||
|
Reference in New Issue
Block a user