~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/heap_var.test

  • Committer: Brian Aker
  • Date: 2009-08-18 07:20:29 UTC
  • mfrom: (1117.1.9 merge)
  • Revision ID: brian@gaz-20090818072029-s9ch5lcmltxwidn7
Merge of Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# Test MEMORY tables with variable-sized records.
 
2
# Test heap tables with variable-sized records.
3
3
#
4
4
 
5
5
--disable_warnings
6
6
drop table if exists t1;
7
7
--enable_warnings
8
8
 
9
 
set @@session.max_heap_table_size=16*1024*1024*24;
10
 
 
11
 
create temporary table t1 (a int not null, b int, c varchar(400), d varchar(400), primary key (a), key (b)) engine=MEMORY comment="testing heaps";
12
 
 
13
 
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
14
 
show table status like "t1";
 
9
set @@session.max_heap_table_size=16*1024*1024;
 
10
 
 
11
--error 1234
 
12
create temporary table t1 (a int not null, b varchar(400), c int, primary key (a), key (c)) engine=heap comment="testing heaps" block_size=128;
 
13
 
 
14
--error 1234
 
15
create temporary table t1 (a int not null, b int, c varchar(400), primary key (a), key (b)) engine=heap comment="testing heaps" block_size=4;
 
16
 
 
17
create temporary table t1 (a int not null, b int, c varchar(400), d varchar(400), primary key (a), key (b)) engine=heap comment="testing heaps" block_size=24;
 
18
 
 
19
#show table status like "t1";
15
20
 
16
21
insert into t1 values (1,1,'012',NULL), (2,2,'0123456789',NULL), (3,3,'012345678901234567890123456789',NULL), (4,4,NULL,'0123456789012345678901234567890123456789012345678901234567890123456789');
17
22
select * from t1;
31
36
insert into t1 values (7,7,'0123',NULL), (8,8,'0123',NULL);
32
37
select * from t1;
33
38
 
 
39
#show table status like "t1";
 
40
alter table t1 block_size = 0;
 
41
#show table status like "t1";
 
42
alter table t1 row_format = dynamic;
 
43
#show table status like "t1";
 
44
alter table t1 block_size = 128;
 
45
#show table status like "t1";
 
46
 
 
47
select * from t1;
 
48
 
34
49
delete from t1;
35
50
select * from t1;
36
51
 
51
66
 
52
67
select count(*) from t1;
53
68
 
54
 
--error ER_DUP_ENTRY
 
69
--error 1062
55
70
insert into t1 values (100000,100000,NULL,'0123'), (100000,100000,NULL,'0123');
56
71
 
57
 
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
58
 
show table status like "t1";
 
72
#show table status like "t1";
59
73
select count(*) from t1;
60
74
 
61
75
set @@session.max_heap_table_size=default;