mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / r / mysqlbinlog_row_big.result
blob0bdbfdcee3ad910a47bb6c01e487fb57c9c04d0a
2 # Preparatory cleanup.
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.
26 RESET MASTER;
28 # Create a test table.
30 CREATE TABLE t1 (
31 c1 LONGTEXT
32 ) ENGINE=MyISAM DEFAULT CHARSET latin1;
34 # Show how many rows are affected by each statement.
37 # Insert some big rows.
39 64MB
40 INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 4194304));
41 affected rows: 1
42 32MB
43 INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152));
44 affected rows: 1
45 4MB
46 INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 262144));
47 affected rows: 1
48 512KB
49 INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 32768));
50 affected rows: 1
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;
56 LENGTH(c1)      67108864
57 LENGTH(c1)      33554432
58 LENGTH(c1)      4194304
59 LENGTH(c1)      524288
60 affected rows: 4
62 # Grow the rows by updating.
64 UPDATE t1 SET c1 = CONCAT(c1, c1);
65 affected rows: 4
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;
72 LENGTH(c1)      134217728
73 LENGTH(c1)      1048576
74 LENGTH(c1)      67108864
75 LENGTH(c1)      8388608
76 affected rows: 4
78 # Delete the rows.
80 DELETE FROM t1 WHERE c1 >= 'ManyMegaByteBlck';
81 affected rows: 4
83 # Hide how many rows are affected by each statement.
86 # Flush all log buffers to the log file.
88 FLUSH LOGS;
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.
97 # Cleanup.
99 # reset variable value to pass testcase checks
100 SET @@global.max_allowed_packet = 1048576;
101 DROP TABLE t1;
102 remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out