Below is the list of changes that have just been committed into a local
5.0 repository of igor. When igor does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-12-13 00:39:13-08:00, igor@stripped +3 -0
Fixed bug #25027.
Removed an assertion that was not valid for the cases where the query
in a prepared statement contained a single-row non-correlated
subquery that was used as an argument of the IS NULL predicate.
mysql-test/r/ps.result@stripped, 2006-12-13 00:39:10-08:00, igor@stripped +15 -0
Added a test case for bug #25027.
mysql-test/t/ps.test@stripped, 2006-12-13 00:39:10-08:00, igor@stripped +18 -0
Added a test case for bug #25027.
sql/sql_lex.cc@stripped, 2006-12-13 00:39:10-08:00, igor@stripped +0 -1
Fixed bug #25027.
Removed an assertion that was not valid for the cases where the query
in a prepared statement contained a single-row non-correlated
subquery that was used as an argument of the IS NULL predicate.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: igor
# Host: olga.mysql.com
# Root: /home/igor/dev-opt/mysql-5.0-opt-bug25027
--- 1.206/sql/sql_lex.cc 2006-12-13 00:39:19 -08:00
+++ 1.207/sql/sql_lex.cc 2006-12-13 00:39:19 -08:00
@@ -1903,7 +1903,6 @@
{
ha_rows select_limit_val;
- DBUG_ASSERT(! thd->stmt_arena->is_stmt_prepare());
select_limit_val= (ha_rows)(sl->select_limit ? sl->select_limit->val_uint() :
HA_POS_ERROR);
offset_limit_cnt= (ha_rows)(sl->offset_limit ? sl->offset_limit->val_uint() :
--- 1.83/mysql-test/r/ps.result 2006-12-13 00:39:19 -08:00
+++ 1.84/mysql-test/r/ps.result 2006-12-13 00:39:19 -08:00
@@ -1514,4 +1514,19 @@
Slow_queries 1
deallocate prepare no_index;
deallocate prepare sq;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1), (2);
+CREATE TABLE t2 (b int);
+INSERT INTO t2 VALUES (NULL);
+SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL;
+a
+1
+2
+PREPARE stmt FROM 'SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL';
+EXECUTE stmt;
+a
+1
+2
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1,t2;
End of 5.0 tests.
--- 1.80/mysql-test/t/ps.test 2006-12-13 00:39:19 -08:00
+++ 1.81/mysql-test/t/ps.test 2006-12-13 00:39:19 -08:00
@@ -1563,4 +1563,22 @@
deallocate prepare no_index;
deallocate prepare sq;
+#
+# Bug 25027: query with a single-row non-correlated subquery
+# and IS NULL predicate
+#
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1), (2);
+CREATE TABLE t2 (b int);
+INSERT INTO t2 VALUES (NULL);
+
+SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL;
+PREPARE stmt FROM 'SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL';
+
+EXECUTE stmt;
+
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1,t2;
+
--echo End of 5.0 tests.
| Thread |
|---|
| • bk commit into 5.0 tree (igor:1.2348) BUG#25027 | igor | 13 Dec |