MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Victoria Reznichenko Date:August 16 2002 2:02pm
Subject:Re: 4.0.x bug with LONGTEXT?
View as plain text  
Harald,
Thursday, August 15, 2002, 4:02:44 PM, you wrote:

HF> I think I've found a bug in the handling of large INSERTs/UPDATEs
HF> (MySQL 4.0.2, Intel/Linux).

HF> Consider the following:

HF>   CREATE TABLE IF NOT EXISTS tbl1 (
HF>     id INT UNSIGNED NOT NULL AUTO_INCREMENT,
HF>     txt LONGTEXT NOT NULL,
HF>     PRIMARY KEY (id)
HF>   ) TYPE=Innodb;

HF>   INSERT INTO tbl1 (txt) VALUES (LOAD_FILE("/var/tmp/out"));

[skip]

HF> If I do

HF>   UPDATE tbl1
HF>   SET txt = CONCAT(txt, LOAD_FILE("/var/tmp/out"))
HF>   WHERE id = 1;

HF> (i.e. duplicating txt), SELECT returns

HF>   +----+-----+
HF>   | id | len |
HF>   +----+-----+
HF>   |  1 |   0 |
HF>   +----+-----+

HF> According to the manual, LOAD_FILE returns NULL if the file is too
HF> large, but apparently this isn't the case here.

In your case total text length is bigger than max_allowed_packet, that
is why you've got len=0




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   Victoria.Reznichenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



Thread
4.0.x bug with LONGTEXT?Harald Fuchs15 Aug
  • Re: 4.0.x bug with LONGTEXT?Victoria Reznichenko16 Aug
Re: 4.0.x bug with LONGTEXT?Harald Fuchs16 Aug
  • Re: Re: 4.0.x bug with LONGTEXT?Victoria Reznichenko19 Aug
Re: 4.0.x bug with LONGTEXT?Harald Fuchs20 Aug
  • max_allowed_packet (was: Re: 4.0.x bug with LONGTEXT?)Roger Baklund20 Aug
RE: max_allowed_packet (was: Re: 4.0.x bug with LONGTEXT?)Luc Foisy20 Aug
  • Re: max_allowed_packet (was: Re: 4.0.x bug with LONGTEXT?)Roger Baklund20 Aug
    • Re: Re: max_allowed_packet (was: Re: 4.0.x bug with LONGTEXT?)Victoria Reznichenko21 Aug
      • Re: max_allowed_packet (was: Re: 4.0.x bug with LONGTEXT?)Roger Baklund21 Aug