<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="998028">
  <date_last_updated>2012-05-11 12:45:59.354961+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/998028</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~elenst</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.1</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/998028/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/998028/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/998028</bug_web_link>
  <owner>Elena Stepanova</owner>
  <assignee>Michael Widenius</assignee>
  <milestone_title>Maria 5.1</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Server crashes on normal shutdown in closefrm after executing a query from MyISAM table</title>
  <status>New</status>
  <importance>High</importance>
  <created>2012-05-11 12:45:59.354961+00:00</created>
  <description>
<![CDATA[#4  <signal handler called>
#5  0x082fe139 in closefrm (table=0x937bbd8, free_share=true) at table.cc:2019
#6  0x082e7acd in intern_close_table (table=0x937bbd8) at sql_base.cc:793
#7  0x082e7b73 in free_cache_entry (table=0x937bbd8) at sql_base.cc:815
#8  0x08738d04 in my_hash_delete (hash=0x8a63720, 
    record=0x937bbd8 "\270\302\067\tp\a9\t\260\304\070\t8\334\067\t") at hash.c:566
#9  0x082e7daf in close_cached_tables (thd=0x0, tables=0x0, have_lock=false, 
    wait_for_refresh=false, wait_for_placeholders=false) at sql_base.cc:877
#10 0x082e6430 in table_cache_free () at sql_base.cc:142
#11 0x082916ca in clean_up (print_message=true) at mysqld.cc:1367
#12 0x0829151f in unireg_end () at mysqld.cc:1307
#13 0x082914a7 in kill_server (sig_ptr=0x0) at mysqld.cc:1242
#14 0x082914be in kill_server_thread (arg=0xaeaf7388) at mysqld.cc:1270
#15 0xb779fb25 in start_thread () from /lib/libpthread.so.0

maria-5.1
bzr version-info
revision-id: <email address hidden>
date: 2012-04-24 17:29:03 +0200
revno: 3147

Also reproducible on maria-5.2 revno 3149.
Could not reproduce on maria-5.3 revno 3519, maria-5.5 revno 3397, mysql-5.1.63.

# Test case
# If you use the client,
# - start server with --core or --log-error;
# - execute SQL below;
# - stop server using mysqladmin shutdown (or sending SIGTERM).
# if you run it via MTR, just make sure you don't have a result file with the same name as the test file.

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT, b VARCHAR(1), KEY(b,a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES
(1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'),
(6,'f'),(7,'g'),(8,'h'),(NULL,'i');
SELECT MIN(a), b FROM t1 WHERE a=7 OR b='z' GROUP BY b;

# End of test case]]>  </description>
  <activities>
    <activity datechanged="2012-05-11T12:45:59.354961+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Elena Stepanova</person>
      <message>added bug</message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/998028/comments/0" datecreated="2012-05-11T12:45:59.354961+00:00">
      <person>Elena Stepanova</person>
      <subject>
<![CDATA[Server crashes on normal shutdown in closefrm after executing a query from MyISAM table]]>      </subject>
      <content>
<![CDATA[#4  <signal handler called>
#5  0x082fe139 in closefrm (table=0x937bbd8, free_share=true) at table.cc:2019
#6  0x082e7acd in intern_close_table (table=0x937bbd8) at sql_base.cc:793
#7  0x082e7b73 in free_cache_entry (table=0x937bbd8) at sql_base.cc:815
#8  0x08738d04 in my_hash_delete (hash=0x8a63720, 
    record=0x937bbd8 "\270\302\067\tp\a9\t\260\304\070\t8\334\067\t") at hash.c:566
#9  0x082e7daf in close_cached_tables (thd=0x0, tables=0x0, have_lock=false, 
    wait_for_refresh=false, wait_for_placeholders=false) at sql_base.cc:877
#10 0x082e6430 in table_cache_free () at sql_base.cc:142
#11 0x082916ca in clean_up (print_message=true) at mysqld.cc:1367
#12 0x0829151f in unireg_end () at mysqld.cc:1307
#13 0x082914a7 in kill_server (sig_ptr=0x0) at mysqld.cc:1242
#14 0x082914be in kill_server_thread (arg=0xaeaf7388) at mysqld.cc:1270
#15 0xb779fb25 in start_thread () from /lib/libpthread.so.0

maria-5.1
bzr version-info
revision-id: sergii@pisem.net-20120424152903-s6pva0iwnhwzbm1e
date: 2012-04-24 17:29:03 +0200
revno: 3147

Also reproducible on maria-5.2 revno 3149.
Could not reproduce on maria-5.3 revno 3519, maria-5.5 revno 3397, mysql-5.1.63.

# Test case
# If you use the client,
# - start server with --core or --log-error;
# - execute SQL below;
# - stop server using mysqladmin shutdown (or sending SIGTERM).
# if you run it via MTR, just make sure you don't have a result file with the same name as the test file.

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT, b VARCHAR(1), KEY(b,a)) ENGINE=MyISAM;
INSERT INTO t1 VALUES
(1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'),
(6,'f'),(7,'g'),(8,'h'),(NULL,'i');
SELECT MIN(a), b FROM t1 WHERE a=7 OR b='z' GROUP BY b;

# End of test case]]>      </content>
    </comment>
  </comments>
</launchpad-bug>
