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

« back to all changes in this revision

Viewing changes to tests/randgen/conf/drizzle/limit_compare_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) 2008-2009 Sun Microsystems, Inc. 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
query:
 
19
        select | select | select | select | select |
 
20
        dml | dml | dml | dml | dml |
 
21
        transaction |
 
22
        select | select | select | select | select |
 
23
        dml | dml | dml | dml | dml |
 
24
        transaction |
 
25
        select | select | select | select | select |
 
26
        dml | dml | dml | dml | dml |
 
27
        transaction |
 
28
        alter 
 
29
;
 
30
 
 
31
dml:
 
32
        update | insert | delete ;
 
33
 
 
34
select:
 
35
        SELECT * FROM _table where order_by limit;
 
36
 
 
37
where:
 
38
        |
 
39
        WHERE _field sign value |
 
40
        WHERE _field BETWEEN value AND value ;
 
41
#       WHERE _field IN ( value , value , value , value , value , value ) ;
 
42
 
 
43
sign:
 
44
        > | < | = | >= | <> | <= | != ;
 
45
 
 
46
order_by:
 
47
        ORDER BY _field , `pk` ;
 
48
 
 
49
limit:
 
50
        LIMIT _digit | LIMIT _tinyint_unsigned | LIMIT 65535 ;
 
51
 
 
52
insert:
 
53
        INSERT INTO _table ( _field , _field ) VALUES ( value , value ) ;
 
54
 
 
55
update:
 
56
        int_update | char_update ;
 
57
 
 
58
int_update:
 
59
        UPDATE _table SET int_field = int_value where order_by limit;
 
60
 
 
61
char_update:
 
62
        UPDATE _table SET char_field = char_value where order_by limit;
 
63
 
 
64
delete:
 
65
        DELETE FROM _table where order_by LIMIT digit ;
 
66
 
 
67
transaction: START TRANSACTION | COMMIT | ROLLBACK ;
 
68
 
 
69
alter:
 
70
        ALTER ONLINE TABLE _table DROP KEY letter |
 
71
        ALTER ONLINE TABLE _table DROP KEY _field |
 
72
        ALTER ONLINE TABLE _table ADD KEY letter ( key_field ) |
 
73
        ALTER ONLINE TABLE _table ADD KEY letter ( key_field ) ;
 
74
 
 
75
value:
 
76
        _english | _digit | _quid | _digit ;
 
77
 
 
78
int_value:
 
79
  _digit | _tinyint_unsigned | 20 | 30 | 50 | 100  ;
 
80
 
 
81
small_int_value:
 
82
  _digit | 10 | 20 | 30 | 50 | 100 | 250 ; 
 
83
 
 
84
char_value:
 
85
   _letter | _english | _quid ;
 
86
 
 
87
# Use only indexed fields:
 
88
 
 
89
_field:
 
90
  char_field | int_field ;
 
91
 
 
92
key_field:
 
93
  char_key_field | int_field ;
 
94
 
 
95
char_field:
 
96
     `col_char_10` | `col_char_10_key` | `col_char_10_not_null` | `col_char_10_not_null_key` |
 
97
     `col_char_1024` | `col_char_1024_key` | `col_char_1024_not_null` | `col_char_1024_not_null_key` |
 
98
     `col_text_not_null` | `col_text_not_null_key` | `col_text_key` | `col_text` ;
 
99
 
 
100
int_field: 
 
101
     `col_int` | `col_int_key` | `col_int_not_null_key` | `col_int_not_null` |
 
102
     `col_bigint` | `col_bigint_key` | `col_bigint_not_null` | `col_bigint_not_null_key` ; 
 
103
 
 
104
char_key_field:
 
105
# we have this rule to apply a length to blob columns used in a key
 
106
     `col_char_10` | `col_char_10_key` | `col_char_10_not_null` | `col_char_10_not_null_key` |
 
107
     `col_char_1024` | `col_char_1024_key` | `col_char_1024_not_null` | `col_char_1024_not_null_key` |
 
108
     `col_text_not_null`(small_int_value) | `col_text_not_null_key`(small_int_value) | `col_text_key`(small_int_value) | `col_text`(small_int_value) ;
 
109
 
 
110
     
 
111