summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-11-06 11:56:48 +0300
committerAlexander Nozdrin <alik@sun.com>2009-11-06 11:56:48 +0300
commit52b1bfe4050e163d844df1c10c648b33d25e28c5 (patch)
treeeb2d1324319886b82e2838e7144d856c95683bbd /mysql-test
parenteed607b829e68694ee996092c337ed13846e78ec (diff)
parentf6868a4eb42f39a5f4e8179b91fe38f0ff299ebe (diff)
downloadmariadb-git-52b1bfe4050e163d844df1c10c648b33d25e28c5.tar.gz
Manual merge from mysql-trunk-merge.
Fix partition_column.test.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/partition_column.result2
-rw-r--r--mysql-test/r/partition_pruning.result3
-rw-r--r--mysql-test/r/range.result9
-rw-r--r--mysql-test/r/subselect.result3
-rw-r--r--mysql-test/t/range.test11
5 files changed, 23 insertions, 5 deletions
diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result
index 8c7d5b4ff77..9d46c6e0805 100644
--- a/mysql-test/r/partition_column.result
+++ b/mysql-test/r/partition_column.result
@@ -110,7 +110,7 @@ a
NULL
explain partitions select * from t1 where a is null;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
+1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where
select * from t1 where a <= 1;
a
1
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index f59316e9ce8..d7790cd8075 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -1601,10 +1601,9 @@ INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL);
# test with an invalid date, which lead to item->null_value is set.
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p20090401 ALL NULL NULL NULL NULL 2 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Warning 1292 Incorrect datetime value: '2009-04-99'
-Warning 1292 Incorrect datetime value: '2009-04-99'
DROP TABLE t1;
CREATE TABLE t1
(a INT NOT NULL AUTO_INCREMENT,
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index c98a7696ea6..0d44e79b39a 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -1398,3 +1398,12 @@ a < 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range a a 5 NULL 8 Using where; Using index
DROP TABLE t1, t2, t3;
+#
+# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
+#
+CREATE TABLE t1(a INT, KEY(a));
+INSERT INTO t1 VALUES (1), (NULL);
+SELECT * FROM t1 WHERE a <> NULL and (a <> NULL or a <= NULL);
+a
+DROP TABLE t1;
+End of 5.1 tests
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index fc0a933b732..e8e8e1f78fb 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -4403,8 +4403,7 @@ FROM t1
WHERE a = 230;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
-2 DEPENDENT SUBQUERY st1 index NULL a 5 NULL 2 Using index
-2 DEPENDENT SUBQUERY st2 index b b 5 NULL 2 Using where; Using index; Using join buffer
+2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
FROM t1
WHERE a = 230;
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index dc119b6a77e..f0fa99f3d95 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -1171,3 +1171,14 @@ a < 5 OR
a < 10;
DROP TABLE t1, t2, t3;
+
+--echo #
+--echo # Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
+--echo #
+
+CREATE TABLE t1(a INT, KEY(a));
+INSERT INTO t1 VALUES (1), (NULL);
+SELECT * FROM t1 WHERE a <> NULL and (a <> NULL or a <= NULL);
+DROP TABLE t1;
+
+--echo End of 5.1 tests