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.
Find a file
Sachin 284c72eacf MDEV-17614 INSERT on dup key update is replication unsafe
Problem:-
When mysql executes INSERT ON DUPLICATE KEY INSERT, the storage engine checks
if the inserted row would generate a duplicate key error. If yes, it returns
the existing row to mysql, mysql updates it and sends it back to the storage
engine.When the table has more than one unique or primary key, this statement
is sensitive to the order in which the storage engines checks the keys.
Depending on this order, the storage engine may determine different rows
to mysql, and hence mysql can update different rows.The order that the
storage engine checks keys is not deterministic. For example, InnoDB checks
keys in an order that depends on the order in which indexes were added to
the table. The first added index is checked first. So if master and slave
have added indexes in different orders, then slave may go out of sync.

Solution:-
Make INSERT...ON DUPLICATE KEY UPDATE unsafe while using stmt or mixed format
When there is more then one unique key.
Although there is two exception.
  1. Auto Increment key is not counted because Innodb will get gap lock for
    failed Insert and concurrent insert will get a next increment value. But if
    user supplies auto inc value it can be unsafe.
  2. Count only unique keys for which insertion is performed.

So this patch also addresses the bug id #72921
2019-08-09 19:36:56 +05:30
BUILD Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
client imporve clang build 2019-06-25 13:21:36 +03:00
cmake MDEV-19481 mariadb-10.3.15-linux-systemd-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' and 'GLIBCXX_3.4.21' not found 2019-07-04 18:19:52 +02:00
dbug Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
debian Mention the sample IPv4 address 10.0.0.1 2019-05-28 10:54:30 +03:00
Docs MDEV-19563 Removed references to deprecated option innodb_locks_unsafe_for_binlog 2019-06-12 13:00:08 +03:00
extra MDEV-17638 Improve error message about corruption of encrypted page 2019-08-01 16:49:17 +03:00
include imporve clang build 2019-06-25 13:21:36 +03:00
libmysql Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
libmysqld Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
libservices Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
man MDEV-19537: Document mysqlimport option ignore-foreign-keys 2019-05-21 17:04:18 +04:00
mysql-test MDEV-17614 INSERT on dup key update is replication unsafe 2019-08-09 19:36:56 +05:30
mysys Merge 5.5 into 10.1 2019-05-28 11:25:45 +03:00
mysys_ssl Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
pcre Merge branch 'merge-pcre' into 10.1 2019-04-26 16:11:55 +02:00
plugin Merge branch '5.5' into 10.1 2019-07-25 13:27:11 +02:00
randgen/conf Group commit for maria engine. 2010-02-12 15:12:28 +02:00
scripts Merge branch '5.5' into 10.1 2019-07-25 13:27:11 +02:00
sql MDEV-17614 INSERT on dup key update is replication unsafe 2019-08-09 19:36:56 +05:30
sql-bench Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
sql-common Merge branch '5.5' into 10.1 2019-07-25 17:42:20 +02:00
storage MDEV-20247 Replication hangs with "preparing" and never starts 2019-08-07 12:35:04 +05:30
strings Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
support-files Merge branch '5.5' into 10.1 2019-07-25 13:27:11 +02:00
tests Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
unittest Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
vio Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
win Merge branch '5.5' into 10.1 2019-07-25 13:27:11 +02:00
wsrep Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
zlib restore RESTRICT_SYMBOL_EXPORTS(zlib) 2019-07-10 08:58:28 +02:00
.clang-format MDEV-13631 Make use of clang-format 2019-06-12 22:36:43 +03:00
.gitattributes Merge branch '10.0' into 10.1 2018-05-05 14:01:59 +02:00
.gitignore Merge branch '10.0' into 10.1 2018-10-30 15:10:01 +01:00
BUILD-CMAKE various documentation updates 2012-06-18 16:57:58 -04:00
CMakeLists.txt MDEV-19360 - Disable _FORTIFY_SOURCE for ASAN builds 2019-06-07 12:47:41 +04:00
config.h.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
configure.cmake Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
COPYING Update FSF Address 2019-05-11 21:29:06 +03:00
COPYING.thirdparty Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
CREDITS Update contributors 2018-09-10 16:47:44 +04:00
EXCEPTIONS-CLIENT MDEV-5645 MariaDB-5.5.35 - references are made to an "EXCEPTIONS-CLIENT" file but it does not exist 2014-05-31 13:18:56 +02:00
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 various documentation updates 2012-06-18 16:57:58 -04:00
README Update FSF Address 2019-05-11 21:29:06 +03:00
VERSION bump the VERSION 2019-07-31 09:55:57 -04:00

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.
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 Foundation and the MariaDB Corporation, 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:
http://mariadb.org/
https://mariadb.com/kb/en/
https://mariadb.com/kb/en/mariadb-vs-mysql-features/
https://mariadb.com/kb/en/mariadb-versus-mysql-features/
https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/

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

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

***************************************************************************

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, COPYING.LESSER,
and COPYING.thirdparty files.

***************************************************************************

IMPORTANT:

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:
http://bugs.mysql.com

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

***************************************************************************