~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/t/lock_multi.test

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
connection locker;
152
152
let $wait_condition=
153
153
  select count(*) = 1 from information_schema.processlist
154
 
  where state = "Waiting for table" and info = 
 
154
  where state = "Table lock" and info = 
155
155
  "SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1";
156
156
--source include/wait_condition.inc
157
157
# Make test case independent from earlier grants.
181
181
connection writer;
182
182
let $wait_condition=
183
183
  select count(*) = 1 from information_schema.processlist
184
 
  where state = "Flushing tables" and info = "FLUSH TABLES WITH READ LOCK";
 
184
  where state = "Waiting for table" and info = "FLUSH TABLES WITH READ LOCK";
185
185
--source include/wait_condition.inc
186
186
# This must not block.
187
187
CREATE TABLE t2 (c1 int);
209
209
connection writer;
210
210
let $wait_condition=
211
211
  select count(*) = 1 from information_schema.processlist
212
 
  where state = "Flushing tables" and info = "FLUSH TABLES WITH READ LOCK";
 
212
  where state = "Waiting for table" and info = "FLUSH TABLES WITH READ LOCK";
213
213
--source include/wait_condition.inc
214
214
--error 1100
215
215
CREATE TABLE t2 AS SELECT * FROM t1;
366
366
--echo connection: default
367
367
let $wait_condition=
368
368
  select count(*) = 1 from information_schema.processlist
369
 
  where state = "Flushing tables";
 
369
  where state = "Waiting for table";
370
370
--source include/wait_condition.inc
371
371
alter table t1 add column j int;
372
372
connect (insert,localhost,root,,test,,);
374
374
--echo connection: insert
375
375
let $wait_condition=
376
376
  select count(*) = 1 from information_schema.processlist
377
 
  where state = "Flushing tables";
 
377
  where state = "Waiting for table";
378
378
--source include/wait_condition.inc
379
379
--send insert into t1 values (1,2);
380
380
--echo connection: default
424
424
--echo connection: default
425
425
let $wait_condition=
426
426
  select count(*) = 1 from information_schema.processlist
427
 
  where state = "Flushing tables";
 
427
  where state = "Waiting for table";
428
428
--source include/wait_condition.inc
429
429
flush tables;
430
430
let $wait_condition=
431
431
  select count(*) = 1 from information_schema.processlist
432
 
  where state = "Flushing tables";
 
432
  where state = "Waiting for table";
433
433
--source include/wait_condition.inc
434
434
unlock tables;
435
 
let $wait_condition=
436
 
  select count(*) = 0 from information_schema.processlist
437
 
  where state = "Flushing tables";
438
 
--source include/wait_condition.inc
439
435
connection flush;
440
436
--reap
441
437
connection default;
494
490
--echo connection: default
495
491
let $wait_condition=
496
492
  select count(*) = 1 from information_schema.processlist
497
 
  where state = "Flushing tables";
 
493
  where state = "Waiting for table";
498
494
--source include/wait_condition.inc
499
495
flush tables;
500
496
let $wait_condition=
501
497
  select count(*) = 1 from information_schema.processlist
502
 
  where state = "Flushing tables";
 
498
  where state = "Waiting for table";
503
499
--source include/wait_condition.inc
504
500
drop table t1;
505
 
let $wait_condition=
506
 
  select count(*) = 0 from information_schema.processlist
507
 
  where state = "Flushing tables";
508
 
--source include/wait_condition.inc
509
501
connection flush;
510
502
--reap
511
503
connection default;