~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/kewpie/randgen/conf/drizzle/proclist_drizzle.yy

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
query:
 
2
  { $tables = 0 ; $fields = 0 ; "" } query_type ;
 
3
 
 
4
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 ;
 
8
 
 
9
normal_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 ;
 
15
 
 
16
select_query_set:
 
17
  select_query_set ; select_query | select_query ;
 
18
 
 
19
select_query:
 
20
# Attempt to generate a semi-hairy query that the database can chew on
 
21
# for a bit
 
22
  SELECT select_list
 
23
  FROM join_list
 
24
  WHERE where_list ;
 
25
 
 
26
null_alter_query_set:
 
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 ;
 
31
 
 
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]` ;
 
35
 
 
36
alter_table_column_set:
 
37
  ALTER TABLE _table[invariant]  ADD COLUMN ( _quid[invariant] INT NOT NULL ) ;  ALTER TABLE _table[invariant]  DROP COLUMN _quid ;
 
38
 
 
39
data_dictionary_query:
 
40
  SHOW PROCESSLIST |
 
41
  SHOW PROCESSLIST ;
 
42
 
 
43
select_list:
 
44
  select_list , select_item | select_item ;
 
45
 
 
46
small_col_list:
 
47
  small_col_list , column_name | column_name | column_name | column_name ;
 
48
 
 
49
column_name:
 
50
  int_field_name | char_field_name ;
 
51
 
 
52
select_item:
 
53
  _field AS {"field".++$fields} ;
 
54
 
 
55
join_list:
 
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 ) ) ;
 
58
 
 
59
join_type:
 
60
        INNER JOIN | left_right outer JOIN | STRAIGHT_JOIN ;  
 
61
 
 
62
join_condition_item:
 
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  ;
 
67
 
 
68
_table:
 
69
  CC | CC | DD | DD | BB | BB | C | D ;
 
70
 
 
71
new_table_item:
 
72
        _table AS { "table".++$tables } ;
 
73
 
 
74
current_table_item:
 
75
        { "table".$tables };
 
76
 
 
77
previous_table_item:
 
78
        { "table".($tables - 1) };
 
79
 
 
80
int_field_name:
 
81
    `pk` | `col_int_key` | `col_int` |
 
82
    `col_bigint` | `col_bigint_key` |
 
83
    `col_int_not_null` | `col_int_not_null_key` ;
 
84
 
 
85
char_field_name:
 
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` ;
 
89
 
 
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` ;
 
93
 
 
94
int_indexed:
 
95
    `pk` | `col_int_key` | `col_bigint_key` | `col_int_not_null_key` ;
 
96
 
 
97
char_indexed:
 
98
    `col_char_1024_key` | `col_char_1024_not_null_key` |
 
99
    `col_char_10_key` | `col_char_10_not_null_key` ;
 
100
 
 
101
where_list:
 
102
  where_list and_or where_item | where_item | where_item ;
 
103
 
 
104
where_item:
 
105
  int_field_name comparison_operator _digit |
 
106
  char_field_name comparison_operator _char ;
 
107
 
 
108
and_or:
 
109
  AND | AND | AND | OR ;
 
110
 
 
111
comparison_operator:
 
112
  = | > | < | != | <> | <= | >= ;
 
113
 
 
114
left_right:
 
115
        LEFT | RIGHT ;
 
116
 
 
117
outer:
 
118
        | OUTER ;
 
119