~xnox/ubuntu/saucy/drizzle/merge

« back to all changes in this revision

Viewing changes to tests/randgen/conf/replication/replication.yy

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.2.11) (2.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20120619104649-9ij634mxm4x8pp4l
Tags: 1:7.1.36-stable-1ubuntu1
* Merge from Debian unstable. (LP: #987575)
  Remaining changes:
  - Added upstart script.
* debian/drizzle.upstart: dropped logger since upstart logs job
  output now.

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
        binlog_event | binlog_event | binlog_event | binlog_event | binlog_event |
 
20
        binlog_event | binlog_event | binlog_event | binlog_event | binlog_event |
 
21
        binlog_event | binlog_event | binlog_event | binlog_event | binlog_event |
 
22
        binlog_event | binlog_event | binlog_event | binlog_event | binlog_event | ddl ;
 
23
 
 
24
binlog_event:
 
25
        delete_rows_event |
 
26
        write_rows_event |
 
27
        update_rows_event |
 
28
        xid_event |
 
29
        query_event |
 
30
        intvar_event |
 
31
        rand_event |
 
32
        user_var_event |
 
33
        rotate_event ;
 
34
 
 
35
rotate_event:
 
36
        FLUSH LOGS ;
 
37
        
 
38
query_event:
 
39
        binlog_format_statement ; dml ; dml ; dml ; dml ; binlog_format_restore ;
 
40
 
 
41
intvar_event:
 
42
        intvar_event_pk | intvar_event_last_insert_id ;
 
43
 
 
44
intvar_event_pk:
 
45
        binlog_format_statement ; INSERT INTO _table ( `pk` ) VALUES ( NULL ) ; binlog_format_restore ;
 
46
 
 
47
intvar_event_last_insert_id:
 
48
        binlog_format_statement ; INSERT INTO _table ( _field ) VALUES ( LAST_INSERT_ID() ) ; binlog_format_restore ;
 
49
 
 
50
rand_event:
 
51
        binlog_format_statement ; rand_event_dml ; binlog_format_restore ;
 
52
 
 
53
rand_event_dml:
 
54
        INSERT INTO _table ( _field ) VALUES ( RAND () ) |
 
55
        UPDATE _table SET _field = RAND() where ORDER BY RAND () limit |
 
56
        DELETE FROM _table WHERE _field < RAND() limit ;
 
57
 
 
58
user_var_event:
 
59
        binlog_format_statement ; SET @a = value ; user_var_dml ; binlog_format_restore ;
 
60
 
 
61
user_var_dml:
 
62
        INSERT INTO _table ( _field ) VALUES ( @a ) |
 
63
        UPDATE _table SET _field = @a ORDER BY _field LIMIT digit |
 
64
        DELETE FROM _table WHERE _field < @a LIMIT 1 ;
 
65
 
 
66
xid_event:
 
67
        START TRANSACTION | COMMIT | ROLLBACK |
 
68
        SAVEPOINT A | ROLLBACK TO SAVEPOINT A | RELEASE SAVEPOINT A |
 
69
        implicit_commit ;
 
70
 
 
71
implicit_commit:
 
72
        CREATE DATABASE ic ; CREATE TABLE ic . _letter SELECT * FROM _table LIMIT digit ; DROP DATABASE ic |
 
73
        CREATE USER _letter | DROP USER _letter | RENAME USER _letter TO _letter |
 
74
        SET AUTOCOMMIT = ON | SET AUTOCOMMIT = OFF |
 
75
        CREATE TABLE IF NOT EXISTS _letter ENGINE = engine SELECT * FROM _table LIMIT digit |
 
76
        RENAME TABLE _letter TO _letter |
 
77
        TRUNCATE TABLE _letter |
 
78
        DROP TABLE IF EXISTS _letter |
 
79
        LOCK TABLE _table WRITE ; UNLOCK TABLES |
 
80
        SELECT * FROM _table LIMIT digit INTO OUTFILE tmpnam ; LOAD DATA INFILE tmpnam REPLACE INTO TABLE _table ;
 
81
 
 
82
begin_load_query_event:
 
83
        binlog_format_statement ; load_data_infile ; binlog_format_restore ;
 
84
 
 
85
execute_load_query_event:
 
86
        binlog_format_statement ; load_data_infile ; binlog_format_restore ;
 
87
 
 
88
load_data_infile:
 
89
        SELECT * FROM _table ORDER BY _field LIMIT digit INTO OUTFILE tmpnam ; LOAD DATA INFILE tmpnam REPLACE INTO TABLE _table ;
 
90
 
 
91
write_rows_event:
 
92
        binlog_format_row ; insert ; binlog_format_restore ;
 
93
 
 
94
update_rows_event:
 
95
        binlog_format_row ; update ; binlog_format_restore ;
 
96
 
 
97
delete_rows_event:
 
98
        binlog_format_row ; delete ; binlog_format_restore ;
 
99
 
 
100
binlog_format_statement:
 
101
        SET @binlog_format_saved = @@binlog_format ; SET BINLOG_FORMAT = 'STATEMENT' ;
 
102
 
 
103
binlog_format_row:
 
104
        SET @binlog_format_saved = @@binlog_format ; SET BINLOG_FORMAT = 'ROW' ;
 
105
 
 
106
binlog_format_restore:
 
107
        SET BINLOG_FORMAT = @binlog_format_saved ;
 
108
 
 
109
dml:
 
110
        insert | update | delete ;
 
111
 
 
112
insert:
 
113
        INSERT INTO _table ( _field ) VALUES ( value ) ;
 
114
 
 
115
update:
 
116
        UPDATE _table SET _field = value where order_by limit ;
 
117
 
 
118
delete:
 
119
        DELETE FROM _table where LIMIT 1 ;
 
120
 
 
121
ddl:
 
122
        CREATE TRIGGER _letter trigger_time trigger_event ON _table FOR EACH ROW BEGIN procedure_body ; END |
 
123
        CREATE EVENT IF NOT EXISTS _letter ON SCHEDULE EVERY digit SECOND ON COMPLETION PRESERVE DO BEGIN procedure_body ; END ;
 
124
        CREATE PROCEDURE _letter () BEGIN procedure_body ; END ;
 
125
 
 
126
trigger_time:
 
127
        BEFORE | AFTER ;
 
128
 
 
129
trigger_event:
 
130
        INSERT | UPDATE ;
 
131
 
 
132
procedure_body:
 
133
        binlog_event ; binlog_event ; binlog_event ; CALL _letter () ;
 
134
 
 
135
engine:
 
136
        Innodb | MyISAM ;
 
137
 
 
138
where:
 
139
        WHERE _field > value |
 
140
        WHERE _field < value |
 
141
        WHERE _field = value ;
 
142
 
 
143
order_by:
 
144
        | ORDER BY _field ;
 
145
 
 
146
limit:
 
147
        | LIMIT digit ;
 
148
 
 
149
value:
 
150
        _digit | _english | NULL ;