1--source include/not_embedded.inc 2 3--echo # 4--echo # WL#5968: Implement START TRANSACTION READ (WRITE|ONLY); 5--echo # 6 7--echo # 8--echo # Test9: The --transaction-read-only startup option. 9 10--echo # Check that the option was set by the .opt file. 11SELECT @@tx_read_only; 12 13--echo # Also for new connections. 14connect (con1, localhost, root); 15SELECT @@tx_read_only; 16SET SESSION TRANSACTION READ WRITE; 17SELECT @@tx_read_only; 18disconnect con1; 19--source include/wait_until_disconnected.inc 20 21connection default; 22SELECT @@tx_read_only; 23 24 25--echo # 26--echo # Test 10: SET TRANSACTION / START TRANSACTION + implicit commit. 27 28SET SESSION TRANSACTION READ WRITE; 29--disable_ps_protocol 30SET TRANSACTION READ ONLY; 31--echo # Since DDL does implicit commit before starting, SET TRANSACTION 32--echo # will have no effect because the "next" transaction will already 33--echo # be over before the DDL statement starts. 34CREATE TABLE t1 (a INT); 35 36START TRANSACTION READ ONLY; 37--echo # The same happens with START TRANSACTION 38DROP TABLE t1; 39--enable_ps_protocol 40 41--echo # 42--echo # Test 11: INSERT DELAYED 43 44CREATE TABLE t1(a INT); 45START TRANSACTION READ ONLY; 46--error ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION 47INSERT DELAYED INTO t1 VALUES (1); 48COMMIT; 49DROP TABLE t1; 50