2
# Test bugs in the MyISAM code with blobs
6
drop table if exists t1;
9
# Bug #2159 (Problem with update of blob to > 16M)
11
CREATE TABLE t1 (data LONGBLOB) ENGINE=myisam;
12
INSERT INTO t1 (data) VALUES (NULL);
13
UPDATE t1 set data=repeat('a',18*1024*1024);
14
select length(data) from t1;
15
delete from t1 where left(data,1)='a';
18
INSERT INTO t1 (data) VALUES (repeat('a',1*1024*1024));
19
INSERT INTO t1 (data) VALUES (repeat('b',16*1024*1024-1024));
20
delete from t1 where left(data,1)='b';
23
# now we have two blocks in the table, first is a 1M record and second is
26
UPDATE t1 set data=repeat('c',17*1024*1024);
28
delete from t1 where left(data,1)='c';
31
INSERT INTO t1 set data=repeat('a',18*1024*1024);
32
select length(data) from t1;
33
alter table t1 modify data blob;
34
select length(data) from t1;
37
CREATE TABLE t1 (data BLOB) ENGINE=myisam;
38
INSERT INTO t1 (data) VALUES (NULL);
39
UPDATE t1 set data=repeat('a',18*1024*1024);
40
select length(data) from t1;