Field_blob should only ever have packlength of 4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Low
|
Stewart Smith | ||
7.0 |
Fix Released
|
Low
|
Stewart Smith | ||
Cherry |
Won't Fix
|
Low
|
Stewart Smith |
Bug Description
for example, the case 3 below should *never* be being called.
65 : void Field_blob:
66 : uint32_t i_packlength,
67 : uint32_t i_number,
68 26081 : bool low_byte_first)
69 : {
70 : #ifndef WORDS_BIGENDIAN
71 : (void)low_
72 : #endif
73 26081 : switch (i_packlength) {
74 : case 1:
75 0 : i_ptr[0]= (unsigned char) i_number;
76 0 : break;
77 : case 2:
78 : #ifdef WORDS_BIGENDIAN
79 : if (low_byte_first)
80 : {
81 : int2store(
82 : }
83 : else
84 : #endif
85 0 : shortstore(
86 0 : break;
87 : case 3:
88 3 : int3store(
89 3 : break;
Further investigation shows this snippet from union.test as the culprit:
SELECT @tmp_max:= @@max_allowed_
SET max_allowed_
CREATE TABLE t1 (a mediumtext);
CREATE TABLE t2 (b varchar(20));
INSERT INTO t1 VALUES ('a');
CREATE TABLE t3 SELECT REPEAT(a,20000000) AS a FROM t1 UNION SELECT b FROM t2;
--replace_regex /ENGINE=
SHOW CREATE TABLE t3;
DROP TABLES t1,t2,t3;
Related branches
- Brian Aker: Needs Fixing
-
Diff: 616 lines (+84/-200)6 files modifieddrizzled/definition/table.cc (+0/-1)
drizzled/field/blob.cc (+48/-135)
drizzled/field/blob.h (+21/-56)
drizzled/field_conv.cc (+13/-2)
drizzled/item.cc (+0/-4)
plugin/pbxt/src/myxt_xt.cc (+2/-2)
Changed in drizzle: | |
milestone: | bell → cherry |
Changed in drizzle: | |
milestone: | 2010-05-24 → none |
tags: | added: create-tmp-table |
Changed in drizzle: | |
status: | Fix Committed → In Progress |
attached branch has fix (remove all the special length handling code!)