~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/heap_var.result

  • Committer: Monty Taylor
  • Date: 2008-12-08 01:15:27 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081208011527-lq9m47jsmiiqn999
Replaced my hacked up m4/ac_system_extensions.m4 with the one from gnulib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1;
2
2
set @@session.max_heap_table_size=16*1024*1024;
3
 
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;
4
 
ERROR 42000: Incorrect usage/placement of 'block_size'
5
 
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;
6
 
ERROR 42000: Incorrect usage/placement of 'block_size'
7
 
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;
8
 
show table status like "t1";
9
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
10
 
#       test    t1      TEMPORARY       MEMORY  #       #       #       #       #
 
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;
11
8
insert into t1 values (1,1,'012',NULL), (2,2,'0123456789',NULL), (3,3,'012345678901234567890123456789',NULL), (4,4,NULL,'0123456789012345678901234567890123456789012345678901234567890123456789');
12
9
select * from t1;
13
10
a       b       c       d
55
52
4       4       NULL    0123456789012345678901234567890123456789012345678901234567890123456789
56
53
7       7       0123    NULL
57
54
8       8       0123    NULL
58
 
show table status like "t1";
59
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
60
 
#       test    t1      TEMPORARY       MEMORY  #       #       #       #       #
61
55
alter table t1 block_size = 0;
62
 
show table status like "t1";
63
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
64
 
#       test    t1      TEMPORARY       MEMORY  #       #       #       #       #
65
56
alter table t1 row_format = dynamic;
66
 
show table status like "t1";
67
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
68
 
#       test    t1      TEMPORARY       MEMORY  #       #       #       #       #
69
 
alter table t1 block_size = 128;
70
 
show table status like "t1";
71
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
72
 
#       test    t1      TEMPORARY       MEMORY  #       #       #       #       #
 
57
alter table t1 block_size = 128, max_rows = 10001;
73
58
select * from t1;
74
59
a       b       c       d
75
60
1       1       012     NULL
86
71
count(*)
87
72
10001
88
73
insert into t1 values (100000,100000,NULL,'0123'), (100000,100000,NULL,'0123');
89
 
ERROR 23000: Duplicate entry '100000' for key 'PRIMARY'
90
 
show table status like "t1";
91
 
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
92
 
#       test    t1      TEMPORARY       MEMORY  #       #       #       #       #
 
74
ERROR HY000: The table 't1' is full
93
75
select count(*) from t1;
94
76
count(*)
95
 
10002
 
77
10001
96
78
set @@session.max_heap_table_size=default;
97
79
drop table t1;