Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/storage_engine/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 923 B image not shown  

Quelle  lock_concurrent.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[84] Lisp[37] Masm[37]} [Methode: maximale Elemente, drei Dimensionen]

#
# READ LOCAL / WRITE CONCURRENT locks.
# This test is separate from the main lock.test
# because the feature is likely to be unsupported.
#

--source have_engine.inc

SET lock_wait_timeout = 1;

--let $create_definition = a $int_col
--source create_table.inc

LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ;

connect (con1,localhost,root,,);
SET lock_wait_timeout = 1;

# If this statement fails with ER_LOCK_WAIT_TIMEOUT,
# most likely the engine does not support LOCK .. WRITE CONCURRENT
LOCK TABLES t1 READ LOCAL;
if ($mysql_errname)
{
  --let $functionality = LOCK .. WRITE CONCURRENT
  --source unexpected_result.inc
}

UNLOCK TABLES;

connection default;
UNLOCK TABLES;

connection con1;
LOCK TABLES t1 READ LOCAL;

connection default;
LOCK TABLES t1 WRITE CONCURRENT, t1 AS t2 READ;
UNLOCK TABLES;

connection con1;
UNLOCK TABLES;
disconnect con1;

connection default;
DROP TABLE t1;

--source cleanup_engine.inc


[Dauer der Verarbeitung: 0.13 Sekunden, vorverarbeitet 2026-10-08]