00001 # 00002 # Simple test of the transaction log for when a START TRANSACTION ... COMMIT 00003 # is issued, but no data modifications actually occurred. Also tested is 00004 # a update that does not update anything. 00005 # 00006 # This situation occurs in, for instance, sysbench, which wraps even SELECTs 00007 # in a transaction. 00008 # 00009 00010 --disable_warnings 00011 DROP TABLE IF EXISTS t1; 00012 --enable_warnings 00013 00014 CREATE TABLE t1 ( 00015 id INT NOT NULL PRIMARY KEY 00016 , padding VARCHAR(200) NOT NULL 00017 ); 00018 00019 INSERT INTO t1 VALUES (1, "I love testing."); 00020 INSERT INTO t1 VALUES (2, "I hate testing."); 00021 00022 UPDATE t1 SET id=1 WHERE padding='I love testing.'; 00023 00024 START TRANSACTION; 00025 00026 SELECT * FROM t1 WHERE id = 1; 00027 SELECT * FROM t1 WHERE id = 2; 00028 00029 COMMIT; 00030 00031 DROP TABLE t1;