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 769 B image not shown  

Quelle  synchronization.test  Sprache: unbekannt

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

#
# Test for Bug#2385 CREATE TABLE LIKE lacks locking on source and destination
#                   table
#

connect (con1,localhost,root,,);
connect (con2,localhost,root,,);

# locking of source:

CREATE TABLE t1 (x1 INT);
let $1= 10;
while ($1)
{
  connection con1;
    send ALTER TABLE t1 CHANGE x1 x2 INT;
  connection con2;
    CREATE TABLE t2 LIKE t1;
    replace_result x1 xx x2 xx;
    SHOW CREATE TABLE t2;
    DROP TABLE t2;
  connection con1;
    reap;
    send ALTER TABLE t1 CHANGE x2 x1 INT;
  connection con2;
    CREATE TABLE t2 LIKE t1;
    replace_result x1 xx x2 xx;
    SHOW CREATE TABLE t2;
    DROP TABLE t2;
  connection con1;
    reap;
  dec $1;
}
DROP TABLE t1;

connection default;
disconnect con1;
disconnect con2;

--echo # End of 4.1 tests

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