Bug #9815 --skip-innodb --default-table-type=innodb leads to assertion failure

Submitted: 11 Apr 2005 13:36 Modified: 9 Nov 2005 3:02
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.11,5.0.16-bk OS:Linux (linux,windows)
Assigned to: Jim Winstead CPU Architecture:Any

[11 Apr 2005 13:36] Guilhem Bichot
Description:
High priority as it is a crash. Verified on two machines.
Start a mysqld (debug binary built from latest 4.1 bk tree) with InnoDB enabled. Create an InnoDB table in database "test". Shutdown mysqld, restart it with --skip-innodb --default-table-type=innodb (yes it does not make sense but it's not a reason to crash :)
Launch "mysql test" (no -A): mysqld crashes here (because of safemutex):

#4  0x4025c9bc in abort () from /lib/i686/libc.so.6
#5  0x0840f402 in safe_mutex_lock (mp=0x85cbdc0, 
    file=0x848cb08 "ha_innodb.cc", line=1075353872) at thr_mutex.c:129
#6  0x0822d657 in get_share (table_name=0x40bb0744 "./test/i")
    at ha_innodb.cc:5205
#7  0x082282d9 in ha_innobase::open (this=0x85fb938, 
    name=0x40bb0744 "./test/i", mode=2, test_if_locked=2) at ha_innodb.cc:1597
#8  0x0821e274 in handler::ha_open (this=0x85fb938, 
    name=0x40bb0744 "./test/i", mode=2, test_if_locked=2) at handler.cc:919
#9  0x081c9308 in openfrm (name=0x40bb1804 "./test/i", alias=0x0, db_stat=39, 
    prgflag=44, ha_open_flags=0, outparam=0x85fb418) at table.cc:761
#10 0x081c426f in open_unireg_entry (thd=0x85f59e8, entry=0x85fb418, 
    db=0x85f1d50 "test", name=0x85fb3e8 "i", alias=0x85fb3e8 "i")
    at sql_base.cc:1431
#11 0x081c2ffa in open_table (thd=0x85f59e8, db=0x85f1d50 "test", 
    table_name=0x85fb3e8 "i", alias=0x85fb3e8 "i", refresh=0x40bb2abf)
    at sql_base.cc:908
#12 0x081c47f1 in open_ltable (thd=0x85f59e8, table_list=0x40bb2cd4, 
    lock_type=TL_UNLOCK) at sql_base.cc:1621
#13 0x08253057 in mysqld_list_fields (thd=0x85f59e8, table_list=0x40bb2cd4, 
    wild=0x85f3828 "") at sql_show.cc:1065
#14 0x081a0c2e in dispatch_command (command=COM_FIELD_LIST, thd=0x85f59e8, 
    packet=0x860f953 "", packet_length=3) at sql_parse.cc:1595
#15 0x081a01d9 in do_command (thd=0x85f59e8) at sql_parse.cc:1318
#16 0x0819f656 in handle_one_connection (arg=0x0) at sql_parse.cc:1050
#17 0x4017ef71 in pthread_start_thread () from /lib/i686/libpthread.so.0
Another simpler way to repeat is:
don't create an InnoDB table first. Just start mysqld with the stupid couple of options, and do
create table i (a int) type=innodb.

How to repeat:
see description (two ways to crash)

Suggested fix:
fix that --skip-innodb really wins over --default-table-type and --default-storage-engine.
Please when you fix, verify that the two testcases don't crash.
[11 Apr 2005 13:41] Heikki Tuuri
In earlier versions, MySQL used (?) MyISAM if InnoDB was missing.

I am changing this to a general 'Server' bug, as it is the task of MySQL not to access storage engines that are not present.

Regards,

Heikki
[14 Apr 2005 1:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23999
[25 Apr 2005 22:51] Jim Winstead
Fixed in 4.1.12 and 5.0.5.
[26 Apr 2005 3:05] Paul DuBois
Noted in 4.1.12, 5.0.5 changelogs.
[3 Nov 2005 1:54] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/31855
[4 Nov 2005 2:30] Jim Winstead
Fixed in 5.0.16.
[9 Nov 2005 3:02] Paul DuBois
Noted in 5.0.16 changelog.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.058 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.