@@ -296,10 +296,17 @@ SELECT * FROM t4;
296
296
297
297
connection con1;
298
298
--echo # But metadata lock on old name can be still kept.
299
+ # Disable prepared statements, since for them the below check
300
+ # works differently. The prepare phase of statements execution
301
+ # acquires weaker S metadata lock (which do not conflict with
302
+ # SNRW locks held by LOCK TABLE WRITE) and manages to discover
303
+ # that table with such name doesn't exist.
304
+ --disable_ps_protocol
299
305
SET @@lock_wait_timeout= 1;
300
306
--error ER_LOCK_WAIT_TIMEOUT
301
307
SELECT * FROM t2;
302
308
SET @@lock_wait_timeout= @old_lock_wait_timeout;
309
+ --enable_ps_protocol
303
310
--echo # New name should not be locked.
304
311
SELECT * FROM t4;
305
312
@@ -396,10 +403,17 @@ SELECT * FROM t4;
396
403
397
404
connection con1;
398
405
--echo # But metadata lock on old name can be still kept.
406
+ # Disable prepared statements, since for them the below check
407
+ # works differently. The prepare phase of statements execution
408
+ # acquires weaker S metadata lock (which do not conflict with
409
+ # SNRW locks held by LOCK TABLE WRITE) and manages to discover
410
+ # that table with such name doesn't exist.
411
+ --disable_ps_protocol
399
412
SET @@lock_wait_timeout= 1;
400
413
--error ER_LOCK_WAIT_TIMEOUT
401
414
SELECT * FROM t2;
402
415
SET @@lock_wait_timeout= @old_lock_wait_timeout;
416
+ --enable_ps_protocol
403
417
--echo # New name should not be locked.
404
418
SELECT * FROM t4;
405
419
@@ -496,12 +510,19 @@ SELECT * FROM t4;
496
510
497
511
connection con1;
498
512
--echo # Metadata locks on both old and new names are still kept.
513
+ # Disable prepared statements, since for them the below check
514
+ # works differently. The prepare phase of statements execution
515
+ # acquires weaker S metadata locks (which do not conflict with
516
+ # SNRW locks held by LOCK TABLE WRITE) and manages to discover
517
+ # that tables with such names don't exist.
518
+ --disable_ps_protocol
499
519
SET @@lock_wait_timeout= 1;
500
520
--error ER_LOCK_WAIT_TIMEOUT
501
521
SELECT * FROM t2;
502
522
--error ER_LOCK_WAIT_TIMEOUT
503
523
SELECT * FROM t4;
504
524
SET @@lock_wait_timeout= @old_lock_wait_timeout;
525
+ --enable_ps_protocol
505
526
506
527
connection default;
507
528
UNLOCK TABLES;
@@ -528,12 +549,19 @@ SELECT * FROM t3;
528
549
529
550
connection con1;
530
551
--echo # However, metadata locks on both old and new names are still kept.
552
+ # Disable prepared statements, since for them the below check
553
+ # works differently. The prepare phase of statements execution
554
+ # acquires weaker S metadata locks (which do not conflict with
555
+ # SNRW locks held by LOCK TABLE WRITE) and manages to discover
556
+ # that tables with such names don't exist.
557
+ --disable_ps_protocol
531
558
SET @@lock_wait_timeout= 1;
532
559
--error ER_LOCK_WAIT_TIMEOUT
533
560
SELECT * FROM t2;
534
561
--error ER_LOCK_WAIT_TIMEOUT
535
562
SELECT * FROM t3;
536
563
SET @@lock_wait_timeout= @old_lock_wait_timeout;
564
+ --enable_ps_protocol
537
565
538
566
connection default;
539
567
--echo # And delete from parent table is possible and doesn't cause asserts.
0 commit comments