[Maria-developers] New to the list & question about CONNECT

2014-05-12 Thread Martijn Tonies (Upscene Productions)
Hello everyone,

My name is Martijn Tonies and I’m a Windows tools developer, we have a tool 
called
“Database Workbench”, a developer tool for several database engines. For it’s 
next
major version, we’re planning to officially support MariaDB in the MySQL module.

I’ve investigated several of the features, implemented support for Roles, 
Virtual 
Columns etc, but I’m having trouble with the CONNECT engine.


Here’s what I did, using MariaDB 10.0.10

1) registered a server with CREATE SERVER:

CREATE SERVER mysql55_at_local FOREIGN DATA WRAPPER mysql
  OPTIONS(HOST 'MT-XP-VM-MYSQL', PORT 3355, DATABASE 'test', USER 'root', 
PASSWORD ‘secret’);

2) created a table in the MySQL database:
CREATE TABLE sfdata (
  mark1  Integer(11),
  mark2  Integer(11),
  mark3  Integer(11),
  mark4  Integer(11),
  `name` VarChar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci
) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;


3) created a table in the MariaDB database:
CREATE TABLE `sfdata_proxy3` (
  `mark1` int(11) DEFAULT NULL,
  `mark2` int(11) DEFAULT NULL,
  `mark3` int(11) DEFAULT NULL,
  `mark4` int(11) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=utf8 CONNECTION='mysql55_at_local/sfdata'



I then expected that table “sfdata_proxy3” has the rows as “sfdata” has, but I 
got nothing returned.


Any clue where to look?



With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] Question about GTIDs in MariaBD

2014-05-12 Thread Peter Laursen
I blogged this:
http://blog.webyog.com/2014/05/12/suddenly-myisam-became-transaction-aware/

It should appear on planet.mysql.com soon.

-- Peter


On Mon, May 12, 2014 at 10:53 AM, Kristian Nielsen  wrote:

> "AL13N"  writes:
>
> >> Peter Laursen  writes:
>
> >> So yes, there are others that consider Oracle's design of GTID 'a dirty
> >> hack',
> >> but MariaDB 10.0 GTID is not affected by that design.
>
> > What about mariadb being a slave of a Oracle MySQL GTID?
>
> The restrictions are on the master, not on the slaves. So what do you mean?
> Surely, connecting a MariaDB slave to an Oracle MySQL master will not
> remove
> those restrictions.
>
> Note that when a MariaDB server connects as a slave to an Oracle MySQL
> master
> server, it is not possible to use GTID for that connection (because the
> GTID
> implementations are not compatible). Old style non-GTID replication must be
> used.
>
>  - Kristian.
>
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] Question about GTIDs in MariaBD

2014-05-12 Thread Kristian Nielsen
"AL13N"  writes:

>> Peter Laursen  writes:

>> So yes, there are others that consider Oracle's design of GTID 'a dirty
>> hack',
>> but MariaDB 10.0 GTID is not affected by that design.

> What about mariadb being a slave of a Oracle MySQL GTID?

The restrictions are on the master, not on the slaves. So what do you mean?
Surely, connecting a MariaDB slave to an Oracle MySQL master will not remove
those restrictions.

Note that when a MariaDB server connects as a slave to an Oracle MySQL master
server, it is not possible to use GTID for that connection (because the GTID
implementations are not compatible). Old style non-GTID replication must be
used.

 - Kristian.

___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] Question about GTIDs in MariaBD

2014-05-12 Thread Peter Laursen
@AL13N ... it affects scripts generated by an automatic maintenance tool.
 The tool does updates to multiple tables in one transaction and does not
check for the storage engine. It used to work, but now fails on schemas
that have a mix of MyISAM and InnoDB tables. (simplifed explanation!)

-- Peter


On Sun, May 11, 2014 at 10:44 PM, AL13N  wrote:

> Op zondag 11 mei 2014 16:59:10 schreef Peter Laursen:
> > With autocommit=1 every statement runs in its own transaction, so
> > obviousluy .. yes!
> >
> > MyISAM is/used to be completely  'transaction-agnosstic'.  But GTIDs seem
> > to confict with non-transactional storage engines (as far as I can
> > understand). MySQL/Oracle have "solved" (!) this by not allowing updates
> to
> > tables using  transactional engines and non-transactional storage engines
> > in same transaction.
>
>
> I don't get this... if MyISAM is transaction-agnostic, why would you use
> it in
> a transaction to begin with and even combined with a transactional
> database?
>
> it seems to me that if you rely on something like this, one shouldn't use
> MyISAM, or expect it to cope with this... (even though this example should
> be
> safe), (well, because it's transaction-agnostic, one can't asume it uses
> the
> same values when using transactional storage engines?
>
> of course, i'm not an expert, so i probably get a wrong idea of the
> problem.
>
> Is there some kind of example that _is_ unsafe somehow? wrt GTID being
> conflicting? since you speak of GTID, i assume you mean the replication
> safety?
> (ie: different results?)
>
>
> > However to me it is nonsense that transactions apply (have any effect at
> > all) for non-transactional storage engines.  As a consequence I consider
> > this solution (what must have been enforced in the server layer and not
> the
> > storeage engine layer) by Oracle 'a dirty hack' (unless somewone can
> > explain me why it it necessary).
> >
> > -- Peter
> >
> > On Sun, May 11, 2014 at 4:42 PM, Roberto Spadim
> wrote:
> > > With autoclmmit=1 works?
> > >
> > > Em domingo, 11 de maio de 2014, Peter Laursen <
> peter_laur...@webyog.com>
> > > escreveu:
> > >
> > > Thanks for the reply, but I am afraid I don't fully understand.
> > >
> > >> Here is a simple test case with mySQL 5.6.17:
> > >>
> > >> 1)
> > >> You need all those in configuration [mysqld) section
> > >>
> > >> log-bin
> > >> log-slave-updates
> > >> gtid_mode = ON
> > >> enforce_gtid_consistency = ON
> > >>
> > >>
> > >> 2)
> > >> Then this small script will reproduce:
> > >>
> > >>
> > >> DROP DATABASE IF EXISTS `gtid_test`;
> > >> CREATE DATABASE `gtid_test`;
> > >> USE `gtid_test`;
> > >>
> > >> CREATE TABLE `tab1` (
> > >> `a` INT DEFAULT NULL
> > >> ) ENGINE=MYISAM ;
> > >>
> > >> CREATE TABLE `tab2` (
> > >> `b` INT
> > >> ) ENGINE=INNODB;
> > >>
> > >> --start a transaction
> > >> SET autocommit=0;
> > >>
> > >> INSERT INTO `tab1` VALUES (1);
> > >> INSERT INTO `tab2` VALUES (1);
> > >>
> > >> -- now the first UPDATE to the MyISAM table in the transaction
> triggers
> > >> this error:
> > >>
> > >> 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.
> > >>
> > >>
> > >> 3)
> > >> 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
> > >> corrupted?
> > >>
> > >>
> > >> Thanks!
> > >>
> > >> -- Peter
> > >>
> > >> On Sat, May 10, 2014 at 6:09 PM, Pavel Ivanov 
> 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.
> > >>>
> > >>> Pavel
> > >>>
> > >>> On Sat, May 10, 2014 at 3:48 AM, Peter Laursen
> > >>> 
> > >>>
> > >>> wrote:
> > >>> > GTID implementation in MySQL 5.6 has the limitation as described
> here:
> > >>>
> https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-restrictions.h
> > >>> tml
> > >>>
> > >>> > "nontransactional storage engines such as MyISAM cannot be made in
> the
> > >>>
> > >>> same
> > >>>
> > >>> > 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