~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to conf/WL5004_sql.yy

- various minor improvements and corrections
- add sub tests for user locks
- some adjustments to open and fixed bugs

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#
8
8
# Attention:
9
9
# There are modified grammar items because of
10
 
# - Bug#45143 All connections hang on concurrent ALTER TABLE
11
10
# - Bug#46339 crash on REPAIR TABLE merge table USE_FRM
12
11
# - Bug#46425 crash in Diagnostics_area::set_ok_status , empty statement, DELETE IGNORE
13
12
# - Bug#46224 HANDLER statements within a transaction might lead to deadlocks
18
17
# - Bug#45966 Crash in MDL_context::release_ticket in .\include\master-slave-reset.inc
19
18
# - Bug#40419 Not locking metadata on alter procedure
20
19
#   Duplicate of Bug#30977 Concurrent statement using stored function and DROP FUNCTION breaks SBR
 
20
# .. there are a lot more please search for open bugs reported by Matthias Leich
21
21
#
22
22
#
23
23
# Bug#45225 Locking: hang if drop table with no timeout
133
133
 
134
134
# Section of easy changeable items with high impact on the test =============================================#
135
135
query_init:
136
 
        init_basics ; init_name_spaces ; event_scheduler_on ; have_some_initial_objects ;
 
136
        # Variant 1: 
 
137
        #    Advantage: Less failing (table does not exist ...) statements within the first phase of the test.
 
138
        # init_basics : init_name_spaces ; event_scheduler_on ; have_some_initial_objects ;
 
139
        # Variant 2:
 
140
        #    Advantage: Better performance during bug hunt, test simplification etc.
 
141
        init_basics ; init_name_spaces ;
137
142
 
138
143
init_basics:
139
144
        # 1. $life_time_unit = maximum lifetime of a table created within a CREATE, wait, DROP sequence.
167
172
        { $life_time_unit = 1 ; $name_space_width = 2 ; if ( $ENV{RQG_THREADS} == 1 ) { $life_time_unit = 0 } ; return undef } avoid_bugs ; nothing_disabled ; system_table_stuff ;
168
173
 
169
174
init_name_spaces:
170
 
   # Please choose between the following alternatives 
 
175
        # Please choose between the following alternatives 
171
176
        # separate_objects         -- no_separate_objects
172
177
        # separate_normal_sequence -- no_separate_normal_sequence
173
178
        # separate_table_types     -- no_separate_table_types
174
 
   # 1. Low amount of failing statements, low risk to run into known not locking related crashes
 
179
        # 1. Low amount of failing statements, low risk to run into known not locking related crashes
175
180
        separate_objects ; separate_normal_sequence ; separate_table_types ;
176
 
   # 2. Higher amount of failing statements, risk to run into known temporary table related crashes
 
181
        # 2. Higher amount of failing statements, risk to run into known temporary table related crashes
177
182
        # separate_objects ; separate_normal_sequence ; no_separate_table_types ;
178
 
   # 3. Total chaos
 
183
        # 3. Total chaos
179
184
        # High amount of failing statements, risk to run into known temporary table related crashes
180
185
        # no_separate_objects ; separate_normal_sequence ; no_separate_table_types ;
181
186
 
241
246
        # The amount of create_..._table items within the some_..._tables should depend a bit on the value in $name_space_width but I currently
242
247
        # do not know how to express this in the grammar.
243
248
        # MLML Bug#47633 assert in ha_myisammrg::info during OPTIMIZE -> merge tables disabled.
244
 
        # create_database ; some_base_tables ; some_temp_tables ; some_part_tables ; some_view_tables ;
245
 
        # create_database ; some_base_tables ; some_temp_tables ; some_merge_tables ; some_part_tables ; create_view ; create_view ; create_view ;
246
 
        some_databases ; some_base_tables ; some_temp_tables ; some_merge_tables ; some_part_tables ; some_view_tables ; some_functions ; some_procedures ; some_trigger ; some_events ;
 
249
        # some_databases ; some_base_tables ; some_temp_tables ; some_merge_tables ; some_part_tables ; some_view_tables ; some_functions ; some_procedures ; some_trigger ; some_events ;
 
250
        some_databases ; some_base_tables ; some_temp_tables ; some_part_tables ; some_view_tables ; some_functions ; some_procedures ; some_trigger ; some_events ;
247
251
some_databases:
248
252
        create_database    ; create_database    ; create_database    ; create_database    ;
249
253
some_base_tables:
1191
1195
 
1192
1196
########## DO ####################
1193
1197
do:
1194
 
        # A lot options like HIGH_PRIORITY etc. are not allowed in connection with DO.
 
1198
        DO 1                                                                                                   |
 
1199
        # A lot options like HIGH_PRIORITY (after SELECT ) etc. are not allowed in connection with DO.
1195
1200
        # The SELECT must give one column.
1196
 
        SELECT COUNT(*) FROM table_item WHERE `pk` BETWEEN _digit[invariant] AND _digit[invariant] + 20 ;
 
1201
        DO ( SELECT COUNT(*) FROM table_item WHERE `pk` BETWEEN _digit[invariant] AND _digit[invariant] + 20 ) |
 
1202
        DO user_lock_action                                                                                    ;
 
1203
 
 
1204
user_lock_action:
 
1205
        IS_FREE_LOCK(TRIM(' _digit '))                                |
 
1206
        IS_USED_LOCK(TRIM(' _digit '))                                |
 
1207
        RELEASE_LOCK(TRIM(' _digit '))                                |
 
1208
        GET_LOCK(TRIM(' _digit '), 0.5 * rand_val * $life_time_unit ) ;
1197
1209
 
1198
1210
########## SELECT ####################
1199
1211
select:
1338
1350
        # generate_outfile ; LOAD DATA low_priority_concurrent local_or_empty INFILE tmpnam replace_ignore INTO TABLE table_item ;
1339
1351
        generate_outfile ; LOAD DATA low_priority_concurrent INFILE tmpnam replace_ignore INTO TABLE table_item ;
1340
1352
generate_outfile:
1341
 
        SELECT * FROM template_table_name INTO OUTFILE _tmpnam ;
 
1353
        SELECT * FROM template_table_item INTO OUTFILE _tmpnam ;
1342
1354
low_priority_concurrent:
1343
1355
         | low_priority | concurrent ;
1344
1356
concurrent:
1516
1528
         | NOT ;
1517
1529
 
1518
1530
online:
1519
 
        # Use if
1520
 
        #    Bug#45143   All connections hang on concurrent ALTER TABLE
1521
 
        # is fixed     (ONLINE removed because of Bug#45143)
1522
1531
        # Only 20 %
1523
 
        # | | | | ONLINE ;
1524
 
        ;
 
1532
        | | | | ONLINE ;
1525
1533
 
1526
1534
quick:
1527
1535
        # Only 10 %