Merge lp:~laurynas-biveinis/percona-server/multiple-xa-ses-5.6 into lp:percona-server/5.6
Status: | Superseded |
---|---|
Proposed branch: | lp:~laurynas-biveinis/percona-server/multiple-xa-ses-5.6 |
Merge into: | lp:percona-server/5.6 |
Diff against target: |
519 lines (+287/-38) 6 files modified
Percona-Server/sql/handler.cc (+1/-1) Percona-Server/sql/log.cc (+79/-35) Percona-Server/sql/log.h (+4/-1) Percona-Server/sql/mysqld.cc (+1/-1) Percona-Server/unittest/gunit/CMakeLists.txt (+1/-0) Percona-Server/unittest/gunit/tc_log_mmap-t.cc (+201/-0) |
To merge this branch: | bzr merge lp:~laurynas-biveinis/percona-server/multiple-xa-ses-5.6 |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith (community) | Needs Fixing | ||
George Ormond Lorch III (community) | g2 | Approve | |
Review via email: mp+197187@code.launchpad.net |
This proposal has been superseded by a proposal from 2013-12-18.
Description of the change
Fixes for bug 1255549 and bug 1255551, making it possible to have 2 XA storage engines installed and running.
jenkins.
Fix bug 1255549 (Crash on startup when XA support functions activated
by a second engine) / http://
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_
- TC_LOG_MMAP::pool reads and writes in
TC_
TC_
- If TC_LOG_
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_
- tc_log_
bumping it.
- The TC_LOG_
TC_
- active == NULL in TC_LOG_
active page lock locked twice.
- LOCK_active was released too early in TC_LOG_
resulting in TC_LOG_MMAP::active access race conditions.
- There was a lock order violation between LOCK_sync and page locks
in TC_LOG_
- LOCK_active was held needlessly, and page field accesses were not
protected by a page lock in TC_LOG_
TC_
- 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_
locked.
- Do not assert but return error in the case the opened log was
shorter than three pages long in TC_LOG_
- If TC_LOG_
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.
Fix bug 1255551 (Tc_log_page_size should be unflushable or server
crashes if 2 XA SEs installed) / upstream
http://
The issue is FLUSH STATUS resetting tc_log_page_size to zero and a
later TC_LOG_
Fixed by making it unflushable.
A few small notes: bugs.mysql. com/bug. php?id= 70854 (modifying EXAMPLE engine... or copy&pasting it and having an engine for such test cases)
- We should bring in the (C) headers from MariaDB for files where the code came from MariaDB.
- I'd love it if we had the test case from http://
otherwise i think it's okay