maria-developers team mailing list archive
Mailing list archive
Re: Question about GTIDs in MariaBD
Thanks for the reply, but I am afraid I don't fully understand.
Here is a simple test case with mySQL 5.6.17:
You need all those in configuration [mysqld) section
gtid_mode = ON
enforce_gtid_consistency = ON
Then this small script will reproduce:
DROP DATABASE IF EXISTS `gtid_test`;
CREATE DATABASE `gtid_test`;
CREATE TABLE `tab1` (
`a` INT DEFAULT NULL
) ENGINE=MYISAM ;
CREATE TABLE `tab2` (
--start a transaction
INSERT INTO `tab1` VALUES (1);
INSERT INTO `tab2` VALUES (1);
-- now the first UPDATE to the MyISAM table in the transaction triggers
UPDATE `tab1` SET `a` = 5 WHERE `a` = 1;
-- and you'll get:
-- Error Code: 1785
-- When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional
tables can only be done in either autocommitted statements or
single-statement transactions, and never in the same statement as updates
to transactional tables.
ShouldI understand that MariaDB dos not prevent this (does not raise an
error), but it is still unsafe as binlog - and thus replication - may be
On Sat, May 10, 2014 at 6:09 PM, Pavel Ivanov <pivanof@xxxxxxxxxx> wrote:
> There is no such limitation in MariaDB as well as no limitation on
> CREATE TABLE ... SELECT.
> Although beware that mixing statements changing MyISAM and InnoDB
> tables in statement binlog mode you may get different results from the
> statements on slaves.
> On Sat, May 10, 2014 at 3:48 AM, Peter Laursen <peter_laursen@xxxxxxxxxx>
> > GTID implementation in MySQL 5.6 has the limitation as described here:
> > "nontransactional storage engines such as MyISAM cannot be made in the
> > statement or transaction as updates to tables using transactional storage
> > engines such as InnoDB."
> > If you try you will get the error:
> > Error Code: 1785
> > When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, updates to non-transactional
> > tables can only be done in either autocommitted statements or
> > single-statement transactions, and never in the same statement as
> updates to
> > transactional tables.
> > Is there same or similar/other limitations with GTID in MariaDB 10?
> > -- Peter Laursen
> > -- Webyog
> > _______________________________________________
> > Mailing list: https://launchpad.net/~maria-developers
> > Post to : maria-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~maria-developers
> > More help : https://help.launchpad.net/ListHelp