>Description:

When inserting large strings into ISAM table in an UPDATE TABLE
command, my perl script generates an "Out of memory error".  I tracked
this down using an SQL script (below).  It seems that a 32777225
character string is tolerated, but a string one character larger is not.

>How-To-Repeat:

Input
-----
drop table if exists t1;
create table t1 (a tinyint not null auto_increment, b longblob not null, primary key 
(a)) checksum=1;

insert into t1 (b) values ('a');
insert into t1 (b) values ('b');
insert into t1 (b) values ('c');
insert into t1 (b) values ('d');
insert into t1 (b) values ('e');
insert into t1 (b) values ('f');
insert into t1 (b) values ('g');
insert into t1 (b) values ('h');

select * from t1;

update t1 set b=(repeat(char(73),16777200)) where a=1;
check table t1;
update t1 set b=(repeat(char(73),32777200)) where a=2;
check table t1;
update t1 set b=(repeat(char(73),32777225)) where a=3;
check table t1;
update t1 set b=(repeat(char(73),32777226)) where a=4;
check table t1;
update t1 set b=(repeat(char(73),32777227)) where a=5;
check table t1;
update t1 set b=(repeat(char(73),32777228)) where a=6;
check table t1;
update t1 set b=(repeat(char(73),36790572)) where a=7;
check table t1;

drop table t1;

Output
------
a       b
1       a
2       b
3       c
4       d
5       e
6       f
7       g
8       h
Table   Op      Msg_type        Msg_text
hs_mrna.t1      check   status  OK
Table   Op      Msg_type        Msg_text
hs_mrna.t1      check   status  OK
Table   Op      Msg_type        Msg_text
hs_mrna.t1      check   status  OK
Table   Op      Msg_type        Msg_text
hs_mrna.t1      check   error   Not enough memory for blob at 60
hs_mrna.t1      check   error   Corrupt
ERROR 1016 at line 23: Can't open file: 't1.MYD'. (errno: 145)

>Fix:

I don't have a fix for this.  I have had similar problems with large
strings in the past but this seemed to be solved by our previous
upgrade to version 4.0.10.


>Submitter-Id:  <submitter ID>
>Originator:    Craig Anthony Cummings
>Organization:
 <organization of PR author (multiple lines)>
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:      <synopsis of the problem (one line)>
>Severity:      <[ non-critical | serious | critical ] (one line)>
>Priority:      <[ low | medium | high ] (one line)>
>Category:      mysql
>Class:         <[ sw-bug | doc-bug | change-request | support ] (one line)>
>Release:       mysql-4.0.10-gamma (Source distribution)
>Server: /tools/local/mysql/bin/mysqladmin  Ver 8.40 Distrib 4.0.10-gamma, for 
>dec-osf4.0f on alphaev67
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          4.0.10-gamma-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
Uptime:                 100 days 7 hours 49 min 48 sec

Threads: 1  Questions: 748114  Slow queries: 4  Opens: 85  Flush tables: 1  Open 
tables: 15  Queries per second avg: 0.086
>C compiler:    2.95.2
>C++ compiler:  2.95.2
>Environment:
        <machine, os, target, libraries (multiple lines)>
System: OSF1 ricotta V4.0 1229 alpha
Machine: alpha
Some paths:  /tools/perl/current/bin/perl /usr/ucb/make /tools/gnu/bin/gmake 
/tools/gnu/bin/gcc /usr/ucb/cc
GCC: Reading specs from /tools/gnu/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS='-felide-constructors 
-fno-exceptions -fno-rtti'  LDFLAGS=''  ASFLAGS=''
LIBC:
lrwxr-xr-x   1 root     system        17 Mar 13  2001 /lib/libc.a -> ../ccs/lib/libc.a
lrwxr-xr-x   1 root     system        17 Mar 13  2001 /usr/lib/libc.a -> 
../ccs/lib/libc.a
Configure command: ./configure '--prefix=/tools/local/mysql-4.0.10' 
'--localstatedir=/usr3/data3/mysql' 'CC=gcc' 'CXXFLAGS=-felide-constructors 
-fno-exceptions -fno-rtti' 'CXX=gcc'
Perl: This is perl, version 5.004_04 built for alpha-dec_osf




Craig Cummings, Ph.D.

Relman Laboratory
Stanford University School of Medicine
Department of Microbiology and Immunology
and
VA Palo Alto Health Care System

e-mail: [EMAIL PROTECTED]
phone:  650-493-5000 x63249
fax:    650-852-3291


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to