1
# Copyright (C) 2008-2009 Sun Microsystems, Inc. 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
19
SELECT _field FROM _table ; # Populate the RQG metadata caches from the start of the start of the test
22
modify ; # Issue DDL that are reflected in INFORMATION_SCHEMA
25
{ @nonaggregates = () ; @table_names = () ; @database_names = () ; $tables = 0 ; $fields = 0 ; "" } select |
26
{ @nonaggregates = () ; @table_names = () ; @database_names = () ; $tables = 0 ; $fields = 0 ; "" } select |
27
{ @nonaggregates = () ; @table_names = () ; @database_names = () ; $tables = 0 ; $fields = 0 ; "" } select |
35
SHOW COLUMNS FROM _table |
36
SHOW CREATE DATABASE _letter |
37
SHOW CREATE FUNCTION _letter |
38
SHOW CREATE PROCEDURE _letter |
39
SHOW CREATE TABLE _letter |
40
SHOW CREATE VIEW _letter |
45
SHOW FUNCTION CODE _letter |
46
SHOW FUNCTION STATUS |
48
SHOW INDEX FROM _table |
49
# SHOW INNODB STATUS |
55
SHOW PROCEDURE CODE _letter |
56
SHOW PROCEDURE STATUS |
72
# collation_character_set_applicability |
86
# referential_constraints |
87
# routines | # same as parameters
102
ALTER TABLE _table ADD COLUMN _letter INTEGER |
103
ALTER TABLE _table DROP COLUMN _letter ;
106
GRANT privilege_list ON _table TO 'someuser'@'somehost';
109
CREATE EVENT _letter ON SCHEDULE AT NOW() DO SET @a=@a |
113
ALTER TABLE _table ADD KEY ( _letter ) |
114
ALTER TABLE _table DROP KEY _letter ;
117
CREATE PROCEDURE _letter ( procedure_parameter_list ) BEGIN SELECT COUNT(*) INTO @a FROM _table; END ; |
118
DROP PROCEDURE IF EXISTS _letter |
119
CREATE FUNCTION _letter ( function_parameter_list ) RETURNS INTEGER RETURN 1 |
120
DROP FUNCTION IF EXISTS _letter ;
123
ALTER TABLE _table PARTITION BY KEY() PARTITIONS _digit |
124
ALTER TABLE _table REMOVE PARTITIONING ;
127
CREATE DATABASE IF NOT EXISTS _letter |
128
DROP DATABASE IF EXISTS _letter ;
131
GRANT ALL PRIVILEGES ON _letter . * TO 'someuser'@'somehost' |
132
REVOKE ALL PRIVILEGES ON _letter . * FROM 'someuser'@'somehost' ;
135
CREATE TABLE _letter LIKE _table |
139
ALTER TABLE _table DROP PRIMARY KEY |
140
ALTER TABLE _table ADD PRIMARY KEY (`pk`) ;
143
GRANT ALL PRIVILEGES ON test . _letter TO 'someuser'@'somehost' |
144
REVOKE ALL PRIVILEGES ON test . _letter FROM 'someuser'@'somehost' ;
147
CREATE TRIGGER _letter BEFORE INSERT ON _table FOR EACH ROW BEGIN INSERT INTO _table SELECT * FROM _table LIMIT 0 ; END ; |
148
DROP TRIGGER IF EXISTS _letter;
151
GRANT admin_privilege_list ON * . * to 'someuser'@'somehost' |
152
REVOKE admin_privilege_list ON * . * FROM 'someuser'@'somehost' ;
154
admin_privilege_list:
156
admin_privilege , admin_privilege_list ;
171
CREATE OR REPLACE VIEW _letter AS SELECT * FROM _table |
172
DROP VIEW IF EXISTS _letter ;
174
function_parameter_list:
175
_letter INTEGER , _letter INTEGER ;
177
procedure_parameter_list:
179
parameter , procedure_parameter_list ;
190
privilege_item , privilege_list ;
193
privilege ( field_list );
196
INSERT | SELECT | UPDATE ;
200
_field , field_list ;
215
new_select_item , select_list ;
219
(new_table_item join_type new_table_item ON ( current_table_item . _field = previous_table_item . _field ) ) ;
222
INNER JOIN | left_right outer JOIN | STRAIGHT_JOIN ;
234
not (where_list AND where_item) |
235
not (where_list OR where_item) ;
241
existing_table_item . _field sign value |
242
existing_table_item . _field sign existing_table_item . _field ;
245
{ scalar(@nonaggregates) > 0 ? " GROUP BY ".join (', ' , @nonaggregates ) : "" };
248
| HAVING having_list;
252
not (having_list AND having_item) |
253
not (having_list OR having_item) |
254
having_item IS not NULL ;
257
existing_table_item . _field sign value ;
261
ORDER BY order_by_list |
262
ORDER BY order_by_list LIMIT _digit ;
265
{ join(', ', map { "field".$_ } (1..$fields) ) };
269
order_by_item , order_by_list ;
272
existing_table_item . _field ;
275
| LIMIT _digit | LIMIT _digit OFFSET _digit;
278
nonaggregate_select_item |
279
nonaggregate_select_item |
280
aggregate_select_item;
282
nonaggregate_select_item:
283
table_one_two . _field AS { my $f = "field".++$fields ; push @nonaggregates , $f ; $f} ;
285
aggregate_select_item:
286
aggregate table_one_two . _field ) AS { "field".++$fields };
288
# Only 20% table2, since sometimes table2 is not present at all
291
table1 { $last_table = $tables[1] } |
292
table2 { $last_table = $tables[2] } ;
295
COUNT( | SUM( | MIN( | MAX( ;
298
database . _table AS { $database_names[++$tables] = $last_database ; $table_names[$tables] = $last_table ; "table".$tables };
301
{ $last_database = $prng->arrayElement(['mysql','INFORMATION_SCHEMA','test']); return $last_database };
304
{ $last_database = $database_names[$tables] ; $last_table = $table_names[$tables] ; "table".$tables };
307
{ $last_database = $database_names[$tables-1] ; $last_table = $table_names[$tables-1] ; "table".($tables - 1) };
310
{ my $i = $prng->int(1,$tables) ; $last_database = $database_names[$i]; $last_table = $table_names[$i] ; "table".$i };
312
existing_select_item:
313
{ "field".$prng->int(1,$fields) };
316
= | > | < | != | <> | <= | >= ;
319
_digit | _char(2) | _datetime ;