mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Enabled HA_NULL_IN_KEY support
This commit is contained in:
@@ -122,18 +122,22 @@ drop table t1;
|
||||
# Indexing NULL values
|
||||
#
|
||||
|
||||
#CREATE TABLE t1 (
|
||||
# a int unsigned NOT NULL PRIMARY KEY,
|
||||
# b int unsigned,
|
||||
# c int unsigned,
|
||||
# KEY bc(b,c)
|
||||
#) engine = ndb;
|
||||
CREATE TABLE t1 (
|
||||
a int unsigned NOT NULL PRIMARY KEY,
|
||||
b int unsigned,
|
||||
c int unsigned,
|
||||
KEY bc(b,c)
|
||||
) engine = ndb;
|
||||
|
||||
#insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL);
|
||||
#select * from t1 use index (bc);
|
||||
#select count(*) from t1 use index (bc);
|
||||
#select count(*) from t1 use index (PRIMARY) where b IS NULL;
|
||||
#select count(*) from t1 use index (bc) where b IS NULL;
|
||||
#select count(*) from t1 use index (bc) where b IS NULL and c = 2;
|
||||
#select count(*) from t1 use index (bc) where b IS NOT NULL;
|
||||
#drop table t1;
|
||||
insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL);
|
||||
select * from t1 use index (bc) where b IS NULL;
|
||||
|
||||
select * from t1 use index (bc)order by a;
|
||||
select * from t1 use index (bc) order by a;
|
||||
select * from t1 use index (PRIMARY) where b IS NULL order by a;
|
||||
select * from t1 use index (bc) where b IS NULL order by a;
|
||||
select * from t1 use index (bc) where b IS NULL and c IS NULL order by a;
|
||||
select * from t1 use index (bc) where b IS NULL and c = 2 order by a;
|
||||
select * from t1 use index (bc) where b < 4 order by a;
|
||||
select * from t1 use index (bc) where b IS NOT NULL order by a;
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user