The corrumpion detected on SELECT AFTER UPDATE ON BLOB COLUMN

The corrumpion detected on SELECT AFTER UPDATE ON BLOB COLUMN

am 03.02.2003 20:41:28 von Dyego Souza do Carmo

How-To-Repeat:

create table teste ( id integer auto_increment unique,imagem LONGBLOB not null);
insert into teste (id) values (1);
update teste set image = (IMG OF 300K) where id = 1;
select if(imagem is null, "ERRO", "OK") from escriba2.teste where id = 1;

* My System is Linux 2.4.18
* Table table : MyISAM and InnoDB the crash is same.
* With "not null" or without "not null" the crash is same.


The MySQL 4.0.9 and 4.0.10 ( build from bk tree today ) crash and says this on
..err file:


mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=67108864
read_buffer_size=1044480
sort_buffer_size=2097144
max_used_connections=8
max_connections=100
threads_connected=9
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 372335 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x8927540
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbd7feb58, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80d77c9
0x40034f54
0x80c8fdf
0x80a07a6
0x80b5a8f
0x80b5a1d
0x80a746d
0x80a73ec
0x80b5281
0x80f8cb1
0x80fd0c1
0x80fcefd
0x80e37f9
0x80e74f7
0x80e299f
0x80e241d
0x80e1aee
0x400320ba
0x401bad6a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x89380d0 = select if(imagem is null, "ERRO", "OK") from teste where id = 1
thd->thread_id=14

Successfully dumped variables, if you ran with --log, take a look at the
details of what thread 14 did to cause the crash. In some cases of really
bad corruption, the values shown above may be invalid.

The manual page at http://www.mysql.com/doc/C/r/Crashing.html contains
information that should help you find out what is causing the crash.




sql,query

------------------------------------------------------------ -------------
++ Dyego Souza do Carmo ++ Dep. Desenvolvimento
------------------------------------------------------------ -------------
E S C R I B A I N F O R M A T I C A
------------------------------------------------------------ -------------
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
--
$ look into "my eyes" Phone : +55 041 296-2311 r.112
look: cannot open my eyes Fax : +55 041 296-6640
------------------------------------------------------------ -------------
Reply: dyego@escriba.com.br



------------------------------------------------------------ ---------
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
To unsubscribe, e-mail
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Re: The corrumpion detected on SELECT AFTER UPDATE ON BLOB COLUMN

am 04.02.2003 18:29:57 von Sinisa Milivojevic

Dyego Souza do Carmo writes:
> How-To-Repeat:
>
> create table teste ( id integer auto_increment unique,imagem LONGBLOB not null);
> insert into teste (id) values (1);
> update teste set image = (IMG OF 300K) where id = 1;
> select if(imagem is null, "ERRO", "OK") from escriba2.teste where id = 1;
>
> * My System is Linux 2.4.18
> * Table table : MyISAM and InnoDB the crash is same.
> * With "not null" or without "not null" the crash is same.
>
>
> The MySQL 4.0.9 and 4.0.10 ( build from bk tree today ) crash and says this on
> .err file:
>
>
> sql,query
>
> ------------------------------------------------------------ -------------
> ++ Dyego Souza do Carmo ++ Dep. Desenvolvimento
> ------------------------------------------------------------ -------------
> E S C R I B A I N F O R M A T I C A
> ------------------------------------------------------------ -------------
> The only stupid question is the unasked one (somewhere in Linux's HowTo)
> Linux registred user : #230601
> --
> $ look into "my eyes" Phone : +55 041 296-2311 r.112
> look: cannot open my eyes Fax : +55 041 296-6640
> ------------------------------------------------------------ -------------
> Reply: dyego@escriba.com.br
>

Hi!

Thank you very much for your bug report.

It helped us fix a bug in updating BLOB columns with long strings.

Table was corrupted due to a crash, which is prevented with this
patch:

===== sql/sql_update.cc 1.74 vs edited =====
*** /tmp/sql_update.cc-1.74-30953 Wed Dec 18 18:59:56 2002
--- edited/sql/sql_update.cc Tue Feb 4 19:11:08 2003
***************
*** 116,121 ****
--- 116,122 ----

// Don't count on usage of 'only index' when calculating which key to use
table->used_keys=0;
+ table->copy_blobs=1;
select=make_select(table,0,0,conds,&error);
if (error ||
(select && select->check_quick(safe_update, limit)) || !limit)
***************
*** 474,479 ****
--- 475,481 ----
tl->shared= table_count++;
table->no_keyread=1;
table->used_keys=0;
+ table->copy_blobs=1;
table->pos_in_table_list= tl;
}
}



--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


------------------------------------------------------------ ---------
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 bugs-thread13670@lists.mysql.com
To unsubscribe, e-mail

Re: The corrumpion detected on SELECT AFTER UPDATE ON BLOB COLUMN

am 04.02.2003 18:29:57 von Sinisa Milivojevic

Dyego Souza do Carmo writes:
> How-To-Repeat:
>
> create table teste ( id integer auto_increment unique,imagem LONGBLOB not null);
> insert into teste (id) values (1);
> update teste set image = (IMG OF 300K) where id = 1;
> select if(imagem is null, "ERRO", "OK") from escriba2.teste where id = 1;
>
> * My System is Linux 2.4.18
> * Table table : MyISAM and InnoDB the crash is same.
> * With "not null" or without "not null" the crash is same.
>
>
> The MySQL 4.0.9 and 4.0.10 ( build from bk tree today ) crash and says this on
> .err file:
>
>
> sql,query
>
> ------------------------------------------------------------ -------------
> ++ Dyego Souza do Carmo ++ Dep. Desenvolvimento
> ------------------------------------------------------------ -------------
> E S C R I B A I N F O R M A T I C A
> ------------------------------------------------------------ -------------
> The only stupid question is the unasked one (somewhere in Linux's HowTo)
> Linux registred user : #230601
> --
> $ look into "my eyes" Phone : +55 041 296-2311 r.112
> look: cannot open my eyes Fax : +55 041 296-6640
> ------------------------------------------------------------ -------------
> Reply: dyego@escriba.com.br
>

Hi!

Thank you very much for your bug report.

It helped us fix a bug in updating BLOB columns with long strings.

Table was corrupted due to a crash, which is prevented with this
patch:

===== sql/sql_update.cc 1.74 vs edited =====
*** /tmp/sql_update.cc-1.74-30953 Wed Dec 18 18:59:56 2002
--- edited/sql/sql_update.cc Tue Feb 4 19:11:08 2003
***************
*** 116,121 ****
--- 116,122 ----

// Don't count on usage of 'only index' when calculating which key to use
table->used_keys=0;
+ table->copy_blobs=1;
select=make_select(table,0,0,conds,&error);
if (error ||
(select && select->check_quick(safe_update, limit)) || !limit)
***************
*** 474,479 ****
--- 475,481 ----
tl->shared= table_count++;
table->no_keyread=1;
table->used_keys=0;
+ table->copy_blobs=1;
table->pos_in_table_list= tl;
}
}



--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


------------------------------------------------------------ ---------
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 bugs-thread13670@lists.mysql.com
To unsubscribe, e-mail