summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-04-04 01:00:23 +0300
committerMichael Widenius <monty@askmonty.org>2012-04-04 01:00:23 +0300
commitdaf29d2a7aae6b92bd10d98819f564749b07720a (patch)
tree48610814f428a224a0e4959f2e7b3fe5e548a244 /mysql-test
parent2149a42928f961112e65944e4b0d7639416e6f50 (diff)
parent24a67aa81699a914d169fc783893c4fb54aa8388 (diff)
downloadmariadb-git-daf29d2a7aae6b92bd10d98819f564749b07720a.tar.gz
Merge with 5.2
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/csv.result13
-rw-r--r--mysql-test/r/partition_innodb.result14
-rw-r--r--mysql-test/t/csv.test15
3 files changed, 35 insertions, 7 deletions
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index 4c3529fb227..76a8bc06f6d 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -5415,4 +5415,17 @@ foo
DROP TABLE t1;
+CREATE TABLE t1 ( b TEXT NOT NULL ) ENGINE=MYISAM;
+INSERT INTO t1 VALUES ('x'),('y');
+CREATE TABLE t2 ( a VARCHAR(1) NOT NULL ) ENGINE=CSV;
+INSERT INTO t2 VALUES ('r'),('t');
+SELECT * FROM t2 ORDER BY a;
+a
+r
+t
+SELECT * FROM t1 LEFT JOIN t2 ON ( b = a );
+b a
+x NULL
+y NULL
+drop table t1,t2;
End of 5.1 tests
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index 5fcb0e796b1..1afffd3a037 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -48,13 +48,13 @@ insert INTO t1 VALUES (110);
ERROR HY000: Table has no partition for value 110
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 90;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 90;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 90;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 89;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p90 ALL NULL NULL NULL NULL 3 Using where
@@ -63,16 +63,16 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p90 ALL NULL NULL NULL NULL 3 Using where
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 89;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 100;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 100;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 100;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 0 Using where
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
DROP TABLE t1;
#
# Bug#50104: Partitioned table with just 1 partion works with fk
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index fd08f7c5a40..974b6a65c39 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1820,5 +1820,20 @@ INSERT INTO t1 VALUES(-1);
SELECT * FROM t1;
DROP TABLE t1;
+#
+# Bug#970528
+# Server crashes in my_strnncollsp_simple on LEFT JOIN with CSV table,
+# TEXT field
+#
+
+CREATE TABLE t1 ( b TEXT NOT NULL ) ENGINE=MYISAM;
+INSERT INTO t1 VALUES ('x'),('y');
+
+CREATE TABLE t2 ( a VARCHAR(1) NOT NULL ) ENGINE=CSV;
+INSERT INTO t2 VALUES ('r'),('t');
+
+SELECT * FROM t2 ORDER BY a;
+SELECT * FROM t1 LEFT JOIN t2 ON ( b = a );
+drop table t1,t2;
--echo End of 5.1 tests