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

Quelle  ps_in_func-locks-01.inc   Sprache: Delphi

 

# Run $routine, which parks itself on the user lock 'l1' after having read
# t1, and check that ALTER TABLE t1 can complete meanwhile, i.e. that the
# metadata lock taken on t1 was released at the end of the statement which
# read it, rather than kept until $routine returns.
#
# Parameters:
#   $routine  procedure to call
#   $comment  table comment ALTER TABLE sets, to wait for

connect (c2,localhost,root,,);
connect (c3,localhost,root,,);

connection c2;
--disable_ps2_protocol
SELECT GET_LOCK('l1', 0);
--enable_ps2_protocol

connection default;
--send_eval CALL $routine()

connection c3;
--let $wait_condition= SELECT COUNT(*) FROM information_schema.processlist WHERE state='User lock'
--source include/wait_condition.inc
--send_eval ALTER TABLE t1 COMMENT '$comment'

connection c2;
--let $wait_condition= SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='test' AND table_name='t1' AND table_comment='$comment'
--source include/wait_condition.inc
--echo # ALTER TABLE t1 completed while $routine is still running
--disable_ps2_protocol
SELECT RELEASE_LOCK('l1');
--enable_ps2_protocol

connection default;
--reap
--disable_ps2_protocol
SELECT RELEASE_LOCK('l1');
--enable_ps2_protocol
connection c3;
--reap

connection default;
DELETE FROM t2;
disconnect c2;
disconnect c3;

Messung V0.5 in Prozent
C=100 H=50 G=79

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-10-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.