Re: [Maria-developers] Contributing in Support for GTID in mysqlbinlog for GSoC'15

2015-02-23 Thread Kristian Nielsen
Rohit Kashyap rkgud...@gmail.com writes:

 I am Rohit Kashyap, I am currently working on MDEV-7569
 and recently came over to your post on Support for GTID in mysqlbinlog
 [MDEV-4989]
 I would like to ask you for guidance and leads on this so that I can
 take it up as my GSoC'15 Project under MariaDB.

So I took a quick look at what mysqlbinlog currently supports, and how it
could be extended to GTID. Looks like it's actually pretty clear:

 - The --start-position and --stop-position options should be able to take
   GTID positions; or maybe there should be new --start-gtid and --stop-gtid
   options. Like --start-gtid=0-1-100,1-2-200,2-1-1000.

 - A GTID position means the point just _after_ that GTID. So starting from
   GTID 0-1-100 and stopping at GTID 0-1-200, the first GTID output will
   probably be 0-1-101 and the last one 0-1-200. Note that if some domain is
   not specified in the position, it means to start from the begining,
   respectively stop immediately in that domain.

 - Starting and stopping GTID should work both with local files, and with
   --read-from-remote-server. For the latter, there are a couple of extra
   things that need doing in the master-slave protocol, see
   get_master_version_and_clock() in sql/slave.cc.

 - At the end of the dump, put these statements as discussed in the bug:
   SET session.server_id = @@global.server_id,
   session.gtid_domain_id=@@global.gtid_domain_id;

Probably some more things will come up during the work, but this looks like a
reasonable start.

I would recommend to start by reading the GTID documentation, and
experimenting with all the relevant features described there, to familiarise
yourself with it. The main thing is to understand the concept of GTID position
and binlog order, and the relation to replication domains:

  https://mariadb.com/kb/en/mariadb/global-transaction-id/

And similarly, familiarise yourself with mysqlbinlog and how it would make
sense for it to be extended to support GTID.

Then make a detailed proposal for how the user-visible interface of
mysqlbinlog should be extended, and send it to the list for comments.

The next step will be to understand the concept of binlog state
(@@gtid_binlog_state), and how it is used to deal correctly with out-of-order
GTID sequence numbers in binlogs. This is mostly an internal implementation
detail, but necessary to be able to correctly identify starting and stopping
GTID positions in all cases.

Hope this helps,

 - 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] auth_socket/unix_socket auth plugin naming incompatibility with Percona Server

2015-02-23 Thread John Leach
Hi Sergei,

On Mon, 2015-02-23 at 14:30 +0100, Sergei Golubchik wrote:
 Hi, John!
 
 On Feb 19, John Leach wrote:
  
  On Percona I am indeed explicitly loading this in the config file
  using:
  
  plugin-load=auth_socket.so
  
  If I use this same config line in MariaDB, that is enough to get
  unix_socket registered.
  
  So the problem is only that the symbol differs between projects for
  the same plugin.
  
  Is that something it's worth filing a bug about? Is the aim for
  Percona/MariaDB to be compatible where possible?
 
 Yes, I suppose so. I cannot say who will fix it, though, we or Percona.

it seems to me that, if the aim is for percona and mariadb to be
compatible where possible, both projects now need to support both auth
definitions.

If that is the aim anyway!


 Generally we avoid having plugin type in the plugin name. XtraDB isn't
 called engine_xtradb. One simply writes
 
   create table ... engine=xtradb
 
 not
 
   create table ... engine=engine_xtradb
 
 Similarly, authentication plugin names describe authentication method
 only, for example:
 
   create user ... identified via pam
   create user ... identified via unix_socket
 
 and so on.

thanks for the clarification.

John.



___
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] auth_socket/unix_socket auth plugin naming incompatibility with Percona Server

2015-02-23 Thread Sergei Golubchik
Hi, John!

On Feb 19, John Leach wrote:
 
 On Percona I am indeed explicitly loading this in the config file
 using:
 
 plugin-load=auth_socket.so
 
 If I use this same config line in MariaDB, that is enough to get
 unix_socket registered.
 
 So the problem is only that the symbol differs between projects for
 the same plugin.
 
 Is that something it's worth filing a bug about? Is the aim for
 Percona/MariaDB to be compatible where possible?

Yes, I suppose so. I cannot say who will fix it, though, we or Percona.

Generally we avoid having plugin type in the plugin name. XtraDB isn't
called engine_xtradb. One simply writes

  create table ... engine=xtradb

not

  create table ... engine=engine_xtradb

Similarly, authentication plugin names describe authentication method
only, for example:

  create user ... identified via pam
  create user ... identified via unix_socket

and so on.

  A plugin can not have two names, but technically it's possible to have
  two plugins in the same .so file, they could share all the code and only
  differ in names.

Regards,
Sergei


___
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] passwordless mariadb root login with auht_socket in Debian

2015-02-23 Thread Otto Kekäläinen
Daniel, anybody..?

