Debian Codegraph @

mysql-test/suite/innodb/t/undo.test

raw
1 --source include/have_innodb_max_16k.inc
2
3 let $ps16 = `SELECT truncate(@@innodb_page_size / 16, 0)`;
4 let $ps316 = `SELECT truncate(3 * @@innodb_page_size / 16, 0)`;
5
6 # Test creating too big undo log record for a table.
7 --disable_query_log
8 eval CREATE TABLE t0 (a blob, b blob, c blob, d blob, e blob, f blob,
9 index(a($ps316)), index(b($ps16)), index(c($ps16)),
10 index(d($ps16)), index(e($ps16)), index(f($ps16))) row_format=dynamic;
11 --enable_query_log
12
13 BEGIN;
14 INSERT INTO t0 VALUES(
15 repeat('a',10000),repeat('b',10000),repeat('c',10000),
16 repeat('d',10000),repeat('e',10000),repeat('f',10000));
17 --error ER_UNDO_RECORD_TOO_BIG
18 UPDATE t0 SET a=substr(a,9999),b=substr(b,9999),c=substr(c,9999),
19 d=substr(d,9999),e=substr(e,9999),f=substr(f,9999);
20 UPDATE t0 SET a=substr(a,9999);
21 SELECT LENGTH(a) FROM t0;
22 ROLLBACK;
23 SELECT * FROM t0;
24 DROP TABLE t0;
25
26 --disable_query_log
27 eval CREATE TEMPORARY TABLE t0 (a blob, b blob, c blob, d blob, e blob, f blob,
28 index(a($ps316)), index(b($ps16)), index(c($ps16)),
29 index(d($ps16)), index(e($ps16)), index(f($ps16))) row_format=dynamic;
30 --enable_query_log
31
32 BEGIN;
33 INSERT INTO t0 VALUES(
34 repeat('a',10000),repeat('b',10000),repeat('c',10000),
35 repeat('d',10000),repeat('e',10000),repeat('f',10000));
36 --error ER_UNDO_RECORD_TOO_BIG
37 UPDATE t0 SET a=substr(a,9999),b=substr(b,9999),c=substr(c,9999),
38 d=substr(d,9999),e=substr(e,9999),f=substr(f,9999);
39 UPDATE t0 SET a=substr(a,9999);
40 SELECT LENGTH(a) FROM t0;
41 ROLLBACK;
42 SELECT * FROM t0;
43 DROP TABLE t0;