summaryrefslogtreecommitdiff
path: root/mysql-test/r/select_pkeycache.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/select_pkeycache.result')
-rw-r--r--mysql-test/r/select_pkeycache.result39
1 files changed, 37 insertions, 2 deletions
diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result
index 3d16d37c5f1..c086a62275a 100644
--- a/mysql-test/r/select_pkeycache.result
+++ b/mysql-test/r/select_pkeycache.result
@@ -2921,8 +2921,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
DROP TABLE t1,t2;
-select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0;
-x'10' + 0 X'10' + 0 b'10' + 0 B'10' + 0
+select x'3136' + 0, X'3136' + 0, b'10' + 0, B'10' + 0;
+x'3136' + 0 X'3136' + 0 b'10' + 0 B'10' + 0
16 16 2 2
create table t1 (f1 varchar(6) default NULL, f2 int(6) primary key not null);
create table t2 (f3 varchar(5) not null, f4 varchar(5) not null, UNIQUE KEY UKEY (f3,f4));
@@ -5119,6 +5119,7 @@ SELECT 1 FROM t1 GROUP BY 1;
1
1
drop table t1;
+set sql_buffer_result= 0;
#
# Bug #58422: Incorrect result when OUTER JOIN'ing
# with an empty table
@@ -5322,4 +5323,38 @@ AND Time_zone_id = Time_zone_id
OR Time_zone_id <> Time_zone_id )
AND Use_leap_seconds <> 'N';
Time_zone_id Use_leap_seconds
+#
+# Bug mdev-4274: result of simplification of OR badly merged
+# into embedding AND
+#
+CREATE TABLE t1 (a int, b int, INDEX idx(b)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (8,8);
+CREATE TABLE t2 (c int, INDEX idx(c)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (8), (9);
+EXPLAIN EXTENDED
+SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
+WHERE 1 IS NULL OR b < 33 AND b = c;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 system idx NULL NULL NULL 1 100.00
+1 SIMPLE t2 ref idx idx 5 const 1 100.00 Using index
+Warnings:
+Note 1003 select 8 AS `a`,8 AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 8) and 1)
+SELECT * FROM t1 INNER JOIN t2 ON ( c = a )
+WHERE 1 IS NULL OR b < 33 AND b = c;
+a b c
+8 8 8
+DROP TABLE t1,t2;
+#
+# Bug mdev-4413: another manifestations of bug mdev-2474
+# (valgrind complains)
+#
+CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (7,1);
+CREATE TABLE t2 (c int) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (0), (8);
+SELECT * FROM t1, t2
+WHERE c = a AND
+( 0 OR ( b BETWEEN 45 AND 300 OR a > 45 AND a < 100 ) AND b = c );
+a b c
+DROP TABLE t1, t2;
End of 5.3 tests