~laurynas-biveinis/percona-server/26611-bug917942-5.1

  • Committer: Laurynas Biveinis
  • Date: 2012-10-16 11:18:45 UTC
  • Revision ID: laurynas.biveinis@percona.com-20121016111845-54o1mxp0hafc5jb2
Fix bug 917942 (fake-changes infinite loop on update, allocates many
extents).

The bug was reported by, and the fix and testcase are adopted from
Facebook MySQL branch, revision 3787 of lp:mysqlatfacebook/51.

The issue is btr_cur_pessimistic_update() has uninitialized
cursor->tree_height when fake changes enabled, which is then used to
compute the number of extents to allocate.  Other similar functions
(btr_cur_pessimistic_insert() and btr_cur_pessimistic_delete()) seem
to be unaffected.

Fixed by initializing cursor->tree_height to ULINT_UNDEFINED in
btr_pcur_create_for_mysql(), testing for this value in
btr_cur_pessimistic_update() and allocating 3 extents in the case of
fake changes.  Added checks in btr_cur_pessimistic_insert() and
btr_cur_pessimistic_delete() that tree_height != ULINT_UNDEFINED.

Make btr_cur_update_alloc_zip() not call
page_zip_compress_write_log_no_data() as fake transactions should not
write to log and to avoid hitting asserts.  For that, pass trx to the
former and update all callers.

Add a testcase for the bug.
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 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree 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 440.2.5 11 years ago Ignacio Nin Add a AC_CONFIG_AUX_DIR directive to HandlerSocket 1.3 KB Diff Download File
Makefile 466 11 years ago Stewart Smith merge mysql-5.1.65 from lp:percona-server/upstream 2.6 KB Diff Download File
README.HandlerSocket 334 12 years ago Stewart Smith Import MySQL 5.1.59 tree 429 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