2015-02-20 22:52 GMT+02:00 Otto Kekäläinen o...@seravo.fi:
 Hello Daniel!

 It seems there are some issues with the passwordless login patch you
 sent me some weeks ago (https://github.com/ottok/mariadb-10.0/pull/3)

 Can you help me debug the failing postinst script?


 I added 'set -x' to the mariadb-server-10.0.postinst script and when
 it is run during the configure phase it will exit with code 1 and make
 dpkg abort the installation.

 Last lines of execution:
  SET sql_log_bin=0;
  CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT
 NULL DEFAULT '\'''\'',dl char(128) COLLATE utf8_bin NOT NULL
 DEFAULT '\'''\'',PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT
 CHARSET=utf8 COLLATE=utf8_bin COMMENT='\''MySQL plugins'\'';'
 + logger -p daemon.err -t mysqld_safe -i
 + /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables
 --default-storage-engine=myisam --plugin-load-add=auth_socket
 + set -e
 + echo 'SET sql_log_bin=0; USE mysql; DELIMITER //; CREATE PROCEDURE
 debian_plugin_install(IN plugin_name CHAR(50), IN soname CHAR(50))
 BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND  EXECUTE
 inst_plug; set @plugin_name=plugin_name; set @soname=soname ;set
 @install_plugin=CONCAT(INSTALL PLUGIN ,@plugin_name, SONAME '\'',
 @soname, '\'');PREPARE inst_plug FROM @install_plugin ;
 select PLUGIN_NAME INTO @a from  information_schema.plugins where
 PLUGIN_NAME=@plugin_name AND PLUGIN_STATUS='\''ACTIVE'\'' AND
 PLUGIN_TYPE='\''AUTHENTICATION'\'' AND PLUGIN_LIBRARY LIKE
 concat(@soname,'\''%'\''
 ); DEALLOCATE PREPARE inst_plug; END// CALL
 debian_plugin_install('\''unix_socket'\'', '\''auth_socket'\'') //
 DROP PROCEDURE debian_plugin_install//'
 + logger -p daemon.err -t mysqld_safe -i
 + /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables
 --default-storage-engine=myisam --plugin-load-add=auth_socket
 timo@debunstable:~$ echo $?
 1
 timo@debunstable:~$ echo $?
 0

 This implies that the exit code from the line '/usr/sbin/mysqld
 --bootstrap --user=mysql --skip-grant-tables
 --default-storage-engine=myisam --plugin-load-add=auth_socket' is 1.


 Any ideas why?


 If you want to test it yourself, add to you apt sources the test repo

 deb http://labs.seravo.fi/~otto/mariadb-repo/ mariabd-10.0-sid-amd64/



-- 
Check out our blog at http://seravo.fi/blog
and follow @ottokekalainen

___
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] passwordless mariadb root login with auht_socket in Debian

2015-02-23 Thread Jean Weisbuch

