maria:bb-10.2-14472

Last commit made on 2018-06-21
Get this branch:
git clone -b bb-10.2-14472 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.2-14472
Repository:
lp:maria

Recent commits

f11b86c... by Sachin Setiya

MDEV-14472 Assertion `is_current_stmt_binlog_format_row()' failed...
in THD::binlog_write_table_map

Problem:- So the issue is when the test case (mdev_14472) is run with debug
  build , Assert DBUG_ASSERT(is_current_stmt_binlog_format_row()); is fired
  in binlog_write_table_map.

Analysis:- When we lock table t1, and if t1 has some trigger which updates
  another table then all other tables are also locked. So in the case of lock
  t1(in mdev_14472 test case) we will lock t1, t2, t3 and t4. In next insert
  command (t2 insert), we call handler->check_table_row_based from
  write_locked_table_maps which updates the table handler
  check_table_binlog_row_based_done to 1 and check_table_binlog_row_based_result
  to 1 , it is set to one because this particular insert stmt is unsafe(because
  of trigger on t4). The next insert stmt(insert t3) is safe so we will write
  that in stmt format , but since we havent cleared the previous
  check_table_binlog_row_based_result so it is logged in row format while
  thd->is_current_stmt_binlog_format_row() is still 0, and this fires the
  assert. So the question is why check_table_binlog_row_based_result is not
  reseted because mark_used_tables_as_free_for_reuse skips locked tables

Solution:- We make mark_used_tables_as_free_for_reuse to reset
  check_table_binlog_row_based_result even when table is locked

635c5e3... by Sergei Golubchik

mysql_install_db: clarify the after-install message

don't tell users to set the root password if they're using unix_socket

df704b5... by Sergei Golubchik

don't use my_error(0) or my_printf_error(0)

there's an assert that catches it

af2dd58... by Sergei Golubchik

empty password is a valid password, don't crash

5f05102... by Sergei Golubchik

MDEV-16238 root/localhost authn prioritizes authentication_string over Password

Don't let SET PASSWORD to set the password, if auth_string is set.

Now SET PASSWORD always sets the plugin/auth_string fields and clears
the password field (on pre-plugin mysql.user table it works as before).

b4db59b... by Georg Richter

MDEV-15596 10.2 doesn't work with openssl 1.1.1

1db1340... by Sergei Golubchik

MDEV-14578: mysql_install_db install unix_socket plugin when --auth-root-authentication-method=socket

post-merge fixes

53db5ed... by Daniel Black

MDEV-14578: mysql_install_db install unix_socket plugin when --auth-root-authentication-method=socket

$ cmake -DPLUGIN_AUTH_SOCKET=STATIC ../mariadb-server-10.2/

$ scripts/mysql_install_db --datadir=/tmp/mysqldatadir-auth-static --auth-root-socket-user=dan --auth-root-authentication-method=socket --builddir=. --srcdir=../mariadb-server-10.2
Installing MariaDB/MySQL system tables in '/tmp/mysqldatadir-auth-static' ...
OK

$ client/mysql -S /tmp/mysql.sock -e 'show create user dan@localhost'
+----------------------------------------------------------+
| CREATE USER for dan@localhost |
+----------------------------------------------------------+
| CREATE USER 'dan'@'localhost' IDENTIFIED VIA unix_socket |
+----------------------------------------------------------+

$ cmake -DPLUGIN_AUTH_SOCKET=NO ../mariadb-server-10.2/
$ scripts/mysql_install_db --datadir=/tmp/mysqldatadir-auth-none --auth-root-socket-user=dan --auth-root-authentication-method=socket --builddir=. --srcdir=../mariadb-server-10.2
Installing MariaDB/MySQL system tables in '/tmp/mysqldatadir-auth-none' ...
ERROR: 1126 Can't open shared library '.../plugin/auth_socket/auth_socket.so' (errno: 2, cannot open shared object file: No such file or directory)
2018-05-01 11:38:56 0 [ERROR] Aborting

$ cmake -DPLUGIN_AUTH_SOCKET=DYNAMIC ../mariadb-server-10.2/
$ scripts/mysql_install_db --datadir=/tmp/mysqldatadir-auth-dyn --auth-root-socket-user=dan --auth-root-authentication-method=socket --builddir=. --srcdir=../mariadb-server-10.2
Installing MariaDB/MySQL system tables in '/tmp/mysqldatadir-auth-dyn' ...
OK
$ ./sql/mysqld --datadir=/tmp/mysqldatadir-auth-dyn --lc-messages-dir=${PWD}/sql/share --plugin-dir=./plugin/auth_socket/
$ client/mysql -S /tmp/mysql.sock -e 'show create user dan@localhost'
+----------------------------------------------------------+
| CREATE USER for dan@localhost |
+----------------------------------------------------------+
| CREATE USER 'dan'@'localhost' IDENTIFIED VIA unix_socket |
+----------------------------------------------------------+

$ sudo make install
$ sudo chmod a+rwx /usr/local/mysql/data
$ cd /usr/local/mysql/
$ scripts/mysql_install_db --auth-root-socket-user=dan --auth-root-authentication-method=socket
Installing MariaDB/MySQL system tables in './data' ...
OK
..
$ bin/mysqld_safe
$ client/mysql -S /tmp/mysql.sock -e 'show create user dan@localhost'
+----------------------------------------------------------+
| CREATE USER for dan@localhost |
+----------------------------------------------------------+
| CREATE USER 'dan'@'localhost' IDENTIFIED VIA unix_socket |
+----------------------------------------------------------+

Merges #767

1033fa4... by Sergei Golubchik

MDEV-13403 Mariadb (with TokuDB) excessive memory usage/leak

In RPM/DEB packages - always ld-preload jemalloc, instead
of linking ha_tokudb.so with it.

Keep linking in bintars, because they don't install cnf files
in the correct locations.

be9d923... by Alexey Botchkov

MDEV-11917 enum/set command-line options aren't respecting max-* settings.

my_option strucures for command-line variables should be set properly.