~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/heap_hash.test

  • Committer: Brian Aker
  • Date: 2009-01-21 05:53:36 UTC
  • mto: This revision was merged to the branch mainline in revision 801.
  • Revision ID: brian@tangent.org-20090121055336-fxoz6wfzreo8gi9x
Removed purge

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
select * from t1 where a=1;
66
66
drop table t1;
67
67
 
68
 
create table t1 (id int unsigned not null, primary key  using HASH (id)) engine=HEAP;
 
68
create table t1 (id int not null, primary key  using HASH (id)) engine=HEAP;
69
69
insert into t1 values(1);
70
70
select max(id) from t1; 
71
71
insert into t1 values(2);
196
196
 
197
197
# Btree and hash index use costs. 
198
198
create table t1 (
199
 
  id int unsigned not null primary key auto_increment, 
 
199
  id int not null primary key auto_increment, 
200
200
  name varchar(20) not null,
201
201
  index heap_idx(name),
202
202
  index btree_idx using btree(name)
203
203
) engine=heap;
204
204
 
205
205
create table t2 (
206
 
  id int unsigned not null primary key auto_increment, 
 
206
  id int not null primary key auto_increment, 
207
207
  name varchar(20) not null,
208
208
  index btree_idx using btree(name),
209
209
  index heap_idx(name)
268
268
# Check that HASH indexes disregard trailing spaces when comparing 
269
269
# strings with binary collations
270
270
 
271
 
CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, 
272
 
                col2 VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, 
 
271
CREATE TABLE t1(col1 VARCHAR(32) COLLATE utf8_bin NOT NULL, 
 
272
                col2 VARCHAR(32) COLLATE utf8_bin NOT NULL, 
273
273
                UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
274
274
INSERT INTO t1 VALUES('A', 'A');
275
275
--error ER_DUP_ENTRY
276
276
INSERT INTO t1 VALUES('A ', 'A ');
277
277
DROP TABLE t1;
278
 
CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, 
279
 
                col2 VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, 
 
278
CREATE TABLE t1(col1 VARCHAR(32) COLLATE utf8_bin NOT NULL, 
 
279
                col2 VARCHAR(32) COLLATE utf8_bin NOT NULL, 
280
280
                UNIQUE KEY key1 USING HASH (col1, col2)) ENGINE=MEMORY;
281
281
INSERT INTO t1 VALUES('A', 'A');
282
282
--error ER_DUP_ENTRY