2
{ $tables = 0 ; $fields = 0 ; "" } query_type ;
5
normal_query | normal_query | normal_query | normal_query | normal_query |
6
normal_query | normal_query | normal_query | normal_query | normal_query |
7
data_dictionary_query | data_dictionary_query ;
10
# These are standard, plain queries that don't do a whole heck of a lot beyond
11
# doing 'something on the database'. Mainly, we want to have something
12
# going on in the background when we do have a data_dictionary_query
13
select_query | select_query_set |
14
null_alter_query_set ;
17
select_query_set ; select_query | select_query ;
20
# Attempt to generate a semi-hairy query that the database can chew on
27
# Set of queries that when, taken together results in 0 change to the table
28
# We do this to generate sufficient activity in the database
29
alter_table_index_set | alter_table_index_set |
30
alter_table_column_set ;
32
alter_table_index_set:
33
# Add + Drop an index from the table
34
ALTER TABLE _table[invariant] ADD INDEX `_quid[invariant]` (small_col_list) ; ALTER TABLE _table[invariant] DROP INDEX `_quid[invariant]` ;
36
alter_table_column_set:
37
ALTER TABLE _table[invariant] ADD COLUMN ( _quid[invariant] INT NOT NULL ) ; ALTER TABLE _table[invariant] DROP COLUMN _quid ;
39
data_dictionary_query:
44
select_list , select_item | select_item ;
47
small_col_list , column_name | column_name | column_name | column_name ;
50
int_field_name | char_field_name ;
53
_field AS {"field".++$fields} ;
56
( new_table_item join_type new_table_item ON (join_condition_item ) ) |
57
( new_table_item join_type ( ( new_table_item join_type new_table_item ON (join_condition_item ) ) ) ON (join_condition_item ) ) ;
60
INNER JOIN | left_right outer JOIN | STRAIGHT_JOIN ;
63
current_table_item . int_indexed = previous_table_item . int_field_name |
64
current_table_item . int_field_name = previous_table_item . int_indexed |
65
current_table_item . char_indexed = previous_table_item . char_field_name |
66
current_table_item . char_field_name = previous_table_item . char_indexed ;
69
CC | CC | DD | DD | BB | BB | C | D ;
72
_table AS { "table".++$tables } ;
78
{ "table".($tables - 1) };
81
`pk` | `col_int_key` | `col_int` |
82
`col_bigint` | `col_bigint_key` |
83
`col_int_not_null` | `col_int_not_null_key` ;
86
`col_char_10` | `col_char_10_key` | `col_text_not_null` | `col_text_not_null_key` |
87
`col_text_key` | `col_text` | `col_char_10_not_null_key` | `col_char_10_not_null` |
88
`col_char_1024` | `col_char_1024_key` | `col_char_1024_not_null` | `col_char_1024_not_null_key` ;
90
char_field_name_disabled:
91
# need to explore enum more before enabling this
92
`col_enum` | `col_enum_key` | `col_enum_not_null` | `col_enum_not_null_key` ;
95
`pk` | `col_int_key` | `col_bigint_key` | `col_int_not_null_key` ;
98
`col_char_1024_key` | `col_char_1024_not_null_key` |
99
`col_char_10_key` | `col_char_10_not_null_key` ;
102
where_list and_or where_item | where_item | where_item ;
105
int_field_name comparison_operator _digit |
106
char_field_name comparison_operator _char ;
109
AND | AND | AND | OR ;
112
= | > | < | != | <> | <= | >= ;