summaryrefslogtreecommitdiff
path: root/mysql-test/r/select.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r--mysql-test/r/select.result39
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 9bcd0a90ecf..7219a9c4462 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -5191,6 +5191,37 @@ WHERE t2.pk <> 2;
pk i pk i pk i
DROP TABLE t1,t2,t_empty;
End of 5.1 tests
+#
+# Bug#45227: Lost HAVING clause led to a wrong result.
+#
+CREATE TABLE `CC` (
+`int_nokey` int(11) NOT NULL,
+`int_key` int(11) NOT NULL,
+`varchar_key` varchar(1) NOT NULL,
+`varchar_nokey` varchar(1) NOT NULL,
+KEY `int_key` (`int_key`),
+KEY `varchar_key` (`varchar_key`)
+);
+INSERT INTO `CC` VALUES
+(0,8,'q','q'),(5,8,'m','m'),(7,3,'j','j'),(1,2,'z','z'),(8,2,'a','a'),(2,6,'',''),(1,8,'e'
+,'e'),(8,9,'t','t'),(5,2,'q','q'),(4,6,'b','b'),(5,5,'w','w'),(3,2,'m','m'),(0,4,'x','x'),
+(8,9,'',''),(0,6,'w','w'),(4,5,'x','x'),(0,0,'e','e'),(0,0,'e','e'),(2,8,'p','p'),(0,0,'x'
+,'x');
+EXPLAIN SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
+HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE CC range int_key int_key 4 NULL 10 Using index condition; Using where; Using filesort
+SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
+HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
+G1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'z'
+Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DOUBLE value: 'q'
+Warning 1292 Truncated incorrect DOUBLE value: 'm'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
+DROP TABLE CC;
+# End of test#45227
#
# BUG#776274: substitution of a single row table
#
@@ -5297,6 +5328,14 @@ f1
DROP TABLE t1;
DROP VIEW view_t1;
# End of test BUG#63020
+#
+# Bug #13571700 TINYBLOB NOT NULL, CRASH IN PROTOCOL::NET_STORE_DATA
+#
+CREATE TABLE t1 (a TINYBLOB NOT NULL);
+SELECT a, COUNT(*) FROM t1 WHERE 0;
+a COUNT(*)
+NULL 0
+DROP TABLE t1;
SET optimizer_switch=@save_optimizer_switch;
#
# LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed