~ubuntu-branches/ubuntu/vivid/drizzle/vivid-proposed

« back to all changes in this revision

Viewing changes to tests/test_tools/randgen/conf/engines/maria/maria_dml_alter.yy

  • Committer: Package Import Robot
  • Author(s): Tobias Frost
  • Date: 2013-08-22 20:18:31 UTC
  • mto: (20.1.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20130822201831-gn3ozsh7o7wmc5tk
Tags: upstream-7.2.3
ImportĀ upstreamĀ versionĀ 7.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2008 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
        select | select | select | select | select |
 
21
        select | select | select | select | select |
 
22
        dml | dml | transaction | alter ;
 
23
 
 
24
dml:
 
25
        update | insert | delete ;
 
26
 
 
27
select:
 
28
        SELECT select_item FROM join where order_by limit;
 
29
 
 
30
select_item:
 
31
        * | X . _field ;
 
32
 
 
33
join:
 
34
        _table AS X | 
 
35
        _table AS X LEFT JOIN _table AS Y ON ( X . _field = Y . _field ) ;
 
36
 
 
37
where:
 
38
        |
 
39
        WHERE X . _field < value |
 
40
        WHERE X . _field > value |
 
41
        WHERE X . _field = value ;
 
42
 
 
43
where_delete:
 
44
        |
 
45
        WHERE _field < value |
 
46
        WHERE _field > value |
 
47
        WHERE _field = value ;
 
48
 
 
49
order_by:
 
50
        | ORDER BY X . _field ;
 
51
 
 
52
limit:
 
53
        | LIMIT _digit ;
 
54
        
 
55
insert:
 
56
        INSERT INTO _table ( _field , _field ) VALUES ( value , value ) ;
 
57
 
 
58
update:
 
59
        UPDATE _table AS X SET _field = value where order_by limit ;
 
60
 
 
61
delete:
 
62
        DELETE FROM _table where_delete LIMIT _digit ;
 
63
 
 
64
transaction:
 
65
        START TRANSACTION | COMMIT | ROLLBACK | SAVEPOINT A | ROLLBACK TO SAVEPOINT A;
 
66
 
 
67
value:
 
68
        ' _letter ' | _digit | _date | _datetime | _time | _english ;
 
69
 
 
70
alter:
 
71
        ALTER TABLE _table DROP KEY letter |
 
72
        ALTER TABLE _table DROP KEY _field |
 
73
        ALTER TABLE _table ADD KEY letter ( _field ) ;