Commit 924ac28b authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

merge

parents 57b6cb39 2551e1ae
...@@ -1135,3 +1135,5 @@ plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL ...@@ -1135,3 +1135,5 @@ plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL
libmysqld/libmysqld_exports_file.cc libmysqld/libmysqld_exports_file.cc
libmysqld/gcalc_slicescan.cc libmysqld/gcalc_slicescan.cc
libmysqld/gcalc_tools.cc libmysqld/gcalc_tools.cc
sql/share/errmsg.sys
sql/share/mysql
# MariaDB-specific config file.
# Read by /etc/mysql/my.cnf
[client]
# Default is Latin1, if you need UTF-8 set this (also in server section)
#default-character-set = utf8
[mysqld]
#
# * Character sets
#
# Default is Latin1, if you need UTF-8 set all this (also in client section)
#
#default-character-set = utf8
#default-collation = utf8_general_ci
#character_set_server = utf8
#collation_server = utf8_general_ci
#
# * Fine Tuning
#
max_connections = 100
connect_timeout = 5
wait_timeout = 600
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M
#
# * MyISAM
#
key_buffer_size = 128M
table_cache = 400
myisam_sort_buffer_size = 512M
concurrent_insert = 2
read_buffer_size = 2M
read_rnd_buffer_size = 1M
# MariaDB database server configuration file. # MariaDB database server configuration file.
# #
# =================================================================
# Base configuration courtesy of Open Query (http://openquery.com/)
# For production use, case-specific preparation is still required.
# 2009-10-07
#
# This is *not* an optimised config, merely a more sane baseline:
# - InnoDB default (e.g., ACID out-of-the-box, same as on Windows)
# - strict mode (for proper input checks, same as on Windows)
# - various other useful settings
# - make use of MariaDB/Percona/OurDelta enhancements/extensions
#
# For tuning assistance, please see http://openquery.com/services
# =================================================================
#
# You can copy this file to one of: # You can copy this file to one of:
# - "/etc/mysql/my.cnf" to set global options, # - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options. # - "~/.my.cnf" to set user-specific options.
...@@ -32,8 +18,6 @@ ...@@ -32,8 +18,6 @@
[client] [client]
port = 3306 port = 3306
socket = /var/run/mysqld/mysqld.sock socket = /var/run/mysqld/mysqld.sock
# Default is Latin1, if you need UTF-8 set this (also in server section)
#default-character-set = utf8
# Here is entries for some specific programs # Here is entries for some specific programs
# The following values assume you have at least 32M ram # The following values assume you have at least 32M ram
...@@ -54,46 +38,25 @@ port = 3306 ...@@ -54,46 +38,25 @@ port = 3306
basedir = /usr basedir = /usr
datadir = /var/lib/mysql datadir = /var/lib/mysql
tmpdir = /tmp tmpdir = /tmp
language = /usr/share/mysql/english lc_messages_dir = /usr/share/mysql
lc_messages = en_US
skip-external-locking skip-external-locking
# #
# * Character sets
#
# Default is Latin1, if you need UTF-8 set all this (also in client section)
#
#default-character-set = utf8
#default-collation = utf8_general_ci
#character_set_server = utf8
#collation_server = utf8_general_ci
#
# Instead of skip-networking the default is now to listen only on # Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure. # localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1 bind-address = 127.0.0.1
# #
# * Fine Tuning # * Fine Tuning
# #
max_connections = 100
connect_timeout = 5
wait_timeout = 600
max_allowed_packet = 16M max_allowed_packet = 16M
thread_cache_size = 128 thread_cache_size = 128
sort_buffer_size = 4M
bulk_insert_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M
# #
# * MyISAM # * MyISAM
# #
# This replaces the startup script and checks MyISAM tables if needed # This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched. On error, make copy and try a repair. # the first time they are touched. On error, make copy and try a repair.
myisam_recover = BACKUP myisam_recover = BACKUP
key_buffer_size = 128M
#open-files-limit = 2000 #open-files-limit = 2000
table_cache = 400
myisam_sort_buffer_size = 512M
concurrent_insert = 2
read_buffer_size = 2M
read_rnd_buffer_size = 1M
# #
# * Query Cache Configuration # * Query Cache Configuration
# #
......
...@@ -61,9 +61,9 @@ done; ...@@ -61,9 +61,9 @@ done;
# #
echo "Incrementing changelog and starting build scripts" echo "Incrementing changelog and starting build scripts"
dch -b -D ${CODENAME} -v "${UPSTREAM}${PATCHLEVEL}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}~${CODENAME}" "Automatic build with ${LOGSTRING}." dch -b -D ${CODENAME} -v "${UPSTREAM}${PATCHLEVEL}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}1~${CODENAME}" "Automatic build with ${LOGSTRING}."
echo "Creating package version ${UPSTREAM}${PATCHLEVEL}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}~${CODENAME} ... " echo "Creating package version ${UPSTREAM}${PATCHLEVEL}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}1~${CODENAME} ... "
# Build the package. # Build the package.
# #
......
...@@ -71,7 +71,6 @@ Package: mysql-common ...@@ -71,7 +71,6 @@ Package: mysql-common
Section: database Section: database
Architecture: all Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: mariadb-common
Description: MariaDB database common files (e.g. /etc/mysql/my.cnf) Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query server. SQL (Structured Query Language) is the most popular database query
...@@ -80,21 +79,32 @@ Description: MariaDB database common files (e.g. /etc/mysql/my.cnf) ...@@ -80,21 +79,32 @@ Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
. .
This package includes files needed by all versions of the client library This package includes files needed by all versions of the client library
(e.g. /etc/mysql/my.cnf). (e.g. /etc/mysql/my.cnf).
Package: mariadb-common
Section: database
Architecture: all
Depends: mysql-common, ${shlibs:Depends}, ${misc:Depends}
Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
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
ease of use.
. .
Due to libmysqlclient15off package depends, this package has not yet been This package includes files needed by all versions of the client library
renamed to mariadb-common. It does, however, already contain a new my.cnf (e.g. /etc/mysql/conf.d/mariadb.cnf).
file with mariadb-specific configuration options.
Package: mariadb-client-core-5.5 Package: mariadb-client-core-5.5
Architecture: any Architecture: any
Depends: mariadb-common, libmariadbclient18 (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} Depends: mariadb-common, libmariadbclient18 (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
Provides: mysql-client-core, mysql-client-core-5.1, mysql-client-core-5.5 Provides: mysql-client-core, mysql-client-core-5.1, mysql-client-core-5.5
Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, mysql-client-5.5, Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0,
mysql-client-5.1 (<< ${source:Version}), mysql-client-5.5 (<< ${source:Version}),
mysql-client-core-5.1, mysql-client-core-5.5, mysql-client-core-5.1, mysql-client-core-5.5,
mariadb-client-5.1, mariadb-client-core-5.1, mariadb-client-5.1, mariadb-client-core-5.1,
mariadb-client-5.2, mariadb-client-core-5.2, mariadb-client-5.2, mariadb-client-core-5.2,
mariadb-client-5.3, mariadb-client-core-5.3 mariadb-client-5.3, mariadb-client-core-5.3
Replaces: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, mysql-client-5.5, Replaces: mysql-client (<< 5.0.51), mysql-client-5.0,
mysql-client-5.1, mysql-client-5.5,
mysql-client-core-5.1, mysql-client-core-5.5, mysql-client-core-5.1, mysql-client-core-5.5,
mariadb-client-5.1, mariadb-client-core-5.1, mariadb-client-5.1, mariadb-client-core-5.1,
mariadb-client-5.2, mariadb-client-core-5.2, mariadb-client-5.2, mariadb-client-core-5.2,
...@@ -176,8 +186,7 @@ Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ...@@ -176,8 +186,7 @@ Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6),
Provides: mariadb-server, mysql-server, virtual-mysql-server Provides: mariadb-server, mysql-server, virtual-mysql-server
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-4.1, mysql-server-5.0, mysql-server-5.1,
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3
libmariadbclient16 (<< 5.3.4)
Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-4.1, mysql-server-5.0, mysql-server-5.1,
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3,
......
...@@ -15,6 +15,7 @@ usr/bin/aria_chk ...@@ -15,6 +15,7 @@ usr/bin/aria_chk
usr/bin/aria_dump_log usr/bin/aria_dump_log
usr/bin/mysql_convert_table_format usr/bin/mysql_convert_table_format
usr/bin/mysql_install_db usr/bin/mysql_install_db
usr/bin/mysql_plugin
usr/bin/mysql_secure_installation usr/bin/mysql_secure_installation
usr/bin/mysql_setpermission usr/bin/mysql_setpermission
usr/bin/mysql_tzinfo_to_sql usr/bin/mysql_tzinfo_to_sql
......
...@@ -73,12 +73,12 @@ endif ...@@ -73,12 +73,12 @@ endif
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_SBINDIR=sbin \ -DINSTALL_SBINDIR=sbin \
-DMYSQL_DATADIR=/var/lib/mysql \ -DMYSQL_DATADIR=/var/lib/mysql \
-DINSTALL_INCLUDEDIR=include \ -DINSTALL_INCLUDEDIR=include/mysql \
-DINSTALL_INFODIR=share/info \ -DINSTALL_INFODIR=share/info \
-DINSTALL_MANDIR=share/man \ -DINSTALL_MANDIR=share/man \
\ \
-DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \
-DWITH_COMMENT="(MariaDB - http://mariadb.com/)" \ -DCOMPILATION_COMMENT="mariadb.org binary distribution" \
-DSYSTEM_TYPE="debian-linux-gnu" \ -DSYSTEM_TYPE="debian-linux-gnu" \
-DINSTALL_LAYOUT=DEB \ -DINSTALL_LAYOUT=DEB \
\ \
...@@ -86,7 +86,6 @@ endif ...@@ -86,7 +86,6 @@ endif
-DWITH_FAST_MUTEXES=1 \ -DWITH_FAST_MUTEXES=1 \
\ \
-DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
-DMYSQL_USER=mysql \
\ \
-DEXTRA_CHARSETS=all \ -DEXTRA_CHARSETS=all \
-DWITH_LIBWRAP=1 \ -DWITH_LIBWRAP=1 \
...@@ -170,12 +169,19 @@ install: build ...@@ -170,12 +169,19 @@ install: build
# libmysqlclient-dev: forgotten header file since 3.23.25? # libmysqlclient-dev: forgotten header file since 3.23.25?
cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/ cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/
cp include/my_dir.h $(TMP)/usr/include/mysql/ cp include/my_dir.h $(TMP)/usr/include/mysql/
mv $(TMP)/usr/include/mysql/mysql/*.h $(TMP)/usr/include/mysql/
mv $(TMP)/usr/include/mysql/mysql/psi $(TMP)/usr/include/mysql/
# mysql-common: We now provide our own config file. # mysql-common: We provide our own version of this package for
# can't be mariadb-common, other packages insist # completeness, but we can use an existing version; mariadb-specic
# stuff is in mariadb-common
install -d $(TMP)/etc/mysql install -d $(TMP)/etc/mysql
install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf
# mariadb-common: MariaDB-specific config stuff.
install -d $(TMP)/etc/mysql/conf.d
install -m 0644 debian/additions/mariadb.cnf $(TMP)/etc/mysql/conf.d/mariadb.cnf
# mariadb-client # mariadb-client
install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/ install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/
install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/ install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/
......
...@@ -71,7 +71,6 @@ Package: mysql-common ...@@ -71,7 +71,6 @@ Package: mysql-common
Section: database Section: database
Architecture: all Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: mariadb-common
Description: MariaDB database common files (e.g. /etc/mysql/my.cnf) Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query server. SQL (Structured Query Language) is the most popular database query
...@@ -80,21 +79,32 @@ Description: MariaDB database common files (e.g. /etc/mysql/my.cnf) ...@@ -80,21 +79,32 @@ Description: MariaDB database common files (e.g. /etc/mysql/my.cnf)
. .
This package includes files needed by all versions of the client library This package includes files needed by all versions of the client library
(e.g. /etc/mysql/my.cnf). (e.g. /etc/mysql/my.cnf).
Package: mariadb-common
Section: database
Architecture: all
Depends: mysql-common, ${shlibs:Depends}, ${misc:Depends}
Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
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
ease of use.
. .
Due to libmysqlclient15off package depends, this package has not yet been This package includes files needed by all versions of the client library
renamed to mariadb-common. It does, however, already contain a new my.cnf (e.g. /etc/mysql/conf.d/mariadb.cnf).
file with mariadb-specific configuration options.
Package: mariadb-client-core-5.5 Package: mariadb-client-core-5.5
Architecture: any Architecture: any
Depends: mariadb-common, libmariadbclient18 (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} Depends: mariadb-common, libmariadbclient18 (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}
Provides: mysql-client-core, mysql-client-core-5.1, mysql-client-core-5.5 Provides: mysql-client-core, mysql-client-core-5.1, mysql-client-core-5.5
Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, mysql-client-5.5, Conflicts: mysql-client (<< 5.0.51), mysql-client-5.0,
mysql-client-5.1 (<< ${source:Version}), mysql-client-5.5 (<< ${source:Version}),
mysql-client-core-5.1, mysql-client-core-5.5, mysql-client-core-5.1, mysql-client-core-5.5,
mariadb-client-5.1, mariadb-client-core-5.1, mariadb-client-5.1, mariadb-client-core-5.1,
mariadb-client-5.2, mariadb-client-core-5.2, mariadb-client-5.2, mariadb-client-core-5.2,
mariadb-client-5.3, mariadb-client-core-5.3 mariadb-client-5.3, mariadb-client-core-5.3
Replaces: mysql-client (<< 5.0.51), mysql-client-5.0, mysql-client-5.1, mysql-client-5.5, Replaces: mysql-client (<< 5.0.51), mysql-client-5.0,
mysql-client-5.1, mysql-client-5.5,
mysql-client-core-5.1, mysql-client-core-5.5, mysql-client-core-5.1, mysql-client-core-5.5,
mariadb-client-5.1, mariadb-client-core-5.1, mariadb-client-5.1, mariadb-client-core-5.1,
mariadb-client-5.2, mariadb-client-core-5.2, mariadb-client-5.2, mariadb-client-core-5.2,
...@@ -170,8 +180,7 @@ Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ...@@ -170,8 +180,7 @@ Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6),
Provides: mariadb-server, mysql-server, virtual-mysql-server Provides: mariadb-server, mysql-server, virtual-mysql-server
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-4.1, mysql-server-5.0, mysql-server-5.1,
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3
libmariadbclient16 (<< 5.3.4)
Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), Replaces: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-4.1, mysql-server-5.0, mysql-server-5.1,
mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3, mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3,
......
...@@ -17,6 +17,7 @@ usr/bin/aria_chk ...@@ -17,6 +17,7 @@ usr/bin/aria_chk
usr/bin/aria_dump_log usr/bin/aria_dump_log
usr/bin/mysql_convert_table_format usr/bin/mysql_convert_table_format
usr/bin/mysql_install_db usr/bin/mysql_install_db
usr/bin/mysql_plugin
usr/bin/mysql_secure_installation usr/bin/mysql_secure_installation
usr/bin/mysql_setpermission usr/bin/mysql_setpermission
usr/bin/mysql_tzinfo_to_sql usr/bin/mysql_tzinfo_to_sql
......
...@@ -73,12 +73,12 @@ endif ...@@ -73,12 +73,12 @@ endif
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_SBINDIR=sbin \ -DINSTALL_SBINDIR=sbin \
-DMYSQL_DATADIR=/var/lib/mysql \ -DMYSQL_DATADIR=/var/lib/mysql \
-DINSTALL_INCLUDEDIR=include \ -DINSTALL_INCLUDEDIR=include/mysql \
-DINSTALL_INFODIR=share/info \ -DINSTALL_INFODIR=share/info \
-DINSTALL_MANDIR=share/man \ -DINSTALL_MANDIR=share/man \
\ \
-DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \
-DWITH_COMMENT="(MariaDB - http://mariadb.com/)" \ -DCOMPILATION_COMMENT="mariadb.org binary distribution" \
-DSYSTEM_TYPE="debian-linux-gnu" \ -DSYSTEM_TYPE="debian-linux-gnu" \
-DINSTALL_LAYOUT=DEB \ -DINSTALL_LAYOUT=DEB \
\ \
...@@ -86,7 +86,6 @@ endif ...@@ -86,7 +86,6 @@ endif
-DWITH_FAST_MUTEXES=1 \ -DWITH_FAST_MUTEXES=1 \
\ \
-DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
-DMYSQL_USER=mysql \
\ \
-DEXTRA_CHARSETS=all \ -DEXTRA_CHARSETS=all \
-DWITH_LIBWRAP=1 \ -DWITH_LIBWRAP=1 \
...@@ -170,12 +169,19 @@ install: build ...@@ -170,12 +169,19 @@ install: build
# libmysqlclient-dev: forgotten header file since 3.23.25? # libmysqlclient-dev: forgotten header file since 3.23.25?
cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/ cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/
cp include/my_dir.h $(TMP)/usr/include/mysql/ cp include/my_dir.h $(TMP)/usr/include/mysql/
mv $(TMP)/usr/include/mysql/mysql/*.h $(TMP)/usr/include/mysql/
mv $(TMP)/usr/include/mysql/mysql/psi $(TMP)/usr/include/mysql/
# mysql-common: We now provide our own config file. # mysql-common: We provide our own version of this package for
# can't be mariadb-common, other packages insist # completeness, but we can use an existing version; mariadb-specic
# stuff is in mariadb-common
install -d $(TMP)/etc/mysql install -d $(TMP)/etc/mysql
install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf
# mariadb-common: MariaDB-specific config stuff.
install -d $(TMP)/etc/mysql/conf.d
install -m 0644 debian/additions/mariadb.cnf $(TMP)/etc/mysql/conf.d/mariadb.cnf
# mariadb-client # mariadb-client
install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/ install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/
install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/ install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/
......
usr/bin/mysql_config usr/bin/mysql_config
usr/include/mysql/*.h usr/include/mysql/*.h
usr/include/mysql/psi/*.h
usr/lib/libmysqlclient.a usr/lib/libmysqlclient.a
usr/lib/libmysqlclient_r.a usr/lib/libmysqlclient_r.a
usr/lib/libmysqlservices.a
usr/share/aclocal/mysql.m4 usr/share/aclocal/mysql.m4
usr/share/man/man1/mysql_config.1 usr/share/man/man1/mysql_config.1
etc/mysql/conf.d/mariadb.cnf
#!/bin/bash -e
if [ "$1" = "purge" ]; then
rmdir /etc/mysql/conf.d 2>/dev/null || true
rmdir /etc/mysql 2>/dev/null || true
fi
#DEBHELPER#
...@@ -69,6 +69,7 @@ while ($_show_slave_status_items) ...@@ -69,6 +69,7 @@ while ($_show_slave_status_items)
--let $_show_slave_status_name= `SELECT SUBSTRING_INDEX('$_show_slave_status_items', ',', 1)` --let $_show_slave_status_name= `SELECT SUBSTRING_INDEX('$_show_slave_status_items', ',', 1)`
--let $_show_slave_status_items= `SELECT LTRIM(SUBSTRING('$_show_slave_status_items', LENGTH('$_show_slave_status_name') + 2))` --let $_show_slave_status_items= `SELECT LTRIM(SUBSTRING('$_show_slave_status_items', LENGTH('$_show_slave_status_name') + 2))`
--replace_regex /\.[\\\/]master/master/
--let $_show_slave_status_value= query_get_value(SHOW SLAVE STATUS, $_show_slave_status_name, 1) --let $_show_slave_status_value= query_get_value(SHOW SLAVE STATUS, $_show_slave_status_name, 1)
--let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')` --let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`
--echo $_show_slave_status_name = '$_show_slave_status_value' --echo $_show_slave_status_name = '$_show_slave_status_value'
......
...@@ -14,7 +14,7 @@ while ($mysql_errno) ...@@ -14,7 +14,7 @@ while ($mysql_errno)
# Strangely enough, the server might return "Too many connections" # Strangely enough, the server might return "Too many connections"
# while being shutdown, thus 1040 is an "allowed" error # while being shutdown, thus 1040 is an "allowed" error
# See BUG#36228 # See BUG#36228
--error 0,1040,1053,2002,2003,2006,2013 --error 0,1040,1053,2002,2003,2005,2006,2013
show status; show status;
dec $counter; dec $counter;
......
...@@ -278,6 +278,7 @@ sub collect_one_suite ...@@ -278,6 +278,7 @@ sub collect_one_suite
{ {
$suitedir= my_find_dir($::basedir, $suitedir= my_find_dir($::basedir,
["share/mysql-test/suite", ["share/mysql-test/suite",
"share/mysql/mysql-test/suite",
"mysql-test/suite", "mysql-test/suite",
"mysql-test", "mysql-test",
# Look in storage engine specific suite dirs # Look in storage engine specific suite dirs
......
...@@ -205,7 +205,7 @@ def mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL NULL utf8 utf8_genera ...@@ -205,7 +205,7 @@ def mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL NULL utf8 utf8_genera
def mysql user max_connections 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned def mysql user max_connections 39 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned
def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned
def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned
def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11)
def mysql user Password 3 NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) def mysql user Password 3 NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41)
def mysql user plugin 41 NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) def mysql user plugin 41 NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64)
def mysql user Process_priv 12 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql user Process_priv 12 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
...@@ -515,6 +515,6 @@ NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint( ...@@ -515,6 +515,6 @@ NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(
NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned NULL mysql user max_user_connections int NULL NULL NULL NULL int(11)
1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64) 1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64)
1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text 1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
...@@ -85,7 +85,7 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_ ...@@ -85,7 +85,7 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_
DROP DATABASE information_schema; DROP DATABASE information_schema;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
RENAME DATABASE information_schema TO info_schema; RENAME DATABASE information_schema TO info_schema;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATABASE information_schema TO info_schema' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DATABASE information_schema TO info_schema' at line 1
ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME; ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
#################################################################################### ####################################################################################
...@@ -154,7 +154,7 @@ ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'in ...@@ -154,7 +154,7 @@ ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'in
DROP DATABASE information_schema; DROP DATABASE information_schema;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
RENAME DATABASE information_schema TO info_schema; RENAME DATABASE information_schema TO info_schema;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATABASE information_schema TO info_schema' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DATABASE information_schema TO info_schema' at line 1
ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME; ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
#################################################################################### ####################################################################################
......
...@@ -26,10 +26,6 @@ update performance_schema.setup_instruments set enabled='YES' ...@@ -26,10 +26,6 @@ update performance_schema.setup_instruments set enabled='YES'
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock"); and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer) master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
...@@ -44,7 +40,3 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F ...@@ -44,7 +40,3 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
...@@ -26,10 +26,6 @@ update performance_schema.setup_instruments set enabled='YES' ...@@ -26,10 +26,6 @@ update performance_schema.setup_instruments set enabled='YES'
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock"); and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer) master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
...@@ -44,7 +40,3 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F ...@@ -44,7 +40,3 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
...@@ -20,12 +20,14 @@ insert into test.t1 ...@@ -20,12 +20,14 @@ insert into test.t1
select thread_id from performance_schema.events_waits_current; select thread_id from performance_schema.events_waits_current;
Warnings: Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Mixing self-logging and non-self-logging engines in a statement is unsafe.
insert into test.t2 insert into test.t2
select name from performance_schema.setup_instruments select name from performance_schema.setup_instruments
where name like "wait/synch/rwlock/sql/%" where name like "wait/synch/rwlock/sql/%"
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock"); and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
Warnings: Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Mixing self-logging and non-self-logging engines in a statement is unsafe.
drop table test.t1; drop table test.t1;
drop table test.t2; drop table test.t2;
update performance_schema.setup_instruments set enabled='YES' update performance_schema.setup_instruments set enabled='YES'
......
...@@ -11,7 +11,7 @@ reset slave; ...@@ -11,7 +11,7 @@ reset slave;
start slave; start slave;
include/wait_for_slave_param.inc [Last_IO_Errno] include/wait_for_slave_param.inc [Last_IO_Errno]
Last_IO_Errno = '1236' Last_IO_Errno = '1236'
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the last event was read from './master-bin.000001' at 316, the last byte read was read from './master-bin.000001' at 335.'' Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the last event was read from 'master-bin.000001' at 316, the last byte read was read from 'master-bin.000001' at 335.''
reset master; reset master;
stop slave; stop slave;
reset slave; reset slave;
......
include/master-slave.inc
[connection master]
UPDATE performance_schema.setup_instruments SET ENABLED="NO";
include/rpl_end.inc
...@@ -115,7 +115,7 @@ SET GLOBAL master_verify_checksum=0; ...@@ -115,7 +115,7 @@ SET GLOBAL master_verify_checksum=0;
SET GLOBAL debug_dbug="+d,corrupt_read_log_event2"; SET GLOBAL debug_dbug="+d,corrupt_read_log_event2";
--connection slave --connection slave
START SLAVE IO_THREAD; START SLAVE IO_THREAD;
let $slave_io_errno= 1595,1722; let $slave_io_errno= 1595,1722,1923;
--source include/wait_for_slave_io_error.inc --source include/wait_for_slave_io_error.inc
--connection master --connection master
SET GLOBAL debug_dbug="-d,corrupt_read_log_event2"; SET GLOBAL debug_dbug="-d,corrupt_read_log_event2";
...@@ -127,7 +127,7 @@ SET GLOBAL master_verify_checksum=1; ...@@ -127,7 +127,7 @@ SET GLOBAL master_verify_checksum=1;
--connection slave --connection slave
SET GLOBAL debug_dbug="+d,corrupt_queue_event"; SET GLOBAL debug_dbug="+d,corrupt_queue_event";
START SLAVE IO_THREAD; START SLAVE IO_THREAD;
let $slave_io_errno= 1595,1722; let $slave_io_errno= 1595,1722,1923;
--source include/wait_for_slave_io_error.inc --source include/wait_for_slave_io_error.inc
SET GLOBAL debug_dbug="-d,corrupt_queue_event"; SET GLOBAL debug_dbug="-d,corrupt_queue_event";
......
--source include/master-slave.inc
--source include/have_perfschema.inc
--source include/have_binlog_format_mixed.inc
UPDATE performance_schema.setup_instruments SET ENABLED="NO";
--sync_slave_with_master
--source include/rpl_end.inc
# End of test case
...@@ -156,7 +156,7 @@ COMMIT; ...@@ -156,7 +156,7 @@ COMMIT;
--echo ## Inserting rows should give error here because connection should ## --echo ## Inserting rows should give error here because connection should ##
--echo ## disconnect after using COMMIT ## --echo ## disconnect after using COMMIT ##
--Error 2006,2013,ER_QUERY_INTERRUPTED --Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED
INSERT INTO t1 VALUES(4,'Record_4'); INSERT INTO t1 VALUES(4,'Record_4');
--echo switch to connection test_con2 --echo switch to connection test_con2
...@@ -171,7 +171,7 @@ INSERT INTO t1 VALUES(12,'Record_12'); ...@@ -171,7 +171,7 @@ INSERT INTO t1 VALUES(12,'Record_12');
ROLLBACK; ROLLBACK;
--echo ## Expect a failure due to COMMIT/ROLLBACK AND RELEASE behavior ## --echo ## Expect a failure due to COMMIT/ROLLBACK AND RELEASE behavior ##
--Error 2006,2013,ER_QUERY_INTERRUPTED --Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED
INSERT INTO t1 VALUES(4,'Record_4'); INSERT INTO t1 VALUES(4,'Record_4');
connection default; connection default;
......
...@@ -14,7 +14,7 @@ SET @old_slow_query_log= @@global.slow_query_log; ...@@ -14,7 +14,7 @@ SET @old_slow_query_log= @@global.slow_query_log;
# var/log/mysql_client_test.trace # var/log/mysql_client_test.trace
--exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1 --exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M --plugin-dir=$MYSQLTEST_VARDIR/plugins >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1 --exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
# End of 4.1 tests # End of 4.1 tests
echo ok; echo ok;
......
...@@ -10127,7 +10127,11 @@ void issue_long_find_row_warning(Log_event_type type, ...@@ -10127,7 +10127,11 @@ void issue_long_find_row_warning(Log_event_type type,
@note If the engine allows random access of the records, a combination of @note If the engine allows random access of the records, a combination of
@c position() and @c rnd_pos() will be used. @c position() and @c rnd_pos() will be used.
*/
Note that one MUST call ha_index_or_rnd_end() after this function if
it returns 0 as we must leave the row position in the handler intact
for any following update/delete command.
*/
int Rows_log_event::find_row(const Relay_log_info *rli) int Rows_log_event::find_row(const Relay_log_info *rli)
{ {
...@@ -10216,7 +10220,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli) ...@@ -10216,7 +10220,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
{ {
DBUG_PRINT("info",("ha_index_init returns error %d",error)); DBUG_PRINT("info",("ha_index_init returns error %d",error));
table->file->print_error(error, MYF(0)); table->file->print_error(error, MYF(0));
goto err; goto end;
} }
/* Fill key data for the row */ /* Fill key data for the row */
...@@ -10251,7 +10255,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli) ...@@ -10251,7 +10255,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
error= HA_ERR_KEY_NOT_FOUND; error= HA_ERR_KEY_NOT_FOUND;
table->file->print_error(error, MYF(0)); table->file->print_error(error, MYF(0));
table->file->ha_index_end(); table->file->ha_index_end();
goto err; goto end;
} }
/* /*
...@@ -10281,15 +10285,15 @@ int Rows_log_event::find_row(const Relay_log_info *rli) ...@@ -10281,15 +10285,15 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
/* Unique does not have non nullable part */ /* Unique does not have non nullable part */
if (!(table->key_info->flags & (HA_NULL_PART_KEY))) if (!(table->key_info->flags & (HA_NULL_PART_KEY)))
{ {
table->file->ha_index_end(); error= 0;
goto ok; goto end;
} }
else else
{ {
KEY *keyinfo= table->key_info; KEY *keyinfo= table->key_info;
/* /*
Unique has nullable part. We need to check if there is any field in the Unique has nullable part. We need to check if there is any
BI image that is null and part of UNNI. field in the BI image that is null and part of UNNI.
*/ */
bool null_found= FALSE; bool null_found= FALSE;
for (uint i=0; i < keyinfo->key_parts && !null_found; i++) for (uint i=0; i < keyinfo->key_parts && !null_found; i++)
...@@ -10301,8 +10305,8 @@ int Rows_log_event::find_row(const Relay_log_info *rli) ...@@ -10301,8 +10305,8 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
if (!null_found) if (!null_found)
{ {
table->file->ha_index_end(); error= 0;
goto ok; goto end;
} }
/* else fall through to index scan */ /* else fall through to index scan */
...@@ -10345,14 +10349,9 @@ int Rows_log_event::find_row(const Relay_log_info *rli) ...@@ -10345,14 +10349,9 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
DBUG_PRINT("info",("no record matching the given row found")); DBUG_PRINT("info",("no record matching the given row found"));
table->file->print_error(error, MYF(0)); table->file->print_error(error, MYF(0));
table->file->ha_index_end(); table->file->ha_index_end();
goto err; goto end;
} }
} }
/*
Have to restart the scan to be able to fetch the next row.
*/
table->file->ha_index_end();
} }
else else
{ {
...@@ -10360,14 +10359,12 @@ int Rows_log_event::find_row(const Relay_log_info *rli) ...@@ -10360,14 +10359,12 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
/* We use this to test that the correct key is used in test cases. */ /* We use this to test that the correct key is used in test cases. */
DBUG_EXECUTE_IF("slave_crash_if_table_scan", abort();); DBUG_EXECUTE_IF("slave_crash_if_table_scan", abort(););
int restart_count= 0; // Number of times scanning has restarted from top
/* We don't have a key: search the table using rnd_next() */ /* We don't have a key: search the table using rnd_next() */
if ((error= table->file->ha_rnd_init_with_error(1))) if ((error= table->file->ha_rnd_init_with_error(1)))
{ {
DBUG_PRINT("info",("error initializing table scan" DBUG_PRINT("info",("error initializing table scan"
" (ha_rnd_init returns %d)",error)); " (ha_rnd_init returns %d)",error));
goto err; goto end;
} }
is_table_scan= true; is_table_scan= true;
...@@ -10383,8 +10380,14 @@ int Rows_log_event::find_row(const Relay_log_info *rli) ...@@ -10383,8 +10380,14 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
switch (error) { switch (error) {
case 0: case 0:
DBUG_DUMP("record found", table->record[0], table->s->reclength);
break; break;
case HA_ERR_END_OF_FILE:
DBUG_PRINT("info", ("Record not found"));
table->file->ha_rnd_end();
goto end;
/* /*
If the record was deleted, we pick the next one without doing If the record was deleted, we pick the next one without doing
any comparisons. any comparisons.
...@@ -10392,58 +10395,28 @@ int Rows_log_event::find_row(const Relay_log_info *rli) ...@@ -10392,58 +10395,28 @@ int Rows_log_event::find_row(const Relay_log_info *rli)
case HA_ERR_RECORD_DELETED: case HA_ERR_RECORD_DELETED:
goto restart_rnd_next; goto restart_rnd_next;
case HA_ERR_END_OF_FILE:
if (++restart_count < 2)
{
int error2;
if ((error2= table->file->ha_rnd_init_with_error(1)))
{
error= error2;
goto err;
}
}
break;
default: default:
DBUG_PRINT("info", ("Failed to get next record" DBUG_PRINT("info", ("Failed to get next record"
" (rnd_next returns %d)",error)); " (rnd_next returns %d)",error));
table->file->print_error(error, MYF(0)); table->file->print_error(error, MYF(0));
table->file->ha_rnd_end(); table->file->ha_rnd_end();
goto err; goto end;
} }
} }
while (restart_count < 2 && record_compare(table)); while (record_compare(table));
/* /*
Note: above record_compare will take into accout all record fields Note: above record_compare will take into accout all record fields
which might be incorrect in case a partial row was given in the event which might be incorrect in case a partial row was given in the event
*/ */
/*
Have to restart the scan to be able to fetch the next row.
*/
if (restart_count == 2)
DBUG_PRINT("info", ("Record not found"));
else
DBUG_DUMP("record found", table->record[0], table->s->reclength);
table->file->ha_rnd_end();
DBUG_ASSERT(error == HA_ERR_END_OF_FILE || error == 0); DBUG_ASSERT(error == HA_ERR_END_OF_FILE || error == 0);
goto err;
} }
ok:
if (is_table_scan || is_index_scan)
issue_long_find_row_warning(get_type_code(), m_table->alias.c_ptr(),
is_index_scan, rli);
table->default_column_bitmaps(); end:
DBUG_RETURN(0);
err:
if (is_table_scan || is_index_scan) if (is_table_scan || is_index_scan)
issue_long_find_row_warning(get_type_code(), m_table->alias.c_ptr(), issue_long_find_row_warning(get_type_code(), m_table->alias.c_ptr(),
is_index_scan, rli); is_index_scan, rli);
table->default_column_bitmaps(); table->default_column_bitmaps();
DBUG_RETURN(error); DBUG_RETURN(error);
} }
...@@ -10516,6 +10489,7 @@ int Delete_rows_log_event::do_exec_row(const Relay_log_info *const rli) ...@@ -10516,6 +10489,7 @@ int Delete_rows_log_event::do_exec_row(const Relay_log_info *const rli)
Delete the record found, located in record[0] Delete the record found, located in record[0]
*/ */
error= m_table->file->ha_delete_row(m_table->record[0]); error= m_table->file->ha_delete_row(m_table->record[0]);
m_table->file->ha_index_or_rnd_end();
} }
return error; return error;
} }
...@@ -10658,7 +10632,7 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli) ...@@ -10658,7 +10632,7 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli)
m_curr_row= m_curr_row_end; m_curr_row= m_curr_row_end;
/* this also updates m_curr_row_end */ /* this also updates m_curr_row_end */
if ((error= unpack_current_row(rli))) if ((error= unpack_current_row(rli)))
return error; goto err;
/* /*
Now we have the right row to update. The old row (the one we're Now we have the right row to update. The old row (the one we're
...@@ -10678,6 +10652,8 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli) ...@@ -10678,6 +10652,8 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli)
if (error == HA_ERR_RECORD_IS_THE_SAME) if (error == HA_ERR_RECORD_IS_THE_SAME)
error= 0; error= 0;
err:
m_table->file->ha_index_or_rnd_end();
return error; return error;
} }
......
...@@ -2218,7 +2218,11 @@ Old_rows_log_event::write_row(const Relay_log_info *const rli, ...@@ -2218,7 +2218,11 @@ Old_rows_log_event::write_row(const Relay_log_info *const rli,
@note If the engine allows random access of the records, a combination of @note If the engine allows random access of the records, a combination of
@c position() and @c rnd_pos() will be used. @c position() and @c rnd_pos() will be used.
*/
Note that one MUST call ha_index_or_rnd_end() after this function if
it returns 0 as we must leave the row position in the handler intact
for any following update/delete command.
*/
int Old_rows_log_event::find_row(const Relay_log_info *rli) int Old_rows_log_event::find_row(const Relay_log_info *rli)
{ {
...@@ -2361,15 +2365,14 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli) ...@@ -2361,15 +2365,14 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli)
/* Unique does not have non nullable part */ /* Unique does not have non nullable part */
if (!(table->key_info->flags & (HA_NULL_PART_KEY))) if (!(table->key_info->flags & (HA_NULL_PART_KEY)))
{ {
table->file->ha_index_end();
DBUG_RETURN(0); DBUG_RETURN(0);
} }
else else
{ {
KEY *keyinfo= table->key_info; KEY *keyinfo= table->key_info;
/* /*
Unique has nullable part. We need to check if there is any field in the Unique has nullable part. We need to check if there is any
BI image that is null and part of UNNI. field in the BI image that is null and part of UNNI.
*/ */
bool null_found= FALSE; bool null_found= FALSE;
for (uint i=0; i < keyinfo->key_parts && !null_found; i++) for (uint i=0; i < keyinfo->key_parts && !null_found; i++)
...@@ -2381,7 +2384,6 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli) ...@@ -2381,7 +2384,6 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli)
if (!null_found) if (!null_found)
{ {
table->file->ha_index_end();
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -2424,11 +2426,6 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli) ...@@ -2424,11 +2426,6 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli)
DBUG_RETURN(error); DBUG_RETURN(error);
} }
} }
/*
Have to restart the scan to be able to fetch the next row.
*/
table->file->ha_index_end();
} }
else else
{ {
...@@ -2462,8 +2459,10 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli) ...@@ -2462,8 +2459,10 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli)
if (++restart_count < 2) if (++restart_count < 2)
{ {
int error2; int error2;
table->file->ha_rnd_end();
if ((error2= table->file->ha_rnd_init_with_error(1))) if ((error2= table->file->ha_rnd_init_with_error(1)))
DBUG_RETURN(error2); DBUG_RETURN(error2);
goto restart_rnd_next;
} }
break; break;
...@@ -2489,6 +2488,7 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli) ...@@ -2489,6 +2488,7 @@ int Old_rows_log_event::find_row(const Relay_log_info *rli)
DBUG_PRINT("info", ("Record not found")); DBUG_PRINT("info", ("Record not found"));
else else
DBUG_DUMP("record found", table->record[0], table->s->reclength); DBUG_DUMP("record found", table->record[0], table->s->reclength);
if (error)
table->file->ha_rnd_end(); table->file->ha_rnd_end();
DBUG_ASSERT(error == HA_ERR_END_OF_FILE || error == 0); DBUG_ASSERT(error == HA_ERR_END_OF_FILE || error == 0);
...@@ -2738,6 +2738,7 @@ int Delete_rows_log_event_old::do_exec_row(const Relay_log_info *const rli) ...@@ -2738,6 +2738,7 @@ int Delete_rows_log_event_old::do_exec_row(const Relay_log_info *const rli)
Delete the record found, located in record[0] Delete the record found, located in record[0]
*/ */
error= m_table->file->ha_delete_row(m_table->record[0]); error= m_table->file->ha_delete_row(m_table->record[0]);
m_table->file->ha_index_or_rnd_end();
} }
return error; return error;
} }
...@@ -2874,6 +2875,8 @@ Update_rows_log_event_old::do_exec_row(const Relay_log_info *const rli) ...@@ -2874,6 +2875,8 @@ Update_rows_log_event_old::do_exec_row(const Relay_log_info *const rli)
#endif #endif
error= m_table->file->ha_update_row(m_table->record[1], m_table->record[0]); error= m_table->file->ha_update_row(m_table->record[1], m_table->record[0]);
m_table->file->ha_index_or_rnd_end();
if (error == HA_ERR_RECORD_IS_THE_SAME) if (error == HA_ERR_RECORD_IS_THE_SAME)
error= 0; error= 0;
......
...@@ -55,11 +55,9 @@ ut_dbg_assertion_failed( ...@@ -55,11 +55,9 @@ ut_dbg_assertion_failed(
ulint line) /*!< in: line number of the assertion */ ulint line) /*!< in: line number of the assertion */
UNIV_COLD __attribute__((nonnull(2))); UNIV_COLD __attribute__((nonnull(2)));
#if defined(__WIN__) || defined(__INTEL_COMPILER)
# undef UT_DBG_USE_ABORT #define UT_DBG_USE_ABORT
#elif defined(__GNUC__) && (__GNUC__ > 2)
# define UT_DBG_USE_ABORT
#endif
#ifndef UT_DBG_USE_ABORT #ifndef UT_DBG_USE_ABORT
/** A null pointer that will be dereferenced to trigger a memory trap */ /** A null pointer that will be dereferenced to trigger a memory trap */
...@@ -83,7 +81,11 @@ ut_dbg_stop_thread( ...@@ -83,7 +81,11 @@ ut_dbg_stop_thread(
#ifdef UT_DBG_USE_ABORT #ifdef UT_DBG_USE_ABORT
/** Abort the execution. */ /** Abort the execution. */
#ifdef _WIN32
# define UT_DBG_PANIC __debugbreak()
#else
# define UT_DBG_PANIC abort() # define UT_DBG_PANIC abort()
#endif
/** Stop threads (null operation) */ /** Stop threads (null operation) */
# define UT_DBG_STOP do {} while (0) # define UT_DBG_STOP do {} while (0)
#else /* UT_DBG_USE_ABORT */ #else /* UT_DBG_USE_ABORT */
......
...@@ -1672,18 +1672,26 @@ int ha_myisam::index_init(uint idx, bool sorted) ...@@ -1672,18 +1672,26 @@ int ha_myisam::index_init(uint idx, bool sorted)
int ha_myisam::index_end() int ha_myisam::index_end()
{ {
DBUG_ENTER("ha_myisam::index_end");
active_index=MAX_KEY; active_index=MAX_KEY;
//pushed_idx_cond_keyno= MAX_KEY; //pushed_idx_cond_keyno= MAX_KEY;
mi_set_index_cond_func(file, NULL, 0); mi_set_index_cond_func(file, NULL, 0);
in_range_check_pushed_down= FALSE; in_range_check_pushed_down= FALSE;
ds_mrr.dsmrr_close(); ds_mrr.dsmrr_close();
return 0; #if !defined(DBUG_OFF) && defined(SQL_SELECT_FIXED_FOR_UPDATE)
file->update&= ~HA_STATE_AKTIV; // Forget active row
#endif
DBUG_RETURN(0);
} }
int ha_myisam::rnd_end() int ha_myisam::rnd_end()
{ {
DBUG_ENTER("ha_myisam::rnd_end");
ds_mrr.dsmrr_close(); ds_mrr.dsmrr_close();
return 0; #if !defined(DBUG_OFF) && defined(SQL_SELECT_FIXED_FOR_UPDATE)
file->update&= ~HA_STATE_AKTIV; // Forget active row
#endif
DBUG_RETURN(0);
} }
int ha_myisam::index_read_map(uchar *buf, const uchar *key, int ha_myisam::index_read_map(uchar *buf, const uchar *key,
...@@ -1785,6 +1793,7 @@ void ha_myisam::position(const uchar *record) ...@@ -1785,6 +1793,7 @@ void ha_myisam::position(const uchar *record)
{ {
my_off_t row_position= mi_position(file); my_off_t row_position= mi_position(file);
my_store_ptr(ref, ref_length, row_position); my_store_ptr(ref, ref_length, row_position);
file->update|= HA_STATE_AKTIV; // Row can be updated
} }
int ha_myisam::info(uint flag) int ha_myisam::info(uint flag)
......
...@@ -70,9 +70,13 @@ public: ...@@ -70,9 +70,13 @@ public:
Without HA_FAST_KEY_READ, the optimizer reads all columns and never Without HA_FAST_KEY_READ, the optimizer reads all columns and never
calls ::rnd_pos(), so it is guaranteed to return only thread <n> calls ::rnd_pos(), so it is guaranteed to return only thread <n>
records. records.
We use HA_HAS_OWN_BINLOGGING to stop changes to this table to
be logged to slaves (as enabled performance tracking on all slaves
is probably not what anyone wants)
*/ */
return HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_NO_AUTO_INCREMENT | return (HA_NO_TRANSACTIONS | HA_REC_NOT_IN_SEQ | HA_NO_AUTO_INCREMENT |
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_NO_BLOBS; HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
HA_HAS_OWN_BINLOGGING | HA_NO_BLOBS);
} }
/** /**
......
...@@ -266,4 +266,4 @@ IF(WITH_INNODB) ...@@ -266,4 +266,4 @@ IF(WITH_INNODB)
ENDIF() ENDIF()
MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE DEFAULT MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE DEFAULT
LINK_LIBRARIES ${ZLIB_LIBRARY}) LINK_LIBRARIES ${ZLIB_LIBRARY} RECOMPILE_FOR_EMBEDDED)
...@@ -23,6 +23,7 @@ Smart ALTER TABLE ...@@ -23,6 +23,7 @@ Smart ALTER TABLE
#include <unireg.h> #include <unireg.h>
#include <mysqld_error.h> #include <mysqld_error.h>
#include <sql_class.h>
#include <sql_lex.h> // SQLCOM_CREATE_INDEX #include <sql_lex.h> // SQLCOM_CREATE_INDEX
#include <mysql/innodb_priv.h> #include <mysql/innodb_priv.h>
......
...@@ -55,11 +55,9 @@ ut_dbg_assertion_failed( ...@@ -55,11 +55,9 @@ ut_dbg_assertion_failed(
ulint line) /*!< in: line number of the assertion */ ulint line) /*!< in: line number of the assertion */
UNIV_COLD __attribute__((nonnull(2))); UNIV_COLD __attribute__((nonnull(2)));
#if defined(__WIN__) || defined(__INTEL_COMPILER)
# undef UT_DBG_USE_ABORT #define UT_DBG_USE_ABORT
#elif defined(__GNUC__) && (__GNUC__ > 2)
# define UT_DBG_USE_ABORT
#endif
#ifndef UT_DBG_USE_ABORT #ifndef UT_DBG_USE_ABORT
/** A null pointer that will be dereferenced to trigger a memory trap */ /** A null pointer that will be dereferenced to trigger a memory trap */
...@@ -83,7 +81,11 @@ ut_dbg_stop_thread( ...@@ -83,7 +81,11 @@ ut_dbg_stop_thread(
#ifdef UT_DBG_USE_ABORT #ifdef UT_DBG_USE_ABORT
/** Abort the execution. */ /** Abort the execution. */
#ifdef _WIN32
# define UT_DBG_PANIC __debugbreak()
#else
# define UT_DBG_PANIC abort() # define UT_DBG_PANIC abort()
#endif
/** Stop threads (null operation) */ /** Stop threads (null operation) */
# define UT_DBG_STOP do {} while (0) # define UT_DBG_STOP do {} while (0)
#else /* UT_DBG_USE_ABORT */ #else /* UT_DBG_USE_ABORT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment