~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/randgen/conf/drizzle/data_dict_concurrent_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
# Copyright (C) 2010 Patrick Crews. All rights reserved.
 
2
# Use is subject to license terms.
 
3
#
 
4
# This program is free software; you can redistribute it and/or modify
 
5
# it under the terms of the GNU General Public License as published by
 
6
# the Free Software Foundation; version 2 of the License.
 
7
#
 
8
# This program is distributed in the hope that it will be useful, but
 
9
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
11
# General Public License for more details.
 
12
#
 
13
# You should have received a copy of the GNU General Public License
 
14
# along with this program; if not, write to the Free Software
 
15
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
 
16
# USA
 
17
 
 
18
# data_dict_concurrent_drizzle.yy
 
19
# Designed to generate a heavy workload against the data_dictionary
 
20
# tables.  Also best used with threads > 1
 
21
# Can also be used with another grammar running against the same
 
22
# server to stress things
 
23
 
24
# Designed to be used with --gendata=conf/drizzle/drizzle.zz
 
25
 
 
26
query_init:
 
27
  USE `data_dictionary` ;
 
28
 
 
29
query:
 
30
  data_dictionary_select | show_command ;
 
31
 
 
32
data_dictionary_select:
 
33
  simple_data_dictionary_select | 
 
34
  complex_data_dictionary_select ;
 
35
 
 
36
simple_data_dictionary_select:
 
37
  SELECT * FROM `data_dictionary` . data_dictionary_table ;
 
38
 
 
39
complex_data_dictionary_select:
 
40
  table_column_select ;
 
41
 
 
42
data_dictionary_table:
 
43
  CHARACTER_SETS | COLLATIONS  | 
 
44
 COLUMNS | CUMULATIVE_SQL_COMMANDS | CUMULATIVE_USER_STATS   | 
 
45
 CURRENT_SQL_COMMANDS | GLOBAL_STATEMENTS | GLOBAL_STATUS | 
 
46
 GLOBAL_VARIABLES | INDEXES | INDEX_PARTS | 
 
47
 INNODB_CMP  | INNODB_CMPMEM | INNODB_CMPMEM_RESET | 
 
48
 INNODB_CMP_RESET | INNODB_INTERNAL_TABLES  | INNODB_LOCKS | 
 
49
 INNODB_LOCK_WAITS | INNODB_STATUS | INNODB_TRX  | 
 
50
 MODULES | PLUGINS | PROCESSLIST | REFERENTIAL_CONSTRAINTS | 
 
51
 REPLICATION_STREAMS | SCHEMAS | SCOREBOARD_STATISTICS   | 
 
52
 SESSION_STATEMENTS | SESSION_STATUS | SESSION_VARIABLES  | 
 
53
 SHOW_COLUMNS | SHOW_INDEXES | SHOW_SCHEMAS | SHOW_TABLES | 
 
54
 SHOW_TABLE_STATUS | SHOW_TEMPORARY_TABLES   | TABLES  | 
 
55
 TABLE_CACHE | TABLE_CONSTRAINTS  | TABLE_DEFINITION_CACHE  ;
 
56
 
 
57
show_command:
 
58
  SHOW TABLES | SHOW TABLE STATUS | SHOW TEMPORARY TABLES |
 
59
  SHOW PROCESSLIST | SHOW PROCESSLIST  | SHOW PROCESSLIST |
 
60
  SHOW global_session STATUS | SHOW global_session VARIABLES ;
 
61
 
 
62
global_session:
 
63
  GLOBAL | SESSION | ;
 
64
 
 
65
table_column_select:
 
66
# JOIN of tables and columns tables
 
67
  SELECT table_column_select_list 
 
68
  FROM tables , columns
 
69
  WHERE tables. table_name = columns . table_name
 
70
  opt_where_list ;
 
71
 
 
72
table_column_select_list:
 
73
  table_column_select_list , table_column_select_item | 
 
74
  table_column_select_item ;
 
75
 
 
76
table_column_select_item:
 
77
 COLUMNS . TABLE_SCHEMA  | COLUMNS . TABLE_NAME | 
 
78
 COLUMNS . COLUMN_NAME | COLUMNS . COLUMN_TYPE | 
 
79
 COLUMNS . ORDINAL_POSITION | COLUMNS . COLUMN_DEFAULT | 
 
80
 COLUMNS . COLUMN_DEFAULT_IS_NULL | COLUMNS .  COLUMN_DEFAULT_UPDATE |
 
81
 COLUMNS . IS_NULLABLE | COLUMNS . IS_INDEXED | 
 
82
 COLUMNS . IS_USED_IN_PRIMARY | COLUMNS . IS_UNIQUE  | 
 
83
 COLUMNS . IS_MULTI   | COLUMNS . IS_FIRST_IN_MULTI  |
 
84
 COLUMNS . INDEXES_FOUND_IN | COLUMNS . DATA_TYPE  | 
 
85
 COLUMNS . CHARACTER_MAXIMUM_LENGTH  | COLUMNS . CHARACTER_OCTET_LENGTH |
 
86
 COLUMNS . NUMERIC_PRECISION    | COLUMNS . NUMERIC_SCALE   | 
 
87
 COLUMNS . COLLATION_NAME  | COLUMNS . COLUMN_COMMENT  |
 
88
 TABLES . TABLE_SCHEMA    | TABLES . TABLE_NAME | 
 
89
 TABLES . TABLE_TYPE | TABLES . ENGINE |
 
90
 TABLES . ROW_FORMAT | TABLES . TABLE_COLLATION |
 
91
 TABLES . TABLE_CREATION_TIME  | TABLES . TABLE_UPDATE_TIME | 
 
92
 TABLES . TABLE_COMMENT ; 
 
93
 
 
94
opt_where_list:
 
95
  | | AND tables_columns . name_schema comparison_operator where_value opt_where_clause ;
 
96
 
 
97
opt_where_clause:
 
98
  | | | | | | | | | | and_or table_column_select_item comparison_operator _value ;
 
99
 
 
100
tables_columns:
 
101
  TABLES | TABLES | COLUMNS ;
 
102
 
 
103
where_value:
 
104
  `data_dictionary` | `test` | `information_schema` | _quid ;
 
105
 
 
106
name_schema:
 
107
  table_schema | table_schema | table_schema | table_name ;
 
108
 
 
109
comparison_operator:
 
110
  > | >= | < | <= | 
 
111
  = | =  | = | != ;
 
112
 
 
113
and_or:
 
114
  AND | AND | OR ;