~laurynas-biveinis/percona-server/BT-16274-bug1111226-5.1

  • Committer: Laurynas Biveinis
  • Date: 2013-02-07 07:29:35 UTC
  • Revision ID: laurynas.biveinis@percona.com-20130207072935-ahnqye3xtgx7ieai
Fix bug 1111226 (Writing larger than 4GB bitmap file fails; bitmap
write error causes heap corruption).

The first issue is incorrect higher 32 bits of write offset
calculation: the 64-bit offset was shifted to the left instead of the
right, fixed trivially.

The second issue is that if a bitmap page write fails (for example,
due to the condition above), then log_online_write_bitmap() exits
prematurely with a return code signalling error.  But, if at least one
bitmap page was written successfully, then the written bitmap tree
nodes will be doubly pointed to: from the bitmap tree itself and from
the free node list.  This will cause a heap corruption on the log
following thread shutdown (which happens immediatelly in the case of
bitmap write error).

Fixed by keeping iterating over the bitmap tree in case of error, but
skipping the actual write.  This way all the tree nodes are moved to
free list for the subsequent cleanup.

Add a write failure injection site and a new testcase
percona_changed_page_debug.
Filename Latest Rev Last Changed Committer Comment Size
..
build 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree Diff
doc 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree Diff
HandlerSocket-Plugin-for-MySQL 494.1.1 11 years ago Ignacio Nin Update HandlerSocket by readding it to the version Diff
kewpie 410.4.1 12 years ago Patrick Crews Merge in kewpie (the test-runner formerly known as Diff
Percona-Server 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree Diff
python-for-subunit2junitxml 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree Diff
UDF 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree Diff
.bzrignore 456.1.1 11 years ago Hrvoje Matijakovic * bug fix for Bug #1013968 * modified doc Makefile 22 bytes Diff Download File
COPYING.show_temp_51 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree 1.6 KB Diff Download File
handlersocket.patch 494.1.1 11 years ago Ignacio Nin Update HandlerSocket by readding it to the version 1.2 KB Diff Download File
Makefile 491.3.9 11 years ago Ignacio Nin Bump versions to 5.5.28-14.2. 2.6 KB Diff Download File
README.HandlerSocket 494.1.1 11 years ago Ignacio Nin Update HandlerSocket by readding it to the version 508 bytes Diff Download File
README.txt 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree 481 bytes Diff Download File
File subunit2junitxml 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree 2.2 KB Diff Download File