"Fossies" - the Fresh Open Source Software Archive

Member "drizzle-7.1.36-stable/tests/suite/regression/t/680028.test" (6 May 2012, 682 Bytes) of package /linux/misc/old/drizzle-7.1.36-stable.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Kill a connection while flush table with read lock is occuring.
    2 connect (con1, localhost, root,,);
    3 connect (con2, localhost, root,,);
    4 
    5 CREATE TABLE CONNECTION_ID (id int);
    6 CREATE TABLE t1_680028 (a serial);
    7 
    8 # Jump to connection one and save our ID.
    9 connection con1;
   10 insert into CONNECTION_ID VALUES (CONNECTION_ID());
   11 
   12 connection con2;
   13 EXECUTE "SELECT @id:=id FROM CONNECTION_ID LIMIT 1" WITH NO RETURN;
   14 
   15 connection default;
   16 FLUSH TABLES WITH READ LOCK;
   17 
   18 connection con1;
   19 SEND select * from t1_680028 for update;
   20 
   21 connection con2;
   22 KILL @id;
   23 
   24 connection default;
   25 SELECT GLOBAL_READ_LOCK();
   26 UNLOCK tables;
   27 SELECT GLOBAL_READ_LOCK();
   28 DROP TABLE t1_680028;
   29 DROP TABLE CONNECTION_ID;