~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to tests/kewpie/randgen/conf/engines/falcon/falcon_recovery.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
        stall_serial_log_rotation | 
 
20
        serial_log_event | serial_log_event | serial_log_event | serial_log_event | serial_log_event |
 
21
        serial_log_event | serial_log_event | serial_log_event | serial_log_event | serial_log_event |
 
22
        serial_log_event | serial_log_event | serial_log_event | serial_log_event | serial_log_event |
 
23
        serial_log_event | serial_log_event | serial_log_event | serial_log_event | serial_log_event ;
 
24
 
 
25
#
 
26
# This creates a transaction in connection_id = 10 that performs an update and then lives for 1800 seconds. 
 
27
# This makes serial log rotation impossible, resulting in larger serial log files and longer recovery times.
 
28
#
 
29
 
 
30
stall_serial_log_rotation:
 
31
        START TRANSACTION ; CREATE TEMPORARY TABLE IF NOT EXISTS stall ( `f1` INTEGER , `connection_id` INTEGER ) ENGINE = Falcon ; INSERT INTO stall VALUES (_digit, CONNECTION_ID()) ; UPDATE stall SET f1 = f1 + 1 WHERE connection_id = CONNECTION_ID() ; SELECT IF( CONNECTION_ID() = 10 , SLEEP(1800) , 1 ) ;
 
32
 
 
33
serial_log_event:
 
34
        blob_delete |
 
35
        blob_update |
 
36
        checkpoint |
 
37
        commit |
 
38
        create_index |
 
39
        create_section |
 
40
        create_tablespace |
 
41
        data |
 
42
        data_page |
 
43
        delete |
 
44
        delete_index |
 
45
        drop_table |
 
46
        drop_tablespace |
 
47
        free_page |
 
48
        index_add |
 
49
        index_delete |
 
50
        index_page |
 
51
        index_update |
 
52
        inversion_page |
 
53
        overflow_pages |
 
54
        prepare |
 
55
        record_locator |
 
56
        record_stub |
 
57
        rollback |
 
58
        savepoint_rollback |
 
59
        section_line |
 
60
        section_page |
 
61
        section_promotion |
 
62
        sequence |
 
63
        sequence_page |
 
64
        session |
 
65
        switch_log |
 
66
        update_blob |
 
67
        update_index |
 
68
        update_records |
 
69
        version |
 
70
        word_update
 
71
;
 
72
 
 
73
blob_delete:
 
74
        DELETE FROM _table WHERE `col_int` = CONNECTION_ID() LIMIT 1 ;
 
75
 
 
76
blob_update:
 
77
        INSERT INTO _table ( `col_int` , `blob` ) VALUES ( CONNECTION_ID() , _data ) |
 
78
        UPDATE _table SET `blob` = _data WHERE `col_int` = CONNECTION_ID() LIMIT _digit ;
 
79
 
 
80
checkpoint: ;
 
81
 
 
82
commit:
 
83
        START TRANSACTION | COMMIT | COMMIT | COMMIT | COMMIT ;
 
84
 
 
85
create_index:
 
86
        ALTER TABLE _table ADD key_type _letter ( `col_int` ) |
 
87
        ALTER TABLE _table ADD key_type _letter ( `col_int` ) |
 
88
        ALTER TABLE _table ADD key_type _letter ( `col_char_255` ) |
 
89
        ALTER TABLE _table ADD key_type _letter ( `col_char_255` ) ;
 
90
 
 
91
key_type:
 
92
        INDEX | UNIQUE | PRIMARY KEY ;
 
93
 
 
94
create_section:
 
95
        CREATE TABLE IF NOT EXISTS _letter (`f1` VARCHAR(255) ) ENGINE = FALCON TABLESPACE _letter ; INSERT INTO _letter SELECT _field FROM _table ;
 
96
 
 
97
create_tablespace:
 
98
        CREATE TABLESPACE _letter ADD DATAFILE file_name ENGINE = FALCON ;
 
99
 
 
100
data: ;
 
101
 
 
102
data_page: ;
 
103
 
 
104
delete:
 
105
        DELETE FROM _table LIMIT 1;
 
106
 
 
107
delete_index:
 
108
        ALTER TABLE _table DROP INDEX _letter ;
 
109
        
 
110
drop_table:
 
111
        DROP TABLE IF EXISTS _letter ;
 
112
 
 
113
#
 
114
# This is disabled because of bug 39138 
 
115
#
 
116
drop_tablespace:
 
117
#       DROP TABLESPACE _letter ENGINE = FALCON 
 
118
;
 
119
 
 
120
free_page:
 
121
        TRUNCATE TABLE _letter ;
 
122
 
 
123
index_add:
 
124
        INSERT INTO _table ( `col_int` ) VALUES ( _digit ) |
 
125
        INSERT INTO _table ( `col_char_255` ) VALUES ( _english ) ;
 
126
 
 
127
index_delete:
 
128
        DELETE FROM _table LIMIT 1;
 
129
 
 
130
index_page:
 
131
        INSERT INTO _table ( `col_int` ) SELECT `col_int` FROM _table LIMIT _tinyint_unsigned ;
 
132
 
 
133
index_update: ;
 
134
 
 
135
inversion_page: ;
 
136
 
 
137
overflow_pages:
 
138
        insert_big_record ; insert_big_record ; insert_big_record ; insert_big_record ; insert_big_record ; insert_big_record ; insert_big_record ;
 
139
 
 
140
prepare: ;
 
141
 
 
142
record_locator: ;
 
143
 
 
144
record_stub: ;
 
145
 
 
146
rollback:
 
147
        ROLLBACK ;
 
148
 
 
149
savepoint_rollback:
 
150
        SAVEPOINT A | SAVEPOINT A | SAVEPOINT A | SAVEPOINT A |
 
151
        ROLLBACK TO SAVEPOINT A ;
 
152
 
 
153
section_line: ;
 
154
 
 
155
section_page: ;
 
156
 
 
157
section_promotion: ;
 
158
 
 
159
sequence:
 
160
        INSERT INTO _table (`pk`) VALUE ( NULL ) ;
 
161
 
 
162
sequence_page: ;
 
163
 
 
164
session: ;
 
165
 
 
166
switch_log: ;
 
167
 
 
168
update_blob:
 
169
        UPDATE _table SET `blob` = _data WHERE `col_int` = CONNECTION_ID() LIMIT _digit |
 
170
        INSERT INTO _table (`col_int`, `blob`) VALUES ( CONNECTION_ID(), _data ) ;
 
171
 
 
172
update_index:
 
173
        INSERT INTO _table (`col_int`) VALUES ( _digit ) ;
 
174
 
 
175
update_records:
 
176
        UPDATE _table SET `col_int` = `col_int` + 1 LIMIT 1 ;
 
177
 
 
178
version: ;
 
179
 
 
180
word_update: ;
 
181
 
 
182
insert_big_record:
 
183
        INSERT INTO _table ( `col_char_255` ) VALUES ( REPEAT('x', 255) ) ;
 
184
 
 
185
file_name:
 
186
        ''f1'' | ''f2'' | ''f3'' | ''f4'' | ''f5'' | ''f6'' | ''f7'' | ''f8'' | ''f9'' | ''f10'' |
 
187
        ''f11'' | ''f12'' | ''f13'' | ''f14'' | ''f15'' | ''f16'' | ''f17'' | ''f18'' | ''f19'' | ''f20'' ;