1drop table if exists t1;
2CREATE TABLE t1 (data LONGBLOB) ENGINE=myisam;
3INSERT INTO t1 (data) VALUES (NULL);
4UPDATE t1 set data=repeat('a',18*1024*1024);
5select length(data) from t1;
6length(data)
718874368
8delete from t1 where left(data,1)='a';
9check table t1;
10Table	Op	Msg_type	Msg_text
11test.t1	check	status	OK
12truncate table t1;
13INSERT INTO t1 (data) VALUES (repeat('a',1*1024*1024));
14INSERT INTO t1 (data) VALUES (repeat('b',16*1024*1024-1024));
15delete from t1 where left(data,1)='b';
16check table t1;
17Table	Op	Msg_type	Msg_text
18test.t1	check	status	OK
19UPDATE t1 set data=repeat('c',17*1024*1024);
20check table t1;
21Table	Op	Msg_type	Msg_text
22test.t1	check	status	OK
23delete from t1 where left(data,1)='c';
24check table t1;
25Table	Op	Msg_type	Msg_text
26test.t1	check	status	OK
27INSERT INTO t1 set data=repeat('a',18*1024*1024);
28select length(data) from t1;
29length(data)
3018874368
31SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
32alter table t1 modify data blob;
33Warnings:
34Warning	1265	Data truncated for column 'data' at row 1
35select length(data) from t1;
36length(data)
3765535
38drop table t1;
39CREATE TABLE t1 (data BLOB) ENGINE=myisam;
40INSERT INTO t1 (data) VALUES (NULL);
41UPDATE IGNORE t1 set data=repeat('a',18*1024*1024);
42Warnings:
43Warning	1265	Data truncated for column 'data' at row 1
44select length(data) from t1;
45length(data)
4665535
47drop table t1;
48