Bug #11079 mysqld cores running mysql_install_db
Submitted: 3 Jun 2005 17:23 Modified: 3 Jun 2005 20:34
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:5.1 OS:Linux (Linux)
Assigned to: Mikael Ronström CPU Architecture:Any

[3 Jun 2005 17:23] Jonathan Miller
Description:
	jeb	(gdb) bt
#0 0x4012ada1 in kill () from /lib/libc.so.6
#1 0x4005af4a in pthread_kill () from /lib/libpthread.so.0
#2 0x08268f7f in write_core ()
#3 0x08173a87 in handle_segfault ()
#4 0x4005e5cd in __pthread_sighandler () from /lib/libpthread.so.0
#5 <signal handler called>
#6 0x0818c92d in mysql_init_select(st_lex*) ()
#7 0x081a0933 in yyparse(void*) (yythd=0x855bee8) at sql_yacc.yy:6270
#8 0x0818cdd3 in mysql_parse(THD*, char*, unsigned) ()
#9 0x08184c54 in handle_bootstrap ()
#10 0x400586de in pthread_start_thread () from /lib/libpthread.so.0
(gdb) frame 6
#6 0x0818c92d in mysql_init_select(st_lex*) ()
(gdb) l
6270 mysql_init_select(lex);
6271 /* for subselects */
6272 lex->lock_option= (using_update_log) ? TL_READ_NO_INSERT : TL_READ;
6273 lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE;
6274 } insert_lock_option
6275 opt_ignore insert2
6276 {
6277 Select->set_lock_for_tables($3);
6278 Lex->current_select= &Lex->select_lex;
6279 }

	jeb	tomas: will send a bug report
	=-=	elliot|brb is now known as elliot
	mikael	jeb: check what the parser is trying to do (input to mysql_parse second parameter)
	mikael	jeb: what's the query string
	jeb	mikael, how to find?
	mikael	in parameter to mysql_parse above #8
	-->|	vinay (~53e2f857@intranet.mysql.com) has joined #cluster
	jeb	mikael: here is frame 7, i will go back for 8:
gdb) frame 7
#7 0x081a0933 in yyparse(void*) (yythd=0x855bee8) at sql_yacc.yy:6270
6270 mysql_init_select(lex);
Current language: auto; currently c++
(gdb) l
6265 INSERT
6266 {
6267 LEX *lex= Lex;
6268 lex->sql_command= SQLCOM_INSERT;
6269 lex->duplicates= DUP_ERROR;
6270 mysql_init_select(lex);
6271 /* for subselects */
6272 lex->lock_option= (using_update_log) ? TL_READ_NO_INSERT : TL_READ;
6273 lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE;
6274 } insert_lock_option
	jeb	mikael are you wanting a frame listing or some other gdb command to be done on frame 8?
	mikael	jeb: yep, frame 8 is what I want to see
	jeb	Mikael: Frame 8:
(gdb) frame 8
#8 0x0818cdd3 in mysql_parse(THD*, char*, unsigned) ()
(gdb) l
6290 mysql_init_select(lex);
6291 lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE;
6292 }
6293 replace_lock_option insert2
6294 {
6295 Select->set_lock_for_tables($3);
6296 Lex->current_select= &Lex->select_lex;
6297 }
6298 insert_field_spec
6299 {}
(gdb)

How to repeat:
run install_db from the wl2325-­wl1354-new clone

Suggested fix:
Create the system database and do not core.
[3 Jun 2005 20:34] Jonathan Miller
Unable to reproduce after rebuilding in OPT mode.