summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--cmake/wsrep.cmake37
-rw-r--r--debian/dist/Debian/control28
-rw-r--r--debian/dist/Debian/mariadb-galera-server-10.0.README.Debian (renamed from debian/dist/Debian/mariadb-server-10.0.README.Debian)0
-rw-r--r--debian/dist/Debian/mariadb-galera-server-10.0.dirs (renamed from debian/dist/Ubuntu/mariadb-server-10.0.dirs)2
-rw-r--r--debian/dist/Debian/mariadb-galera-server-10.0.files.in (renamed from debian/dist/Debian/mariadb-server-10.0.files.in)36
-rw-r--r--debian/dist/Debian/mariadb-galera-server-10.0.postinst (renamed from debian/dist/Debian/mariadb-server-10.0.postinst)2
-rw-r--r--debian/dist/Debian/mariadb-galera-server-10.0.postrm (renamed from debian/dist/Debian/mariadb-server-10.0.postrm)0
-rwxr-xr-xdebian/dist/Debian/rules12
-rw-r--r--debian/dist/Ubuntu/control38
-rw-r--r--debian/dist/Ubuntu/mariadb-galera-server-10.0.README.Debian (renamed from debian/dist/Ubuntu/mariadb-server-10.0.README.Debian)0
-rw-r--r--debian/dist/Ubuntu/mariadb-galera-server-10.0.dirs (renamed from debian/dist/Debian/mariadb-server-10.0.dirs)2
-rw-r--r--debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in (renamed from debian/dist/Ubuntu/mariadb-server-10.0.files.in)35
-rw-r--r--debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst (renamed from debian/dist/Ubuntu/mariadb-server-10.0.postinst)2
-rw-r--r--debian/dist/Ubuntu/mariadb-galera-server-10.0.postrm (renamed from debian/dist/Ubuntu/mariadb-server-10.0.postrm)0
-rw-r--r--debian/dist/Ubuntu/mariadb-galera-server-10.0.py (renamed from debian/dist/Ubuntu/mariadb-server-10.0.py)0
-rwxr-xr-xdebian/dist/Ubuntu/rules14
-rw-r--r--mysql-test/include/have_wsrep.inc4
-rw-r--r--mysql-test/r/have_wsrep.require2
-rw-r--r--mysql-test/r/mysql_tzinfo_to_sql_symlink.result1
-rw-r--r--mysql-test/suite/sys_vars/r/auto_increment_increment_func.result24
-rw-r--r--mysql-test/suite/sys_vars/r/auto_increment_offset_func.result44
-rw-r--r--mysql-test/suite/wsrep/r/binlog_format.result33
-rw-r--r--mysql-test/suite/wsrep/r/trans.result9
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.opt1
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.test24
-rw-r--r--mysql-test/suite/wsrep/t/trans.test13
-rw-r--r--mysys/my_delete.c3
-rw-r--r--scripts/mysqld_safe.sh1
-rw-r--r--sql/log.cc2
-rw-r--r--sql/mysqld.cc10
-rw-r--r--sql/sql_parse.cc13
-rw-r--r--sql/sys_vars.cc20
-rw-r--r--sql/wsrep_applier.cc2
-rw-r--r--sql/wsrep_hton.cc12
-rw-r--r--sql/wsrep_mysqld.cc17
-rw-r--r--sql/wsrep_mysqld.h7
-rw-r--r--sql/wsrep_sst.cc33
-rw-r--r--sql/wsrep_var.cc3
-rw-r--r--storage/innobase/handler/ha_innodb.cc29
-rw-r--r--storage/innobase/os/os0file.cc2
-rw-r--r--storage/innobase/srv/srv0srv.cc23
-rw-r--r--storage/tokudb/CMakeLists.txt2
-rw-r--r--storage/xtradb/handler/ha_innodb.cc26
-rw-r--r--storage/xtradb/row/row0upd.cc2
-rw-r--r--storage/xtradb/srv/srv0srv.cc43
-rw-r--r--support-files/mysql.server.sh9
47 files changed, 439 insertions, 187 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b0fb88422a..60b46f7a8b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -373,8 +373,8 @@ CONFIGURE_FILE(
IF(DEB)
CONFIGURE_FILE(
- ${CMAKE_SOURCE_DIR}/debian/mariadb-server-10.0.files.in
- ${CMAKE_SOURCE_DIR}/debian/mariadb-server-10.0.files)
+ ${CMAKE_SOURCE_DIR}/debian/mariadb-galera-server-10.0.files.in
+ ${CMAKE_SOURCE_DIR}/debian/mariadb-galera-server-10.0.files)
ENDIF(DEB)
# Handle the "INFO_*" files.
diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake
index c75b5f0b99b..a807a729adf 100644
--- a/cmake/wsrep.cmake
+++ b/cmake/wsrep.cmake
@@ -1,4 +1,5 @@
# Copyright (c) 2011, Codership Oy <info@codership.com>.
+# Copyright (c) 2013, Monty Program Ab.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,19 +20,15 @@
# Set the patch version
SET(WSREP_PATCH_VERSION "9")
-# Obtain patch revision number
-SET(WSREP_PATCH_REVNO $ENV{WSREP_REV})
-IF(NOT WSREP_PATCH_REVNO)
- EXECUTE_PROCESS(
- COMMAND bzr revno
- OUTPUT_VARIABLE WSREP_PATCH_REVNO
- RESULT_VARIABLE RESULT
- )
-STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_PATCH_REVNO "${WSREP_PATCH_REVNO}")
-#FILE(WRITE "wsrep_config" "Debug: WSREP_PATCH_REVNO result: ${RESULT}\n")
-ENDIF()
-IF(NOT WSREP_PATCH_REVNO)
- SET(WSREP_PATCH_REVNO "XXXX")
+# MariaDB addition: Revision number of the last revision merged from
+# codership branch visible in @@visible_comment.
+# Branch : codership-mysql/5.5
+SET(WSREP_PATCH_REVNO "3928") # Should be updated on every merge.
+
+# MariaDB: Obtain patch revision number:
+# Update WSREP_PATCH_REVNO if WSREP_REV environment variable is set.
+IF (DEFINED ENV{WSREP_REV})
+ SET(WSREP_PATCH_REVNO $ENV{WSREP_REV})
ENDIF()
# Obtain wsrep API version
@@ -43,9 +40,17 @@ EXECUTE_PROCESS(
#FILE(WRITE "wsrep_config" "Debug: WSREP_API_VERSION result: ${RESULT}\n")
STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_API_VERSION "${WSREP_API_VERSION}")
-SET(WSREP_VERSION
- "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}"
-)
+IF(NOT WSREP_PATCH_REVNO)
+ MESSAGE(WARNING "Could not determine bzr revision number, WSREP_VERSION will "
+ "not contain the revision number.")
+ SET(WSREP_VERSION
+ "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
+ )
+ELSE()
+ SET(WSREP_VERSION
+ "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}"
+ )
+ENDIF()
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ON)
IF (WITH_WSREP)
diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control
index 236e5540c0d..7ac06093410 100644
--- a/debian/dist/Debian/control
+++ b/debian/dist/Debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
-Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev
+Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev
Standards-Version: 3.8.3
Homepage: http://mariadb.org/
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.0/files
@@ -182,23 +182,27 @@ Description: MariaDB database regression test suite
.
This package includes the regression test suite.
-Package: mariadb-server-10.0
+Package: mariadb-galera-server-10.0
Architecture: any
Suggests: tinyca, mailx, mariadb-test
Recommends: libhtml-template-perl
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
-Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.0 (>= ${binary:Version})
-Provides: mariadb-server, mysql-server, virtual-mysql-server
-Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
+Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.0 (>= ${binary:Version}), galera (>=25.2)
+Provides: mariadb-server-core, mysql-server-core-5.5, mariadb-galera-server, mysql-server, virtual-mysql-server
+Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mariadb-galera-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3,
+ mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5,
+ mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5,
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
-Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
+Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mariadb-galera-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3,
libmariadbclient16 (<< 5.3.4), libmariadbclient-dev (<< 5.5.0),
+ mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5,
+ mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5,
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
-Description: MariaDB database server binaries
+Description: MariaDB database server with Galera cluster binaries
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
@@ -206,14 +210,14 @@ Description: MariaDB database server binaries
.
This package includes the server binaries.
-Package: mariadb-server
+Package: mariadb-galera-server
Section: database
Architecture: all
-Depends: mariadb-server-10.0 (= ${source:Version}), ${misc:Depends}
-Description: MariaDB database server (metapackage depending on the latest version)
+Depends: mariadb-galera-server-10.0 (= ${source:Version}), ${misc:Depends}
+Description: MariaDB database server with Galera cluster (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of
- mariadb-server (currently mariadb-server-10.0), as determined by the MariaDB
- maintainers. Install this package if in doubt about which MariaDB
+ mariadb-galera-server (currently mariadb-galera-server-10.0), as determined by the MariaDB
+ maintainers. Install this package if in doubt about which MariaDB-Galera
version you need. That will install the version recommended by the
package maintainers.
.
diff --git a/debian/dist/Debian/mariadb-server-10.0.README.Debian b/debian/dist/Debian/mariadb-galera-server-10.0.README.Debian
index f398f2fa236..f398f2fa236 100644
--- a/debian/dist/Debian/mariadb-server-10.0.README.Debian
+++ b/debian/dist/Debian/mariadb-galera-server-10.0.README.Debian
diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.dirs b/debian/dist/Debian/mariadb-galera-server-10.0.dirs
index 4eef28f62e1..5379d2b713f 100644
--- a/debian/dist/Ubuntu/mariadb-server-10.0.dirs
+++ b/debian/dist/Debian/mariadb-galera-server-10.0.dirs
@@ -5,7 +5,7 @@ usr/bin
usr/sbin
usr/share/man/man8
usr/share/mysql
-usr/share/doc/mariadb-server-10.0
+usr/share/doc/mariadb-galera-server-10.0
usr/support-files
var/run/mysqld
var/lib/mysql-upgrade
diff --git a/debian/dist/Debian/mariadb-server-10.0.files.in b/debian/dist/Debian/mariadb-galera-server-10.0.files.in
index 5002204e75d..28a64355c48 100644
--- a/debian/dist/Debian/mariadb-server-10.0.files.in
+++ b/debian/dist/Debian/mariadb-galera-server-10.0.files.in
@@ -1,7 +1,9 @@
usr/lib/mysql/plugin/auth_pam.so
usr/lib/mysql/plugin/auth_socket.so
+usr/sbin/mysqld
+usr/lib/mysql/plugin/ha_innodb.so
+usr/lib/mysql/plugin/ha_oqgraph.so
usr/lib/mysql/plugin/ha_sequence.so
-usr/lib/mysql/plugin/ha_sphinx.so
usr/lib/mysql/plugin/ha_xtradb.so
usr/lib/mysql/plugin/handlersocket.so
usr/lib/mysql/plugin/locales.so
@@ -42,9 +44,14 @@ usr/bin/perror
usr/bin/replace
usr/bin/resolve_stack_dump
usr/bin/resolveip
+usr/bin/wsrep_sst_common
+usr/bin/wsrep_sst_mysqldump
+usr/bin/wsrep_sst_rsync
+usr/bin/wsrep_sst_xtrabackup
usr/share/doc/mariadb-server-10.0/mysqld.sym.gz
usr/share/doc/mariadb-server-10.0/INFO_SRC
usr/share/doc/mariadb-server-10.0/INFO_BIN
+usr/share/doc/mariadb-galera-server-10.0/README-wsrep
usr/share/lintian/overrides/mariadb-server-10.0
usr/share/man/man1/msql2mysql.1
usr/share/man/man1/myisamchk.1
@@ -68,6 +75,31 @@ usr/share/man/man1/resolveip.1
usr/share/man/man1/resolve_stack_dump.1
usr/share/man/man1/innochecksum.1
usr/share/man/man1/mysql_tzinfo_to_sql.1
+usr/share/man/man8/mysqld.8
+usr/share/mysql/charsets
+usr/share/mysql/czech
+usr/share/mysql/danish
+usr/share/mysql/dutch
+usr/share/mysql/english
+usr/share/mysql/estonian
+usr/share/mysql/french
+usr/share/mysql/german
+usr/share/mysql/greek
+usr/share/mysql/hungarian
+usr/share/mysql/italian
+usr/share/mysql/japanese
+usr/share/mysql/korean
+usr/share/mysql/norwegian
+usr/share/mysql/norwegian-ny
+usr/share/mysql/polish
+usr/share/mysql/portuguese
+usr/share/mysql/romanian
+usr/share/mysql/russian
+usr/share/mysql/serbian
+usr/share/mysql/slovak
+usr/share/mysql/spanish
+usr/share/mysql/swedish
+usr/share/mysql/ukrainian
usr/share/mysql/debian-start.inc.sh
usr/share/mysql/echo_stderr
usr/share/mysql/errmsg-utf8.txt
@@ -79,3 +111,5 @@ usr/share/mysql/mysql_test_data_timezone.sql
@CASSANDRA_DEB_FILES@
@SPIDER_DEB_FILES@
@TOKUDB_DEB_FILES@
+usr/share/mysql/wsrep.cnf
+usr/share/mysql/wsrep_notify
diff --git a/debian/dist/Debian/mariadb-server-10.0.postinst b/debian/dist/Debian/mariadb-galera-server-10.0.postinst
index 9f79b61fd05..fb1f710eb89 100644
--- a/debian/dist/Debian/mariadb-server-10.0.postinst
+++ b/debian/dist/Debian/mariadb-galera-server-10.0.postinst
@@ -21,7 +21,7 @@ invoke() {
fi
}
-MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
+MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --default-storage-engine=myisam"
test_mysql_access() {
mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
diff --git a/debian/dist/Debian/mariadb-server-10.0.postrm b/debian/dist/Debian/mariadb-galera-server-10.0.postrm
index 469b1627aff..469b1627aff 100644
--- a/debian/dist/Debian/mariadb-server-10.0.postrm
+++ b/debian/dist/Debian/mariadb-galera-server-10.0.postrm
diff --git a/debian/dist/Debian/rules b/debian/dist/Debian/rules
index 04f3426e464..28071e6fb45 100755
--- a/debian/dist/Debian/rules
+++ b/debian/dist/Debian/rules
@@ -166,11 +166,11 @@ install: build
install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/
install -m 0644 debian/additions/innotop/innotop.1 $(TMP)/usr/share/man/man1/
- # mariadb-server
+ # mariadb-galera-server
install -m 0755 $(BUILDDIR)/scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe
- mkdir -p $(TMP)/usr/share/doc/mariadb-server-10.0/examples
+ mkdir -p $(TMP)/usr/share/doc/mariadb-galera-server-10.0/examples
# We have a sane my.cnf, cruft not needed (remove my-*.cnf and config-*.cnf)
- # $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mariadb-server-10.0/examples/
+ # $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mariadb-galera-server-10.0/examples/
rm -vf $(TMP)/usr/share/mysql/my-*.cnf \
$(TMP)/usr/share/mysql/config-*.cnf \
$(TMP)/usr/share/mysql/mi_test_all* \
@@ -182,15 +182,15 @@ install: build
install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/
install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/
- install -m 0644 $(builddir)/Docs/INFO_SRC $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_SRC
- install -m 0644 $(builddir)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_BIN
+ install -m 0644 $(builddir)/Docs/INFO_SRC $(TMP)/usr/share/doc/mariadb-galera-server-10.0/INFO_SRC
+ install -m 0644 $(builddir)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-galera-server-10.0/INFO_BIN
# mariadb-test
mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql
# lintian overrides
mkdir -p $(TMP)/usr/share/lintian/overrides/
- cp debian/mariadb-galera-server-10.0.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-server-10.0
+ cp debian/mariadb-galera-server-10.0.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-galera-server-10.0
# For 5.0 -> 10.0 transition
d=$(TMP)/usr/share/mysql-common/internal-use-only/; \
diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control
index 410e992429c..844e857fba4 100644
--- a/debian/dist/Ubuntu/control
+++ b/debian/dist/Ubuntu/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
-Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev
+Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev
Standards-Version: 3.8.2
Homepage: http://mariadb.org/
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.0/files
@@ -145,10 +145,16 @@ Package: mariadb-server-core-10.0
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version})
Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5
-Conflicts: mysql-server-5.0,
+Conflicts: mariadb-server-5.1 (<< 5.1.60),
+ mariadb-server-5.2 (<< 5.2.10),
+ mariadb-server-5.3 (<< 5.3.3),
+ mysql-server-5.0,
mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5,
mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5
-Replaces: mysql-server-5.0,
+Replaces: mariadb-server-5.1 (<< 5.1.60),
+ mariadb-server-5.2 (<< 5.2.10),
+ mariadb-server-5.3 (<< 5.3.3),
+ mysql-server-5.0,
mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5,
mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5
Description: MariaDB database core server files
@@ -176,23 +182,27 @@ Description: MariaDB database regression test suite
.
This package includes the regression test suite.
-Package: mariadb-server-10.0
+Package: mariadb-galera-server-10.0
Architecture: any
Suggests: tinyca, mailx, mariadb-test
Recommends: libhtml-template-perl
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
-Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.0 (>= ${binary:Version})
-Provides: mariadb-server, mysql-server, virtual-mysql-server
-Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
+Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.0 (>= ${binary:Version}), galera (>=25.2)
+Provides: mariadb-server-core, mysql-server-core-5.5, mariadb-galera-server, mysql-server, virtual-mysql-server
+Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mariadb-galera-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3,
+ mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5,
+ mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5,
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
-Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
+Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), mariadb-galera-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3,
libmariadbclient16 (<< 5.3.4), libmariadbclient-dev (<< 5.5.0),
+ mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5,
+ mariadb-server-core-5.1, mariadb-server-core-5.2, mariadb-server-core-5.5,
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
-Description: MariaDB database server binaries
+Description: MariaDB database server with Galera cluster binaries
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
@@ -200,14 +210,14 @@ Description: MariaDB database server binaries
.
This package includes the server binaries.
-Package: mariadb-server
+Package: mariadb-galera-server
Section: database
Architecture: all
-Depends: mariadb-server-10.0 (= ${source:Version}), ${misc:Depends}
-Description: MariaDB database server (metapackage depending on the latest version)
+Depends: mariadb-galera-server-10.0 (= ${source:Version}), ${misc:Depends}
+Description: MariaDB database server with Galera cluster (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of
- mariadb-server (currently mariadb-server-10.0), as determined by the MariaDB
- maintainers. Install this package if in doubt about which MariaDB
+ mariadb-galera-server (currently mariadb-galera-server-10.0), as determined by the MariaDB
+ maintainers. Install this package if in doubt about which MariaDB-Galera
version you need. That will install the version recommended by the
package maintainers.
.
diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.README.Debian b/debian/dist/Ubuntu/mariadb-galera-server-10.0.README.Debian
index 741243f1ec3..741243f1ec3 100644
--- a/debian/dist/Ubuntu/mariadb-server-10.0.README.Debian
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.README.Debian
diff --git a/debian/dist/Debian/mariadb-server-10.0.dirs b/debian/dist/Ubuntu/mariadb-galera-server-10.0.dirs
index 4eef28f62e1..5379d2b713f 100644
--- a/debian/dist/Debian/mariadb-server-10.0.dirs
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.dirs
@@ -5,7 +5,7 @@ usr/bin
usr/sbin
usr/share/man/man8
usr/share/mysql
-usr/share/doc/mariadb-server-10.0
+usr/share/doc/mariadb-galera-server-10.0
usr/support-files
var/run/mysqld
var/lib/mysql-upgrade
diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.files.in b/debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in
index a5d25598aa2..f0b1a9a1349 100644
--- a/debian/dist/Ubuntu/mariadb-server-10.0.files.in
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in
@@ -1,5 +1,8 @@
usr/lib/mysql/plugin/auth_pam.so
usr/lib/mysql/plugin/auth_socket.so
+usr/sbin/mysqld
+usr/lib/mysql/plugin/ha_innodb.so
+usr/lib/mysql/plugin/ha_oqgraph.so
usr/lib/mysql/plugin/ha_sequence.so
usr/lib/mysql/plugin/ha_xtradb.so
usr/lib/mysql/plugin/handlersocket.so
@@ -43,9 +46,14 @@ usr/bin/perror
usr/bin/replace
usr/bin/resolve_stack_dump
usr/bin/resolveip
+usr/bin/wsrep_sst_common
+usr/bin/wsrep_sst_mysqldump
+usr/bin/wsrep_sst_rsync
+usr/bin/wsrep_sst_xtrabackup
usr/share/doc/mariadb-server-10.0/mysqld.sym.gz
usr/share/doc/mariadb-server-10.0/INFO_SRC
usr/share/doc/mariadb-server-10.0/INFO_BIN
+usr/share/doc/mariadb-galera-server-10.0/README-wsrep
usr/share/lintian/overrides/mariadb-server-10.0
usr/share/man/man1/msql2mysql.1
usr/share/man/man1/myisamchk.1
@@ -69,6 +77,31 @@ usr/share/man/man1/resolveip.1
usr/share/man/man1/resolve_stack_dump.1
usr/share/man/man1/innochecksum.1
usr/share/man/man1/mysql_tzinfo_to_sql.1
+usr/share/man/man8/mysqld.8
+usr/share/mysql/charsets
+usr/share/mysql/czech
+usr/share/mysql/danish
+usr/share/mysql/dutch
+usr/share/mysql/english
+usr/share/mysql/estonian
+usr/share/mysql/french
+usr/share/mysql/german
+usr/share/mysql/greek
+usr/share/mysql/hungarian
+usr/share/mysql/italian
+usr/share/mysql/japanese
+usr/share/mysql/korean
+usr/share/mysql/norwegian
+usr/share/mysql/norwegian-ny
+usr/share/mysql/polish
+usr/share/mysql/portuguese
+usr/share/mysql/romanian
+usr/share/mysql/russian
+usr/share/mysql/serbian
+usr/share/mysql/slovak
+usr/share/mysql/spanish
+usr/share/mysql/swedish
+usr/share/mysql/ukrainian
usr/share/mysql/debian-start.inc.sh
usr/share/mysql/echo_stderr
usr/share/mysql/errmsg-utf8.txt
@@ -80,3 +113,5 @@ usr/share/mysql/mysql_test_data_timezone.sql
@CASSANDRA_DEB_FILES@
@SPIDER_DEB_FILES@
@TOKUDB_DEB_FILES@
+usr/share/mysql/wsrep.cnf
+usr/share/mysql/wsrep_notify
diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.postinst b/debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst
index 6e81fdba7ce..a827f3c8356 100644
--- a/debian/dist/Ubuntu/mariadb-server-10.0.postinst
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst
@@ -21,7 +21,7 @@ invoke() {
fi
}
-MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
+MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --default-storage-engine=myisam"
test_mysql_access() {
mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.postrm b/debian/dist/Ubuntu/mariadb-galera-server-10.0.postrm
index 7cee5150ef9..7cee5150ef9 100644
--- a/debian/dist/Ubuntu/mariadb-server-10.0.postrm
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.postrm
diff --git a/debian/dist/Ubuntu/mariadb-server-10.0.py b/debian/dist/Ubuntu/mariadb-galera-server-10.0.py
index b0537b4bd6b..b0537b4bd6b 100644
--- a/debian/dist/Ubuntu/mariadb-server-10.0.py
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.py
diff --git a/debian/dist/Ubuntu/rules b/debian/dist/Ubuntu/rules
index 9432b19697f..e0e562136c9 100755
--- a/debian/dist/Ubuntu/rules
+++ b/debian/dist/Ubuntu/rules
@@ -166,11 +166,11 @@ install: build
install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/
install -m 0644 debian/additions/innotop/innotop.1 $(TMP)/usr/share/man/man1/
- # mariadb-server
+ # mariadb-galera-server
install -m 0755 $(BUILDDIR)/scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe
- mkdir -p $(TMP)/usr/share/doc/mariadb-server-10.0/examples
+ mkdir -p $(TMP)/usr/share/doc/mariadb-galera-server-10.0/examples
# We have a sane my.cnf, cruft not needed (remove my-*.cnf and config-*.cnf)
- # $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mariadb-server-10.0/examples/
+ # $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mariadb-galera-server-10.0/examples/
rm -vf $(TMP)/usr/share/mysql/my-*.cnf \
$(TMP)/usr/share/mysql/config-*.cnf \
$(TMP)/usr/share/mysql/mi_test_all* \
@@ -182,15 +182,15 @@ install: build
install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/
install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/
- install -m 0644 $(builddir)/Docs/INFO_SRC $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_SRC
- install -m 0644 $(builddir)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_BIN
+ install -m 0644 $(builddir)/Docs/INFO_SRC $(TMP)/usr/share/doc/mariadb-galera-server-10.0/INFO_SRC
+ install -m 0644 $(builddir)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-galera-server-10.0/INFO_BIN
# mariadb-test
mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql
# lintian overrides
mkdir -p $(TMP)/usr/share/lintian/overrides/
- cp debian/mariadb-galera-server-10.0.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-server-10.0
+ cp debian/mariadb-galera-server-10.0.lintian-overrides $(TMP)/usr/share/lintian/overrides/mariadb-galera-server-10.0
# For 5.0 -> 10.0 transition
d=$(TMP)/usr/share/mysql-common/internal-use-only/; \
@@ -202,7 +202,7 @@ install: build
# install AppArmor profile
install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld
# install Apport hook
- install -D -m 644 debian/mariadb-server-10.0.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.0.py
+ install -D -m 644 debian/mariadb-galera-server-10.0.py $(TMP)/usr/share/apport/package-hooks/source_mariadb-10.0.py
autorm=debian/autorm-file; \
rm -f $$autorm; \
diff --git a/mysql-test/include/have_wsrep.inc b/mysql-test/include/have_wsrep.inc
new file mode 100644
index 00000000000..f8f7e7a82fc
--- /dev/null
+++ b/mysql-test/include/have_wsrep.inc
@@ -0,0 +1,4 @@
+-- require r/have_wsrep.require
+disable_query_log;
+show variables like 'wsrep_on';
+enable_query_log;
diff --git a/mysql-test/r/have_wsrep.require b/mysql-test/r/have_wsrep.require
new file mode 100644
index 00000000000..af32ac7dca7
--- /dev/null
+++ b/mysql-test/r/have_wsrep.require
@@ -0,0 +1,2 @@
+Variable_name Value
+wsrep_on ON
diff --git a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result
index fce61687c83..1aaaa38895d 100644
--- a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result
+++ b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result
@@ -1,6 +1,7 @@
#
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
#
+SET SESSION wsrep_replicate_myisam=ON;
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
diff --git a/mysql-test/suite/sys_vars/r/auto_increment_increment_func.result b/mysql-test/suite/sys_vars/r/auto_increment_increment_func.result
index df3ca1ab093..a7ce4e99e20 100644
--- a/mysql-test/suite/sys_vars/r/auto_increment_increment_func.result
+++ b/mysql-test/suite/sys_vars/r/auto_increment_increment_func.result
@@ -142,8 +142,8 @@ id name
116 Record_10
117 Record_11
119 Record_12
-121 Record_13
-123 Record_14
+120 Record_13
+121 Record_14
## Changing column's datatype to BigInt and verifying variable's behavior ##
ALTER table t1 MODIFY id BIGINT NOT NULL auto_increment;
INSERT into t1(name) values('Record_15');
@@ -159,10 +159,10 @@ id name
116 Record_10
117 Record_11
119 Record_12
-121 Record_13
-123 Record_14
-125 Record_15
-127 Record_16
+120 Record_13
+121 Record_14
+122 Record_15
+123 Record_16
'#--------------------FN_DYNVARS_001_07-------------------------#'
## Verifying behavior of variable with negative value ##
SET @@auto_increment_increment = -10;
@@ -181,12 +181,12 @@ id name
116 Record_10
117 Record_11
119 Record_12
-121 Record_13
-123 Record_14
-125 Record_15
-127 Record_16
-128 Record_17
-129 Record_18
+120 Record_13
+121 Record_14
+122 Record_15
+123 Record_16
+124 Record_17
+125 Record_18
## Disconnecting test_con2 ##
## Dropping table t1 ##
DROP table if exists t1;
diff --git a/mysql-test/suite/sys_vars/r/auto_increment_offset_func.result b/mysql-test/suite/sys_vars/r/auto_increment_offset_func.result
index d2b5b828c04..58ecf95dae3 100644
--- a/mysql-test/suite/sys_vars/r/auto_increment_offset_func.result
+++ b/mysql-test/suite/sys_vars/r/auto_increment_offset_func.result
@@ -144,8 +144,8 @@ id name
125 Record_12
134 Record_13
140 Record_14
-150 Record_15
-160 Record_16
+141 Record_15
+142 Record_16
## Changing datatype of column id with primary key to BigInt ##
ALTER table t1 modify id BIGINT NOT NULL auto_increment;
INSERT into t1(name) values('Record_17');
@@ -166,10 +166,10 @@ id name
125 Record_12
134 Record_13
140 Record_14
-150 Record_15
-160 Record_16
-170 Record_17
-180 Record_18
+141 Record_15
+142 Record_16
+143 Record_17
+144 Record_18
'#--------------------FN_DYNVARS_002_07-------------------------#'
## Assigning -ve value to variable ##
SET @@auto_increment_offset = -10;
@@ -196,12 +196,12 @@ id name
125 Record_12
134 Record_13
140 Record_14
-150 Record_15
-160 Record_16
-170 Record_17
-180 Record_18
-181 Record_17
-191 Record_18
+141 Record_15
+142 Record_16
+143 Record_17
+144 Record_18
+145 Record_17
+146 Record_18
## Assigning value that is out of range of variable ##
SET @@auto_increment_offset = 65536;
Warnings:
@@ -229,16 +229,16 @@ id name
125 Record_12
134 Record_13
140 Record_14
-150 Record_15
-160 Record_16
-170 Record_17
-180 Record_18
-181 Record_17
-191 Record_18
-199 Record_17
-209 Record_18
-219 Record_19
-229 Record_20
+141 Record_15
+142 Record_16
+143 Record_17
+144 Record_18
+145 Record_17
+146 Record_18
+147 Record_17
+148 Record_18
+149 Record_19
+150 Record_20
## No effect of auto_increment_offset since value of this variable is greater ##
## than auto_increment_increment ##
## Dropping table ##
diff --git a/mysql-test/suite/wsrep/r/binlog_format.result b/mysql-test/suite/wsrep/r/binlog_format.result
new file mode 100644
index 00000000000..d87cd3bf1a8
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/binlog_format.result
@@ -0,0 +1,33 @@
+SHOW VARIABLES LIKE 'binlog_format';
+Variable_name Value
+binlog_format ROW
+SET binlog_format=STATEMENT;
+ERROR 42000: Variable 'binlog_format' can't be set to the value of 'STATEMENT'
+SHOW WARNINGS;
+Level Code Message
+Warning 1105 MariaDB Galera does not support binlog format: STATEMENT
+Error 1231 Variable 'binlog_format' can't be set to the value of 'STATEMENT'
+SHOW VARIABLES LIKE 'binlog_format';
+Variable_name Value
+binlog_format ROW
+CREATE TABLE IF NOT EXISTS test.t1 AS SELECT * FROM information_schema.routines WHERE 1 = 0;
+SET binlog_format=MIXED;
+ERROR 42000: Variable 'binlog_format' can't be set to the value of 'MIXED'
+SHOW WARNINGS;
+Level Code Message
+Warning 1105 MariaDB Galera does not support binlog format: MIXED
+Error 1231 Variable 'binlog_format' can't be set to the value of 'MIXED'
+SHOW VARIABLES LIKE 'binlog_format';
+Variable_name Value
+binlog_format ROW
+CREATE TABLE IF NOT EXISTS test.t2 AS SELECT * FROM information_schema.routines WHERE 1 = 0;
+SET binlog_format=ROW;
+SHOW WARNINGS;
+Level Code Message
+SHOW VARIABLES LIKE 'binlog_format';
+Variable_name Value
+binlog_format ROW
+CREATE TABLE IF NOT EXISTS test.t3 AS SELECT * FROM information_schema.routines WHERE 1 = 0;
+DROP TABLE IF EXISTS test.t1;
+DROP TABLE IF EXISTS test.t2;
+DROP TABLE IF EXISTS test.t3;
diff --git a/mysql-test/suite/wsrep/r/trans.result b/mysql-test/suite/wsrep/r/trans.result
new file mode 100644
index 00000000000..bc225897103
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/trans.result
@@ -0,0 +1,9 @@
+#
+# MDEV-4222 : Assertion `( ((global_system_variables.wsrep_on) &&
+# (thd && thd->variables.wsrep_on)) && srep_emulate_bin_log)
+# || mysql_bin_log .is_open()' fails on SAVEPOINT with
+# disabled wsrep_provider
+#
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+SAVEPOINT A;
+End of test.
diff --git a/mysql-test/suite/wsrep/t/binlog_format.opt b/mysql-test/suite/wsrep/t/binlog_format.opt
new file mode 100644
index 00000000000..901ead9a41d
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/binlog_format.opt
@@ -0,0 +1 @@
+--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=/usr/lib/libgalera_smm.so --wsrep-cluster-address=gcomm:// --wsrep-on=1 --log-bin \ No newline at end of file
diff --git a/mysql-test/suite/wsrep/t/binlog_format.test b/mysql-test/suite/wsrep/t/binlog_format.test
new file mode 100644
index 00000000000..907fae5f4fb
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/binlog_format.test
@@ -0,0 +1,24 @@
+--source include/have_wsrep.inc
+--source include/have_binlog_format_row.inc
+#
+# MDEV-4227: Galera server should stop crashing on setting binlog_format STATEMENT
+#
+SHOW VARIABLES LIKE 'binlog_format';
+-- error ER_WRONG_VALUE_FOR_VAR
+SET binlog_format=STATEMENT;
+SHOW WARNINGS;
+SHOW VARIABLES LIKE 'binlog_format';
+CREATE TABLE IF NOT EXISTS test.t1 AS SELECT * FROM information_schema.routines WHERE 1 = 0;
+-- error ER_WRONG_VALUE_FOR_VAR
+SET binlog_format=MIXED;
+SHOW WARNINGS;
+SHOW VARIABLES LIKE 'binlog_format';
+CREATE TABLE IF NOT EXISTS test.t2 AS SELECT * FROM information_schema.routines WHERE 1 = 0;
+SET binlog_format=ROW;
+SHOW WARNINGS;
+SHOW VARIABLES LIKE 'binlog_format';
+CREATE TABLE IF NOT EXISTS test.t3 AS SELECT * FROM information_schema.routines WHERE 1 = 0;
+DROP TABLE IF EXISTS test.t1;
+DROP TABLE IF EXISTS test.t2;
+DROP TABLE IF EXISTS test.t3;
+
diff --git a/mysql-test/suite/wsrep/t/trans.test b/mysql-test/suite/wsrep/t/trans.test
new file mode 100644
index 00000000000..9278ef12072
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/trans.test
@@ -0,0 +1,13 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-4222 : Assertion `( ((global_system_variables.wsrep_on) &&
+--echo # (thd && thd->variables.wsrep_on)) && srep_emulate_bin_log)
+--echo # || mysql_bin_log .is_open()' fails on SAVEPOINT with
+--echo # disabled wsrep_provider
+--echo #
+
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+SAVEPOINT A;
+
+--echo End of test.
diff --git a/mysys/my_delete.c b/mysys/my_delete.c
index c1a821e90c2..bd81f98ed62 100644
--- a/mysys/my_delete.c
+++ b/mysys/my_delete.c
@@ -150,4 +150,5 @@ error:
my_osmaperr(last_error);
DBUG_RETURN(-1);
}
-#endif \ No newline at end of file
+#endif
+
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index df8acb0ece4..a76e821df48 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -326,6 +326,7 @@ parse_arguments() {
then
wsrep_restart=1
fi
+ append_arg_to_args "$arg"
;;
--help) usage ;;
diff --git a/sql/log.cc b/sql/log.cc
index dda3e2ee8c1..c0b3f36ee78 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1738,7 +1738,7 @@ int binlog_init(void *p)
{
binlog_hton= (handlerton *)p;
#ifdef WITH_WSREP
- if (WSREP_ON)
+ if (WSREP_ON)
binlog_hton->state= SHOW_OPTION_YES;
else
{
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index b15ace4657a..93c3942e05e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
- Copyright (c) 2008, 2012, Monty Program Ab
+ Copyright (c) 2008, 2013, Monty Program Ab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1935,7 +1935,8 @@ static void __cdecl kill_server(int sig_ptr)
close_connections();
#ifdef WITH_WSREP
- if (WSREP_ON) wsrep_deinit();
+ if (wsrep_inited == 1)
+ wsrep_deinit();
#endif
if (sig != MYSQL_KILL_SIGNAL &&
sig != 0)
@@ -4891,8 +4892,10 @@ will be ignored as the --log-bin option is not defined.");
if (wsrep_before_SE())
{
+#ifndef EMBEDDED_LIBRARY
set_ports(); // this is also called in network_init() later but we need
// to know mysqld_port now - lp:1071882
+#endif /* !EMBEDDED_LIBRARY */
wsrep_init_startup(true);
}
}
@@ -9747,6 +9750,9 @@ void set_server_version(void)
#ifdef EMBEDDED_LIBRARY
end= strmov(end, "-embedded");
#endif
+#ifdef WITH_WSREP
+ end= strmov(end, "-wsrep");
+#endif
#ifndef DBUG_OFF
if (!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug"))
end= strmov(end, "-debug");
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index d6ea0c2368a..863658f7878 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1081,8 +1081,19 @@ bool do_command(THD *thd)
while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT)
{
WSREP_DEBUG("Retry autocommit for: %s\n", thd->wsrep_retry_query);
+ CHARSET_INFO *current_charset = thd->variables.character_set_client;
+ if (!is_supported_parser_charset(current_charset))
+ {
+ /* Do not use non-supported parser character sets */
+ WSREP_WARN("Current client character set is non-supported parser "
+ "character set: %s", current_charset->csname);
+ thd->variables.character_set_client = &my_charset_latin1;
+ WSREP_WARN("For retry temporally setting character set to : %s",
+ my_charset_latin1.csname);
+ }
return_value= dispatch_command(command, thd, thd->wsrep_retry_query,
- thd->wsrep_retry_query_len);
+ thd->wsrep_retry_query_len);
+ thd->variables.character_set_client = current_charset;
}
}
if (thd->wsrep_retry_query && thd->wsrep_conflict_state != REPLAYING)
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 98615b8b902..f7b44af4e8b 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -464,6 +464,26 @@ static bool binlog_format_check(sys_var *self, THD *thd, set_var *var)
ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT))
return true;
+#ifdef WITH_WSREP
+ /* MariaDB Galera does not support STATEMENT or MIXED binlog
+ format currently */
+ if (WSREP(thd) &&
+ (var->save_result.ulonglong_value == BINLOG_FORMAT_STMT ||
+ var->save_result.ulonglong_value == BINLOG_FORMAT_MIXED))
+ {
+ WSREP_DEBUG("MariaDB Galera does not support binlog format : %s",
+ var->save_result.ulonglong_value == BINLOG_FORMAT_STMT ?
+ "STATEMENT" : "MIXED");
+ /* Push also warning, because error message is general */
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_UNKNOWN_ERROR,
+ "MariaDB Galera does not support binlog format: %s",
+ var->save_result.ulonglong_value == BINLOG_FORMAT_STMT ?
+ "STATEMENT" : "MIXED");
+ return true;
+ }
+#endif
+
return false;
}
diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc
index 27fe7072813..2d859087217 100644
--- a/sql/wsrep_applier.cc
+++ b/sql/wsrep_applier.cc
@@ -121,7 +121,7 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd,
if (!ev)
{
- WSREP_ERROR("applier could not read binlog event, seqno: %lld, len: %ld",
+ WSREP_ERROR("applier could not read binlog event, seqno: %lld, len: %zu",
(long long)wsrep_thd_trx_seqno(thd), buf_len);
rcode= 1;
goto error;
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc
index e9d1a9289ff..efb6ed87179 100644
--- a/sql/wsrep_hton.cc
+++ b/sql/wsrep_hton.cc
@@ -258,11 +258,13 @@ int wsrep_commit(handlerton *hton, THD *thd, bool all)
Transaction didn't go through wsrep->pre_commit() so just roll back
possible changes to clean state.
*/
- if (wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
- {
- DBUG_PRINT("wsrep", ("setting rollback fail"));
- WSREP_ERROR("settting rollback fail: thd: %llu SQL: %s",
- (long long)thd->real_id, thd->query());
+ if (WSREP_PROVIDER_EXISTS) {
+ if (wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
+ {
+ DBUG_PRINT("wsrep", ("setting rollback fail"));
+ WSREP_ERROR("settting rollback fail: thd: %llu SQL: %s",
+ (long long)thd->real_id, thd->query());
+ }
}
wsrep_cleanup_transaction(thd);
}
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 6b9e3fe02ed..8d59db84b7f 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -68,6 +68,11 @@ my_bool wsrep_load_data_splitting = 1; // commit load data every 10K interv
* End configuration options
*/
+/*
+ * Other wsrep global variables.
+ */
+my_bool wsrep_inited = 0; // initialized ?
+
static const wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED;
static char cluster_uuid_str[40]= { 0, };
static const char* cluster_status_str[WSREP_VIEW_MAX] =
@@ -459,6 +464,7 @@ extern char* my_bind_addr_str;
int wsrep_init()
{
int rcode= -1;
+ DBUG_ASSERT(wsrep_inited == 0);
wsrep_ready_set(FALSE);
assert(wsrep_provider);
@@ -483,11 +489,11 @@ int wsrep_init()
}
}
- if (strlen(wsrep_provider)== 0 ||
- !strcmp(wsrep_provider, WSREP_NONE))
+ if (!WSREP_PROVIDER_EXISTS)
{
// enable normal operation in case no provider is specified
wsrep_ready_set(TRUE);
+ wsrep_inited= 1;
global_system_variables.wsrep_on = 0;
return 0;
}
@@ -632,6 +638,8 @@ int wsrep_init()
WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode);
free(wsrep);
wsrep = NULL;
+ } else {
+ wsrep_inited= 1;
}
return rcode;
@@ -662,11 +670,13 @@ void wsrep_init_startup (bool first)
void wsrep_deinit()
{
+ DBUG_ASSERT(wsrep_inited == 1);
wsrep_unload(wsrep);
wsrep= 0;
provider_name[0]= '\0';
provider_version[0]= '\0';
provider_vendor[0]= '\0';
+ wsrep_inited= 0;
}
void wsrep_recover()
@@ -753,8 +763,7 @@ bool wsrep_start_replication()
if provider is trivial, don't even try to connect,
but resume local node operation
*/
- if (strlen(wsrep_provider)== 0 ||
- !strcmp(wsrep_provider, WSREP_NONE))
+ if (!WSREP_PROVIDER_EXISTS)
{
// enable normal operation in case no provider is specified
wsrep_ready_set(TRUE);
diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h
index 0704bc6503b..7cf4871d6f4 100644
--- a/sql/wsrep_mysqld.h
+++ b/sql/wsrep_mysqld.h
@@ -128,6 +128,8 @@ bool wsrep_before_SE(); // initialize wsrep before storage
* @param before wsrep_before_SE() value */
void wsrep_init_startup(bool before);
+// Other wsrep global variables
+extern my_bool wsrep_inited; // whether wsrep is initialized ?
extern "C" enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd);
extern "C" enum wsrep_conflict_state wsrep_thd_conflict_state(THD *thd);
@@ -219,10 +221,13 @@ extern wsrep_seqno_t wsrep_locked_seqno;
WSREP_LOG(sql_print_information, "cluster conflict due to %s for threads:",\
(bf_abort) ? "high priority abort" : "certification failure" \
); \
- if (bf_thd) WSREP_LOG_CONFLICT_THD(bf_thd, "Winning thread"); \
+ if (bf_thd != NULL) WSREP_LOG_CONFLICT_THD(bf_thd, "Winning thread"); \
if (victim_thd) WSREP_LOG_CONFLICT_THD(victim_thd, "Victim thread"); \
}
+#define WSREP_PROVIDER_EXISTS \
+ (wsrep_provider && strncasecmp(wsrep_provider, WSREP_NONE, FN_REFLEN))
+
extern void wsrep_ready_wait();
enum wsrep_trx_status {
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index bf34790a711..050bb2073a8 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -16,6 +16,9 @@
#include "wsrep_sst.h"
#include <mysqld.h>
+#include <m_ctype.h>
+#include <my_sys.h>
+#include <strfunc.h>
#include <sql_class.h>
#include <set_var.h>
#include <sql_acl.h>
@@ -764,6 +767,19 @@ static int sst_flush_tables(THD* thd)
int err;
int not_used;
+ CHARSET_INFO *current_charset;
+
+ current_charset = thd->variables.character_set_client;
+
+ if (!is_supported_parser_charset(current_charset))
+ {
+ /* Do not use non-supported parser character sets */
+ WSREP_WARN("Current client character set is non-supported parser character set: %s", current_charset->csname);
+ thd->variables.character_set_client = &my_charset_latin1;
+ WSREP_WARN("For SST temporally setting character set to : %s",
+ my_charset_latin1.csname);
+ }
+
if (run_sql_command(thd, "FLUSH TABLES WITH READ LOCK"))
{
WSREP_ERROR("Failed to flush and lock tables");
@@ -776,6 +792,9 @@ static int sst_flush_tables(THD* thd)
(TABLE_LIST*) 0, &not_used);
}
+ thd->variables.character_set_client = current_charset;
+
+
if (err)
{
WSREP_ERROR("Failed to flush tables: %d (%s)", err, strerror(err));
@@ -818,6 +837,19 @@ static void sst_disallow_writes (THD* thd, bool yes)
{
char query_str[64] = { 0, };
ssize_t const query_max = sizeof(query_str) - 1;
+ CHARSET_INFO *current_charset;
+
+ current_charset = thd->variables.character_set_client;
+
+ if (!is_supported_parser_charset(current_charset))
+ {
+ /* Do not use non-supported parser character sets */
+ WSREP_WARN("Current client character set is non-supported parser character set: %s", current_charset->csname);
+ thd->variables.character_set_client = &my_charset_latin1;
+ WSREP_WARN("For SST temporally setting character set to : %s",
+ my_charset_latin1.csname);
+ }
+
snprintf (query_str, query_max, "SET GLOBAL innodb_disallow_writes=%d",
yes ? 1 : 0);
@@ -825,6 +857,7 @@ static void sst_disallow_writes (THD* thd, bool yes)
{
WSREP_ERROR("Failed to disallow InnoDB writes");
}
+ thd->variables.character_set_client = current_charset;
}
static void* sst_donor_thread (void* a)
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index 3f6b621a9f5..02e2584e86d 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -238,7 +238,8 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
wsrep_stop_replication(thd);
mysql_mutex_lock(&LOCK_global_system_variables);
- wsrep_deinit();
+ if (wsrep_inited == 1)
+ wsrep_deinit();
char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider
//when fails
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 8efc019fb38..7b25018bbb8 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -16703,6 +16703,8 @@ wsrep_abort_slave_trx(wsrep_seqno_t bf_seqno, wsrep_seqno_t victim_seqno)
(long long)bf_seqno, (long long)victim_seqno);
abort();
}
+/*******************************************************************//**
+This function is used to kill one transaction in BF. */
int
wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
const trx_t * const bf_trx,
@@ -16720,18 +16722,18 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
if (!thd) {
DBUG_PRINT("wsrep", ("no thd for conflicting lock"));
- WSREP_WARN("no THD for trx: %lu", victim_trx->id);
+ WSREP_WARN("no THD for trx: %llu", victim_trx->id);
DBUG_RETURN(1);
}
if (!bf_thd) {
DBUG_PRINT("wsrep", ("no BF thd for conflicting lock"));
- WSREP_WARN("no BF THD for trx: %lu", (bf_trx) ? bf_trx->id : 0);
+ WSREP_WARN("no BF THD for trx: %llu", (bf_trx) ? bf_trx->id : 0);
DBUG_RETURN(1);
}
WSREP_LOG_CONFLICT(bf_thd, thd, TRUE);
- WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: %lu",
+ WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: %llu",
signal, (long long)bf_seqno,
wsrep_thd_thread_id(thd),
victim_trx->id);
@@ -16742,12 +16744,12 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep_thd_LOCK(thd);
if (wsrep_thd_query_state(thd) == QUERY_EXITING) {
- WSREP_DEBUG("kill trx EXITING for %lu", victim_trx->id);
+ WSREP_DEBUG("kill trx EXITING for %llu", victim_trx->id);
wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0);
}
if(wsrep_thd_exec_mode(thd) != LOCAL_STATE) {
- WSREP_DEBUG("withdraw for BF trx: %lu, state: %d",
+ WSREP_DEBUG("withdraw for BF trx: %llu, state: %d",
victim_trx->id,
wsrep_thd_conflict_state(thd));
}
@@ -16757,7 +16759,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep_thd_set_conflict_state(thd, MUST_ABORT);
break;
case MUST_ABORT:
- WSREP_DEBUG("victim %lu in MUST ABORT state",
+ WSREP_DEBUG("victim %llu in MUST ABORT state",
victim_trx->id);
wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal);
@@ -16766,7 +16768,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
case ABORTED:
case ABORTING: // fall through
default:
- WSREP_DEBUG("victim %lu in state %d",
+ WSREP_DEBUG("victim %llu in state %d",
victim_trx->id, wsrep_thd_conflict_state(thd));
wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0);
@@ -16781,8 +16783,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep_thd_thread_id(thd));
wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal);
-
- WSREP_DEBUG("kill trx QUERY_COMMITTING for %lu",
+ WSREP_DEBUG("kill trx QUERY_COMMITTING for %llu",
victim_trx->id);
if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
@@ -16793,10 +16794,10 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep, bf_seqno,
(wsrep_trx_id_t)victim_trx->id
);
-
+
switch (rcode) {
case WSREP_WARNING:
- WSREP_DEBUG("cancel commit warning: %lu",
+ WSREP_DEBUG("cancel commit warning: %llu",
victim_trx->id);
DBUG_RETURN(1);
break;
@@ -16804,7 +16805,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
break;
default:
WSREP_ERROR(
- "cancel commit bad exit: %d %lu",
+ "cancel commit bad exit: %d %llu",
rcode,
victim_trx->id);
/* unable to interrupt, must abort */
@@ -16820,7 +16821,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
/* it is possible that victim trx is itself waiting for some
* other lock. We need to cancel this waiting
*/
- WSREP_DEBUG("kill trx QUERY_EXEC for %lu", victim_trx->id);
+ WSREP_DEBUG("kill trx QUERY_EXEC for %llu", victim_trx->id);
victim_trx->lock.was_chosen_as_deadlock_victim= TRUE;
if (victim_trx->lock.wait_lock) {
@@ -16856,7 +16857,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
bool skip_abort= false;
wsrep_aborting_thd_t abortees;
- WSREP_DEBUG("kill IDLE for %lu", victim_trx->id);
+ WSREP_DEBUG("kill IDLE for %llu", victim_trx->id);
if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
WSREP_DEBUG("kill BF IDLE, seqno: %lld",
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index d1b2b12bf59..c9c7ec4cc31 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -2106,7 +2106,7 @@ os_file_set_size(
fprintf(stderr, "InnoDB: Error: preallocating file "
"space for file \'%s\' failed. Current size "
- "%lu, desired size %lu\n",
+ "%llu, desired size %llu\n",
name, current_size, size);
os_file_handle_error_no_exit(name, "posix_fallocate", FALSE);
return(FALSE);
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index d4d24e53df1..874fdd3d444 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -2319,27 +2319,6 @@ srv_master_sleep(void)
srv_main_thread_op_info = "";
}
-#ifdef WITH_WSREP
-/*********************************************************************//**
-check if lock timeout was for priority thread,
-as a side effect trigger lock monitor
-@return false for regular lock timeout */
-static ibool
-wsrep_is_BF_lock_timeout(
-/*====================*/
- srv_slot_t* slot) /* in: lock slot to check for lock priority */
-{
- if (wsrep_on(thr_get_trx(slot->thr)->mysql_thd) &&
- wsrep_thd_is_brute_force((thr_get_trx(slot->thr))->mysql_thd)) {
- fprintf(stderr, "WSREP: BF lock wait long\n");
- srv_print_innodb_monitor = TRUE;
- srv_print_innodb_lock_monitor = TRUE;
- os_event_set(lock_sys->timeout_event);
- return TRUE;
- }
- return FALSE;
- }
-#endif /* WITH_WSREP */
/*********************************************************************//**
The master thread controlling the server.
@return a dummy parameter */
@@ -2440,7 +2419,7 @@ wsrep_is_BF_lock_timeout(
}
return FALSE;
}
-#endif /* WITH_WSREP */
+#endif /* WITH_WSREP_TODO */
/*********************************************************************//**
Check if purge should stop.
@return true if it should shutdown. */
diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt
index 09ca7ca9659..bbd61c80948 100644
--- a/storage/tokudb/CMakeLists.txt
+++ b/storage/tokudb/CMakeLists.txt
@@ -16,7 +16,7 @@ ENDIF()
############################################
SET(ENV{TOKUDB_VERSION} "7.1.0")
-SET(TOKUDB_DEB_FILES "usr/lib/mysql/plugin/ha_tokudb.so\netc/mysql/conf.d/tokudb.cnf\nusr/bin/tokuftdump\nusr/share/doc/mariadb-server-10.0/README-TOKUDB\nusr/share/doc/mariadb-server-10.0/README.md" PARENT_SCOPE)
+SET(TOKUDB_DEB_FILES "usr/lib/mysql/plugin/ha_tokudb.so\netc/mysql/conf.d/tokudb.cnf\nusr/bin/tokuftdump\nusr/share/doc/mariadb-galera-server-10.0/README-TOKUDB\nusr/share/doc/mariadb-galera-server-10.0/README.md" PARENT_SCOPE)
SET(USE_BDB OFF CACHE BOOL "")
SET(USE_VALGRIND OFF CACHE BOOL "")
SET(BUILD_TESTING OFF CACHE BOOL "")
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 26190d56044..62a033e82e0 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -17759,6 +17759,8 @@ wsrep_abort_slave_trx(wsrep_seqno_t bf_seqno, wsrep_seqno_t victim_seqno)
(long long)bf_seqno, (long long)victim_seqno);
abort();
}
+/*******************************************************************//**
+This function is used to kill one transaction in BF. */
int
wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
const trx_t * const bf_trx,
@@ -17776,18 +17778,18 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
if (!thd) {
DBUG_PRINT("wsrep", ("no thd for conflicting lock"));
- WSREP_WARN("no THD for trx: %lu", victim_trx->id);
+ WSREP_WARN("no THD for trx: %llu", victim_trx->id);
DBUG_RETURN(1);
}
if (!bf_thd) {
DBUG_PRINT("wsrep", ("no BF thd for conflicting lock"));
- WSREP_WARN("no BF THD for trx: %lu", (bf_trx) ? bf_trx->id : 0);
+ WSREP_WARN("no BF THD for trx: %llu", (bf_trx) ? bf_trx->id : 0);
DBUG_RETURN(1);
}
WSREP_LOG_CONFLICT(bf_thd, thd, TRUE);
- WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: %lu",
+ WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: %llu",
signal, (long long)bf_seqno,
wsrep_thd_thread_id(thd),
victim_trx->id);
@@ -17798,12 +17800,12 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep_thd_LOCK(thd);
if (wsrep_thd_query_state(thd) == QUERY_EXITING) {
- WSREP_DEBUG("kill trx EXITING for %lu", victim_trx->id);
+ WSREP_DEBUG("kill trx EXITING for %llu", victim_trx->id);
wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0);
}
if(wsrep_thd_exec_mode(thd) != LOCAL_STATE) {
- WSREP_DEBUG("withdraw for BF trx: %lu, state: %d",
+ WSREP_DEBUG("withdraw for BF trx: %llu, state: %d",
victim_trx->id,
wsrep_thd_conflict_state(thd));
}
@@ -17813,7 +17815,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep_thd_set_conflict_state(thd, MUST_ABORT);
break;
case MUST_ABORT:
- WSREP_DEBUG("victim %lu in MUST ABORT state",
+ WSREP_DEBUG("victim %llu in MUST ABORT state",
victim_trx->id);
wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal);
@@ -17822,7 +17824,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
case ABORTED:
case ABORTING: // fall through
default:
- WSREP_DEBUG("victim %lu in state %d",
+ WSREP_DEBUG("victim %llu in state %d",
victim_trx->id, wsrep_thd_conflict_state(thd));
wsrep_thd_UNLOCK(thd);
DBUG_RETURN(0);
@@ -17837,7 +17839,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
wsrep_thd_thread_id(thd));
wsrep_thd_UNLOCK(thd);
wsrep_thd_awake(thd, signal);
- WSREP_DEBUG("kill trx QUERY_COMMITTING for %lu",
+ WSREP_DEBUG("kill trx QUERY_COMMITTING for %llu",
victim_trx->id);
if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
@@ -17851,7 +17853,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
switch (rcode) {
case WSREP_WARNING:
- WSREP_DEBUG("cancel commit warning: %lu",
+ WSREP_DEBUG("cancel commit warning: %llu",
victim_trx->id);
DBUG_RETURN(1);
break;
@@ -17859,7 +17861,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
break;
default:
WSREP_ERROR(
- "cancel commit bad exit: %d %lu",
+ "cancel commit bad exit: %d %llu",
rcode,
victim_trx->id);
/* unable to interrupt, must abort */
@@ -17875,7 +17877,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
/* it is possible that victim trx is itself waiting for some
* other lock. We need to cancel this waiting
*/
- WSREP_DEBUG("kill trx QUERY_EXEC for %lu", victim_trx->id);
+ WSREP_DEBUG("kill trx QUERY_EXEC for %llu", victim_trx->id);
victim_trx->lock.was_chosen_as_deadlock_victim= TRUE;
if (victim_trx->lock.wait_lock) {
@@ -17913,7 +17915,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr,
bool skip_abort= false;
wsrep_aborting_thd_t abortees;
- WSREP_DEBUG("kill IDLE for %lu", victim_trx->id);
+ WSREP_DEBUG("kill IDLE for %llu", victim_trx->id);
if (wsrep_thd_exec_mode(thd) == REPL_RECV) {
WSREP_DEBUG("kill BF IDLE, seqno: %lld",
diff --git a/storage/xtradb/row/row0upd.cc b/storage/xtradb/row/row0upd.cc
index ee80e034eb1..9d40848c2fc 100644
--- a/storage/xtradb/row/row0upd.cc
+++ b/storage/xtradb/row/row0upd.cc
@@ -2554,7 +2554,7 @@ row_upd_del_mark_clust_rec(
break;
default:
fprintf (stderr,
- "WSREP: clust rec referenced FK check fail: %lu",
+ "WSREP: clust rec referenced FK check fail: %u",
err);
break;
}
diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc
index 87615e161da..46d81790fe8 100644
--- a/storage/xtradb/srv/srv0srv.cc
+++ b/storage/xtradb/srv/srv0srv.cc
@@ -2050,28 +2050,6 @@ exit_func:
OS_THREAD_DUMMY_RETURN;
}
-#ifdef WITH_WSREP
-/*********************************************************************//**
-check if lock timeout was for priority thread,
-as a side effect trigger lock monitor
-@return false for regular lock timeout */
-static ibool
-wsrep_is_BF_lock_timeout(
-/*====================*/
- srv_slot_t* slot) /* in: lock slot to check for lock priority */
-{
- if (wsrep_on(thr_get_trx(slot->thr)->mysql_thd) &&
- wsrep_thd_is_brute_force((thr_get_trx(slot->thr))->mysql_thd)) {
- fprintf(stderr, "WSREP: BF lock wait long\n");
- srv_print_innodb_monitor = TRUE;
- srv_print_innodb_lock_monitor = TRUE;
- os_event_set(lock_sys->timeout_event);
- return TRUE;
- }
- return FALSE;
- }
-#endif /* WITH_WSREP */
-
/*********************************************************************//**
A thread which prints warnings about semaphore waits which have lasted
too long. These can be used to track bugs which cause hangs.
@@ -3020,6 +2998,27 @@ suspend_thread:
OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */
}
+#ifdef WITH_WSREP_TODO
+/*********************************************************************//**
+check if lock timeout was for priority thread,
+as a side effect trigger lock monitor
+@return false for regular lock timeout */
+static ibool
+wsrep_is_BF_lock_timeout(
+/*====================*/
+ srv_slot_t* slot) /* in: lock slot to check for lock priority */
+{
+ if (wsrep_on(thr_get_trx(slot->thr)->mysql_thd) &&
+ wsrep_thd_is_brute_force((thr_get_trx(slot->thr))->mysql_thd)) {
+ fprintf(stderr, "WSREP: BF lock wait long\n");
+ srv_print_innodb_monitor = TRUE;
+ srv_print_innodb_lock_monitor = TRUE;
+ os_event_set(lock_sys->timeout_event);
+ return TRUE;
+ }
+ return FALSE;
+ }
+#endif /* WITH_WSREP_TODO */
/*********************************************************************//**
Check if purge should stop.
@return true if it should shutdown. */
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 2b4577377e8..317825b0350 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -52,6 +52,7 @@ datadir=
# 0 means don't wait at all
# Negative numbers mean to wait indefinitely
service_startup_timeout=900
+startup_sleep=1
# Lock directory for RedHat / SuSE.
lockdir='/var/lock/subsys'
@@ -157,6 +158,7 @@ wait_for_pid () {
pid="$2" # process ID of the program operating on the pid-file
pid_file_path="$3" # path to the PID file.
+ sst_progress_file=$datadir/sst_in_progress
i=0
avoid_race_condition="by checking again"
@@ -194,9 +196,14 @@ wait_for_pid () {
fi
fi
+ if test -e $sst_progress_file && [ $startup_sleep -ne 10 ];then
+ echo $echo_n "SST in progress, setting sleep higher"
+ startup_sleep=10
+ fi
+
echo $echo_n ".$echo_c"
i=`expr $i + 1`
- sleep 1
+ sleep $startup_sleep
done