1
by brian
clean slate |
1 |
#
|
2 |
# Test bugs in the MyISAM code with blobs |
|
3 |
#
|
|
4 |
||
5 |
--disable_warnings
|
|
6 |
drop table if exists t1; |
|
7 |
--enable_warnings
|
|
8 |
||
9 |
# Bug #2159 (Problem with update of blob to > 16M) |
|
10 |
||
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'; |
|
16 |
check table t1; |
|
17 |
truncate table t1; |
|
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'; |
|
21 |
check table t1; |
|
22 |
||
23 |
# now we have two blocks in the table, first is a 1M record and second is |
|
24 |
# a 16M delete block. |
|
25 |
||
26 |
UPDATE t1 set data=repeat('c',17*1024*1024); |
|
27 |
check table t1; |
|
28 |
delete from t1 where left(data,1)='c'; |
|
29 |
check table t1; |
|
30 |
||
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; |
|
35 |
drop table t1; |
|
36 |
||
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; |
|
41 |
drop table t1; |
|
42 |
||
43 |
# End of 4.1 tests |