~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/heap_var.test

  • Committer: Padraig O'Sullivan
  • Date: 2009-08-08 04:22:33 UTC
  • mto: (1115.3.4 captain)
  • mto: This revision was merged to the branch mainline in revision 1117.
  • Revision ID: osullivan.padraig@gmail.com-20090808042233-q0z88zc490z3f3r7
Renamed the Command class to be Statement. Renamed the command directory to
statement and also the command header file to statement. Updated various
source files to reflect this renaming.

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
9
9
set @@session.max_heap_table_size=16*1024*1024;
10
10
 
11
11
--error 1234
12
 
create temporary table t1 (a int not null, b varchar(400), c int, primary key (a), key (c)) engine=MEMORY comment="testing heaps" block_size=128;
 
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
13
 
14
14
--error 1234
15
 
create temporary table t1 (a int not null, b int, c varchar(400), primary key (a), key (b)) engine=MEMORY 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=MEMORY comment="testing heaps" block_size=24;
18
 
 
19
 
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
20
 
show table status like "t1";
 
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";
21
20
 
22
21
insert into t1 values (1,1,'012',NULL), (2,2,'0123456789',NULL), (3,3,'012345678901234567890123456789',NULL), (4,4,NULL,'0123456789012345678901234567890123456789012345678901234567890123456789');
23
22
select * from t1;
37
36
insert into t1 values (7,7,'0123',NULL), (8,8,'0123',NULL);
38
37
select * from t1;
39
38
 
40
 
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
41
 
show table status like "t1";
 
39
#show table status like "t1";
42
40
alter table t1 block_size = 0;
43
 
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
44
 
show table status like "t1";
 
41
#show table status like "t1";
45
42
alter table t1 row_format = dynamic;
46
 
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
47
 
show table status like "t1";
48
 
alter table t1 block_size = 128;
49
 
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
50
 
show table status like "t1";
 
43
#show table status like "t1";
 
44
alter table t1 block_size = 128, max_rows = 10001;
 
45
#show table status like "t1";
51
46
 
52
47
select * from t1;
53
48
 
71
66
 
72
67
select count(*) from t1;
73
68
 
74
 
--error 1062
 
69
--error 1114
75
70
insert into t1 values (100000,100000,NULL,'0123'), (100000,100000,NULL,'0123');
76
71
 
77
 
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
78
 
show table status like "t1";
 
72
#show table status like "t1";
79
73
select count(*) from t1;
80
74
 
81
75
set @@session.max_heap_table_size=default;