~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/r/lock.result

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
1
129
129
1
130
130
drop view v_bug5719;
 
131
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
131
132
 
132
133
sic: did not left LOCK TABLES mode automatically
133
134
 
134
135
select * from t1;
135
136
ERROR HY000: Table 't1' was not locked with LOCK TABLES
136
137
unlock tables;
137
 
create view v_bug5719 as select * from t1;
 
138
create or replace view v_bug5719 as select * from t1;
138
139
lock tables v_bug5719 write;
139
140
select * from v_bug5719;
140
141
a
173
174
 
174
175
drop table t2, t3;
175
176
End of 5.1 tests.
 
177
#
 
178
# Ensure that FLUSH TABLES doesn't substitute a base locked table
 
179
# with a temporary one.
 
180
#
 
181
drop table if exists t1, t2;
 
182
create table t1 (a int);
 
183
create table t2 (a int);
 
184
lock table t1 write, t2 write;
 
185
create temporary table t1 (a int);
 
186
flush table t1;
 
187
drop temporary table t1;
 
188
select * from t1;
 
189
a
 
190
unlock tables;
 
191
drop table t1, t2;
 
192
#
 
193
# Ensure that REPAIR .. USE_FRM works under LOCK TABLES.
 
194
#
 
195
drop table if exists t1, t2;
 
196
create table t1 (a int);
 
197
create table t2 (a int);
 
198
lock table t1 write, t2 write;
 
199
repair table t1 use_frm;
 
200
Table   Op      Msg_type        Msg_text
 
201
test.t1 repair  status  OK
 
202
repair table t1 use_frm;
 
203
Table   Op      Msg_type        Msg_text
 
204
test.t1 repair  status  OK
 
205
select * from t1;
 
206
a
 
207
select * from t2;
 
208
a
 
209
repair table t2 use_frm;
 
210
Table   Op      Msg_type        Msg_text
 
211
test.t2 repair  status  OK
 
212
repair table t2 use_frm;
 
213
Table   Op      Msg_type        Msg_text
 
214
test.t2 repair  status  OK
 
215
select * from t1;
 
216
a
 
217
unlock tables;
 
218
drop table t1, t2;
 
219
#
 
220
# Ensure that mi_copy_status is called for two instances
 
221
# of the same table when it is reopened after a flush.
 
222
 
223
drop table if exists t1;
 
224
drop view if exists v1;
 
225
create table t1 (c1 int);
 
226
create view v1 as select * from t1;
 
227
lock tables t1 write, v1 write;
 
228
flush table t1;
 
229
insert into t1 values (33);
 
230
flush table t1;
 
231
select * from t1;
 
232
c1
 
233
33
 
234
unlock tables;
 
235
drop table t1;
 
236
drop view v1;
 
237
#
 
238
# End of 6.0 tests.
 
239
#