Bug #36172 insert into compressed innodb table crashes
Submitted: 17 Apr 2008 8:12 Modified: 18 Jun 2010 1:58
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.1.25+innodb_plugin-1.0.0-5.1 OS:Any
Assigned to: Sunny Bains CPU Architecture:Any
Triage: D2 (Serious)

[17 Apr 2008 8:12] Shane Bester
Description:
while inserting into a compressed innodb table, we got a crash:

mysqld.exe!mtr_set_log_mode
mysqld.exe!page_zip_reorganize
mysqld.exe!page_cur_insert_rec_zip_reorg
mysqld.exe!page_cur_insert_rec_zip
mysqld.exe!page_cur_tuple_insert
mysqld.exe!btr_cur_pessimistic_insert
mysqld.exe!row_ins_index_entry_low
mysqld.exe!row_ins
mysqld.exe!row_ins_step
mysqld.exe!row_insert_for_mysql
mysqld.exe!ha_innobase::write_row
mysqld.exe!handler::ha_write_row
mysqld.exe!write_record
mysqld.exe!mysql_insert
mysqld.exe!mysql_execute_command

How to repeat:
uploading testcase later.
[17 Apr 2008 8:13] Shane Bester
full stack, half the insert, and table structure.

Attachment: bug36172_stack_info.txt (text/plain), 6.51 KiB.

[17 Apr 2008 8:20] Shane Bester
after crash recovery, check table crashes on this table.

Assertion failure in thread 2404 in file .\btr\btr0btr.c line 3235
n: page_get_n_recs(page) > 0 || (level == 0 && page_get_page_no(page) == dict_index_get_page(index))
[17 Apr 2008 9:56] Shane Bester
import this. the check table crashes.

Attachment: bug36172_testcase.sql (application/unknown, text), 7.46 KiB.

[18 Apr 2008 6:54] Shane Bester
I forgot to mention you should first run these to setup the file format:

SET GLOBAL innodb_file_format=“Barracuda”;
SET GLOBAL innodb_file_per_table=ON;
[7 May 2008 11:01] Heikki Tuuri
Sunny has a patch for this.

He improves the split algorithm to pick the right split place in btr0btr.c.

Some other place may break because we allow records > page size / 2, but let us see if we get more bug reports.
[21 May 2008 19:50] Calvin Sun
The patch was committed as r2453.
[5 May 2010 15:28] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 14:58] Paul Dubois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[28 May 2010 6:05] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:34] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 7:01] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[29 May 2010 2:40] Paul Dubois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 12:10] 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:57] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:37] 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)