File: blob_redo.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (63 lines) | stat: -rw-r--r-- 1,582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--source include/have_innodb_max_16k.inc

--echo #
--echo # Bug #19498877 LIMITATION ON BLOB SIZE IS TOO STRICT, BLOB CAN
--echo # BE 10% OF TOTAL REDO LOG SIZE
--echo #

SET GLOBAL max_allowed_packet = 100*1024*1024;

--echo # Connection big_packets:
connect(big_packets,localhost,root,,);
connection big_packets;

CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB;

# Insert a few rows (it doesn't really matter how many). These transactions
# are committed once they are acked, so they should not be lost.
INSERT INTO t1 (a, b) VALUES (1, '1');
INSERT INTO t1 (a, b) VALUES (2, '2');
INSERT INTO t1 (a, b) VALUES (3, '3');
INSERT INTO t1 (a, b) VALUES (4, '4');
INSERT INTO t1 (a, b) VALUES (5, '5');

start transaction;
INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 6*1024*1024));

--echo # Connection default:
connection default;

# Wait for 300 seconds instead of the default 100
--let $wait_counter= 3000
--source include/kill_and_restart_mysqld.inc

--disconnect big_packets

# We should see (1,2,3,4,5) here.
SELECT a, b FROM t1;

SET GLOBAL max_allowed_packet = 100*1024*1024;

--echo # Connection big_packets:
connect(big_packets,localhost,root,,);

start transaction;
UPDATE t1 SET b = REPEAT('a', 6*1024*1024) WHERE a = 1;

--echo # Connection default:
connection default;

# Wait for 300 seconds instead of the default 100
--let $wait_counter= 3000
--source include/kill_and_restart_mysqld.inc

--echo # Connection default:
connection default;

--disconnect big_packets

# We should see (1,2,3,4,5) here.
SELECT a, b FROM t1;

# Clean up.
DROP TABLE t1;