MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
  • MariaDB\ 71.8%
  • C++ 16.4%
  • C 10.4%
  • Shell 0.5%
  • Perl 0.4%
  • Other 0.3%
Find a file
Andrei Elkin c8ae357341 MDEV-742 XA PREPAREd transaction survive disconnect/server restart
Lifted long standing limitation to the XA of rolling it back at the
transaction's
connection close even if the XA is prepared.

Prepared XA-transaction is made to sustain connection close or server
restart.
The patch consists of

    - binary logging extension to write prepared XA part of
      transaction signified with
      its XID in a new XA_prepare_log_event. The concusion part -
      with Commit or Rollback decision - is logged separately as
      Query_log_event.
      That is in the binlog the XA consists of two separate group of
      events.

      That makes the whole XA possibly interweaving in binlog with
      other XA:s or regular transaction but with no harm to
      replication and data consistency.

      Gtid_log_event receives two more flags to identify which of the
      two XA phases of the transaction it represents. With either flag
      set also XID info is added to the event.

      When binlog is ON on the server XID::formatID is
      constrained to 4 bytes.

    - engines are made aware of the server policy to keep up user
      prepared XA:s so they (Innodb, rocksdb) don't roll them back
      anymore at their disconnect methods.

    - slave applier is refined to cope with two phase logged XA:s
      including parallel modes of execution.

This patch does not address crash-safe logging of the new events which
is being addressed by MDEV-21469.

CORNER CASES: read-only, pure myisam, binlog-*, @@skip_log_bin, etc

Are addressed along the following policies.
1. The read-only at reconnect marks XID to fail for future
   completion with ER_XA_RBROLLBACK.

2. binlog-* filtered XA when it changes engine data is regarded as
   loggable even when nothing got cached for binlog.  An empty
   XA-prepare group is recorded. Consequent Commit-or-Rollback
   succeeds in the Engine(s) as well as recorded into binlog.

3. The same applies to the non-transactional engine XA.

4. @@skip_log_bin=OFF does not record anything at XA-prepare
   (obviously), but the completion event is recorded into binlog to
   admit inconsistency with slave.

The following actions are taken by the patch.

At XA-prepare:
   when empty binlog cache - don't do anything to binlog if RO,
   otherwise write empty XA_prepare (assert(binlog-filter case)).

At Disconnect:
   when Prepared && RO (=> no binlogging was done)
     set Xid_cache_element::error := ER_XA_RBROLLBACK
     *keep* XID in the cache, and rollback the transaction.

At XA-"complete":
   Discover the error, if any don't binlog the "complete",
   return the error to the user.

