mirror of
https://github.com/MariaDB/server.git
synced 2025-12-28 08:10:14 +00:00
MDEV-30277: Assertion failure in Diagnostics_area::set_error_status
/ Reprepare_observer::report_error Analysis: Error is not reported when we hit invalid default parameter error Fix: Return appropriate value on error.
This commit is contained in:
parent
6aa7498313
commit
f0bef17b82
@ -6047,3 +6047,15 @@ a b c
|
||||
1 1970-01-01 09:00:01 6
|
||||
DROP TABLE t;
|
||||
# End of 10.6 tests
|
||||
# Beginning of 10.11 test
|
||||
#
|
||||
# MDEV-30277: Assertion failure in Diagnostics_area::set_error_status
|
||||
# / Reprepare_observer::report_error
|
||||
#
|
||||
CREATE TABLE t (a INT);
|
||||
PREPARE stmt FROM " DELETE FROM t LIMIT ?";
|
||||
ALTER TABLE t FORCE;
|
||||
EXECUTE stmt USING DEFAULT;
|
||||
ERROR HY000: Default/ignore value is not supported for such parameter usage
|
||||
DROP TABLE t;
|
||||
# End of 10.11 test
|
||||
|
||||
@ -5498,3 +5498,20 @@ SELECT * FROM t;
|
||||
|
||||
DROP TABLE t;
|
||||
--echo # End of 10.6 tests
|
||||
|
||||
--echo # Beginning of 10.11 test
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30277: Assertion failure in Diagnostics_area::set_error_status
|
||||
--echo # / Reprepare_observer::report_error
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t (a INT);
|
||||
PREPARE stmt FROM " DELETE FROM t LIMIT ?";
|
||||
ALTER TABLE t FORCE;
|
||||
--error ER_INVALID_DEFAULT_PARAM
|
||||
EXECUTE stmt USING DEFAULT;
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
--echo # End of 10.11 test
|
||||
|
||||
@ -4894,6 +4894,9 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
|
||||
DBUG_ASSERT(select_lex->limit_params.offset_limit == 0);
|
||||
unit->set_limit(select_lex);
|
||||
|
||||
if (thd->is_error())
|
||||
goto error;
|
||||
|
||||
MYSQL_DELETE_START(thd->query());
|
||||
Protocol *save_protocol= NULL;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user