mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
A fix for the bug with:
delete from table where column<=>NULL on indexed columns
This commit is contained in:
parent
910849ccd1
commit
a3a99fc7ca
3 changed files with 12 additions and 1 deletions
|
|
@ -24,3 +24,9 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
|
|||
insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
|
||||
delete from t1 where a=27;
|
||||
drop table t1;
|
||||
create table t1 (id int, index(id));
|
||||
insert into t1 values(NULL);
|
||||
delete from t1 where id <=> NULL;
|
||||
select * from t1;
|
||||
id
|
||||
drop table if exists t1;
|
||||
|
|
|
|||
|
|
@ -35,3 +35,8 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a));
|
|||
insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
|
||||
delete from t1 where a=27;
|
||||
drop table t1;
|
||||
create table t1 (id int, index(id));
|
||||
insert into t1 values(NULL);
|
||||
delete from t1 where id <=> NULL;
|
||||
select * from t1;
|
||||
drop table if exists t1;
|
||||
|
|
|
|||
|
|
@ -1024,7 +1024,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
|
|||
field->cmp_type() != value->result_type())
|
||||
DBUG_RETURN(0);
|
||||
|
||||
if (value->save_in_field(field))
|
||||
if (value->save_in_field(field) || value->is_null())
|
||||
{
|
||||
// TODO; Check if we can we remove the following block.
|
||||
if (type == Item_func::EQUAL_FUNC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue