~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/heap.test

  • Committer: Stewart Smith
  • Date: 2010-06-16 14:17:58 UTC
  • mto: (1626.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 1633.
  • Revision ID: stewart@flamingspork.com-20100616141758-odpf36m0wo09ok4c
add handler_write status variable test for when statement was rolled back

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
update t1 set b=b+1 where a>=3;
19
19
replace t1 values (3,3);
20
20
select * from t1;
21
 
alter table t1 add c int DEFAULT 42 not null, add key (c,a);
 
21
alter table t1 add c int not null, add key (c,a);
22
22
drop table t1;
23
23
 
24
24
create temporary table t1 (a int not null,b int not null, primary key (a)) engine=memory comment="testing heaps";
51
51
engine=MEMORY;
52
52
insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6);
53
53
select * from t1 where x=1;
54
 
--error ER_CANT_REOPEN_TABLE
 
54
-- error 1137
55
55
select * from t1,t1 as t2 where t1.x=t2.y;
56
 
--error ER_CANT_REOPEN_TABLE
 
56
-- error 1137
57
57
explain select * from t1,t1 as t2 where t1.x=t2.y;
58
58
drop table t1;
59
59
 
108
108
insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
109
109
explain select * from t1 where btn like "q%";
110
110
select * from t1 where btn like "q%";
111
 
alter table t1 add column new_col char(1) DEFAULT "Y" not null, add key (btn,new_col), drop key btn;
 
111
alter table t1 add column new_col char(1) not null, add key (btn,new_col), drop key btn;
112
112
update t1 set new_col=left(btn,1);
113
113
explain select * from t1 where btn="a";
114
114
explain select * from t1 where btn="a" and new_col="a";
215
215
create temporary table t1 (v varchar(10), c char(10), t varchar(50));
216
216
insert into t1 values('+ ', '+ ', '+ ');
217
217
set @a=repeat(' ',20);
218
 
--error ER_DATA_TOO_LONG
219
 
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
220
 
set @a=repeat(' ',10);
221
 
--error ER_DATA_TOO_LONG
222
 
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
223
 
set @a=repeat(' ',9);
224
218
insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
225
219
select concat('*',v,'*',c,'*',t,'*') from t1;
226
220
 
315
309
insert into t1 values ('a '),('a  '),('a   '),('a         ');
316
310
--error ER_DUP_ENTRY
317
311
insert into t1 values ('a     ');
318
 
--error ER_DATA_TOO_LONG
 
312
--error ER_DUP_ENTRY
319
313
insert into t1 values ('a          ');
320
314
--error ER_DUP_ENTRY
321
315
insert into t1 values ('a ');
393
387
insert into t1 values ('a '),('a  '),('a   '),('a         ');
394
388
--error ER_DUP_ENTRY
395
389
insert into t1 values ('a     ');
396
 
--error ER_DATA_TOO_LONG
 
390
--error ER_DUP_ENTRY
397
391
insert into t1 values ('a          ');
398
392
--error ER_DUP_ENTRY
399
393
insert into t1 values ('a ');
436
430
select * from t1;
437
431
drop table t1;
438
432
 
439
 
--error ER_WRONG_AUTO_KEY
 
433
--error 1075
440
434
create temporary table t1 (a int not null, b int not null auto_increment,
441
435
  primary key(a, b)) engine=MEMORY;
442
436