~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/heap_var.result

  • Committer: Harrison Fisk
  • Date: 2008-08-05 05:01:04 UTC
  • mto: (261.1.8 drizzle)
  • mto: This revision was merged to the branch mainline in revision 264.
  • Revision ID: harrison@mysql.com-20080805050104-bz1tt53bp1dg996e
Port Ebay/Google memory storage engine variable width columns.  

See: http://code.google.com/p/mysql-heap-dynamic-rows/

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1;
 
2
set @@session.max_heap_table_size=16*1024*1024;
 
3
create table t1 (a int not null, b varchar(400), c int, primary key (a), key (c)) engine=heap comment="testing heaps" block_size=128;
 
4
ERROR 42000: Incorrect usage/placement of 'block_size'
 
5
create table t1 (a int not null, b int, c varchar(400), primary key (a), key (b)) engine=heap comment="testing heaps" block_size=4;
 
6
ERROR 42000: Incorrect usage/placement of 'block_size'
 
7
create 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;
 
8
insert into t1 values (1,1,'012',NULL), (2,2,'0123456789',NULL), (3,3,'012345678901234567890123456789',NULL), (4,4,NULL,'0123456789012345678901234567890123456789012345678901234567890123456789');
 
9
select * from t1;
 
10
a       b       c       d
 
11
1       1       012     NULL
 
12
2       2       0123456789      NULL
 
13
3       3       012345678901234567890123456789  NULL
 
14
4       4       NULL    0123456789012345678901234567890123456789012345678901234567890123456789
 
15
delete from t1 where a = 3;
 
16
select * from t1;
 
17
a       b       c       d
 
18
1       1       012     NULL
 
19
2       2       0123456789      NULL
 
20
4       4       NULL    0123456789012345678901234567890123456789012345678901234567890123456789
 
21
insert into t1 values (5,5,NULL,'0123'), (6,6,NULL,'0123');
 
22
select * from t1;
 
23
a       b       c       d
 
24
1       1       012     NULL
 
25
2       2       0123456789      NULL
 
26
6       6       NULL    0123
 
27
5       5       NULL    0123
 
28
4       4       NULL    0123456789012345678901234567890123456789012345678901234567890123456789
 
29
update t1 set c = '012345678901234567890123456789' where a = 2;
 
30
select * from t1;
 
31
a       b       c       d
 
32
1       1       012     NULL
 
33
2       2       012345678901234567890123456789  NULL
 
34
6       6       NULL    0123
 
35
5       5       NULL    0123
 
36
4       4       NULL    0123456789012345678901234567890123456789012345678901234567890123456789
 
37
update t1 set c = '0123456789' where a = 2;
 
38
select * from t1;
 
39
a       b       c       d
 
40
1       1       012     NULL
 
41
2       2       0123456789      NULL
 
42
6       6       NULL    0123
 
43
5       5       NULL    0123
 
44
4       4       NULL    0123456789012345678901234567890123456789012345678901234567890123456789
 
45
insert into t1 values (7,7,'0123',NULL), (8,8,'0123',NULL);
 
46
select * from t1;
 
47
a       b       c       d
 
48
1       1       012     NULL
 
49
2       2       0123456789      NULL
 
50
6       6       NULL    0123
 
51
5       5       NULL    0123
 
52
4       4       NULL    0123456789012345678901234567890123456789012345678901234567890123456789
 
53
7       7       0123    NULL
 
54
8       8       0123    NULL
 
55
alter table t1 block_size = 0;
 
56
alter table t1 row_format = dynamic;
 
57
alter table t1 block_size = 128, max_rows = 10001;
 
58
select * from t1;
 
59
a       b       c       d
 
60
1       1       012     NULL
 
61
2       2       0123456789      NULL
 
62
6       6       NULL    0123
 
63
5       5       NULL    0123
 
64
4       4       NULL    0123456789012345678901234567890123456789012345678901234567890123456789
 
65
7       7       0123    NULL
 
66
8       8       0123    NULL
 
67
delete from t1;
 
68
select * from t1;
 
69
a       b       c       d
 
70
select count(*) from t1;
 
71
count(*)
 
72
10001
 
73
insert into t1 values (100000,100000,NULL,'0123'), (100000,100000,NULL,'0123');
 
74
ERROR HY000: The table 't1' is full
 
75
select count(*) from t1;
 
76
count(*)
 
77
10001
 
78
set @@session.max_heap_table_size=default;
 
79
drop table t1;