I'm having an issue with BLOB columns (MEDIUMBLOB and LONGBLOB, more
specifically) in a table that's intended to store files (with filename,
content-type and length columns). Generally, the problem seems to be that
MySQL thinks that it's out of memory when dealing with arbirarily large
values, either during an attempted INSERT/UPDATE (using LOAD_FILE() or the
contents of the file as a string) or during a mysqldump.

The problem has manifested on 2 x86/FreeBSD development boxes running the
ports installation of 3.23.46, as well as an OSX box running 3.23.47. The
exact same operations succeed on our production server, a Sparc/Solaris box
running 3.23.36.

The my.cnf's are identical on all 3 machines: a copy of the my-large.cnf
with a modified max_allowed_packet value of '16M' (which should suit a query
that INSERT's a file at least 7MB in size, with escaped characters, etc.).
The specific errors encountered are:

- when attempting an INSERT INTO binaries (contents) VALUES ([str]), where
[str] is the contents of a file over ~1MB, the INSERT fails with "Out of
memory: (xxxxxxx bytes needed)". Subsequent attempts *sometimes* result in
the "MySQL server has gone away" error. The same errors occur when replacing
[str] with LOAD_FILE([filename]).

- when attempting to dump a database containing values of LONGBLOB columns
over ~1MB, mysqldump fails with the same "Out of memory" error above.

- when attempting to feed a dump into a database using the "mysql DB <
dump.sql" method (or source'ing it from the SQL prompt), values in the same
range cause mysql to die with the "MySQL server has gone away" error.

I should also mention that the errors are pretty erratic, since the same
operation often yields different errors on each attempt. A recent mysqldump
succeeded on one FreeBSD box, but the attempt to restore it on the other one
failed ("MySQL server has gone away"). Several times, attempts to INSERT
large values have resulted in corrupt tables, or NULL values without any
error.

Has anyone else experienced any of these symptoms? We're attempting an
installation of 3.23.36 on our development boxes so we can be sure that this
is a new bug, but we're pretty certain since we haven't seen anything like
this on our production server (which routinely handles files in excess of
5MB). I'd appreciate any feedback, since we're gearing up to submit a bug
report and would like to avoid doing so if it ends up being a problem on our
end. We've checked the physical memory and df on all 3 boxes that we've
experienced the problems, and none of them even come near being out of
memory or disk space. We even checked safe_mysqld to see if it calls limit
or ulimit... which it doesn't. I'm totally stumped.

Thanks,

-- 
shawn allen | [EMAIL PROTECTED]



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to