summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2006-03-28 09:59:20 +0200
committerunknown <mskold@mysql.com>2006-03-28 09:59:20 +0200
commit3372c31d12f30621c9cacd9b0e91044fc917a846 (patch)
treeeb0cdaa00dfd365d50ee27b72e1df10ab3aa0318 /mysql-test
parent2568c2cfed7fc94ce63e7f7be87d48d7181fe182 (diff)
downloadmariadb-git-3372c31d12f30621c9cacd9b0e91044fc917a846.tar.gz
Fix for Bug #15722 Engine_condition_pushdown fails when using blobs(text)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ndb_condition_pushdown.result18
-rw-r--r--mysql-test/t/ndb_condition_pushdown.test12
2 files changed, 28 insertions, 2 deletions
diff --git a/mysql-test/r/ndb_condition_pushdown.result b/mysql-test/r/ndb_condition_pushdown.result
index 3e46a487c07..c516740d02c 100644
--- a/mysql-test/r/ndb_condition_pushdown.result
+++ b/mysql-test/r/ndb_condition_pushdown.result
@@ -1766,5 +1766,21 @@ select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.a
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort
1 SIMPLE t4 ALL NULL NULL NULL NULL 6 Using where
+create table t5 (a int primary key auto_increment, b tinytext not null)
+engine = ndb;
+insert into t5 (b) values ('jonas'), ('jensing'), ('johan');
+set engine_condition_pushdown = off;
+select * from t5 where b like '%jo%' order by a;
+a b
+1 jonas
+3 johan
+set engine_condition_pushdown = on;
+explain select * from t5 where b like '%jo%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where
+select * from t5 where b like '%jo%' order by a;
+a b
+1 jonas
+3 johan
set engine_condition_pushdown = @old_ecpd;
-DROP TABLE t1,t2,t3,t4;
+DROP TABLE t1,t2,t3,t4,t5;
diff --git a/mysql-test/t/ndb_condition_pushdown.test b/mysql-test/t/ndb_condition_pushdown.test
index 9f512430085..1e6e105bc61 100644
--- a/mysql-test/t/ndb_condition_pushdown.test
+++ b/mysql-test/t/ndb_condition_pushdown.test
@@ -1639,5 +1639,15 @@ select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1;
explain
select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1;
+# bug#15722
+create table t5 (a int primary key auto_increment, b tinytext not null)
+engine = ndb;
+insert into t5 (b) values ('jonas'), ('jensing'), ('johan');
+set engine_condition_pushdown = off;
+select * from t5 where b like '%jo%' order by a;
+set engine_condition_pushdown = on;
+explain select * from t5 where b like '%jo%';
+select * from t5 where b like '%jo%' order by a;
+
set engine_condition_pushdown = @old_ecpd;
-DROP TABLE t1,t2,t3,t4;
+DROP TABLE t1,t2,t3,t4,t5;