Bug #48757 missing .ARZ file causes server crash
Submitted: 13 Nov 2009 11:51 Modified: 18 Jun 2010 1:12
Reporter: Anurag Shekhar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Archive storage engine Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Sergey Vojtovich CPU Architecture:Any
Tags: regression

[13 Nov 2009 11:51] Anurag Shekhar
Description:
A missing ARZ file in database directory causes server crash.

How to repeat:
Create a an archive table.
Shut down the server.
Delete ARZ file of the table from database directory.
Restart server and try accessing the table.
[13 Nov 2009 12:33] Valeriy Kravchuk
Verified just as described on Windows XP. Stack trace contains:

 	mysqld.exe!thr_lock(st_thr_lock_data * data=0x00000000, st_thr_lock_owner * owner=0x02342a00, thr_lock_type lock_type=560)  Line 509	C
 	mysqld.exe!thr_multi_lock(st_thr_lock_data * * data=0x00e5ef8c, unsigned int count=1, st_thr_lock_owner * owner=0x02342a00)  Line 973 + 0xd bytes	C
 	mysqld.exe!mysql_lock_tables(THD * thd=0x023421e8, st_table * * tables=0x04d3edd0, unsigned int count=1, unsigned int flags=4, bool * need_reopen=0x0561e5d7)  Line 279 + 0x17 bytes	C++
 	mysqld.exe!lock_tables(THD * thd=0x023421e8, TABLE_LIST * tables=0x04d3eb90, unsigned int count=1, bool * need_reopen=0x0561e5d7)  Line 5293 + 0x14 bytes	C++
 	mysqld.exe!open_and_lock_tables_derived(THD * thd=0x023421e8, TABLE_LIST * tables=0x04d3eb90, bool derived=true)  Line 4990 + 0x15 bytes	C++
 	mysqld.exe!execute_sqlcom_select(THD * thd=0x00000000, TABLE_LIST * all_tables=0x00000000)  Line 4976 + 0x9 bytes	C++
 	mysqld.exe!mysql_execute_command(THD * thd=0x023421e8)  Line 2206 + 0xb bytes	C++
[13 Nov 2009 12:36] Valeriy Kravchuk
5.0.x is NOT affected:

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -proot -P3308 test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.86-community-nt-log MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select * from ta;
ERROR 1034 (HY000): Incorrect key file for table 'ta'; try to repair it

so this is a regression bug.
[10 Feb 2010 10:34] 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/commits/99798

3372 Sergey Vojtovich	2010-02-10
      BUG#48757 - missing .ARZ file causes server crash
      
      Server crashes when accessing ARCHIVE table with missing
      .ARZ file.
      
      When opening a table, ARCHIVE didn't properly pass through
      error code from lower level azopen() to higher level open()
      method.
     @ mysql-test/r/archive.result
        A test case for BUG#48757.
     @ mysql-test/t/archive.test
        A test case for BUG#48757.
     @ storage/archive/ha_archive.cc
        Pass through error code from azopen().
[12 Feb 2010 12:33] 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/commits/100122

3372 Sergey Vojtovich	2010-02-12
      BUG#48757 - missing .ARZ file causes server crash
      
      Server crashes when accessing ARCHIVE table with missing
      .ARZ file.
      
      When opening a table, ARCHIVE didn't properly pass through
      error code from lower level azopen() to higher level open()
      method.
     @ mysql-test/r/archive.result
        A test case for BUG#48757.
     @ mysql-test/t/archive.test
        A test case for BUG#48757.
     @ storage/archive/ha_archive.cc
        Pass through error code from azopen().
[1 Mar 2010 8:42] Bugs System
Pushed into 5.1.45 (revid:joro@sun.com-20100301083827-xnimmrjg6bh33o1o) (version source revid:joerg@mysql.com-20100212173307-ph563zr4wmoklgwd) (merge vers: 5.1.45) (pib:16)
[2 Mar 2010 14:33] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100302142746-u1gxdf5yk2bjrq3e) (version source revid:alik@sun.com-20100225090938-2j5ybqoau570mytu) (merge vers: 6.0.14-alpha) (pib:16)
[2 Mar 2010 14:38] Bugs System
Pushed into 5.5.3-m2 (revid:alik@sun.com-20100302072233-t3uqgjzdukt1pyhe) (version source revid:alexey.kopytov@sun.com-20100221213311-xf5nyv391dsw9v6j) (merge vers: 5.5.2-m2) (pib:16)
[2 Mar 2010 14:44] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100302072432-k8xvfkgcggkwgi94) (version source revid:alik@sun.com-20100224135227-rcqs9pe9b2in80pf) (pib:16)
[3 Mar 2010 15:42] Tony Bedford
An entry has been added to the following changelogs: 5.1.45, 6.0.14, 5.5.3:

     An ARZ file missing from the database directory caused the server to crash.

Setting report to 'Need Merge' pending push of Celosia to release tree.
[17 Jun 2010 12:04] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:49] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:martin.skold@mysql.com-20100609140708-52rvuyq4q500sxkq) (merge vers: 5.1.45-ndb-6.2.19) (pib:16)
[17 Jun 2010 13:32] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)