2
# The goal of this grammar is to stress test the operation of the HEAP storage engine by:
4
# * Creating numerous tables, populating them rapidly and then dropping them
6
# * Using various DDL statements that cause HEAP tables to be created or manipulated
8
# * Have concurrent operation by using mostly TEMPORARY or connection-specific tables
12
{ $table_name = 'local_'.$generator->threadId().'_1' ; return undef; } create_definition_init ; { $table_name = 'local_'.$generator->threadId().'_2' ; return undef; } create_definition_init ; { $table_name = 'local_'.$generator->threadId().'_3' ; return undef; } create_definition_init ;
14
create_definition_init:
15
create_definition SELECT short_value AS f1 , short_value AS f2 , short_value AS f3 , short_value AS f4 , short_value AS f5 FROM DUAL ;
19
select | select | select | select |
20
insert | insert | insert | insert |
21
insert | insert | insert | insert |
22
update | update | update | update |
23
delete | delete | delete | delete |
28
set_table_name DROP TABLE IF EXISTS { $table_name } ; create_definition ; create_definition ; create_definition |
29
set_table_name DROP TABLE IF EXISTS { $table_name } ; create_definition select_all ;
32
ALTER TABLE table_name ENGINE = HEAP |
33
ALTER TABLE table_name enable_disable KEYS ;
39
TRUNCATE TABLE table_name ;
42
SELECT * FROM table_name ;
45
CREATE temporary TABLE IF NOT EXISTS { $table_name } (
52
) ENGINE=HEAP /*executor1 ROW_FORMAT = dynamic_fixed KEY_BLOCK_SIZE = key_block_size */ ;
55
| | | | | | TEMPORARY ;
58
DYNAMIC | DYNAMIC | DYNAMIC | DYNAMIC | DYNAMIC |
59
DYNAMIC | DYNAMIC | DYNAMIC | DYNAMIC | FIXED ;
62
insert_multi | insert_multi | insert_select ;
65
INSERT IGNORE INTO table_name VALUES row_list ;
68
INSERT IGNORE INTO table_name select_all;
71
row , row , row , row |
75
( value , value , value , value , value ) ;
77
index_definition_list:
79
index_definition , index_definition ;
82
index_type ( index_column_list ) USING btree_hash ;
88
KEY | KEY | KEY | KEY | PRIMARY KEY ;
91
f1 | f2 | f1 , f2 | f2 , f1 |
92
f1 ( index_column_size ) | f2 ( index_column_size ) |
93
f1 ( index_column_size ) , f2 ( index_column_size ) |
94
f2 ( index_column_size ) , f1 ( index_column_size ) ;
100
512 | 1024 | 2048 | 3072 ;
103
VARCHAR ( size_varchar ) character_set not_null default |
104
VARCHAR ( size_varchar ) collation not_null default |
105
VARBINARY ( size_varchar ) |
111
| CHARACTER SET utf8 ;
117
VARCHAR ( size_index ) character_set not_null default |
118
VARCHAR ( size_index ) collation not_null default ;
121
32 | 128 | 512 | 1024 ;
127
BLOB | BLOB ( blob_size ) | MEDIUMBLOB | TINYBLOB | LONGBLOB |
130
TEXT ( blob_size ) character_set |
131
TEXT ( blob_size ) collation |
132
MEDIUMTEXT | TINYTEXT | LONGTEXT ;
141
| DEFAULT _varchar(32) ;
147
connection_specific_table |
148
connection_specific_table |
149
connection_specific_table |
150
connection_specific_table |
151
connection_specific_table |
154
connection_specific_table:
155
{ 'local_'.$generator->threadId().'_'.$prng->int(1,5) } ;
158
global_1 | global_2 | global_3 | global_4 | global_5 ;
161
{ $table_name = $prng->int(1,5) <= 4 ? 'local_'.$generator->threadId().'_'.$prng->int(1,5) : 'global_'.$prng->int(1,5) ; return undef ; } ;
168
short_value | long_value ;
171
_digit | _varchar(1) | NULL | _english ;
174
REPEAT( _varchar(128) , _digit ) | NULL | _data ;
177
SELECT field_name FROM table_name WHERE where order_by ;
180
ORDER BY field_name desc_asc ;
186
UPDATE table_name SET field_name = value WHERE where ;
189
DELETE FROM table_name WHERE where ;
192
f1 | f2 | f3 | f4 | f5 ;
195
(field_name cmp_op value ) and_or where |
196
field_name cmp_op value |
197
field_name not IN ( value_list ) |
198
field_name BETWEEN value AND value ;
207
< | > | = | <= | >= | <> | <=> | != ;