lp:~laurynas-biveinis/percona-server/multiple-xa-ses-5.6

Created by Laurynas Biveinis on 2013-11-28 and last modified on 2013-12-18
Get this branch:
bzr branch lp:~laurynas-biveinis/percona-server/multiple-xa-ses-5.6
Only Laurynas Biveinis can upload to this branch. If you are Laurynas Biveinis please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

520. By Laurynas Biveinis on 2013-12-18

Fix bug 1255551 (Tc_log_page_size should be unflushable or server
crashes if 2 XA SEs installed) / upstream
http://bugs.mysql.com/bug.php?id=70854.

The issue is FLUSH STATUS resetting tc_log_page_size to zero and a
later TC_LOG_MMAP::unlog() attempt to divide by it.

Fixed by making it unflushable.

519. By Laurynas Biveinis on 2013-12-18

Fix bug 1255549 (Crash on startup when XA support functions activated
by a second engine) / http://bugs.mysql.com/bug.php?id=47134.

The fix is a combination of:

- disabling of code in ha_recover() that asserts if more than one XA
  SE is installed;

- MariaDB revisions 2502.102.122, 2502.102.167 (minus PBXT testcase),
  2502.565.20, 2502.102.215 (minus PBXT testcase and a bit that was
  later reverted as MDEV-3850) in lp:maria/5.5. They address:

  - TC_LOG_MMAP::open() performed incorrect pointer arithmetics to set
    the end pointer for each page by adding tc_log_page_size
    (byte-sized) number of XIDs (ulonglong-sized).
  - TC_LOG_MMAP::PAGE::ptr field was never initialized.
  - TC_LOG_MMAP::pool reads and writes in
    TC_LOG_MMAP::get_active_from_pool() failed to be protected by
    TC_LOG_MMAP::LOCK_pool if !syncing.
  - If TC_LOG_MMAP::get_active_from_pool() sees that the first page in
    the pool has no waiters, it returns it as an active page, and
    fails to check whether there is any free space on it.
  - active->free and active->size were accessed without active->lock
    protection in TC_LOG_MMAP::get_active_from_pool().
  - tc_log_cur_pages_used was not protected from race conditions in
    bumping it.
  - The TC_LOG_MMAP::log_xid() return value check was inverted in
    TC_LOG_MMAP::commit().
  - active == NULL in TC_LOG_MMAP::log_xid() would result in the new
    active page lock locked twice.
  - LOCK_active was released too early in TC_LOG_MMAP::log_xid(),
    resulting in TC_LOG_MMAP::active access race conditions.
  - There was a lock order violation between LOCK_sync and page locks
    in TC_LOG_MMAP::log_xid().
  - LOCK_active was held needlessly, and page field accesses were not
    protected by a page lock in TC_LOG_MMAP::log_xid() if
    TC_LOG_MMAP::syncing != NULL.
  - TC_LOG_MMAP::sync() requested to sync only 1 byte from the page
    being synced.
  - TC_LOG_MMAP::sync() broadcasted syncing->cond too early.
  - TC_LOG_MMAP::sync() could dereference NULL active.
  - TC_LOG_MMAP::unlog() performed page writes without the page lock
    locked.
  - Do not assert but return error in the case the opened log was
    shorter than three pages long in TC_LOG_MMAP::open().
  - If TC_LOG_MMAP::get_active_from_pool() chooses the last pool page
    to be made active, it was not unlinked from the pool.

- backport of the tc_log_mmap unit test from MySQL 5.7.2 with a
  supporting TC_LOG_MMAP::size() method.

516. By Laurynas Biveinis on 2013-12-16

Null-merge lp:percona-server/5.5 revision 607

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:percona-server/5.6
This branch contains Public information 
Everyone can see this information.