|
Posted by moira.shrimpton on August 29, 2006, 4:36 am
Please log in for more thread options
>> And yes, it IS truncating at 256, not 255.
>>
>> Yes, I understand that 255 is the max for an 8 bit number, and this
>> would make more sense. But its cutting it off at 256 regardless.
>>
>> greywire@gmail.com wrote:
>> > MySQL 5.0.18
>> >
>> > The field in question (bulk_body) is a text field, so it should not
>> > have a limit anywhere near as low as 255.
>> >
>> > CREATE TABLE `lead_bulk` (
>> > `bulk_id` int(10) unsigned NOT NULL,
>> > `bulk_batch_id` int(10) unsigned NOT NULL,
>> > `bulk_source` int(10) unsigned NOT NULL default '0',
>> > `bulk_body` text NOT NULL,
>> > `bulk_cdate` datetime NOT NULL default '0000-00-00 00:00:00',
>> > `bulk_import_date` datetime default NULL,
>> > `bulk_lead_id` int(10) unsigned default NULL,
>> > `bulk_header` tinyint(1) NOT NULL default '0',
>> > PRIMARY KEY (`bulk_id`),
>> > FULLTEXT KEY `bulk_body` (`bulk_body`)
>> > ) ENGINE=MyISAM;
>> >
>> > According to the documentation for LOAD DATA it does not support Text
>> > or BLOB fields:
>> >
>> > " Some cases are not supported by LOAD DATA INFILE:
>> >
>> > Fixed-size rows (FIELDS TERMINATED BY and FIELDS ENCLOSED BY both
>> > empty) and BLOB or TEXT columns. "
>>>
>
> Okay. I wasn't mindful of the Text type. That should get you 64K string
> lengths.
> Your field definition [bulk_body] is not restricting your string length. My
> suspicions were unjustified ;-)
>
> But
>
> I recreated this table on my version 4.1.13 and tried doing LOAD DATA INFILE
> to stuff a record with long (300 char + ) strings into that [bulk_body]
> field and it seems to work a charm. Long (300 char + ) strings get stuffed
> without truncation.
>
> > > According to the documentation for LOAD DATA it does not support
> Text
> > > or BLOB fields:
>
> ????
> I don't know where that comes from but I just verifed that it does work with
> Text fields.
> I also have a production item actively stuffing a tinyblob with short
> strings using LOAD DATA. So - if it's not allowed, my version doesn't seem
> to know about it ;-)
>
> Are you using an older version (than 4.1 ?) ?
> What OS are you using ?
>
> Perhaps there are chars embedded in the string that MySQL sees as End
> Of Field markers? Embedded quotes? Commas? Linefeeds? Carriage Returns?
> Or, if running MS OS, the dreaded Ctrl-Z (char(26)) char?
>
> Still fishing.
> Thomas Bartkus
>
>
>
It is written in "MySQL 5.0 Reference Manual".
"
Some cases are not supported by LOAD DATA INFILE:
Fixed-size rows (FIELDS TERMINATED BY and FIELDS ENCLOSED BY both empty)
and BLOB or TEXT columns.
"
--
Albert Einstein College of Medicine
|