diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-07-19 11:03:52 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-07-19 11:03:52 +0200 |
commit | 85e5ce0ba06b6a79e4bd7521ab0e44c1e63a3e77 (patch) | |
tree | a1625076e06207efabbacb575121b6d04a393404 /mysql-test/t/update.test | |
parent | 92f3fc92f3310cb19d48f69ab6f5d23789a90570 (diff) | |
download | mariadb-git-85e5ce0ba06b6a79e4bd7521ab0e44c1e63a3e77.tar.gz |
Bug #54734 assert in Diagnostics_area::set_ok_status
This assert checks that the server does not try to send OK to the
client if there has been some error during processing. This is done
to make sure that the error is in fact sent to the client.
The problem was that view errors during processing of WHERE conditions
in UPDATE statements where not detected by the update code. It therefore
tried to send OK to the client, triggering the assert.
The bug was only noticeable in debug builds.
This patch fixes the problem by making sure that the update code
checks for errors during condition processing and acts accordingly.
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r-- | mysql-test/t/update.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index f6708828a6b..c515f8873d8 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -483,3 +483,23 @@ UPDATE IGNORE v1 SET a = 1; SET SESSION sql_safe_updates = DEFAULT; DROP TABLE t1; DROP VIEW v1; + +--echo # +--echo # Bug#54734 assert in Diagnostics_area::set_ok_status +--echo # + +--disable_warnings +DROP TABLE IF EXISTS t1, not_exists; +DROP FUNCTION IF EXISTS f1; +DROP VIEW IF EXISTS v1; +--enable_warnings + +CREATE TABLE t1 (PRIMARY KEY(pk)) AS SELECT 1 AS pk; +CREATE FUNCTION f1() RETURNS INTEGER RETURN (SELECT 1 FROM not_exists); +CREATE VIEW v1 AS SELECT pk FROM t1 WHERE f1() = 13; +--error ER_VIEW_INVALID +UPDATE v1 SET pk = 7 WHERE pk > 0; + +DROP VIEW v1; +DROP FUNCTION f1; +DROP TABLE t1; |