diff options
author | Martin Hansson <martin.hansson@sun.com> | 2010-02-10 15:37:34 +0100 |
---|---|---|
committer | Martin Hansson <martin.hansson@sun.com> | 2010-02-10 15:37:34 +0100 |
commit | 630fa243c9a459526e225acc19fee30f4676a505 (patch) | |
tree | 9b0fa35b8e58886b80c4cd6e6d3b538098387d92 /mysql-test/r/multi_update.result | |
parent | f2c5870f2a94fb818010a874d04f1c7ceac80282 (diff) | |
download | mariadb-git-630fa243c9a459526e225acc19fee30f4676a505.tar.gz |
Bug#49534: multitable IGNORE update with sql_safe_updates
error causes debug assertion
The IGNORE option of the multiple-table UPDATE command was
not intended to suppress errors caused by the
sql_safe_updates mode. This flag will raise an error if the
execution of UPDATE does not use a key for row retrieval,
and should continue do so regardless of the IGNORE option.
However the implementation of IGNORE does not support
exceptions to the rule; it always converts errors to
warnings and cannot be extended. The Internal_error_handler
interface offers the infrastructure to handle individual
errors, making sure that the error raised by
sql_safe_updates is not silenced.
Fixed by implementing an Internal_error_handler and using it
for UPDATE IGNORE commands.
Diffstat (limited to 'mysql-test/r/multi_update.result')
-rw-r--r-- | mysql-test/r/multi_update.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 449333a4ae6..04bf7720c43 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -634,4 +634,15 @@ select count(*) from t3 /* must be 1 */; count(*) 1 drop table t1, t2, t3; +# +# Bug#49534: multitable IGNORE update with sql_safe_updates error +# causes debug assertion +# +CREATE TABLE t1( a INT, KEY( a ) ); +INSERT INTO t1 VALUES (1), (2), (3); +SET SESSION sql_safe_updates = 1; +# Must not cause failed assertion +UPDATE IGNORE t1, t1 t1a SET t1.a = 1 WHERE t1a.a = 1; +ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column +DROP TABLE t1; end of tests |