summaryrefslogtreecommitdiff
path: root/mysql-test/main/long_unique_using_hash.test
blob: 1e19cd66b0225898ccb50fbceb3f32b2d1a2b177 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# MDEV-371 Unique indexes for blobs
#

create table t1(a blob , unique(a) using hash);
--query_vertical show keys from t1;
drop table t1;

--error ER_TOO_LONG_KEY
create table t1(a blob , unique(a) using btree);

create table t1(a int , unique(a) using hash);
--query_vertical show keys from t1;
drop table t1;

create table t1(a int ,b int , c int,  unique(a, b, c) using hash);
show keys from t1;
insert into t1 values(1,1,1);
--error ER_DUP_ENTRY
insert into t1 values(1,1,1);
drop table t1;

create table t1(a int ,b int , c int,  unique(a, b, c) using hash) engine=memory;
show keys from t1;
insert into t1 values(1,1,1);
--error ER_DUP_ENTRY
insert into t1 values(1,1,1);
drop table t1;