4 DROP TABLE IF EXISTS t1;
6 # We need a fixed timestamp to avoid varying results.
8 SET timestamp=1000000000;
10 # We need big packets.
12 # Capture initial value to reset at the end of the test
13 # Now adjust max_allowed_packet
14 SET @@global.max_allowed_packet= 1024*1024*1024;
15 max_allowed_packet is a global variable.
16 In order for the preceding change in max_allowed_packets' value
17 to be seen and used, we must start a new connection.
18 The change does not take effect with the current one.
19 For simplicity, we just disconnect / reconnect connection default here.
20 Disconnecting default connection...
21 Reconnecting default connection...
22 default connection established, continuing with the test
24 # Delete all existing binary logs.
28 # Create a test table.
32 ) ENGINE=MyISAM DEFAULT CHARSET latin1;
34 # Show how many rows are affected by each statement.
37 # Insert some big rows.
40 INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 4194304));
43 INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152));
46 INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 262144));
49 INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 32768));
52 # Show what we have in the table.
53 # Do not display the column value itself, just its length.
55 SELECT LENGTH(c1) FROM t1;
62 # Grow the rows by updating.
64 UPDATE t1 SET c1 = CONCAT(c1, c1);
66 info: Rows matched: 4 Changed: 4 Warnings: 0
68 # Show what we have in the table.
69 # Do not display the column value itself, just its length.
71 SELECT LENGTH(c1) FROM t1;
80 DELETE FROM t1 WHERE c1 >= 'ManyMegaByteBlck';
83 # Hide how many rows are affected by each statement.
86 # Flush all log buffers to the log file.
90 # Call mysqlbinlog to display the log file contents.
91 # NOTE: The output of mysqlbinlog is redirected to
92 # $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out
93 # If you want to examine it, disable remove_file
94 # at the bottom of the test script.
99 # reset variable value to pass testcase checks
100 SET @@global.max_allowed_packet = 1048576;
102 remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out