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

« back to all changes in this revision

Viewing changes to tests/randgen/conf/engines/heap/heap_dml_single.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
#
 
2
# The goal of this grammar is to stress test the operation of the HEAP storage engine by:
 
3
#
 
4
# * Creating a small set of tables and executing various operations over those tables
 
5
#
 
6
# * Employ TEMPORARY tables in as many DML contexts as possible
 
7
 
8
# This grammar goes together with the respective mysqld --init file that creates the tables
 
9
#
 
10
 
 
11
query:
 
12
        insert | insert | insert |
 
13
        select | delete | update ;
 
14
 
 
15
select:
 
16
        SELECT select_list FROM table_name any_where |
 
17
        SELECT select_list FROM table_name restrictive_where order_by |
 
18
        SELECT select_list FROM table_name restrictive_where full_order_by LIMIT _digit ;
 
19
 
 
20
select_list:
 
21
        field_name |
 
22
        field_name , select_list ;
 
23
 
 
24
delete:
 
25
        DELETE FROM table_name restrictive_where |
 
26
        DELETE FROM table_name restrictive_where |
 
27
        DELETE FROM table_name restrictive_where |
 
28
        DELETE FROM table_name restrictive_where |
 
29
        DELETE FROM table_name any_where full_order_by LIMIT _digit ;
 
30
 
 
31
update:
 
32
        UPDATE table_name SET update_list restrictive_where |
 
33
        UPDATE table_name SET update_list restrictive_where |
 
34
        UPDATE table_name SET update_list restrictive_where |
 
35
        UPDATE table_name SET update_list restrictive_where |
 
36
        UPDATE table_name SET update_list any_where full_order_by LIMIT _digit ;
 
37
 
 
38
any_where:
 
39
        permissive_where | restrictive_where;
 
40
 
 
41
restrictive_where:
 
42
        WHERE field_name LIKE(CONCAT( _varchar(2), '%')) |
 
43
        WHERE field_name = _varchar(2) |
 
44
        WHERE field_name BETWEEN _varchar(2) AND _varchar(2) ;
 
45
 
 
46
permissive_where:
 
47
        WHERE field_name comp_op value ;
 
48
 
 
49
comp_op:
 
50
        > | < | >= | <= | <> | != | <=> ;
 
51
 
 
52
update_list:
 
53
        field_name = value |
 
54
        field_name = value , update_list ;
 
55
 
 
56
insert:
 
57
        insert_single | insert_select |
 
58
        insert_multi | insert_multi | insert_multi ;
 
59
 
 
60
insert_single:
 
61
        INSERT IGNORE INTO table_name VALUES ( value , value , value , value ) ;
 
62
 
 
63
insert_multi:
 
64
        INSERT IGNORE INTO table_name VALUES value_list ;
 
65
 
 
66
insert_select:
 
67
        INSERT IGNORE INTO table_name SELECT * FROM table_name restrictive_where full_order_by LIMIT _tinyint_unsigned ;
 
68
 
 
69
order_by:
 
70
        | ORDER BY field_name ;
 
71
 
 
72
full_order_by:
 
73
        ORDER BY f1 , f2 , f3 , f4 ;
 
74
 
 
75
value_list:
 
76
        ( value , value, value , value ) |
 
77
        ( value , value, value , value ) , value_list |
 
78
        ( value , value, value , value ) , value_list ;
 
79
 
 
80
value:
 
81
        small_value | large_value ;
 
82
 
 
83
small_value:
 
84
        _digit | _varchar(1) | _varchar(2) | _varchar(32) | NULL ;
 
85
 
 
86
large_value:
 
87
        _varchar(32) | _varchar(1024) | _data | NULL ;
 
88
 
 
89
 
 
90
field_name:
 
91
        f1 | f2 | f3 | f4 ;
 
92
 
 
93
 
 
94
table_name:
 
95
        heap_complex_indexes |
 
96
        heap_large_block |
 
97
        heap_noindexes_large |
 
98
        heap_noindexes_small |
 
99
        heap_oversize_pk |
 
100
        heap_small_block |
 
101
        heap_standard
 
102
;