MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Harald Fuchs Date:August 20 2002 11:17am
Subject:Re: 4.0.x bug with LONGTEXT?
View as plain text  
In article <200208191407.g7JE71j12413@stripped>,
Victoria Reznichenko <victoria.reznichenko@stripped> writes:

> As you can see txt1 and txt2 contain text file ~ 8M

> UPDATE tbl1 SET total=CONCAT(txt1,txt2) WHERE id=1;

>  SELECT id, LENGTH(txt1), LENGTH(txt2), LENGTH(total) FROM tbl1;
> +----+--------------+--------------+---------------+
> | id | LENGTH(txt1) | LENGTH(txt2) | LENGTH(total) |
> +----+--------------+--------------+---------------+
> |  1 |      8390060 |      8390060 |             0 |
> +----+--------------+--------------+---------------+

> The same result.
> MySQL inserts NULL in the total, because you can't store data more
> than max_allowed_packet.

Thanks for the clarification, Victoria.

This confirms my suspicion that LONGTEXT and LONGBLOB are completely
useless, at least in MySQL 3.23.x: you can declare a LONGTEXT column,
but you can't insert values longer than a MEDIUMTEXT because you can't
set max_allowed_packet higher than 16M.

If I understand the manual correctly, max_allowed_packet is a
safeguard against broken query packets, and there's currently no way
to circumvent that.

AFAIK Sybase has a special API which works something like that:
* Client tells server that it wants to INSERT n bytes
* Server returns a file descriptor
* Clients issues some write operations on the descriptor, transferring
  a total of n bytes
* Client closes the descriptor
* Server puts the n bytes it received into the desired row/column

Are there any plans for a MySQL API to insert longer texts?
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