Kudos
-----
Alexey Botchkov took to drive this work initially.
Sergei Golubchik, Sergei Petrunja, Marko Mäkelä provided a number of
good recommendations.
Sergei Voitovich made a magnificent review and improvements to the code.
They all deserve a bunch of thanks for making this work done!
2020-03-14 22:45:48 +02:00
BUILD Merge branch '10.3' into 10.4 2019-09-06 11:53:10 +02:00
client MDEV-13362: Fix -Wset-but-unused 2020-03-12 18:13:47 +02:00
cmake Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
dbug Merge 10.2 into 10.3 2019-12-12 14:41:51 +02:00
debian Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
Docs Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB driver 2019-07-19 13:39:20 +03:00
extra Merge branch 'github/10.5' into 10.5 2020-03-14 09:52:35 +01:00
include Merge branch 'github/10.5' into 10.5 2020-03-14 09:52:35 +01:00
libmariadb@3be5897c33 MDEV-21920 binlog_encryption.rpl_gtid_basic test failure with --ps 2020-03-14 09:56:00 +01:00
libmysqld MDEV-21907: InnoDB: Enable -Wconversion on clang and GCC 2020-03-12 19:46:41 +02:00
libservices Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
man Add a man page for mytop that is in sources 2020-03-10 07:53:33 +01:00
mysql-test MDEV-742 XA PREPAREd transaction survive disconnect/server restart 2020-03-14 22:45:48 +02:00
mysys Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
mysys_ssl Update WolfSSL, remove older workarounds. 2019-07-28 13:45:15 +02:00
plugin Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
randgen/conf
scripts MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
sql MDEV-742 XA PREPAREd transaction survive disconnect/server restart 2020-03-14 22:45:48 +02:00
sql-bench Merge 10.4 into 10.5 2019-12-16 07:47:17 +02:00
sql-common cleanup: PSI key is *always* the first argument 2020-03-10 19:24:23 +01:00
storage MDEV-742 XA PREPAREd transaction survive disconnect/server restart 2020-03-14 22:45:48 +02:00
strings perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
support-files Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
tests perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
tpool MDEV-16264: Eliminate unsafe os_aio_userdata_t type cast 2020-03-12 19:43:45 +02:00
unittest perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
vio perfschema socket instrumentation related changes 2020-03-10 19:24:23 +01:00
win Merge branch '10.4' into 10.5 2019-11-27 16:02:34 +01:00
wsrep-lib@dcdd7435bd Update wsrep-lib submodule. 2020-02-19 09:35:48 +02:00
zlib Fixed compiler warnings from gcc 7.4.1 2020-01-29 23:23:55 +02:00
.clang-format Merge 10.4 into 10.5 2019-12-27 21:17:16 +02:00
.gitattributes Merge branch '10.0' into 10.1 2018-05-05 14:01:59 +02:00
.gitignore perfschema compilation, test and misc fixes 2020-03-10 19:24:23 +01:00
.gitmodules Fix github urls of submodules 2019-07-02 17:16:35 +04:00
.travis.compiler.sh travis: use galera-4 in 10.4 branch (#1226) 2019-03-14 08:20:32 +02:00
.travis.yml Review comments: Refactoring the duplicates 2020-02-24 19:01:51 +02:00
appveyor.yml Appveyor configuration and addition of badge 2019-01-10 11:58:02 +01:00
BUILD-CMAKE Minor spelling fixes in code comments, docs and output 2018-01-12 16:49:02 +02:00
CMakeLists.txt MDEV-21580: Allow packed sort keys in sort buffer 2020-03-10 15:09:17 +05:30
config.h.cmake Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
configure.cmake Merge commit '10.3' into 10.4 2020-03-11 13:27:10 +01:00
CONTRIBUTING.md Add CONTRIBUTING file and modify README file about live QA regarding new contributors 2018-12-04 23:15:33 +04:00
COPYING Update FSF Address 2019-05-11 21:29:06 +03:00
CREDITS Update contributors 2018-09-10 16:47:44 +04:00
EXCEPTIONS-CLIENT
INSTALL-SOURCE Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
INSTALL-WIN-SOURCE Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
KNOWN_BUGS.txt Changed some MySQL names in messages to MariaDB 2018-12-09 20:49:05 +02:00
README.md Changed Travis to 10.5 2020-01-27 10:37:32 +02:00
THIRDPARTY Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
VERSION bump the VERSION 2020-02-14 10:46:08 -05:00

Code status:

  • Travis CI status travis-ci.org (10.5 branch)
  • Appveyor CI status ci.appveyor.com

MariaDB: drop-in replacement for MySQL

MariaDB is designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.

MariaDB is brought to you by the MariaDB Foundation and the MariaDB corporation. Please read the CREDITS file for details about the MariaDB Foundation, and who is developing MariaDB.

MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Corporation, the MariaDB Foundation and by many people in the community.

MySQL, which is the base of MariaDB, is a product and trademark of Oracle Corporation, Inc. For a list of developers and other contributors, see the Credits appendix. You can also run 'SHOW authors' to get a list of active contributors.

A description of the MariaDB project and a manual can be found at:

https://mariadb.com/kb/en/

https://mariadb.com/kb/en/mariadb-vs-mysql-features/

https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/

https://mariadb.com/kb/en/library/new-and-old-releases/

https://mariadb.org/

As MariaDB is a full replacement of MySQL, the MySQL manual at http://dev.mysql.com/doc is generally applicable.

Help

More help is available from the Maria Discuss mailing list https://launchpad.net/~maria-discuss and the #maria IRC channel on Freenode.

Live QA for beginner contributors

MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip and IRC. From 8:00 to 10:00 UTC on Mondays, and 10:00 to 12:00 UTC on Thursdays, anyone can ask any questions theyd like, and a live developer will be available to assist.

New contributors can ask questions any time, but we will provide immediate feedback during that interval.

Licensing


NOTE:

MariaDB is specifically available only under version 2 of the GNU General Public License (GPLv2). (I.e. Without the "any later version" clause.) This is inherited from MySQL. Please see the README file in the MySQL distribution for more information.

License information can be found in the COPYING file. Third party license information can be found in the THIRDPARTY file.


Bug Reports

Bug and/or error reports regarding MariaDB should be submitted at: https://jira.mariadb.org

For reporting security vulnerabilities see: https://mariadb.org/about/security-policy/

Bugs in the MySQL code can also be submitted at: https://bugs.mysql.com

The code for MariaDB, including all revision history, can be found at: https://github.com/MariaDB/server