~drizzle-trunk/drizzle/development

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