Bug #13547 INSERT DELAYED produces a ERROR 2013
Submitted: 27 Sep 2005 23:03 Modified: 15 Nov 2005 12:48
Reporter: Alexander Klein Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.13RC OS:Linux (SuSE 9)
Assigned to: CPU Architecture:Any

[27 Sep 2005 23:03] Alexander Klein
Description:
I upgraded to the new "mysql-standard-5.0.13-rc-linux-i686"
from "mysql-standard-4.1.12-pc-linux-gnu-i686"

After the Server was up and running i missed entries in one 
table. I switched to the old version and tried the same 
situation and it worked fine. So i reproduced the steps.

How to repeat:
1 - The table structure 

CREATE TABLE `referrer` (
  `track_id` bigint(20) NOT NULL default '0',
  `search_id` bigint(20) NOT NULL auto_increment,
  `search_time` bigint(20) NOT NULL default '0',
  `search_engine` varchar(100) NOT NULL default '',
  `search_keyword` text NOT NULL,
  `search_referer` text NOT NULL,
  PRIMARY KEY  (`search_id`),
  KEY `track_id` (`track_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1115749 ;

2 - The original raw query

INSERT DELAYED
  INTO database.referrer
   SET track_id = '1925989',
       search_time = '1127859821',
       search_engine = '[...]',
       search_keyword = '[...]',
       search_referer = 'http://[...]/search?blablabla'
      
3 -What i have done to reproduce
      
Your MySQL connection id is 88 to server version: 5.0.13-rc-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> INSERT DELAYED
    ->   INTO database.referrer
    ->    SET track_id = '1925989',
    ->        search_time = '1127859821',
    ->        search_engine = '[...]',
    ->        search_keyword = '[...]',
    ->        search_referer = 'http://[...]/search?blablabla'
    -> ;
ERROR 2013: Lost connection to MySQL server during query
[27 Sep 2005 23:11] Hartmut Holzgraefe
can't reproduce with latest 5.0bk on suse 9.3 ...
[28 Sep 2005 0:12] Alexander Klein
> can't reproduce with latest 5.0bk on suse 9.3 ...

I made several tests with both "INSERT" and "INSERT DELAYED" on both 
existing and newly created tables. On exisiting tables with delayed i get
the error, but not with a simple insert. The new tables produced no error
on both.
And i made all maintenance queries "Check table, Repair table ..."
but nothing changed with the delayed error ...

So, where is the problem?
[28 Sep 2005 3:05] MySQL Verification Team
I was unable to reproduce the behavior reported like Harmut already
have mentioned on Suse 9.3 and using the defaults start option
for the server. Could you please provide your my.cnf for further
test on our side. Thanks in avance.
[28 Sep 2005 20:10] Alexander Klein
The current my.cnf with 2G Memory

Attachment: my.cnf (application/octet-stream, text), 1.32 KiB.

[28 Sep 2005 20:33] Alexander Klein
And here ist the (hopefully correct) stack trace

0x809d242 handle_segfault + 430
0x82d5b18 pthread_sighandler + 184
0x82f5613 memcpy + 51
0x808d2b9 store__15Field_varstringPCcUiP15charset_info_st + 229
0x805303a save_in_field__11Item_stringP5Fieldb + 86
0x80d5078 fill_record__FP3THDRt4List1Z4ItemT1b + 112
0x80d50f0 fill_record_n_invoke_before_triggers__FP3THDRt4List1Z4ItemT1bP19Table_triggers_list14trg_event_type + 40
0x80f4b76 mysql_insert__FP3THDP13st_table_listRt4List1Z4ItemRt4List1Zt4List1Z4ItemT2T215enum_duplicatesb + 1366
0x80afec3 mysql_execute_command__FP3THD + 7423
0x80b4dca mysql_parse__FP3THDPcUi + 286
0x80acc90 dispatch_command__F19enum_server_commandP3THDPcUi + 1760
0x80ac5a3 do_command__FP3THD + 203
0x80abb06 handle_one_connection + 766
0x82d32cc pthread_start_thread + 220
0x82fcd0a thread_start + 4

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

thd=0x8a25a50
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=0xbfe5ec08, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x809d242
0x82d5b18
0x82f5613
0x808d2b9
0x805303a
0x80d5078
0x80d50f0
0x80f4b76
0x80afec3
0x80b4dca
0x80acc90
0x80ac5a3
0x80abb06
0x82d32cc
0x82fcd0a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read 
http://dev.mysql.com/doc/mysql/en/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 0x8a82c18 = INSERT DELAYED
                  INTO a_tracking_referrer
                   SET track_id       = '1925989',
                       search_time    = '1127859821',
                       search_engine  = '[...]',
                       search_keyword = '[...]',
                       search_referer = 'http://[...]/search?blablabla'
thd->thread_id=101
[15 Oct 2005 12:48] Valeriy Kravchuk
Have you followed the updrade instructions? http://dev.mysql.com/doc/refman/5.0/en/upgrading-grant-tables.html I mean.
[16 Nov 2005 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".