Click here to get back home

Help with Stored Proc in mysql varchar variables

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Help with Stored Proc in mysql varchar variables moira.shrimpton 08-29-2006
Get Chitika Premium
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

Similar ThreadsPosted
UPPER not doing anything inside stored proc October 23, 2005, 6:26 pm
Major diff between varchar of 70 against varchar of 100? November 4, 2005, 9:29 am
Inserting variables in mySQL table! June 25, 2005, 9:11 am
Reading Variables available in shell program into MySQL September 26, 2005, 12:39 am
IDE for stored procedures, are MySQL stored procedures reliable? September 26, 2006, 1:38 pm
MySQL variables, modifying Microsoft SQL sequence insert for use in mysql October 7, 2005, 10:54 am
varchar and unique December 19, 2005, 8:13 am
Varchar to Blob conversion July 13, 2005, 11:11 pm
Removing space in varchar November 14, 2006, 12:12 pm
Macro Variables April 18, 2006, 11:37 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap