diff options
author | unknown <tomas@whalegate.ndb.mysql.com> | 2007-12-14 06:55:44 +0100 |
---|---|---|
committer | unknown <tomas@whalegate.ndb.mysql.com> | 2007-12-14 06:55:44 +0100 |
commit | 271bafb0445daebeef402832c5392d50777217c7 (patch) | |
tree | c2ec10de5da01e642654f8c6007e43c3cd344473 /mysql-test/include | |
parent | bcbbe70c240711ccf3f68ec149add5601d246eb1 (diff) | |
parent | 35742460f4f252f6d08217997ea2f103b57a5201 (diff) | |
download | mariadb-git-271bafb0445daebeef402832c5392d50777217c7.tar.gz |
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
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/mix1.inc | 13 | ||||
-rw-r--r-- | mysql-test/include/ps_query.inc | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index e695e7d5570..3005e67935b 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -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 # diff --git a/mysql-test/include/ps_query.inc b/mysql-test/include/ps_query.inc index e96d666eaec..ae6027a0e07 100644 --- a/mysql-test/include/ps_query.inc +++ b/mysql-test/include/ps_query.inc @@ -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 ; |