335
335
--source ../plugin/transaction_log/tests/t/truncate_log.inc
338
--echo Testing UPDATE LP Bug#655352
340
DROP TABLE IF EXISTS t1;
345
, col0_int INT DEFAULT NULL
346
, col1_int INT DEFAULT NULL
347
, col2_int INT DEFAULT NULL
348
, col3_int INT DEFAULT NULL
349
, col4_int INT DEFAULT NULL
353
INSERT INTO t1 VALUES (1, 2, 3, 4, 5, 6);
354
INSERT INTO t1 VALUES (2, 20, 30, 40, 50, 60);
356
# check that these 2 updates are in different statements
358
UPDATE t1 SET col0_int = 20 WHERE id = 1;
359
UPDATE t1 SET col1_int = 300 WHERE id = 2;
361
--source ../plugin/transaction_log/tests/t/check_transaction_log.inc
364
# check that these 2 updates are in the same statement
366
UPDATE t1 SET col0_int = 2000 WHERE id = 1;
367
UPDATE t1 SET col0_int = 200 WHERE id = 2;
369
--source ../plugin/transaction_log/tests/t/check_transaction_log.inc
372
# check that these 2 updates are not in the same statement, given the 2nd
373
# updates columns are a subset of the first updates columns
375
UPDATE t1 SET col0_int = 20000, col1_int = 30, col2_int = 40 where id = 1;
376
UPDATE t1 SET col0_int = 2000, col1_int = 3000 where id = 2;
378
--source ../plugin/transaction_log/tests/t/check_transaction_log.inc
382
#check that these 2 updates are not in the same statement, given the 1st
383
# updates columns are a subset of the 2nd updates columns
385
UPDATE t1 SET col0_int = 200000, col1_int = 300 where id = 1;
386
UPDATE t1 SET col0_int = 20000, col1_int = 30000, col2_int = 400 where id = 2;
388
--source ../plugin/transaction_log/tests/t/check_transaction_log.inc
393
# Truncate the log file to reset for the next test
394
--source ../plugin/transaction_log/tests/t/truncate_log.inc