mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Fix for Bug #15722 Engine_condition_pushdown fails when using blobs(text)
This commit is contained in:
parent
2568c2cfed
commit
3372c31d12
3 changed files with 32 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -6587,7 +6587,10 @@ void ndb_serialize_cond(const Item *item, void *arg)
|
|||
context->expecting_field_result(INT_RESULT))
|
||||
: true)) &&
|
||||
// Bit fields no yet supported in scan filter
|
||||
type != MYSQL_TYPE_BIT)
|
||||
type != MYSQL_TYPE_BIT &&
|
||||
// No BLOB support in scan filter
|
||||
type != MYSQL_TYPE_TINY_BLOB &&
|
||||
type != MYSQL_TYPE_BLOB)
|
||||
{
|
||||
const NDBCOL *col= tab->getColumn(field->field_name);
|
||||
DBUG_ASSERT(col);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue