1
# Copyright (C) 2010 Patrick Crews. All rights reserved.
2
# Use is subject to license terms.
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.
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.
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
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
24
# Designed to be used with --gendata=conf/drizzle/drizzle.zz
27
USE `data_dictionary` ;
30
data_dictionary_select | show_command ;
32
data_dictionary_select:
33
simple_data_dictionary_select |
34
complex_data_dictionary_select ;
36
simple_data_dictionary_select:
37
SELECT * FROM `data_dictionary` . data_dictionary_table ;
39
complex_data_dictionary_select:
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 ;
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 ;
66
# JOIN of tables and columns tables
67
SELECT table_column_select_list
69
WHERE tables. table_name = columns . table_name
72
table_column_select_list:
73
table_column_select_list , table_column_select_item |
74
table_column_select_item ;
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 ;
95
| | AND tables_columns . name_schema comparison_operator where_value opt_where_clause ;
98
| | | | | | | | | | and_or table_column_select_item comparison_operator _value ;
101
TABLES | TABLES | COLUMNS ;
104
`data_dictionary` | `test` | `information_schema` | _quid ;
107
table_schema | table_schema | table_schema | table_name ;