1# This testcase throws following error when run with InnoDB as Default 2# Unknown/unsupported storage engine: InnoDB 3# All tests are required to run with MyISAM 4# MTR starts mysqld with MyISAM as default 5 6--source include/force_myisam_default.inc 7--source include/have_myisam.inc 8 9SET SQL_MODE=''; 10# 11# Test bugs in the MyISAM code with blobs 12# 13 14--disable_warnings 15drop table if exists t1; 16--enable_warnings 17 18# Bug #2159 (Problem with update of blob to > 16M) 19 20CREATE TABLE t1 (data LONGBLOB) ENGINE=myisam; 21INSERT INTO t1 (data) VALUES (NULL); 22UPDATE t1 set data=repeat('a',18*1024*1024); 23select length(data) from t1; 24delete from t1 where left(data,1)='a'; 25check table t1; 26truncate table t1; 27INSERT INTO t1 (data) VALUES (repeat('a',1*1024*1024)); 28INSERT INTO t1 (data) VALUES (repeat('b',16*1024*1024-1024)); 29delete from t1 where left(data,1)='b'; 30check table t1; 31 32# now we have two blocks in the table, first is a 1M record and second is 33# a 16M delete block. 34 35UPDATE t1 set data=repeat('c',17*1024*1024); 36check table t1; 37delete from t1 where left(data,1)='c'; 38check table t1; 39 40INSERT INTO t1 set data=repeat('a',18*1024*1024); 41select length(data) from t1; 42alter table t1 modify data blob; 43select length(data) from t1; 44drop table t1; 45 46CREATE TABLE t1 (data BLOB) ENGINE=myisam; 47INSERT INTO t1 (data) VALUES (NULL); 48UPDATE IGNORE t1 set data=repeat('a',18*1024*1024); 49select length(data) from t1; 50drop table t1; 51 52SET SQL_MODE=default; 53# End of 4.1 tests 54