1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

* Merged revisions: 3431, 3435..3457, 3459, 3460 from maria-5.5-galera.

* Fixed Debian/Ubuntu dist files.
* Fixed some compiler warnings.
This commit is contained in:
Nirbhay Choubey
2014-01-30 12:45:38 -05:00
parent 5b6a4f25a5
commit 4a6be51f78
47 changed files with 439 additions and 187 deletions

View File

@@ -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.

View File

@@ -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
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)

View File

@@ -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.
.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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/; \

View File

@@ -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.
.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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; \

View File

@@ -0,0 +1,4 @@
-- require r/have_wsrep.require
disable_query_log;
show variables like 'wsrep_on';
enable_query_log;

View File

@@ -0,0 +1,2 @@
Variable_name Value
wsrep_on ON

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 ##

View File

@@ -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;

View File

@@ -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.

View File

@@ -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

View File

@@ -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;

View File

@@ -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.

View File

@@ -151,3 +151,4 @@ error:
DBUG_RETURN(-1);
}
#endif

View File

@@ -326,6 +326,7 @@ parse_arguments() {
then
wsrep_restart=1
fi
append_arg_to_args "$arg"
;;
--help) usage ;;

View File

@@ -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");

View File

@@ -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->variables.character_set_client = current_charset;
}
}
if (thd->wsrep_retry_query && thd->wsrep_conflict_state != REPLAYING)

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -258,12 +258,14 @@ 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_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);
}
}

View File

@@ -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);

View File

@@ -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 {

View File

@@ -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)

View File

@@ -238,6 +238,7 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
wsrep_stop_replication(thd);
mysql_mutex_lock(&LOCK_global_system_variables);
if (wsrep_inited == 1)
wsrep_deinit();
char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider

View File

@@ -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) {
@@ -16796,7 +16797,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;
@@ -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",

View File

@@ -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);

View File

@@ -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. */

View File

@@ -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 "")

View File

@@ -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",

View File

@@ -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;
}

View File

@@ -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. */

View File

@@ -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