Going to attempt to explain what i'm doing here.....
I have rigged the engine so that on every 2nd row insert, it returns LOCK_WAIT_TIMEOUT (and calls the appropriate mark_transaction_to_rollback)
So, in a single thread:
+INSERT INTO t1 (id,padding) values (40, "boo"),(41,"scary");
+Got one of the listed errors
which means what *should* happen is that we do the equiv of "begin; insert; insert (error); rollback;"
+begin;
+INSERT INTO t1 (id,padding) VALUES (1, "I love testing.");
+INSERT INTO t1 (id,padding) VALUES (2, "I hate testing.");
+Got one of the listed errors
+update t1 set padding="bar" where id=1;
+commit;
+INSERT INTO t1 (id,padding) VALUES (2, "I hate testing.");
+COMMIT;
+select * from t1;
+pk id padding
+2 1 bar
+3 2 I hate testing.
Note how we do *NOT* have the "boo" line from above.
+CREATE TABLE `test`.`t1` ( `pk` INT NOT NULL AUTO_INCREMENT, `id` INT NOT NULL, `padding` VARCHAR(200) COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`pk`) ) ENGINE=STORAGE_ENGINE_API_TESTER COLLATE = utf8_general_ci;
COMMIT;
START TRANSACTION;
+INSERT INTO `test`.`t1` (`pk`,`id`,`padding`) VALUES (1,40,'boo');
+INSERT INTO `test`.`t1` (`pk`,`id`,`padding`) VALUES (2,1,'I love testing.');
+UPDATE `test`.`t1` SET `padding`='bar' WHERE `pk`=2;
COMMIT;
But notice how we *DO* have it here. We got the rollback to the engine okay, but *NOT* to the transaction log.
START TRANSACTION;
+INSERT INTO `test`.`t1` (`pk`,`id`,`padding`) VALUES (3,2,'I hate testing.');
COMMIT;
START TRANSACTION;
DROP TABLE `test`.`t1`;
Going to attempt to explain what i'm doing here.....
I have rigged the engine so that on every 2nd row insert, it returns LOCK_WAIT_TIMEOUT (and calls the appropriate mark_transactio n_to_rollback)
So, in a single thread:
+INSERT INTO t1 (id,padding) values (40, "boo"), (41,"scary" );
+Got one of the listed errors
which means what *should* happen is that we do the equiv of "begin; insert; insert (error); rollback;"
+begin;
+INSERT INTO t1 (id,padding) VALUES (1, "I love testing.");
+INSERT INTO t1 (id,padding) VALUES (2, "I hate testing.");
+Got one of the listed errors
+update t1 set padding="bar" where id=1;
+commit;
+INSERT INTO t1 (id,padding) VALUES (2, "I hate testing.");
+COMMIT;
+select * from t1;
+pk id padding
+2 1 bar
+3 2 I hate testing.
Note how we do *NOT* have the "boo" line from above.
+CREATE TABLE `test`.`t1` ( `pk` INT NOT NULL AUTO_INCREMENT, `id` INT NOT NULL, `padding` VARCHAR(200) COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (`pk`) ) ENGINE= STORAGE_ ENGINE_ API_TESTER COLLATE = utf8_general_ci; id`,`padding` ) VALUES (1,40,'boo'); id`,`padding` ) VALUES (2,1,'I love testing.');
COMMIT;
START TRANSACTION;
+INSERT INTO `test`.`t1` (`pk`,`
+INSERT INTO `test`.`t1` (`pk`,`
+UPDATE `test`.`t1` SET `padding`='bar' WHERE `pk`=2;
COMMIT;
But notice how we *DO* have it here. We got the rollback to the engine okay, but *NOT* to the transaction log.
START TRANSACTION; id`,`padding` ) VALUES (3,2,'I hate testing.');
+INSERT INTO `test`.`t1` (`pk`,`
COMMIT;
START TRANSACTION;
DROP TABLE `test`.`t1`;