~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to mysql-test/suite/falcon_team/t/falcon_deadlock.test

auto-merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
--echo # Switch to connection conn2
62
62
connection conn2;
63
63
# If we set Falcon to
64
 
#     falcon_consistent_read = off
 
64
#     falcon_consistent_read = on
65
65
#
66
66
# we should get a
67
67
#     Record has changed since last read in table 't1'
68
 
# here. Please note that falcon_consistent_read = off
 
68
# here. Please note that falcon_consistent_read = on
69
69
# is the default setting.
70
70
--error ER_CHECKREAD
71
71
--reap
118
118
--echo # Switch to connection conn2
119
119
connection conn2;
120
120
# If we set Falcon to
121
 
#     falcon_consistent_read = off
 
121
#     falcon_consistent_read = on
122
122
#
123
123
# we should get a
124
124
#     Record has changed since last read in table 't1'
125
 
# here. Please note that falcon_consistent_read = off
 
125
# here. Please note that falcon_consistent_read = on
126
126
# is the default setting.
127
127
--error ER_CHECKREAD
128
128
--reap
129
 
COMMIT;
 
129
ROLLBACK;
130
130
 
131
131
--echo # Switch to connection conn1
132
132
connection conn1;
160
160
--echo # Switch to connection conn2
161
161
connection conn2;
162
162
 
163
 
# The following query should hang because conn1 is locking the record
164
163
UPDATE t2 SET a = 2 WHERE b = 0;
165
164
SELECT * FROM t2;
 
165
# The following query should hang because conn1 is locking the record
166
166
--real_sleep 1
167
167
--send UPDATE t1 SET x = 2 WHERE id = 0
168
168
 
175
175
--echo # Switch to connection conn2
176
176
connection conn2;
177
177
# If we set Falcon to
178
 
#     falcon_consistent_read = off
 
178
#     falcon_consistent_read = on
179
179
#
180
180
# we should get a
181
181
#     Record has changed since last read in table 't1'
182
 
# here. Please note that falcon_consistent_read = off
 
182
# here. Please note that falcon_consistent_read = on
183
183
# is the default setting.
184
184
--error ER_CHECKREAD
185
185
--reap
186
 
COMMIT;
 
186
ROLLBACK;
187
187
 
188
188
--echo # Switch to connection conn1
189
189
connection conn1;
194
194
# --- Check                                         --- #
195
195
# ----------------------------------------------------- #
196
196
SELECT count(*) FROM t1;
 
197
SELECT count(*) FROM t2;
197
198
 
198
199
# ----------------------------------------------------- #
199
200
# --- Final cleanup                                 --- #