summaryrefslogtreecommitdiff
path: root/mysql-test/t/group_min_max.test
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-11-02 02:36:12 +0300
committerunknown <kostja@bodhi.(none)>2007-11-02 02:36:12 +0300
commit0c1bdcbd2443a0e6514652aac5ba41c72882ccd0 (patch)
tree8a5a1cdffe685eb107e85ed2f3923c6c55ec0046 /mysql-test/t/group_min_max.test
parentecef837931ae10467bb112eb5364051e419521dc (diff)
downloadmariadb-git-0c1bdcbd2443a0e6514652aac5ba41c72882ccd0.tar.gz
A fix for Bug#32030 "DELETE does not return an error and deletes rows if
error evaluating WHERE" DELETE with a subquery in WHERE clause would sometimes ignore subquery evaluation error and proceed with deletion. The fix is to check for an error after evaluation of the WHERE clause in DELETE. Addressed review comments. mysql-test/r/group_min_max.result: Update the test results to reflect the fix for Bug#32030. mysql-test/r/ps.result: Update test results (Bug#32030) mysql-test/t/group_min_max.test: Update the test case to reflect the fix for Bug#32030 mysql-test/t/ps.test: Add a test case for Bug#32030 sql/sql_delete.cc: Check for an error before calling send_ok(). Two different places are covered because the subquery code has slightly different execution paths depending on ps-protocol/old-protocol
Diffstat (limited to 'mysql-test/t/group_min_max.test')
-rw-r--r--mysql-test/t/group_min_max.test1
1 files changed, 1 insertions, 0 deletions
diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test
index cf25b4c61be..9d1e065797d 100644
--- a/mysql-test/t/group_min_max.test
+++ b/mysql-test/t/group_min_max.test
@@ -890,6 +890,7 @@ FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000;
SHOW STATUS LIKE 'handler_read__e%';
FLUSH STATUS;
+--error ER_SUBQUERY_NO_1_ROW
DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1) > 10000;
SHOW STATUS LIKE 'handler_read__e%';