mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Fix for LP BUG#606013: Adding bit field support for heap tables.
mysql-test/r/heap_btree.result: Test of index over bit firld in hash table. mysql-test/r/heap_hash.result: Test of index over bit firld in hash table. mysql-test/t/heap_btree.test: Test of index over bit firld in hash table. mysql-test/t/heap_hash.test: Test of index over bit firld in hash table. storage/heap/ha_heap.cc: Adding bit field support for heap tables. storage/heap/hp_create.c: Adding bit field support for heap tables. storage/heap/hp_hash.c: Adding bit field support for heap tables.
This commit is contained in:
@@ -344,3 +344,38 @@ INSERT INTO t1 VALUES(1),(1);
|
||||
DELETE a1 FROM t1 AS a1, t1 AS a2 WHERE a1.a=a2.a;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
# bit index in heap tables
|
||||
create table t1 (a bit(63) not null) engine=heap;
|
||||
insert into t1 values (869751),(736494),(226312),(802616),(728912);
|
||||
alter table t1 add unique uniq_id using BTREE (a);
|
||||
select 0+a from t1 where a > 736494;
|
||||
0+a
|
||||
802616
|
||||
869751
|
||||
explain select 0+a from t1 where a > 736494;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range uniq_id uniq_id 8 NULL 3 Using where
|
||||
select 0+a from t1 where a = 736494;
|
||||
0+a
|
||||
736494
|
||||
explain select 0+a from t1 where a = 736494;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const uniq_id uniq_id 8 const 1
|
||||
select 0+a from t1 where a=869751 or a=736494;
|
||||
0+a
|
||||
736494
|
||||
869751
|
||||
explain select 0+a from t1 where a=869751 or a=736494;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range uniq_id uniq_id 8 NULL 2 Using where
|
||||
select 0+a from t1 where a in (869751,736494,226312,802616);
|
||||
0+a
|
||||
226312
|
||||
736494
|
||||
802616
|
||||
869751
|
||||
explain select 0+a from t1 where a in (869751,736494,226312,802616);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range uniq_id uniq_id 8 NULL 4 Using where
|
||||
drop table t1;
|
||||
End of 5.3 tests
|
||||
|
Reference in New Issue
Block a user