mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge sql/mysqld.cc: Auto merged
This commit is contained in:
@ -724,6 +724,19 @@ set @@sort_buffer_size=default;
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
#
|
||||
# Bug #32815: query with ORDER BY and a possible ref_or_null access
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (id int, type char(6), d int, INDEX idx(id,d)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES
|
||||
(191, 'member', 1), (NULL, 'member', 3), (NULL, 'member', 4), (201, 'member', 2);
|
||||
|
||||
EXPLAIN SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
|
||||
SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
# Test of behaviour with CREATE ... SELECT
|
||||
#
|
||||
|
||||
|
@ -434,8 +434,8 @@ execute stmt1 ;
|
||||
let $1= 3 ;
|
||||
while ($1)
|
||||
{
|
||||
prepare stmt1 from ' SELECT a as ccc from t1 where a+1=
|
||||
(SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) ';
|
||||
prepare stmt1 from ' SELECT a as ccc from t1 outr where a+1=
|
||||
(SELECT 1+outr.a from t1 where outr.a+1=a+1 and a=1) ';
|
||||
execute stmt1 ;
|
||||
deallocate prepare stmt1 ;
|
||||
dec $1 ;
|
||||
|
Reference in New Issue
Block a user