Manually executing the command result in this error :
ERROR: 1064  You have an error in your SQL syntax; check the 
manual that corresponds to your MariaDB server version for the right 
syntax to use near 'USE mysql;DELIMITER //; CREATE PROCEDURE 
debian_plugin_install(IN plugin_name C' at line 1

150223 22:44:06 [ERROR] Aborting

By adding \n between each of these statements we can see that the 
statement causing the syntax error is DELIMITER //;, it seems that 
DELIMITER is only used by mysql client and the that mysqld doesnt 
recognize it as an internal command.



Le 23/02/2015 21:52, Otto Kekäläinen a écrit :

Daniel, anybody..?

2015-02-20 22:52 GMT+02:00 Otto Kekäläinen o...@seravo.fi:

Hello Daniel!

It seems there are some issues with the passwordless login patch you
sent me some weeks ago (https://github.com/ottok/mariadb-10.0/pull/3)

Can you help me debug the failing postinst script?


I added 'set -x' to the mariadb-server-10.0.postinst script and when
it is run during the configure phase it will exit with code 1 and make
dpkg abort the installation.

Last lines of execution:
  SET sql_log_bin=0;
  CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT
NULL DEFAULT '\'''\'',dl char(128) COLLATE utf8_bin NOT NULL
DEFAULT '\'''\'',PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT
CHARSET=utf8 COLLATE=utf8_bin COMMENT='\''MySQL plugins'\'';'
+ logger -p daemon.err -t mysqld_safe -i
+ /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables
--default-storage-engine=myisam --plugin-load-add=auth_socket
+ set -e
+ echo 'SET sql_log_bin=0; USE mysql; DELIMITER //; CREATE PROCEDURE
debian_plugin_install(IN plugin_name CHAR(50), IN soname CHAR(50))
BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND  EXECUTE
inst_plug; set @plugin_name=plugin_name; set @soname=soname ;set
@install_plugin=CONCAT(INSTALL PLUGIN ,@plugin_name, SONAME '\'',
@soname, '\'');PREPARE inst_plug FROM @install_plugin ;
select PLUGIN_NAME INTO @a from  information_schema.plugins where
PLUGIN_NAME=@plugin_name AND PLUGIN_STATUS='\''ACTIVE'\'' AND
PLUGIN_TYPE='\''AUTHENTICATION'\'' AND PLUGIN_LIBRARY LIKE
concat(@soname,'\''%'\''
); DEALLOCATE PREPARE inst_plug; END// CALL
debian_plugin_install('\''unix_socket'\'', '\''auth_socket'\'') //
DROP PROCEDURE debian_plugin_install//'
+ logger -p daemon.err -t mysqld_safe -i
+ /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables
--default-storage-engine=myisam --plugin-load-add=auth_socket
timo@debunstable:~$ echo $?
1
timo@debunstable:~$ echo $?
0

This implies that the exit code from the line '/usr/sbin/mysqld
--bootstrap --user=mysql --skip-grant-tables
--default-storage-engine=myisam --plugin-load-add=auth_socket' is 1.


Any ideas why?


If you want to test it yourself, add to you apt sources the test repo

deb http://labs.seravo.fi/~otto/mariadb-repo/ mariabd-10.0-sid-amd64/


___
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] passwordless mariadb root login with auht_socket in Debian

2015-02-23 Thread Daniel Black
I partly got started on the weekend but didn't get far.

I'll continue looking this afternoon.

- Original Message -
 Daniel, anybody..?
 
 2015-02-20 22:52 GMT+02:00 Otto Kekäläinen o...@seravo.fi:
  Hello Daniel!
 
  It seems there are some issues with the passwordless login patch you
  sent me some weeks ago (https://github.com/ottok/mariadb-10.0/pull/3)
 
  Can you help me debug the failing postinst script?
 
 
  I added 'set -x' to the mariadb-server-10.0.postinst script and when
  it is run during the configure phase it will exit with code 1 and make
  dpkg abort the installation.
 
  Last lines of execution:
   SET sql_log_bin=0;
   CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT
  NULL DEFAULT '\'''\'',dl char(128) COLLATE utf8_bin NOT NULL
  DEFAULT '\'''\'',PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT
  CHARSET=utf8 COLLATE=utf8_bin COMMENT='\''MySQL plugins'\'';'
  + logger -p daemon.err -t mysqld_safe -i
  + /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables
  --default-storage-engine=myisam --plugin-load-add=auth_socket
  + set -e
  + echo 'SET sql_log_bin=0; USE mysql; DELIMITER //; CREATE PROCEDURE
  debian_plugin_install(IN plugin_name CHAR(50), IN soname CHAR(50))
  BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND  EXECUTE
  inst_plug; set @plugin_name=plugin_name; set @soname=soname ;set
  @install_plugin=CONCAT(INSTALL PLUGIN ,@plugin_name, SONAME '\'',
  @soname, '\'');PREPARE inst_plug FROM @install_plugin ;
  select PLUGIN_NAME INTO @a from  information_schema.plugins where
  PLUGIN_NAME=@plugin_name AND PLUGIN_STATUS='\''ACTIVE'\'' AND
  PLUGIN_TYPE='\''AUTHENTICATION'\'' AND PLUGIN_LIBRARY LIKE
  concat(@soname,'\''%'\''
  ); DEALLOCATE PREPARE inst_plug; END// CALL
  debian_plugin_install('\''unix_socket'\'', '\''auth_socket'\'') //
  DROP PROCEDURE debian_plugin_install//'
  + logger -p daemon.err -t mysqld_safe -i
  + /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables
  --default-storage-engine=myisam --plugin-load-add=auth_socket
  timo@debunstable:~$ echo $?
  1
  timo@debunstable:~$ echo $?
  0
 
  This implies that the exit code from the line '/usr/sbin/mysqld
  --bootstrap --user=mysql --skip-grant-tables
  --default-storage-engine=myisam --plugin-load-add=auth_socket' is 1.
 
 
  Any ideas why?
 
 
  If you want to test it yourself, add to you apt sources the test repo
 
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariabd-10.0-sid-amd64/
 
 
 
 --
 Check out our blog at http://seravo.fi/blog
 and follow @ottokekalainen
 

-- 
-- 
Daniel Black, Engineer @ Open Query (http://openquery.com.au)
Remote expertise  maintenance for MySQL/MariaDB server environments.

___
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] passwordless mariadb root login with auht_socket in Debian

2015-02-23 Thread Daniel Black


- Original Message -
 Manually executing the command result in this error :
  ERROR: 1064  You have an error in your SQL syntax; check the
 manual that corresponds to your MariaDB server version for the right
 syntax to use near 'USE mysql;DELIMITER //; CREATE PROCEDURE
 debian_plugin_install(IN plugin_name C' at line 1
  150223 22:44:06 [ERROR] Aborting
 
 By adding \n between each of these statements we can see that the
 statement causing the syntax error is DELIMITER //;, it seems that
 DELIMITER is only used by mysql client and the that mysqld doesnt
 recognize it as an internal command.

thank you


-- 
-- 
Daniel Black, Engineer @ Open Query (http://openquery.com.au)
Remote expertise  maintenance for MySQL/MariaDB server environments.

___
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