summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-10-12 10:03:04 +0200
committerSergei Golubchik <serg@mariadb.org>2015-10-12 10:03:04 +0200
commite19a6f3dca7509eb8e042796a9311dba937ad9d7 (patch)
tree8eb1587285f8d06f57f1915c7ac212ef3e4d4a60
parent0b4c3ad8181b909a3af04847e229900b1e9c5232 (diff)
parentdfb74dea300f83880c11600dc726a9cae559f356 (diff)
downloadmariadb-git-e19a6f3dca7509eb8e042796a9311dba937ad9d7.tar.gz
Merge branch 'bb-10.1-serg' into 10.1
-rw-r--r--client/CMakeLists.txt3
-rw-r--r--client/mysqlimport.c5
-rw-r--r--cmake/os/Windows.cmake10
-rw-r--r--extra/yassl/README29
-rw-r--r--extra/yassl/include/openssl/ssl.h2
-rw-r--r--extra/yassl/include/yassl_error.hpp3
-rw-r--r--extra/yassl/src/buffer.cpp2
-rw-r--r--extra/yassl/src/handshake.cpp2
-rw-r--r--extra/yassl/src/ssl.cpp29
-rw-r--r--extra/yassl/src/yassl_error.cpp4
-rw-r--r--extra/yassl/src/yassl_imp.cpp15
-rw-r--r--extra/yassl/taocrypt/src/asn.cpp9
-rw-r--r--extra/yassl/taocrypt/src/rsa.cpp4
-rw-r--r--extra/yassl/testsuite/cipher-test.sh1
-rw-r--r--include/maria.h2
-rw-r--r--include/my_alarm.h2
-rw-r--r--include/my_base.h8
-rw-r--r--include/my_dbug.h4
-rw-r--r--include/my_global.h2
-rw-r--r--include/my_pthread.h8
-rw-r--r--include/my_sys.h12
-rw-r--r--include/mysql.h4
-rw-r--r--man/aria_chk.13
-rw-r--r--man/aria_dump_log.15
-rw-r--r--man/aria_ftdump.13
-rw-r--r--man/aria_pack.13
-rw-r--r--man/aria_read_log.13
-rw-r--r--man/comp_err.123
-rw-r--r--man/innochecksum.142
-rw-r--r--man/make_win_bin_dist.117
-rw-r--r--man/msql2mysql.117
-rw-r--r--man/my_print_defaults.141
-rw-r--r--man/myisam_ftdump.117
-rw-r--r--man/myisamchk.1185
-rw-r--r--man/myisamlog.117
-rw-r--r--man/myisampack.119
-rw-r--r--man/mysql-stress-test.pl.123
-rw-r--r--man/mysql-test-run.pl.1537
-rw-r--r--man/mysql.1497
-rw-r--r--man/mysql.server.144
-rw-r--r--man/mysql_client_test.125
-rw-r--r--man/mysql_config.139
-rw-r--r--man/mysql_convert_table_format.126
-rw-r--r--man/mysql_find_rows.117
-rw-r--r--man/mysql_fix_extensions.117
-rw-r--r--man/mysql_install_db.1154
-rw-r--r--man/mysql_plugin.137
-rw-r--r--man/mysql_secure_installation.121
-rw-r--r--man/mysql_setpermission.135
-rw-r--r--man/mysql_tzinfo_to_sql.120
-rw-r--r--man/mysql_upgrade.1450
-rw-r--r--man/mysql_waitpid.117
-rw-r--r--man/mysql_zap.117
-rw-r--r--man/mysqlaccess.128
-rw-r--r--man/mysqladmin.1220
-rw-r--r--man/mysqlbinlog.1264
-rw-r--r--man/mysqlbug.125
-rw-r--r--man/mysqlcheck.1320
-rw-r--r--man/mysqld.834
-rw-r--r--man/mysqld_multi.1123
-rw-r--r--man/mysqld_safe.1202
-rw-r--r--man/mysqldump.1588
-rw-r--r--man/mysqldumpslow.126
-rw-r--r--man/mysqlhotcopy.139
-rw-r--r--man/mysqlimport.1223
-rw-r--r--man/mysqlshow.1225
-rw-r--r--man/mysqlslap.1327
-rw-r--r--man/mysqltest.1363
-rw-r--r--man/perror.119
-rw-r--r--man/replace.117
-rw-r--r--man/resolve_stack_dump.117
-rw-r--r--man/resolveip.117
-rw-r--r--mysql-test/disabled.def2
-rw-r--r--mysql-test/include/restart_mysqld.inc20
-rwxr-xr-xmysql-test/mysql-test-run.pl5
-rw-r--r--mysql-test/r/explain_non_select.result41
-rw-r--r--mysql-test/r/func_if.result14
-rw-r--r--mysql-test/r/func_misc.result204
-rw-r--r--mysql-test/r/information_schema2.result24
-rw-r--r--mysql-test/r/loadxml.result27
-rw-r--r--mysql-test/r/lowercase_fs_on.result3
-rw-r--r--mysql-test/r/lowercase_table3.result11
-rw-r--r--mysql-test/r/mysqld--help.result4
-rw-r--r--mysql-test/r/mysqldump.result30
-rw-r--r--mysql-test/r/partition_alter.result53
-rw-r--r--mysql-test/r/partition_error.result2
-rw-r--r--mysql-test/r/set_statement.result1
-rw-r--r--mysql-test/r/subselect.result70
-rw-r--r--mysql-test/r/subselect_no_exists_to_in.result70
-rw-r--r--mysql-test/r/subselect_no_mat.result70
-rw-r--r--mysql-test/r/subselect_no_opts.result70
-rw-r--r--mysql-test/r/subselect_no_scache.result70
-rw-r--r--mysql-test/r/subselect_no_semijoin.result70
-rw-r--r--mysql-test/r/update.result15
-rw-r--r--mysql-test/r/view.result35
-rw-r--r--mysql-test/std_data/bug16171518_1.dat59
-rw-r--r--mysql-test/std_data/bug16171518_2.dat12
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result6
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result72
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result72
-rw-r--r--mysql-test/suite/encryption/r/filekeys_nofile.result4
-rw-r--r--mysql-test/suite/encryption/t/filekeys_nofile.test2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug68148.result36
-rw-r--r--mysql-test/suite/innodb/r/innodb_simulate_comp_failures.result2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60229-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60229.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug68148.test41
-rw-r--r--mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test4
-rw-r--r--mysql-test/suite/innodb/t/xa_recovery.test6
-rw-r--r--mysql-test/suite/jp/t/jp_enum_sjis-master.opt1
-rw-r--r--mysql-test/suite/jp/t/jp_enum_sjis.test4
-rw-r--r--mysql-test/suite/jp/t/jp_enum_ucs2-master.opt1
-rw-r--r--mysql-test/suite/jp/t/jp_enum_ucs2.test4
-rw-r--r--mysql-test/suite/jp/t/jp_enum_ujis-master.opt1
-rw-r--r--mysql-test/suite/jp/t/jp_enum_ujis.test4
-rw-r--r--mysql-test/suite/jp/t/jp_enum_utf8-master.opt1
-rw-r--r--mysql-test/suite/jp/t/jp_enum_utf8.test4
-rw-r--r--mysql-test/suite/perfschema/r/misc.result15
-rw-r--r--mysql-test/suite/perfschema/r/query_cache.result4
-rw-r--r--mysql-test/suite/perfschema/t/misc.test20
-rw-r--r--mysql-test/suite/perfschema/t/query_cache.test2
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_load.result8
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_send.result8
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_load.test20
-rw-r--r--mysql-test/suite/plugins/t/feedback_plugin_send.test9
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_reset_slave.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_to_stmt.result28
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_triggers_sbr.result14
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_reset_slave.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_innodb_bug30888.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_to_stmt-master.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_to_stmt-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_to_stmt.test23
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_triggers_sbr.test43
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff4
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff4
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result2
-rw-r--r--mysql-test/t/explain_non_select.test42
-rw-r--r--mysql-test/t/func_if.test14
-rw-r--r--mysql-test/t/func_misc.test207
-rw-r--r--mysql-test/t/information_schema2.test19
-rw-r--r--mysql-test/t/loadxml.test14
-rw-r--r--mysql-test/t/lowercase_fs_on.test38
-rw-r--r--mysql-test/t/lowercase_table3-master.opt1
-rw-r--r--mysql-test/t/lowercase_table3.test37
-rw-r--r--mysql-test/t/mysqldump.test37
-rw-r--r--mysql-test/t/partition_alter.test66
-rw-r--r--mysql-test/t/partition_error.test2
-rw-r--r--mysql-test/t/set_statement.test1
-rw-r--r--mysql-test/t/subselect.test76
-rw-r--r--mysql-test/t/update.test15
-rw-r--r--mysql-test/t/view.test44
-rw-r--r--plugin/file_key_management/file_key_management_plugin.cc8
-rw-r--r--plugin/file_key_management/parser.cc12
-rw-r--r--scripts/mysql_install_db.sh4
-rw-r--r--sql/field.h20
-rw-r--r--sql/field_conv.cc16
-rw-r--r--sql/item_cmpfunc.cc54
-rw-r--r--sql/item_func.cc50
-rw-r--r--sql/item_func.h42
-rw-r--r--sql/item_subselect.cc28
-rw-r--r--sql/item_subselect.h6
-rw-r--r--sql/log_event.cc131
-rw-r--r--sql/log_event.h74
-rw-r--r--sql/log_slow.h28
-rw-r--r--sql/mysqld.cc31
-rw-r--r--sql/opt_range.cc20
-rw-r--r--sql/opt_subselect.cc49
-rw-r--r--sql/partition_info.cc53
-rw-r--r--sql/slave.cc6
-rw-r--r--sql/sql_acl.cc56
-rw-r--r--sql/sql_admin.h2
-rw-r--r--sql/sql_base.cc14
-rw-r--r--sql/sql_class.cc15
-rw-r--r--sql/sql_const.h4
-rw-r--r--sql/sql_handler.cc37
-rw-r--r--sql/sql_handler.h5
-rw-r--r--sql/sql_insert.cc44
-rw-r--r--sql/sql_load.cc13
-rw-r--r--sql/sql_parse.cc44
-rw-r--r--sql/sql_repl.cc19
-rw-r--r--sql/sql_select.cc5
-rw-r--r--sql/sql_show.cc19
-rw-r--r--sql/sql_yacc.yy10
-rw-r--r--sql/threadpool_unix.cc2
-rw-r--r--sql/unireg.h12
-rw-r--r--storage/archive/archive_test.c2
-rw-r--r--storage/connect/tabmul.cpp2
-rw-r--r--storage/federated/ha_federated.h2
-rw-r--r--storage/innobase/CMakeLists.txt21
-rw-r--r--storage/innobase/btr/btr0cur.cc34
-rw-r--r--storage/innobase/buf/buf0buf.cc47
-rw-r--r--storage/innobase/dict/dict0dict.cc58
-rw-r--r--storage/innobase/handler/ha_innodb.cc30
-rw-r--r--storage/innobase/handler/handler0alter.cc2
-rw-r--r--storage/innobase/include/dict0dict.h28
-rw-r--r--storage/innobase/include/ibuf0ibuf.ic5
-rw-r--r--storage/innobase/include/os0sync.h167
-rw-r--r--storage/innobase/include/srv0srv.h7
-rw-r--r--storage/innobase/include/sync0sync.h9
-rw-r--r--storage/innobase/include/sync0sync.ic19
-rw-r--r--storage/innobase/include/univ.i2
-rw-r--r--storage/innobase/lock/lock0lock.cc7
-rw-r--r--storage/innobase/log/log0log.cc8
-rw-r--r--storage/innobase/row/row0ins.cc2
-rw-r--r--storage/innobase/row/row0log.cc4
-rw-r--r--storage/innobase/srv/srv0srv.cc28
-rw-r--r--storage/innobase/srv/srv0start.cc5
-rw-r--r--storage/innobase/trx/trx0sys.cc22
-rw-r--r--storage/maria/ma_blockrec.h2
-rw-r--r--storage/myisam/myisamdef.h2
-rw-r--r--storage/perfschema/ha_perfschema.cc2
-rw-r--r--storage/perfschema/pfs.cc1
-rw-r--r--storage/perfschema/pfs_timer.cc40
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result32
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test34
-rw-r--r--storage/xtradb/api/api0api.cc12
-rw-r--r--storage/xtradb/btr/btr0cur.cc8
-rw-r--r--storage/xtradb/buf/buf0flu.cc21
-rw-r--r--storage/xtradb/dict/dict0dict.cc65
-rw-r--r--storage/xtradb/dict/dict0stats_bg.cc8
-rw-r--r--storage/xtradb/fil/fil0fil.cc9
-rw-r--r--storage/xtradb/handler/ha_innodb.cc92
-rw-r--r--storage/xtradb/handler/handler0alter.cc166
-rw-r--r--storage/xtradb/ibuf/ibuf0ibuf.cc4
-rw-r--r--storage/xtradb/include/dict0dict.h27
-rw-r--r--storage/xtradb/include/dict0dict.ic4
-rw-r--r--storage/xtradb/include/fts0fts.h2
-rw-r--r--storage/xtradb/include/row0purge.h12
-rw-r--r--storage/xtradb/include/univ.i5
-rw-r--r--storage/xtradb/log/log0log.cc3
-rw-r--r--storage/xtradb/os/os0file.cc18
-rw-r--r--storage/xtradb/row/row0import.cc107
-rw-r--r--storage/xtradb/row/row0ins.cc71
-rw-r--r--storage/xtradb/row/row0log.cc4
-rw-r--r--storage/xtradb/row/row0purge.cc79
-rw-r--r--storage/xtradb/row/row0sel.cc2
-rw-r--r--storage/xtradb/srv/srv0srv.cc3
-rw-r--r--storage/xtradb/srv/srv0start.cc27
-rw-r--r--strings/conf_to_src.c2
-rw-r--r--strings/ctype.c2
-rw-r--r--win/packaging/ca/CustomAction.cpp2
244 files changed, 7246 insertions, 2756 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 1bf466c1e47..e4643ad9358 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
#
# 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
@@ -51,6 +51,7 @@ MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
TARGET_LINK_LIBRARIES(mysqldump mysqlclient)
MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c)
+SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient)
MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c COMPONENT Server)
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index cf1df1e95d8..2363f1b69df 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -1,5 +1,6 @@
/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates.
+ Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2015, MariaDB
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
@@ -30,7 +31,6 @@
#include "client_priv.h"
#include "mysql_version.h"
-#include <my_pthread.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
@@ -484,7 +484,6 @@ static void db_disconnect(char *host, MYSQL *mysql)
}
-
static void safe_exit(int error, MYSQL *mysql)
{
if (error && ignore_errors)
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake
index 5a6e51e4120..c61e4f9d941 100644
--- a/cmake/os/Windows.cmake
+++ b/cmake/os/Windows.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
# 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
@@ -49,10 +49,12 @@ IF(CMAKE_C_COMPILER MATCHES "icl")
SET(MSVC TRUE)
ENDIF()
-ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
-ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501")
+ADD_DEFINITIONS(-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE)
+ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501)
+# We do not want the windows.h macros min/max
+ADD_DEFINITIONS(-DNOMINMAX)
# Speed up build process excluding unused header files
-ADD_DEFINITIONS("-DWIN32_LEAN_AND_MEAN")
+ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)
# Adjust compiler and linker flags
IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
diff --git a/extra/yassl/README b/extra/yassl/README
index da399c3d141..bf0e1c9f40f 100644
--- a/extra/yassl/README
+++ b/extra/yassl/README
@@ -12,6 +12,35 @@ before calling SSL_new();
*** end Note ***
+yaSSL Release notes, version 2.3.8 (9/17/2015)
+ This release of yaSSL fixes a high security vulnerability. All users
+ SHOULD update. If using yaSSL for TLS on the server side with private
+ RSA keys allowing ephemeral key exchange you MUST update and regenerate
+ the RSA private keys. This report is detailed in:
+ https://people.redhat.com/~fweimer/rsa-crt-leaks.pdf
+ yaSSL now detects RSA signature faults and returns an error.
+
+yaSSL Patch notes, version 2.3.7e (6/26/2015)
+ This release of yaSSL includes a fix for Date less than comparison.
+ Previously yaSSL would return true on less than comparisons if the Dates
+ were equal. Reported by Oracle. No security problem, but if a cert was
+ generated right now, a server started using it in the same second, and a
+ client tried to verify it in the same second it would report not yet valid.
+
+yaSSL Patch notes, version 2.3.7d (6/22/2015)
+ This release of yaSSL includes a fix for input_buffer set_current with
+ index 0. SSL_peek() at front of waiting data could trigger. Robert
+ Golebiowski of Oracle identified and suggested a fix, thanks!
+
+yaSSL Patch notes, version 2.3.7c (6/12/2015)
+ This release of yaSSL does certificate DATE comparisons to the second
+ instead of to the minute, helpful when using freshly generated certs.
+ Though keep in mind that time sync differences could still show up.
+
+yaSSL Patch notes, version 2.3.7b (3/18/2015)
+ This release of yaSSL fixes a potential crash with corrupted private keys.
+ Also detects bad keys earlier for user.
+
yaSSL Release notes, version 2.3.7 (12/10/2014)
This release of yaSSL fixes the potential to process duplicate handshake
messages by explicitly marking/checking received handshake messages.
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
index 404ffa29275..bec22427332 100644
--- a/extra/yassl/include/openssl/ssl.h
+++ b/extra/yassl/include/openssl/ssl.h
@@ -34,7 +34,7 @@
#include "rsa.h"
-#define YASSL_VERSION "2.3.7"
+#define YASSL_VERSION "2.3.8"
#if defined(__cplusplus)
diff --git a/extra/yassl/include/yassl_error.hpp b/extra/yassl/include/yassl_error.hpp
index beba7b0b5dd..d63244dca90 100644
--- a/extra/yassl/include/yassl_error.hpp
+++ b/extra/yassl/include/yassl_error.hpp
@@ -53,7 +53,8 @@ enum YasslError {
compress_error = 118,
decompress_error = 119,
pms_version_error = 120,
- sanityCipher_error = 121
+ sanityCipher_error = 121,
+ rsaSignFault_error = 122
// !!!! add error message to .cpp !!!!
diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp
index ee5e0cc0793..532da3875a7 100644
--- a/extra/yassl/src/buffer.cpp
+++ b/extra/yassl/src/buffer.cpp
@@ -165,7 +165,7 @@ void input_buffer::set_error()
void input_buffer::set_current(uint i)
{
- if (error_ == 0 && (i == 0 || check(i - 1, size_) == 0))
+ if (error_ == 0 && check(i ? i - 1 : 0, size_) == 0)
current_ = i;
else
error_ = -1;
diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp
index 39bcd9745b4..407e4092ccc 100644
--- a/extra/yassl/src/handshake.cpp
+++ b/extra/yassl/src/handshake.cpp
@@ -1173,6 +1173,8 @@ void sendCertificateVerify(SSL& ssl, BufferOutput buffer)
CertificateVerify verify;
verify.Build(ssl);
+ if (ssl.GetError()) return;
+
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
index 111da306b4d..ccc1ad24b39 100644
--- a/extra/yassl/src/ssl.cpp
+++ b/extra/yassl/src/ssl.cpp
@@ -37,6 +37,8 @@
#include "file.hpp" // for TaoCrypt Source
#include "coding.hpp" // HexDecoder
#include "helpers.hpp" // for placement new hack
+#include "rsa.hpp" // for TaoCrypt RSA key decode
+#include "dsa.hpp" // for TaoCrypt DSA key decode
#include <stdio.h>
#include <time.h>
@@ -55,6 +57,8 @@ namespace yaSSL {
int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
{
+ int ret = SSL_SUCCESS;
+
if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM)
return SSL_BAD_FILETYPE;
@@ -142,8 +146,31 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
}
}
}
+
+ if (type == PrivateKey && ctx->privateKey_) {
+ // see if key is valid early
+ TaoCrypt::Source rsaSource(ctx->privateKey_->get_buffer(),
+ ctx->privateKey_->get_length());
+ TaoCrypt::RSA_PrivateKey rsaKey;
+ rsaKey.Initialize(rsaSource);
+
+ if (rsaSource.GetError().What()) {
+ // rsa failed see if DSA works
+
+ TaoCrypt::Source dsaSource(ctx->privateKey_->get_buffer(),
+ ctx->privateKey_->get_length());
+ TaoCrypt::DSA_PrivateKey dsaKey;
+ dsaKey.Initialize(dsaSource);
+
+ if (rsaSource.GetError().What()) {
+ // neither worked
+ ret = SSL_FAILURE;
+ }
+ }
+ }
+
fclose(input);
- return SSL_SUCCESS;
+ return ret;
}
diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp
index 36e286a73ce..fec6a3394ca 100644
--- a/extra/yassl/src/yassl_error.cpp
+++ b/extra/yassl/src/yassl_error.cpp
@@ -148,6 +148,10 @@ void SetErrorString(YasslError error, char* buffer)
strncpy(buffer, "sanity check on cipher text size error", max);
break;
+ case rsaSignFault_error:
+ strncpy(buffer, "rsa signature fault error", max);
+ break;
+
// openssl errors
case SSL_ERROR_WANT_READ :
strncpy(buffer, "the read operation would block", max);
diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp
index 5d5632f3ba4..48d0e01b1fa 100644
--- a/extra/yassl/src/yassl_imp.cpp
+++ b/extra/yassl/src/yassl_imp.cpp
@@ -196,9 +196,16 @@ void DH_Server::build(SSL& ssl)
sha.update(tmp.get_buffer(), tmp.get_size());
sha.get_digest(&hash[MD5_LEN]);
- if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo)
+ if (ssl.getSecurity().get_parms().sig_algo_ == rsa_sa_algo) {
auth->sign(signature_, hash, sizeof(hash),
ssl.getCrypto().get_random());
+ // check for rsa signautre fault
+ if (!auth->verify(hash, sizeof(hash), signature_,
+ auth->get_signatureLength())) {
+ ssl.SetError(rsaSignFault_error);
+ return;
+ }
+ }
else {
auth->sign(signature_, &hash[MD5_LEN], SHA_LEN,
ssl.getCrypto().get_random());
@@ -2159,6 +2166,12 @@ void CertificateVerify::Build(SSL& ssl)
memcpy(sig.get(), len, VERIFY_HEADER);
rsa.sign(sig.get() + VERIFY_HEADER, hashes_.md5_, sizeof(Hashes),
ssl.getCrypto().get_random());
+ // check for rsa signautre fault
+ if (!rsa.verify(hashes_.md5_, sizeof(Hashes), sig.get() + VERIFY_HEADER,
+ rsa.get_cipherLength())) {
+ ssl.SetError(rsaSignFault_error);
+ return;
+ }
}
else { // DSA
DSS dss(cert.get_privateKey(), cert.get_privateKeyLength(), false);
diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp
index 624148bdac8..d8b133a3f0a 100644
--- a/extra/yassl/taocrypt/src/asn.cpp
+++ b/extra/yassl/taocrypt/src/asn.cpp
@@ -84,7 +84,7 @@ void ASN1_TIME_extract(const unsigned char* date, unsigned char format,
namespace { // locals
-// to the minute
+// to the second
bool operator>(tm& a, tm& b)
{
if (a.tm_year > b.tm_year)
@@ -105,13 +105,18 @@ bool operator>(tm& a, tm& b)
a.tm_min > b.tm_min)
return true;
+ if (a.tm_year == b.tm_year && a.tm_mon == b.tm_mon &&
+ a.tm_mday == b.tm_mday && a.tm_hour == b.tm_hour &&
+ a.tm_min == b.tm_min && a.tm_sec > b.tm_sec)
+ return true;
+
return false;
}
bool operator<(tm& a, tm&b)
{
- return !(a>b);
+ return (b>a);
}
diff --git a/extra/yassl/taocrypt/src/rsa.cpp b/extra/yassl/taocrypt/src/rsa.cpp
index 79a8a8f1c4f..73f678e2674 100644
--- a/extra/yassl/taocrypt/src/rsa.cpp
+++ b/extra/yassl/taocrypt/src/rsa.cpp
@@ -140,6 +140,10 @@ word32 RSA_BlockType2::UnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen,
void RSA_BlockType1::Pad(const byte* input, word32 inputLen, byte* pkcsBlock,
word32 pkcsBlockLen, RandomNumberGenerator&) const
{
+ // sanity checks
+ if (input == NULL || pkcsBlock == NULL)
+ return;
+
// convert from bit length to byte length
if (pkcsBlockLen % 8 != 0)
{
diff --git a/extra/yassl/testsuite/cipher-test.sh b/extra/yassl/testsuite/cipher-test.sh
index 5ce29459d07..d3e69146097 100644
--- a/extra/yassl/testsuite/cipher-test.sh
+++ b/extra/yassl/testsuite/cipher-test.sh
@@ -4,6 +4,7 @@
#
+no_pid=-1
server_pid=$no_pid
diff --git a/include/maria.h b/include/maria.h
index 5618e8ae1a4..bdd53f3d183 100644
--- a/include/maria.h
+++ b/include/maria.h
@@ -44,7 +44,7 @@ extern "C" {
#define MARIA_NAME_IEXT ".MAI"
#define MARIA_NAME_DEXT ".MAD"
/* Max extra space to use when sorting keys */
-#define MARIA_MAX_TEMP_LENGTH 2*1024L*1024L*1024L
+#define MARIA_MAX_TEMP_LENGTH (2*1024L*1024L*1024L)
/* Possible values for maria_block_size (must be power of 2) */
#define MARIA_KEY_BLOCK_LENGTH 8192 /* default key block length */
#define MARIA_MIN_KEY_BLOCK_LENGTH 1024 /* Min key block length */
diff --git a/include/my_alarm.h b/include/my_alarm.h
index c3707cba395..73bb6ab76cc 100644
--- a/include/my_alarm.h
+++ b/include/my_alarm.h
@@ -50,7 +50,7 @@ extern ulong my_time_to_wait_for_lock;
#define ALARM_INIT
#define ALARM_END
#define ALARM_TEST (alarm_pos++ >= alarm_end_pos)
-#define ALARM_REINIT alarm_end_pos+=MY_HOW_OFTEN_TO_WRITE
+#define ALARM_REINIT (alarm_end_pos+=MY_HOW_OFTEN_TO_WRITE)
#endif /* HAVE_ALARM */
#ifdef __cplusplus
diff --git a/include/my_base.h b/include/my_base.h
index 91a26f316a7..8b546edac43 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -537,13 +537,13 @@ typedef ulong key_part_map;
#define SEARCH_NULL_ARE_EQUAL 32768 /* NULL in keys are equal */
#define SEARCH_NULL_ARE_NOT_EQUAL 65536 /* NULL in keys are not equal */
/* Use this when inserting a key in position order */
-#define SEARCH_INSERT SEARCH_NULL_ARE_NOT_EQUAL*2
+#define SEARCH_INSERT (SEARCH_NULL_ARE_NOT_EQUAL*2)
/* Only part of the key is specified while reading */
-#define SEARCH_PART_KEY SEARCH_INSERT*2
+#define SEARCH_PART_KEY (SEARCH_INSERT*2)
/* Used when user key (key 2) contains transaction id's */
-#define SEARCH_USER_KEY_HAS_TRANSID SEARCH_PART_KEY*2
+#define SEARCH_USER_KEY_HAS_TRANSID (SEARCH_PART_KEY*2)
/* Used when page key (key 1) contains transaction id's */
-#define SEARCH_PAGE_KEY_HAS_TRANSID SEARCH_USER_KEY_HAS_TRANSID*2
+#define SEARCH_PAGE_KEY_HAS_TRANSID (SEARCH_USER_KEY_HAS_TRANSID*2)
/* bits in opt_flag */
#define QUICK_USED 1
diff --git a/include/my_dbug.h b/include/my_dbug.h
index bcf2015466d..f4c854bc10c 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -58,7 +58,7 @@ extern void _db_end_(void);
extern void _db_lock_file_(void);
extern void _db_unlock_file_(void);
extern FILE *_db_fp_(void);
-extern void _db_flush_();
+extern void _db_flush_(void);
extern void dbug_swap_code_state(void **code_state_store);
extern void dbug_free_code_state(void **code_state_store);
extern const char* _db_get_func_(void);
@@ -123,7 +123,7 @@ extern const char* _db_get_func_(void);
#ifdef __WIN__
#define DBUG_SUICIDE() DBUG_ABORT()
#else
-extern void _db_suicide_();
+extern void _db_suicide_(void);
#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_())
#endif
diff --git a/include/my_global.h b/include/my_global.h
index f7d8f795051..30e08d7a03a 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -547,7 +547,7 @@ typedef int my_socket; /* File descriptor for sockets */
/* Type for fuctions that handles signals */
#define sig_handler RETSIGTYPE
C_MODE_START
-typedef void (*sig_return)();/* Returns type from signal */
+typedef void (*sig_return)(); /* Returns type from signal */
C_MODE_END
#if defined(__GNUC__) && !defined(_lint)
typedef char pchar; /* Mixed prototypes can take char */
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 104e91715e7..1b7d289b2ef 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -701,8 +701,8 @@ extern void my_thread_end(void);
extern const char *my_thread_name(void);
extern my_thread_id my_thread_dbug_id(void);
extern int pthread_dummy(int);
-extern void my_mutex_init();
-extern void my_mutex_end();
+extern void my_mutex_init(void);
+extern void my_mutex_end(void);
/* All thread specific variables are in the following struct */
@@ -745,8 +745,8 @@ struct st_my_thread_var
};
extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
-extern void **my_thread_var_dbug();
-extern safe_mutex_t **my_thread_var_mutex_in_use();
+extern void **my_thread_var_dbug(void);
+extern safe_mutex_t **my_thread_var_mutex_in_use(void);
extern uint my_thread_end_wait_time;
extern my_bool safe_mutex_deadlock_detector;
#define my_thread_var (_my_thread_var())
diff --git a/include/my_sys.h b/include/my_sys.h
index 31d4ffd7667..9ae15db649c 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -690,7 +690,7 @@ extern void my_osmaperr(unsigned long last_error);
#endif
extern void init_glob_errs(void);
-extern const char** get_global_errmsgs();
+extern const char** get_global_errmsgs(void);
extern void wait_for_free_space(const char *filename, int errors);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
@@ -715,7 +715,7 @@ extern void my_printf_error(uint my_err, const char *format,
ATTRIBUTE_FORMAT(printf, 2, 4);
extern void my_printv_error(uint error, const char *format, myf MyFlags,
va_list ap);
-extern int my_error_register(const char** (*get_errmsgs) (),
+extern int my_error_register(const char** (*get_errmsgs) (void),
uint first, uint last);
extern const char **my_error_unregister(uint first, uint last);
extern void my_message(uint my_err, const char *str,myf MyFlags);
@@ -925,12 +925,12 @@ extern uint my_set_max_open_files(uint files);
void my_free_open_file_info(void);
extern my_bool my_gethwaddr(uchar *to);
-extern int my_getncpus();
+extern int my_getncpus(void);
#define HRTIME_RESOLUTION 1000000ULL /* microseconds */
typedef struct {ulonglong val;} my_hrtime_t;
-void my_time_init();
-extern my_hrtime_t my_hrtime();
+void my_time_init(void);
+extern my_hrtime_t my_hrtime(void);
extern ulonglong my_interval_timer(void);
extern ulonglong my_getcputime(void);
@@ -989,7 +989,7 @@ int my_msync(int, void *, size_t, int);
void my_uuid_init(ulong seed1, ulong seed2);
void my_uuid(uchar *guid);
void my_uuid2str(const uchar *guid, char *s);
-void my_uuid_end();
+void my_uuid_end(void);
/* character sets */
extern void my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader);
diff --git a/include/mysql.h b/include/mysql.h
index d9d9739dd1f..f088ad668a1 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -79,8 +79,8 @@ extern unsigned int mariadb_deinitialize_ssl;
extern unsigned int mysql_port;
extern char *mysql_unix_port;
-#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
-#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
+#define CLIENT_NET_READ_TIMEOUT (365*24*3600) /* Timeout on read */
+#define CLIENT_NET_WRITE_TIMEOUT (365*24*3600) /* Timeout on write */
#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
diff --git a/man/aria_chk.1 b/man/aria_chk.1
index 4dc5bf8c78f..9b2a19b31af 100644
--- a/man/aria_chk.1
+++ b/man/aria_chk.1
@@ -241,5 +241,4 @@ Read this file after the global files are read.
.SH "SEE ALSO"
\fBmyisamchk(1)\fR
.PP
-For more information, please refer to the MariaDB Knowledge Base,
-which is available online at http://mariadb.com/kb/
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
diff --git a/man/aria_dump_log.1 b/man/aria_dump_log.1
index 41318d97f7a..16463fc222d 100644
--- a/man/aria_dump_log.1
+++ b/man/aria_dump_log.1
@@ -50,5 +50,6 @@ Only read default options from the given file #.
Read this file after the global files are read.
.PP
.SH "SEE ALSO"
-For more information, please refer to the MariaDB Knowledge Base,
-which is available online at http://mariadb.com/kb/
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
+.SH AUTHOR
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/aria_ftdump.1 b/man/aria_ftdump.1
index 4d6c1373e31..7b5ba5f5211 100644
--- a/man/aria_ftdump.1
+++ b/man/aria_ftdump.1
@@ -25,5 +25,4 @@ Be verbose.
.SH "SEE ALSO"
\fBmyisam_ftdump(1)\fR
.PP
-For more information, please refer to the MariaDB Knowledge Base,
-which is available online at http://mariadb.com/kb/
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
diff --git a/man/aria_pack.1 b/man/aria_pack.1
index ee47f5ff3bb..2557507b999 100644
--- a/man/aria_pack.1
+++ b/man/aria_pack.1
@@ -72,5 +72,4 @@ Read this file after the global files are read.
.SH "SEE ALSO"
\fBmyisampack(1)\fR
.PP
-For more information, please refer to the MariaDB Knowledge Base,
-which is available online at http://mariadb.com/kb/
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
diff --git a/man/aria_read_log.1 b/man/aria_read_log.1
index 701104fe047..4570c2ceee9 100644
--- a/man/aria_read_log.1
+++ b/man/aria_read_log.1
@@ -104,5 +104,4 @@ Read this file after the global files are read.
.SH "SEE ALSO"
\fBmyisamlog(1)\fR
.PP
-For more information, please refer to the MariaDB Knowledge Base,
-which is available online at http://mariadb.com/kb/
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
diff --git a/man/comp_err.1 b/man/comp_err.1
index 817243b84f6..942556bfdda 100644
--- a/man/comp_err.1
+++ b/man/comp_err.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBcomp_err\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBCOMP_ERR\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBCOMP_ERR\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -20,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" comp_err
.SH "NAME"
-comp_err \- compile MySQL error message file
+comp_err \- compile MariaDB error message file
.SH "SYNOPSIS"
.HP \w'\fBcomp_err\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBcomp_err [\fR\fB\fIoptions\fR\fR\fB]\fR
@@ -33,11 +26,11 @@ file that is used by
\fBmysqld\fR
to determine the error messages to display for different error codes\&.
\fBcomp_err\fR
-normally is run automatically when MySQL is built\&. It compiles the
+normally is run automatically when MariaDB is built\&. It compiles the
errmsg\&.sys
file from the plaintext file located at
sql/share/errmsg\&.txt
-in MySQL source distributions\&.
+in MariaDB source distributions\&.
.PP
\fBcomp_err\fR
also generates
@@ -254,7 +247,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -263,8 +256,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/innochecksum.1 b/man/innochecksum.1
index 6ad9b6b6d78..4e48b4d69cc 100644
--- a/man/innochecksum.1
+++ b/man/innochecksum.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBinnochecksum\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBINNOCHECKSUM\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBINNOCHECKSUM\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -69,7 +62,7 @@ supports the following options\&. For options that refer to page numbers, the nu
.sp -1
.IP \(bu 2.3
.\}
-\fB\-c\fR
+\fB\-c, --count\fR
.sp
Print a count of the number of pages in the file\&.
.RE
@@ -82,7 +75,7 @@ Print a count of the number of pages in the file\&.
.sp -1
.IP \(bu 2.3
.\}
-\fB\-d\fR
+\fB\-d, --debug\fR
.sp
Debug mode; prints checksums for each page\&.
.RE
@@ -95,7 +88,7 @@ Debug mode; prints checksums for each page\&.
.sp -1
.IP \(bu 2.3
.\}
-\fB\-e \fR\fB\fInum\fR\fR
+\fB\-e \fR\fB\fInum\fB, --end-page=#\fR\fR
.sp
End at this page number\&.
.RE
@@ -108,7 +101,7 @@ End at this page number\&.
.sp -1
.IP \(bu 2.3
.\}
-\fB\-p \fR\fB\fInum\fR\fR
+\fB\-p \fR\fB\fInum\fB, --page-num=#\fR\fR
.sp
Check only this page number\&.
.RE
@@ -121,7 +114,7 @@ Check only this page number\&.
.sp -1
.IP \(bu 2.3
.\}
-\fB\-s \fR\fB\fInum\fR\fR
+\fB\-s \fR\fB\fInum\fB, --start-page\fR\fR
.sp
Start at this page number\&.
.RE
@@ -134,14 +127,27 @@ Start at this page number\&.
.sp -1
.IP \(bu 2.3
.\}
-\fB\-v\fR
+\fB\-u, --skip-corrupt\fR\fR
+.sp
+Skip corrupt pages\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fB\-v, --verbose\fR
.sp
Verbose mode; print a progress indicator every five seconds\&.
.RE
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -150,8 +156,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/make_win_bin_dist.1 b/man/make_win_bin_dist.1
index 131e4a5f1c1..5d9070e7bd4 100644
--- a/man/make_win_bin_dist.1
+++ b/man/make_win_bin_dist.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmake_win_bin_dist\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMAKE_WIN_BIN_DIST" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMAKE_WIN_BIN_DIST" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -169,7 +162,7 @@ directories)\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -178,8 +171,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/msql2mysql.1 b/man/msql2mysql.1
index 61512e312d9..96e4cd3ae5b 100644
--- a/man/msql2mysql.1
+++ b/man/msql2mysql.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmsql2mysql\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMSQL2MYSQL\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMSQL2MYSQL\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -60,7 +53,7 @@ utility to make the function name substitutions\&. See
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -69,8 +62,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1
index b44f250f663..2406fa9cb47 100644
--- a/man/my_print_defaults.1
+++ b/man/my_print_defaults.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmy_print_defaults\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMY_PRINT_DEFAULTS" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMY_PRINT_DEFAULTS" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -87,7 +80,9 @@ Display a help message and exit\&.
\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR,
\fB\-c \fR\fB\fIfile_name\fR\fR
.sp
-Read only the given option file\&.
+Read only the given option file\&. If no extension is given, default extension(.ini or .cnf) will
+be used\&. \fB\-\-config-file\fR is deprecated, use \fB\-\-defaults\-file\fR instead\&. If \fB\-\-defaults\-file\fR is
+the first option, then read this file only, do not read global or per\-user config files; should be the first option.
.RE
.sp
.RS 4
@@ -126,7 +121,8 @@ string is
\fB\-\-extra\-file=\fR\fB\fIfile_name\fR\fR,
\fB\-e \fR\fB\fIfile_name\fR\fR
.sp
-Read this option file after the global option file but (on Unix) before the user option file\&.
+Read this option file after the global option file but (on Unix) before the user option
+file\&. Should be the first option\&. \fB\-\-extra\-file\fR is deprecated, use \fB\-\-defaults\-extra\-file\fR\&.
.RE
.sp
.RS 4
@@ -153,12 +149,27 @@ In addition to the groups named on the command line, read groups that have the g
.sp -1
.IP \(bu 2.3
.\}
+.\" my_print_defaults: --mysqld option
+.\" mysqld option: my_print_defaults
+\fB\-\-mysqld\fR
+.sp
+Read the same set of groups that the mysqld binary does.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" my_print_defaults: no-defaults option
.\" no-defaults option: my_print_defaults
\fB\-\-no\-defaults\fR,
\fB\-n\fR
.sp
-Return an empty string\&.
+Return an empty string (useful for scripts)\&.
.RE
.sp
.RS 4
@@ -195,7 +206,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -204,8 +215,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1
index f85467aabe0..b2928a17183 100644
--- a/man/myisam_ftdump.1
+++ b/man/myisam_ftdump.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmyisam_ftdump\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYISAM_FTDUMP\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYISAM_FTDUMP\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -242,7 +235,7 @@ Verbose mode\&. Print more output about what the program does\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -251,8 +244,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/myisamchk.1 b/man/myisamchk.1
index 98ce3805515..df5cb4db604 100644
--- a/man/myisamchk.1
+++ b/man/myisamchk.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmyisamchk\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYISAMCHK\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYISAMCHK\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -125,7 +118,7 @@ shell> \fBmyisamchk \fR\fB\fI/path/to/database_dir/\fR\fR\fB*\&.MYI\fR
.RE
.\}
.PP
-You can even check all tables in all databases by specifying a wildcard with the path to the MySQL data directory:
+You can even check all tables in all databases by specifying a wildcard with the path to the MariaDB data directory:
.sp
.if n \{\
.RS 4
@@ -184,7 +177,7 @@ the section called \(lqMYISAMCHK MEMORY USAGE\(rq\&.
.ps -1
.br
.PP
-\fIYou must ensure that no other program is using the tables while you are running \fR\fI\fBmyisamchk\fR\fR\&. The most effective means of doing so is to shut down the MySQL server while running
+\fIYou must ensure that no other program is using the tables while you are running \fR\fI\fBmyisamchk\fR\fR\&. The most effective means of doing so is to shut down the MariaDB server while running
\fBmyisamchk\fR, or to lock all tables that
\fBmyisamchk\fR
is being used on\&.
@@ -218,8 +211,7 @@ However, the easiest way to avoid this problem is to use
CHECK TABLE
instead of
\fBmyisamchk\fR
-to check tables\&. See
-Section\ \&12.4.2.3, \(lqCHECK TABLE Syntax\(rq\&.
+to check tables\&.
.sp .5v
.RE
.PP
@@ -227,9 +219,6 @@ Section\ \&12.4.2.3, \(lqCHECK TABLE Syntax\(rq\&.
supports the following options, which can be specified on the command line or in the
[myisamchk]
option file group\&.
-\fBmyisamchk\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
.SH "MYISAMCHK GENERAL OPTIONS"
.\" options: myisamchk
.\" myisamchk: options
@@ -366,6 +355,66 @@ with external locking disabled, the table can be locked only by another
\fBmyisamchk\fR
command\&.
.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" myisamchk: print argument list option
+.\" print argument list option: myisamchk
+\fB\-\-print\-defaults\fR
+.sp
+Print the program argument list and exit\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" myisamchk: no defaults option
+.\" no defaults option: myisamchk
+\fB\-\-no\-defaults\fR
+.sp
+Don't read default options from any option file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" myisamchk: defaults file option
+.\" defaults file option: myisamchk
+\fB\-\-defaults\-file=#\fR
+.sp
+Only read default options from the given file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" myisamchk: defaults extrafile option
+.\" defaults extra file option: myisamchk
+\fB\-\-defaults\-extra\-file=#\fR
+.sp
+Read this file after the global files are read\&.
+.RE
.PP
You can also set the following variables by using
\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
@@ -375,6 +424,7 @@ syntax:
.\" ft_min_word_len myisamchk variable
.\" ft_stopword_file myisamchk variable
.\" key_buffer_size myisamchk variable
+.\" key_cache_block_size myisamchk variable
.\" myisam_block_size myisamchk variable
.\" read_buffer_size myisamchk variable
.\" sort_buffer_size myisamchk variable
@@ -426,6 +476,11 @@ T}:T{
523264
T}
T{
+key_cache_block_size
+T}:T{
+1024
+T}
+T{
myisam_block_size
T}:T{
1024
@@ -696,7 +751,8 @@ finds any errors in the table\&. The repair type is the same as that specified w
\fB\-\-recover\fR
or
\fB\-r\fR
-option\&.
+option\&. States will be updated as with
+\fB\-\-update\-state\fR\&.
.RE
.sp
.RS 4
@@ -816,8 +872,7 @@ file as
.\" character-sets-dir option: myisamchk
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
.sp
-The directory where character sets are installed\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+The directory where character sets are installed\&.
.RE
.sp
.RS 4
@@ -843,6 +898,24 @@ Correct the checksum information for the table\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" myisamchk: create-missing-keys option
+.\" create-missing-keys option: myisamchk
+\fB\-\-create\-missing\-keys\fR
+.sp
+Create missing keys. This assumes that the data file is correct and that the
+number of rows stored in the index file is correct\&. Enables
+\fB\-\-quick\fR\&.
+
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" myisamchk: data-file-length option
.\" data-file-length option: myisamchk
\fB\-\-data\-file\-length=\fR\fB\fIlen\fR\fR,
@@ -885,7 +958,12 @@ the section called \(lqMYISAMCHK TABLE INFORMATION\(rq\&.
\fB\-f\fR
.sp
Overwrite old intermediate files (files with names like
-\fItbl_name\fR\&.TMD) instead of aborting\&.
+\fItbl_name\fR\&.TMD) instead of aborting\&. Add another
+\fB\-\-force\fR
+to avoid 'myisam_sort_buffer_size is too small' errors\&. In this case
+we will attempt to do the repair with the given
+\fBmyisam_sort_buffer_size\fR
+and dynamically allocate as many management buffers as needed\&.
.RE
.sp
.RS 4
@@ -914,24 +992,6 @@ For
.sp -1
.IP \(bu 2.3
.\}
-.\" myisamchk: no-symlinks option
-.\" no-symlinks option: myisamchk
-\fB\-\-no\-symlinks\fR,
-\fB\-l\fR
-.sp
-Do not follow symbolic links\&. Normally
-\fBmyisamchk\fR
-repairs the table that a symlink points to\&. This option does not exist as of MySQL 4\&.0 because versions from 4\&.0 on do not remove symlinks during repair operations\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
.\" myisamchk: max-record-length option
.\" max-record-length option: myisamchk
\fB\-\-max\-record\-length=\fR\fB\fIlen\fR\fR
@@ -976,7 +1036,7 @@ and
.sp
Achieve a faster repair by modifying only the index file, not the data file\&. You can specify this option twice to force
\fBmyisamchk\fR
-to modify the original data file in case of duplicate keys\&.
+to modify the original data file in case of duplicate keys\&. NOTE: Tables where the data file is corrupted can't be fixed with this option\&.
.RE
.sp
.RS 4
@@ -1043,19 +1103,6 @@ key_buffer_size\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" myisamchk: set-character-set option
-.\" set-character-set option: myisamchk
-\fB\-\-set\-character\-set=\fR\fB\fIname\fR\fR
-.sp
-Change the character set used by the table indexes\&. This option was replaced by
-\fB\-\-set\-collation\fR
-in MySQL 5\&.0\&.3\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
.el \{\
.sp -1
.IP \(bu 2.3
@@ -1251,6 +1298,22 @@ sorts and moves records, it just overwrites record offsets in the index\&. If ke
\fBmyisamchk\fR
must unpack key blocks first, then re\-create indexes and pack the key blocks again\&. (In this case, re\-creating indexes is faster than updating offsets for each index\&.)
.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" myisamchk: stats_method option
+.\" stats_method option: myisamchk
+\fB\-\-stats\-method=name\fR
+.sp
+Specifies how index statistics collection code should treat NULLs\&. Possible values
+of name are "nulls_unequal" (default), "nulls_equal" (emulate MySQL 4 behavior), and "nulls_ignored"\&.
+.RE
.SH "MYISAMCHK TABLE INFORMATION"
.\" table description: myisamchk
.\" tables: information
@@ -1275,7 +1338,7 @@ Runs
\fBmyisamchk\fR
in
\(lqdescribe mode\(rq
-to produce a description of your table\&. If you start the MySQL server with external locking disabled,
+to produce a description of your table\&. If you start the MariaDB server with external locking disabled,
\fBmyisamchk\fR
may report an error for a table that is updated while it runs\&. However, because
\fBmyisamchk\fR
@@ -1623,7 +1686,7 @@ Section\ \&6.6.4, \(lqMyISAM Table Optimization\(rq\&.
.\}
Datafile pointer
.sp
-The size of the data file pointer, in bytes\&. It is usually 2, 3, 4, or 5 bytes\&. Most tables manage with 2 bytes, but this cannot be controlled from MySQL yet\&. For fixed tables, this is a row address\&. For dynamic tables, this is a byte address\&.
+The size of the data file pointer, in bytes\&. It is usually 2, 3, 4, or 5 bytes\&. Most tables manage with 2 bytes, but this cannot be controlled from MariaDB yet\&. For fixed tables, this is a row address\&. For dynamic tables, this is a byte address\&.
.RE
.sp
.RS 4
@@ -1636,7 +1699,7 @@ The size of the data file pointer, in bytes\&. It is usually 2, 3, 4, or 5 bytes
.\}
Keyfile pointer
.sp
-The size of the index file pointer, in bytes\&. It is usually 1, 2, or 3 bytes\&. Most tables manage with 2 bytes, but this is calculated automatically by MySQL\&. It is always a block address\&.
+The size of the index file pointer, in bytes\&. It is usually 1, 2, or 3 bytes\&. Most tables manage with 2 bytes, but this is calculated automatically by MariaDB\&. It is always a block address\&.
.RE
.sp
.RS 4
@@ -1785,7 +1848,7 @@ Address of the root index block\&.
.\}
Blocksize
.sp
-The size of each index block\&. By default this is 1024, but the value may be changed at compile time when MySQL is built from source\&.
+The size of each index block\&. By default this is 1024, but the value may be changed at compile time when MariaDB is built from source\&.
.RE
.sp
.RS 4
@@ -2137,7 +2200,7 @@ What percentage of the keyblocks are used\&. When a table has just been reorgani
.\}
Packed
.sp
-MySQL tries to pack key values that have a common suffix\&. This can only be used for indexes on
+MariaDB tries to pack key values that have a common suffix\&. This can only be used for indexes on
CHAR
and
VARCHAR
@@ -2193,7 +2256,7 @@ The average row length\&. This is the exact row length for tables with fixed\-le
.\}
Packed
.sp
-MySQL strips spaces from the end of strings\&. The
+MariaDB strips spaces from the end of strings\&. The
Packed
value indicates the percentage of savings achieved by doing this\&.
.RE
@@ -2444,7 +2507,7 @@ instead of
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -2453,8 +2516,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/myisamlog.1 b/man/myisamlog.1
index 1ea424cd949..57728d14e2e 100644
--- a/man/myisamlog.1
+++ b/man/myisamlog.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmyisamlog\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYISAMLOG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYISAMLOG\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -225,7 +218,7 @@ Display version information\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -234,8 +227,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/myisampack.1 b/man/myisampack.1
index 0f5efd0fb8d..37eca1f4a04 100644
--- a/man/myisampack.1
+++ b/man/myisampack.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmyisampack\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYISAMPACK\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYISAMPACK\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -72,7 +65,7 @@ if the table might be updated by the server during the packing process\&. It is
.sp -1
.IP \(bu 2.3
.\}
-After packing a table, it becomes read only\&. This is generally intended (such as when accessing packed tables on a CD)\&. Allowing writes to a packed table is on our TODO list, but with low priority\&.
+After packing a table, it becomes read only\&. This is generally intended (such as when accessing packed tables on a CD)\&.
.RE
.PP
Invoke
@@ -832,7 +825,7 @@ option to
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -841,8 +834,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1
index 78ba75847ad..19fe4a1aac6 100644
--- a/man/mysql-stress-test.pl.1
+++ b/man/mysql-stress-test.pl.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql-stress-test.pl\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 03/31/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL
-.\" Language: English
.\"
-.TH "\FBMYSQL\-STRESS\-TE" "1" "03/31/2010" "MySQL" "MySQL Database System"
+.TH "\FBMYSQL\-STRESS\-TE" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -28,7 +21,7 @@ mysql-stress-test.pl \- server stress test program
.PP
The
\fBmysql\-stress\-test\&.pl\fR
-Perl script performs stress\-testing of the MySQL server\&. (MySQL 5\&.0 and up only)
+Perl script performs stress\-testing of the MariaDB server\&.
.PP
\fBmysql\-stress\-test\&.pl\fR
requires a version of Perl that has been built with threads support\&.
@@ -250,7 +243,7 @@ The TCP/IP port number to use for connecting to the server\&. The default is 330
\fB\-\-server\-socket=\fR\fB\fIfile_name\fR\fR
.sp
For connections to
-localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. The default if
+localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. The default is
/tmp/mysql\&.sock\&.
.RE
.sp
@@ -266,7 +259,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
.\" server-user option: mysql-stress-test.pl
\fB\-\-server\-user=\fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&. The default is
+The MariaDB user name to use when connecting to the server\&. The default is
root\&.
.RE
.sp
@@ -489,7 +482,7 @@ Verbose mode\&. Print more information about what the program does\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright \(co 2007, 2010, Oracle and/or its affiliates
+Copyright \(co 2007, 2010, Oracle and/or its affiliates, 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -498,8 +491,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1
index 87d640dead7..cd6fec8a35e 100644
--- a/man/mysql-test-run.pl.1
+++ b/man/mysql-test-run.pl.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql-test-run.pl\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 03/31/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL
-.\" Language: English
.\"
-.TH "\FBMYSQL\-TEST\-RUN\" "1" "03/31/2010" "MySQL" "MySQL Database System"
+.TH "\FBMYSQL\-TEST\-RUN\" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -20,7 +13,7 @@
.\" -----------------------------------------------------------------
.\" mysql-test-run.pl
.SH "NAME"
-mysql-test-run.pl \- run MySQL test suite
+mysql-test-run.pl \- run MariaDB test suite
.SH "SYNOPSIS"
.HP \w'\fBmysql\-test\-run\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR
@@ -28,7 +21,7 @@ mysql-test-run.pl \- run MySQL test suite
.PP
The
\fBmysql\-test\-run\&.pl\fR
-Perl script is the main application used to run the MySQL test suite\&. It invokes
+Perl script is the main application used to run the MariaDB test suite\&. It invokes
\fBmysqltest\fR
to run individual test cases\&.
.PP
@@ -381,9 +374,54 @@ Display a help message and exit\&.
Allow tests marked as "big" to run\&. Tests can be thus marked by including the line
\fB\-\-source include/big_test\&.inc\fR, and they will only be run if this option is given, or if the environment variable
BIG_TEST
-is set to 1\&.
+is set to 1\&. Repeat this option twice to run only "big" tests\&.
.sp
-This is typically done for tests that take very long to run, or that use very much resources, so that they are not suitable for running as part of a normal test suite run\&.
+This is typically used for tests that take a very long to run, or that use many resources, so that they are not suitable for running as part of a normal test suite run\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: boot-dbx option
+.\" boot-dbx option: mysql-test-run.pl
+\fB\-\-boot\-dbx\fR
+.sp
+Run the mysqld server used for bootstrapping the database through the dbx debugger\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: boot-ddd option
+.\" boot-ddd option: mysql-test-run.pl
+\fB\-\-boot\-ddd\fR
+.sp
+Run the mysqld server used for bootstrapping the database through the ddd debugger\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: boot-gdb option
+.\" boot-gdb option: mysql-test-run.pl
+\fB\-\-boot\-gdb\fR
+.sp
+Run the mysqld server used for bootstrapping the database through the gdb debugger\&.
.RE
.sp
.RS 4
@@ -396,7 +434,7 @@ This is typically done for tests that take very long to run, or that use very mu
.\}
.\" mysql-test-run.pl: build-thread option
.\" build-thread option: mysql-test-run.pl
-\fB\-\-build\-thread=\fR\fB\fInumber\fR\fR
+\fB\-\-[mtr\-]build\-thread=\fR\fB\fInumber\fR\fR
.sp
Specify a number to calculate port numbers from\&. The formula is 10 *
\fIbuild_thread\fR
@@ -410,7 +448,7 @@ auto) can also be set with the
MTR_BUILD_THREAD
environment variable\&.
.sp
-From MySQL 5\&.1\&.45, the more logical
+The more logical
\fB\-\-port\-base\fR
is supported as an alternative\&.
.RE
@@ -471,6 +509,25 @@ The path to the directory where client binaries are located\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: client-dbx option
+.\" client-dbx option: mysql-test-run.pl
+\fB\-\-client\-dbx\fR
+.sp
+Start
+\fBmysqltest\fR
+in the
+\fBdbx\fR
+debugger\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: client-ddd option
.\" client-ddd option: mysql-test-run.pl
\fB\-\-client\-ddd\fR
@@ -560,8 +617,7 @@ is given only once, it has no effect\&. For test runs specific to a given test s
\fB\-\-combination\fR
is to create a
combinations
-file in the suite directory\&. The file should contain a section of options for each test run\&. See
-Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltest\(rq\&.
+file in the suite directory\&. The file should contain a section of options for each test run\&.
.RE
.sp
.RS 4
@@ -609,10 +665,7 @@ Compress all information sent between the client and the server if both support
.\" cursor-protocol option: mysql-test-run.pl
\fB\-\-cursor\-protocol\fR
.sp
-Pass the
-\fB\-\-cursor\-protocol\fR
-option to
-\fBmysqltest\fR
+Use the cursor protocol between client and server
(implies
\fB\-\-ps\-protocol\fR)\&.
.RE
@@ -625,12 +678,31 @@ option to
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: dbx option
+.\" dbx option: mysql-test-run.pl
+\fB\-\-dbx\fR
+.sp
+Start the
+\fBmysqld(s)\fR
+in the
+\fBdbx\fR
+debugger\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: ddd option
.\" ddd option: mysql-test-run.pl
\fB\-\-ddd\fR
.sp
-Start
-\fBmysqld\fR
+Start the
+\fBmysqld(s)\fR
in the
\fBddd\fR
debugger\&.
@@ -659,6 +731,36 @@ Dump trace output for all clients and servers\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: debug-common option
+.\" debug-common option: mysql-test-run.pl
+\fB\-\-debug\-common\fR
+.sp
+Same as \fB--debug\fR, but sets the 'd' debug flags to "query,info,error,enter,exit"\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: debug-server option
+.\" debug-server option: mysql-test-run.pl
+\fB\-\-debug\-server\fR
+.sp
+Use debug version of server, but without turning on tracing\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: debugger option
.\" debugger option: mysql-test-run.pl
\fB\-\-debugger=\fR\fB\fIdebugger\fR\fR
@@ -691,11 +793,6 @@ to
prefix is used so that
\fBmysqld\fR
does not fail if Debug Sync is not compiled in\&.
-.sp
-For information about using the Debug Sync facility for testing, see
-Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&.
-.sp
-This option was added in MySQL 5\&.1\&.41/5\&.5\&.0/6\&.0\&.6\&.
.RE
.sp
.RS 4
@@ -707,7 +804,7 @@ This option was added in MySQL 5\&.1\&.41/5\&.5\&.0/6\&.0\&.6\&.
.IP \(bu 2.3
.\}
.\" mysql-test-run.pl: defaults-file option
-.\" default-file option: mysql-test-run.pl
+.\" defaults-file option: mysql-test-run.pl
\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR
.sp
Use the named file as fixed config file template for all tests\&.
@@ -738,11 +835,12 @@ Add setting from the named file to all generated configs\&.
.\}
.\" mysql-test-run.pl: do-test option
.\" do-test option: mysql-test-run.pl
-\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR
+\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR|\fB\fIregex\fR\fR
.sp
Run all test cases having a name that begins with the given
\fIprefix\fR
-value\&. This option provides a convenient way to run a family of similarly named tests\&.
+value, or fulfils the
+\fIregex\fR\&. This option provides a convenient way to run a family of similarly named tests\&.
.sp
The argument for the
\fB\-\-do\-test\fR
@@ -772,6 +870,21 @@ xmainytestz\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: dry-run option
+.\" dry-run option: mysql-test-run.pl
+\fB\-\-dry\-run\fR
+.sp
+Don't run any tests, print the list of tests that were selected for execution\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: embedded-server option
.\" embedded-server option: mysql-test-run.pl
\fB\-\-embedded\-server\fR
@@ -795,7 +908,7 @@ built with the embedded server\&.
.sp
Ignore any
disabled\&.def
-file, and run also tests marked as disbaled\&. Success or failure of those tests will be reported the same way as other tests\&.
+file, and also run tests marked as disabled\&. Success or failure of those tests will be reported the same way as other tests\&.
.RE
.sp
.RS 4
@@ -814,7 +927,7 @@ Specify a file that contains a list of test cases that should be displayed with
[ exp\-fail ]
code rather than
[ fail ]
-if they fail\&. This option was added in MySQL 5\&.1\&.33\&.
+if they fail\&.
.sp
For an example of a file that might be specified via this option, see
mysql\-test/collections/default\&.experimental\&.
@@ -836,10 +949,10 @@ mysql\-test/collections/default\&.experimental\&.
Use an already running server\&. The option/value pair is what is needed by the
\fBmysql\fR
client to connect to the server\&. Each
+\fB\-\-extern\fR option
+can only take one option/value pair as an argument, so you need to repeat
\fB\-\-extern\fR
-can only take one option/value pair as argument, so it you need more you need to repeat
-\fB\-\-extern\fR
-for each of them\&. Example:
+for each pair needed\&. Example:
.sp
.if n \{\
.RS 4
@@ -880,6 +993,21 @@ Do not perform controlled shutdown when servers need to be restarted or at the e
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: force-restart option
+.\" force-restart option: mysql-test-run.pl
+\fB\-\-force\-restart\fR
+.sp
+Always restart servers between tests\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: force option
.\" force option: mysql-test-run.pl
\fB\-\-force\fR
@@ -903,9 +1031,25 @@ causes execution to continue regardless of test case failure\&.
.\" gcov option: mysql-test-run.pl
\fB\-\-gcov\fR
.sp
-Run tests with the
+Collect coverage information after the test\&. The result is a
\fBgcov\fR
-test coverage tool\&.
+file per source and header file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: gcov-src-dir option
+.\" gcov-src-dir option: mysql-test-run.pl
+\fB\-\-gcov\-src\-dir\fR
+.sp
+Colllect coverage only within the given subdirectory\&. For example, if you're only developing the SQL layer,
+it makes sense to use \fB--gcov-src-dir=sql\fR\&.
.RE
.sp
.RS 4
@@ -920,8 +1064,8 @@ test coverage tool\&.
.\" gdb option: mysql-test-run.pl
\fB\-\-gdb\fR
.sp
-Start
-\fBmysqld\fR
+Start the
+\fBmysqld(s)\fR
in the
\fBgdb\fR
debugger\&.
@@ -939,11 +1083,26 @@ debugger\&.
.\" gprof option: mysql-test-run.pl
\fB\-\-gprof\fR
.sp
-Run tests with the
+Collect profiling information using the
\fBgprof\fR
profiling tool\&.
-\fB\-\-gprof\fR
-was added in 5\&.1\&.45\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: manual-dbx option
+.\" manual-dbx option: mysql-test-run.pl
+\fB\-\-manual\-dbx\fR
+.sp
+Use a server that has already been started by the user in the
+\fBdbx\fR
+debugger\&.
.RE
.sp
.RS 4
@@ -1003,6 +1162,23 @@ debugger\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: manual-lldb option
+.\" manual-lldb option: mysql-test-run.pl
+\fB\-\-manual\-lldb\fR
+.sp
+Use a server that has already been started by the user in the
+\fBlldb\fR
+debugger\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: mark-progress option
.\" mark-progress option: mysql-test-run.pl
\fB\-\-mark\-progress\fR
@@ -1025,8 +1201,6 @@ var/log/\fItestname\fR\&.progress\&.
.sp
The maximum number of simultaneous server connections that may be used per test\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. Corresponds to the same option for
\fBmysqltest\fR\&.
-.sp
-This option is available from MySQL 5\&.1\&.45\&.
.RE
.sp
.RS 4
@@ -1073,7 +1247,7 @@ MTR_MAX_SAVE_DATADIR
.\" max-test-fail option: mysql-test-run.pl
\fB\-\-max\-test\-fail=\fR\fB\fIN\fR\fR
.sp
-Stop execution after the specified number of tests have failed, to avoid using up resources (and time) in case of massive failures\&. retries are noe counted, nor are failures of tests marked experimental\&. Defaults to 10, set to 0 for no limit\&. May also be set with the environment variable
+Stop execution after the specified number of tests have failed, to avoid using up resources (and time) in case of massive failures\&. retries are not counted, nor are failures of tests marked experimental\&. Defaults to 10, set to 0 for no limit\&. May also be set with the environment variable
MTR_MAX_TEST_FAIL
.RE
.sp
@@ -1129,8 +1303,22 @@ option next time\&.
Extra options to pass to
\fBmysqld\fR\&. The value should consist of one or more comma\-separated
\fBmysqld\fR
-options\&. See
-Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltest\(rq\&.
+options\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: mysqld-env option
+.\" mysqld-env option: mysql-test-run.pl
+\fB\-\-mysqld\-env=\fR\fB\fIVAR=VAL\fR\fR
+.sp
+Specify additional environment settings for "mysqld"\&. Use additional \fB--mysqld-env\fR options to set more than one variable\&.
.RE
.sp
.RS 4
@@ -1214,7 +1402,7 @@ Run tests using
parallel threads\&. By default, 1 thread is used\&. Use
\fB\-\-parallel=auto\fR
for auto\-setting of
-\fIN\fR\&. The auto value was added in MySQL 5\&.1\&.36\&.
+\fIN\fR\&.
.RE
.sp
.RS 4
@@ -1227,7 +1415,7 @@ for auto\-setting of
.\}
.\" mysql-test-run.pl: port-base option
.\" port-base option: mysql-test-run.pl
-\fB\-\-port\-base=\fR\fB\fIP\fR\fR
+\fB\-\-[mtr\-]port\-base=\fR\fB\fIP\fR\fR
.sp
Specify base of port numbers to be used; a block of 10 will be allocated\&.
\fIP\fR
@@ -1235,14 +1423,12 @@ should be divisible by 10; if it is not, it will be rounded down\&. If running w
.sp
If the port number is given as
auto, which is also the default,
-\fBmysql\-test\-run\&.pl\fRwill allocate a number unique to this host\&. The value may also be given with the environment variable
+\fBmysql\-test\-run\&.pl\fR will allocate a number unique to this host\&. The value may also be given with the environment variable
MTR_PORT_BASE\&.
.sp
+If both \fB\-\-build\-thread\fR and \fB\-\-port\-base\fR are used,
\fB\-\-port\-base\fR
-was added in MySQL 5\&.1\&.45 as a more logical alternative to
-\fB\-\-build\-thread\fR\&. If both are used,
-\fB\-\-port\-base\fR
-takes presedence\&.
+takes precedence\&.
.RE
.sp
.RS 4
@@ -1272,10 +1458,7 @@ Do not run any tests, but print details about all tests, in the order they would
.\" ps-protocol option: mysql-test-run.pl
\fB\-\-ps\-protocol\fR
.sp
-Pass the
-\fB\-\-ps\-protocol\fR
-option to
-\fBmysqltest\fR\&.
+Use the binary protocol between client and server\&.
.RE
.sp
.RS 4
@@ -1340,10 +1523,23 @@ number of times\&.
.\" report-features option: mysql-test-run.pl
\fB\-\-report\-features\fR
.sp
-Display the output of
-SHOW ENGINES
-and
-SHOW VARIABLES\&. This can be used to verify that binaries are built with all required features\&.
+First run a "test" that reports MariaDB features, displaying the output of SHOW ENGINES and SHOW VARIABLES\&. This can be
+used to verify that binaries are built with all required features\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: report-times option
+.\" report-times option: mysql-test-run.pl
+\fB\-\-report\-times\fR
+.sp
+Report how much time has been spent on different phases of test execution\&.
.RE
.sp
.RS 4
@@ -1360,7 +1556,8 @@ SHOW VARIABLES\&. This can be used to verify that binaries are built with all re
.sp
If a test fails, it is retried up to a maximum of
\fIN\fR
-runs, but will terminate after 2 failures\&. Default is 3, set to 1 or 0 for no retries\&. This option has no effect unless
+runs (default 1)\&. Retries are also limited by the maximum number of failures before stopping,
+set with the \fB-\-retry\-failure\fR option\&. This option has no effect unless
\fB\-\-force\fR
is also used; without it, test execution will terminate after the first failure\&.
.sp
@@ -1385,7 +1582,8 @@ may fail in total, as each repetition is considered a new test case, which may i
.\" retry-failure option: mysql-test-run.pl
\fB\-\-retry\-failure=\fR\fB\fIN\fR\fR
.sp
-Allow a failed and retried test to fail more than the default 2 times before giving it up\&. Setting it to 0 or 1 effectively turns off retries
+When using the \fB-\-retry\fR option to retry failed tests,
+stop when N failures have occured (default 2)\&. Setting it to 0 or 1 effectively turns off retries\&.
.RE
.sp
.RS 4
@@ -1460,7 +1658,7 @@ with support for SSL connections\&.
.\}
.\" mysql-test-run.pl: skip-test option
.\" skip-test option: mysql-test-run.pl
-\fB\-\-skip\-test=\fR\fB\fIregex\fR\fR
+\fB\-\-skip\-test=\fR\fB\fIregex\fR\fR|\fR\fB\fIregex\fR\fR
.sp
Specify a regular expression to be applied to test case names\&. Cases with names that match the expression are skipped\&. tests to skip\&.
.sp
@@ -1479,6 +1677,21 @@ option for details\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: skip-test-list option
+.\" skip-test-list option: mysql-test-run.pl
+\fB\-\-skip\-test\-list=\fB\fIFILE\fR
+.sp
+Skip the tests listed in FILE\&. Each line in the file is an entry and should be formatted as: <TESTNAME> : <COMMENT>
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
\fB\-\-skip\-*\fR
.sp
\fB\-\-skip\-*\fR
@@ -1517,10 +1730,7 @@ to
.\" sp-protocol option: mysql-test-run.pl
\fB\-\-sp\-protocol\fR
.sp
-Pass the
-\fB\-\-sp\-protocol\fR
-option to
-\fBmysqltest\fR\&.
+Create a stored procedure to execute all queries\&.
.RE
.sp
.RS 4
@@ -1539,7 +1749,7 @@ If
\fBmysql\-test\-run\&.pl\fR
is started with the
\fB\-\-ssl\fR
-option, it sets up a secure conection for all test cases\&. In this case, if
+option, it sets up a secure connection for all test cases\&. In this case, if
\fBmysqld\fR
does not support SSL,
\fBmysql\-test\-run\&.pl\fR
@@ -1555,6 +1765,21 @@ Couldn\'t find support for SSL
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: staging-run option
+.\" staging-run option: mysql-test-run.pl
+\fB\-\-staging\-run\fR
+.sp
+Run a limited number of tests (no slow tests)\&. Used for running staging trees with valgrind\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: start-and-exit option
.\" start-and-exit option: mysql-test-run.pl
\fB\-\-start\fR
@@ -1591,6 +1816,22 @@ will stop once the server has been started, but will terminate if the server die
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: start-and-exit option
+.\" start-and-exit option: mysql-test-run.pl
+\fB\-\-start\-and\-exit\fR
+.sp
+Same
+\fB\-\-start\fR, but mysql-test-run terminates and leaves just the server running\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: start-dirty option
.\" start-dirty option: mysql-test-run.pl
\fB\-\-start\-dirty\fR
@@ -1624,6 +1865,21 @@ sorts the list of names of the test cases to be run, and then begins with
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql-test-run.pl: strace option
+.\" strace option: mysql-test-run.pl
+\fB\-\-strace\fR
+.sp
+Run the "mysqld" executables using strace. Default options are \fB-f -o var/log/'mysqld-name'.strace\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql-test-run.pl: strace-client option
.\" strace-client option: mysql-test-run.pl
\fB\-\-strace\-client\fR
@@ -1631,7 +1887,42 @@ sorts the list of names of the test cases to be run, and then begins with
Create
\fBstrace\fR
output for
-\fBmysqltest\fR\&.
+\fBmysqltest\fR, optionally specifying name and path
+to the trace program to use\&.
+.sp
+Example: \&./mysql\-test\-run\&.pl \-\-strace\-client=ktrace
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: strace-option option
+.\" strace-option option: mysql-test-run.pl
+\fB\-\-strace\-option\fR=\fR\fB\fIARGS\fR\fR
+.sp
+Option to give
+\fBstrace\fR,
+replaces default option(s)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: stress option
+.\" stress option: mysql-test-run.pl
+\fB\-\-stress=\fR\fB\fIARGS\fR\fR
+.sp
+Run stress test, providing options to mysql\-stress\-test\&.pl\&. Options are separated by comma\&.
.RE
.sp
.RS 4
@@ -1644,13 +1935,41 @@ output for
.\}
.\" mysql-test-run.pl: suite option
.\" suite option: mysql-test-run.pl
-\fB\-\-suite=\fR\fB\fIsuite_name\fR\fR
+\fB\-\-suite[s]=\fR\fB\fIsuite_name...\fR\fR
.sp
-Run the named test suite\&. The default name is
-main
-(the regular test suite located in the
-mysql\-test
-directory)\&.
+Comma separated list of suite names to run. The default is: "main-,archive-,binlog-,csv-,federated-,funcs_1-,funcs_2-,handler-,heap-,innodb-,innodb_fts-,
+innodb_zip-,maria-,multi_source-,optimizer_unfixed_bugs-,parts-,percona-,perfschema-,
+plugins-,roles-,rpl-,sys_vars-,unit-,vcol-"\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: stop-file option
+.\" stop-file option: mysql-test-run.pl
+\fB\-\-stop\-file=\fR\fB\fIfile\fR\fR
+.sp
+If this file is detected, mysqltest will not start new tests until the file is removed (also MTR_STOP_FILE environment variable)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: stop-keep-alive option
+.\" stop-keep-alive option: mysql-test-run.pl
+\fB\-\-stop\-keep\-alive=\fR\fB\fIsec\fR\fR
+.sp
+Works with \fB--stop-file\fR, print messages every \fIsec\fR seconds when mysqltest is waiting to remove the file (for buildbot) (also MTR_STOP_KEEP_ALIVE environment variable)\&.
.RE
.sp
.RS 4
@@ -1665,7 +1984,7 @@ directory)\&.
.\" suite-timeout option: mysql-test-run.pl
\fB\-\-suite\-timeout=\fR\fB\fIminutes\fR\fR
.sp
-Specify the maximum test suite runtime\&.
+Specify the maximum test suite runtime in minutes\&. The default is 360\&.
.RE
.sp
.RS 4
@@ -1680,7 +1999,7 @@ Specify the maximum test suite runtime\&.
.\" testcase-timeout option: mysql-test-run.pl
\fB\-\-testcase\-timeout\fR
.sp
-Specify the maximum test case runtime\&.
+Specify the maximum test case runtime in minutes\&. The default is 15\&.
.RE
.sp
.RS 4
@@ -1695,8 +2014,7 @@ Specify the maximum test case runtime\&.
.\" timediff option: mysql-test-run.pl
\fB\-\-timediff\fR
.sp
-Adds to each test report for a test case, the total time in sconds and milliseconds passed since the preceding test ended\&. This option can only be used together with
-\fB\-\-timestamp\fR, and has no effect without it\&.
+Used with \fB\-\-timestamp\fR, also print time passed since the previous test started\&.
.RE
.sp
.RS 4
@@ -1762,7 +2080,22 @@ will be set to the path for this directory, whether it has the default value or
.\" user option: mysql-test-run.pl
\fB\-\-user=\fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server (default root)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql-test-run.pl: user-args option
+.\" user-args option: mysql-test-run.pl
+\fB\-\-user\-args\fR
+.sp
+In combination with \fBstart*\fR and no test name, drops arguments to mysqld except those specified with \fB\-\-mysqld\fR (if any)\&.
.RE
.sp
.RS 4
@@ -1775,16 +2108,16 @@ The MySQL user name to use when connecting to the server\&.
.\}
.\" mysql-test-run.pl: valgrind option
.\" valgrind option: mysql-test-run.pl
-\fB\-\-valgrind\fR
+\fB\-\-valgrind[\-all]\fR
.sp
Run
\fBmysqltest\fR
and
\fBmysqld\fR
with
-\fBvalgrind\fR\&. Thiks and the following
+\fBvalgrind\fR\&. This and the following
\fB\-\-valgrind\fR
-options require that the executables have been build with
+options require that the executables have been built with
\fBvalgrind\fR
support\&.
.RE
@@ -1819,9 +2152,11 @@ server with
.\" valgrind-mysqltest option: mysql-test-run.pl
\fB\-\-valgrind\-mysqltest\fR
.sp
-Run
+Run the
\fBmysqltest\fR
-with
+and
+\fBmysql_client_test\fR
+executables with
\fBvalgrind\fR\&.
.RE
.sp
@@ -1837,8 +2172,7 @@ with
.\" valgrind-options option: mysql-test-run.pl
\fB\-\-valgrind\-option=\fR\fB\fIstr\fR\fR
.sp
-Extra options to pass to
-\fBvalgrind\fR\&.
+Option to give \fBvalgrind\fR. Replaces default option(s)\&. Can be specified more then once&.
.RE
.sp
.RS 4
@@ -1853,7 +2187,7 @@ Extra options to pass to
.\" valgrind-path option: mysql-test-run.pl
\fB\-\-valgrind\-path=\fR\fB\fIpath\fR\fR
.sp
-Specify the path name to the
+Path to the
\fBvalgrind\fR
executable\&.
.RE
@@ -1918,10 +2252,7 @@ Write when and why servers are restarted between test cases\&.
.\" view-protocol option: mysql-test-run.pl
\fB\-\-view\-protocol\fR
.sp
-Pass the
-\fB\-\-view\-protocol\fR
-option to
-\fBmysqltest\fR\&.
+Create a view to execute all non updating queries\&.
.RE
.sp
.RS 4
@@ -1936,9 +2267,9 @@ option to
.\" vs-config option: mysql-test-run.pl
\fB\-\-vs\-config=\fR\fB\fIconfig_val\fR\fR
.sp
-Specify the configuration used to build MySQL (for example,
-\fB\-\-vs\-config=debug\fR
-\fB\-\-vs\-config=release\fR)\&. This option is for Windows only\&.
+Visual Studio configuration used to create executables
+(default: MTR_VS_CONFIG environment variable)
+This option is for Windows only\&.
.RE
.sp
.RS 4
@@ -1957,9 +2288,7 @@ If
\fB\-\-start\fR
or
\fB\-\-start\-dirty\fR
-is used, wait for all servers to exit before termination\&. Otherise, it will terminate if one (of several) servers is restarted\&.
-.sp
-This option was added in MySQL 5\&.1\&.36\&.
+is used, wait for all servers to exit before termination\&. Otherwise, it will terminate if one (of several) servers is restarted\&.
.RE
.sp
.RS 4
@@ -1983,7 +2312,7 @@ Search the server log for errors or warning after each test and report any suspi
.SH "COPYRIGHT"
.br
.PP
-Copyright \(co 2007, 2010, Oracle and/or its affiliates
+Copyright \(co 2007, 2010, Oracle and/or its affiliates, 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -1992,8 +2321,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql.1 b/man/mysql.1
index b9430ccae6a..48ab6c7cd95 100644
--- a/man/mysql.1
+++ b/man/mysql.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -25,7 +18,7 @@
.\" SQL scripts
.\" batch SQL files
.SH "NAME"
-mysql \- the MySQL command\-line tool
+mysql \- the MariaDB command\-line tool
.SH "SYNOPSIS"
.HP \w'\fBmysql\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u
\fBmysql [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR
@@ -34,7 +27,7 @@ mysql \- the MySQL command\-line tool
\fBmysql\fR
is a simple SQL shell (with GNU
readline
-capabilities)\&. It supports interactive and noninteractive use\&. When used interactively, query results are presented in an ASCII\-table format\&. When used noninteractively (for example, as a filter), the result is presented in tab\-separated format\&. The output format can be changed using command options\&.
+capabilities)\&. It supports interactive and non\-interactive use\&. When used interactively, query results are presented in an ASCII\-table format\&. When used non\-interactively (for example, as a filter), the result is presented in tab\-separated format\&. The output format can be changed using command options\&.
.PP
If you have problems due to insufficient memory for large result sets, use the
\fB\-\-quick\fR
@@ -77,13 +70,11 @@ Then type an SQL statement, end it with
\eG
and press Enter\&.
.PP
-As of MySQL 5\&.1\&.10, typing Control\-C causes
+Typing Control\-C causes
\fBmysql\fR
to attempt to kill the current statement\&. If this cannot be done, or Control\-C is typed again before the statement is killed,
\fBmysql\fR
-exits\&. Previously, Control\-C caused
-\fBmysql\fR
-to exit in all cases\&.
+exits\&.
.PP
You can execute SQL statements in a script file (batch file) like this:
.sp
@@ -104,13 +95,10 @@ shell> \fBmysql \fR\fB\fIdb_name\fR\fR\fB < \fR\fB\fIscript\&.sql\fR\fR\fB > \fR
.PP
\fBmysql\fR
supports the following options, which can be specified on the command line or in the
-[mysql]
-and
-[client]
+[mysql], [client], [client-server] or [client-mariadb]
option file groups\&.
\fBmysql\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
+also supports the options for processing option files\&.
.sp
.RS 4
.ie n \{\
@@ -137,12 +125,27 @@ Display a help message and exit\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql: abort-source-on-error option
+.\" abort-source-on-error: mysql
+\fB\-\-abort\-source\-on\-error\fR
+.sp
+Abort 'source filename' operations in case of errors\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql: auto-rehash option
.\" auto-rehash option: mysql
\fB\-\-auto\-rehash\fR
.sp
Enable automatic rehashing\&. This option is on by default, which enables database, table, and column name completion\&. Use
-\fB\-\-disable\-auto\-rehash\fR
+\fB\-\-disable\-auto\-rehash\fR, \fB\-\-no\-auto\-rehash\fR, or \fB\-\-skip\-auto\-rehash\fR
to disable rehashing\&. That causes
\fBmysql\fR
to start faster, but you must issue the
@@ -162,6 +165,21 @@ completes it\&. Otherwise, you can press Tab again to see the possible names tha
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql: auto-vertical-output option
+.\" auto-vertical-output option: mysql
+\fB\-\-auto\-vertical\-output\fR
+.sp
+Automatically switch to vertical output mode if the result is wider than the terminal width\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql: batch option
.\" batch option: mysql
\fB\-\-batch\fR,
@@ -184,12 +202,26 @@ option\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql: binary-mode option
+.\" binary-mode option: mysql
+\fB\-\-binary\-mode\fR
+.sp
+By default, ASCII '\e0' is disallowed and '\er\en' is translated to '\en'\&. This switch turns off both features, and also turns off parsing of all client commands except \eC and DELIMITER, in non-interactive mode (for input piped to mysql or loaded using the 'source' command)\&. This is necessary when processing output from mysqlbinlog that may contain blobs\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql: character-sets-dir option
.\" character-sets-dir option: mysql
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
.sp
-The directory where character sets are installed\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+The directory where character sets are installed\&.
.RE
.sp
.RS 4
@@ -220,10 +252,7 @@ Write column names in results\&.
\fB\-\-column\-type\-info\fR,
\fB\-m\fR
.sp
-Display result set metadata\&. This option was added in MySQL 5\&.1\&.14\&. (Before that, use
-\fB\-\-debug\-info\fR\&.) The
-\fB\-m\fR
-short option was added in MySQL 5\&.1\&.21\&.
+Display result set metadata\&.
.RE
.sp
.RS 4
@@ -239,7 +268,7 @@ short option was added in MySQL 5\&.1\&.21\&.
\fB\-\-comments\fR,
\fB\-c\fR
.sp
-Whether to preserve comments in statements sent to the server\&. The default is \-\-skip\-comments (discard comments), enable with \-\-comments (preserve comments)\&. This option was added in MySQL 5\&.1\&.23\&.
+Whether to preserve comments in statements sent to the server\&. The default is \-\-skip\-comments (discard comments), enable with \-\-comments (preserve comments)\&.
.RE
.sp
.RS 4
@@ -286,7 +315,7 @@ Set the number of seconds before connection timeout\&. (Default value is 0\&.)
\fB\-\-database=\fR\fB\fIdb_name\fR\fR,
\fB\-D \fR\fB\fIdb_name\fR\fR
.sp
-The database to use\&. This is useful primarily in an option file\&.
+The database to use\&.
.RE
.sp
.RS 4
@@ -321,7 +350,7 @@ string is
.\" debug-check option: mysql
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
@@ -337,9 +366,22 @@ Print some debugging information when the program exits\&. This option was added
\fB\-\-debug\-info\fR,
\fB\-T\fR
.sp
-Before MySQL 5\&.1\&.14, this option prints debugging information and memory and CPU usage statistics when the program exits, and also causes display of result set metadata during execution\&. As of MySQL 5\&.1\&.14, use
-\fB\-\-column\-type\-info\fR
-to display result set metadata\&.
+Prints debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: default-auth option
+.\" default-auth option: mysql
+\fB\-\-default\-auth=\fR\fB\fIname\fR
+.sp
+Default authentication client-side plugin to use\&.
.RE
.sp
.RS 4
@@ -362,12 +404,25 @@ A common issue that can occur when the operating system uses
utf8
or another multi\-byte character set is that output from the
\fBmysql\fR
-client is formatted incorrectly, due to the fact that the MySQL client uses the
+client is formatted incorrectly, due to the fact that the MariaDB client uses the
latin1
character set by default\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&.
+.RE
.sp
-See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq, for more information\&.
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: defaults-extra-file option
+.\" defaults-extra-file option: mysql
+\fB\-\-defaults-extra-file=\fR\fB\fIfilename\fR\fR
+.sp
+Set \fB\fIfilename\fR\fR as the file to read default options from after the global defaults files has been read\&.
+Must be given as first option\&.
.RE
.sp
.RS 4
@@ -393,12 +448,11 @@ Set \fB\fIfilename\fR\fR as the file to read default options from, override glob
.sp -1
.IP \(bu 2.3
.\}
-.\" mysql: defaults-extra-file option
-.\" defaults-extra-file option: mysql
-\fB\-\-defaults-extra-file=\fR\fB\fIfilename\fR\fR
+.\" mysql: defaults-group-suffix option
+.\" defaults-group-suffix option: mysql
+\fB\-\-defaults\-group\-suffix=\fR\fB\fIsuffix\fR\fR
.sp
-Set \fB\fIfilename\fR\fR as the file to read default options from after the global defaults files has been read\&.
-Must be given as first option\&.
+In addition to the groups named on the command line, read groups that have the given suffix\&.
.RE
.sp
.RS 4
@@ -451,9 +505,8 @@ the section called \(lqMYSQL COMMANDS\(rq\&.
\fB\-\-execute=\fR\fB\fIstatement\fR\fR,
\fB\-e \fR\fB\fIstatement\fR\fR
.sp
-Execute the statement and quit\&. The default output format is like that produced with
-\fB\-\-batch\fR\&. See
-Section\ \&4.2.3.1, \(lqUsing Options on the Command Line\(rq, for some examples\&.
+Execute the statement and quit\&. Disables \fB\-\-force\fR and history file\&. The default output format is like that produced with
+\fB\-\-batch\fR\&.
.RE
.sp
.RS 4
@@ -469,7 +522,7 @@ Section\ \&4.2.3.1, \(lqUsing Options on the Command Line\(rq, for some examples
\fB\-\-force\fR,
\fB\-f\fR
.sp
-Continue even if an SQL error occurs\&.
+Continue even if an SQL error occurs\&. Sets \fB\-\-abort\-source\-on-error\fR to 0\&.
.RE
.sp
.RS 4
@@ -485,7 +538,7 @@ Continue even if an SQL error occurs\&.
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -517,10 +570,22 @@ Produce HTML output\&.
\fB\-\-ignore\-spaces\fR,
\fB\-i\fR
.sp
-Ignore spaces after function names\&. The effect of this is described in the discussion for the
-IGNORE_SPACE
-SQL mode (see
-Section\ \&5.1.8, \(lqServer SQL Modes\(rq)\&.
+Ignore spaces after function names\&. Allows one to have spaces (including tab characters and new line characters) between function name and '('\&. The drawback is that this causes built in functions to become reserved words\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: init-command option
+.\" init-command option: mysql
+\fB\-\-init\-command=\fR\fB\fIstr\fR\fR\fR
+.sp
+SQL Command to execute when connecting to the MariaDB server\&. Will automatically be re-executed when reconnecting\&.
.RE
.sp
.RS 4
@@ -577,7 +642,7 @@ has no effect if the server does not also support it\&.
.\" max-allowed-packet option: mysql
\fB\-\-max\-allowed\-packet=\fR\fB\fInum\fR\fR
.sp
-Set the maximum packet length to send to or receive from the server\&. (Default value is 16MB\&.)
+Set the maximum packet length to send to or receive from the server\&. (Default value is 16MB, largest 1GB\&.)
.RE
.sp
.RS 4
@@ -618,7 +683,7 @@ and
both are recognized\&. Use
\fB\-\-skip\-named\-commands\fR
to disable named commands\&. See
-the section called \(lqMYSQL COMMANDS\(rq\&.
+the section called \(lqMYSQL COMMANDS\(rq\&. Disabled by default\&.
.RE
.sp
.RS 4
@@ -695,72 +760,12 @@ Do not read default options from any option file\&. This must be given as the fi
.sp -1
.IP \(bu 2.3
.\}
-.\" mysql: no-named-commands option
-.\" no-named-commands option: mysql
-\fB\-\-no\-named\-commands\fR,
-\fB\-g\fR
-.sp
-Deprecated, use
-\fB\-\-disable\-named\-commands\fR
-instead\&.
-\fB\-\-no\-named\-commands\fR
-is removed in MySQL 5\&.5\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-.\" mysql: no-pager option
-.\" no-pager option: mysql
-\fB\-\-no\-pager\fR
-.sp
-Deprecated form of
-\fB\-\-skip\-pager\fR\&. See the
-\fB\-\-pager\fR
-option\&.
-\fB\-\-no\-pager\fR
-is removed in MySQL 5\&.5\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-.\" mysql: no-tee option
-.\" no-tee option: mysql
-\fB\-\-no\-tee\fR
-.sp
-Deprecated form of
-\fB\-\-skip\-tee\fR\&. See the
-\fB\-\-tee\fR
-option\&.
-\fB\-\-no\-tee\fR
-is removed in MySQL 5\&.5\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
.\" mysql: one-database option
.\" one-database option: mysql
\fB\-\-one\-database\fR,
\fB\-o\fR
.sp
-Ignore statements except those for the default database named on the command line\&. This is useful for skipping updates to other databases in the binary log\&.
+Ignore statements except those those that occur while the default database is the one named on the command line\&. This filtering is limited, and based only on USE statements\&. This is useful for skipping updates to other databases in the binary log\&.
.RE
.sp
.RS 4
@@ -810,8 +815,7 @@ option on the command line,
\fBmysql\fR
prompts for one\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -838,12 +842,27 @@ On Windows, connect to the server via a named pipe\&. This option applies only i
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql: plugin-dir option
+.\" plugin-dir option: mysql
+\fB\-\-plugin\-dir=\fIdir_name\fR
+.sp
+Directory for client-side plugins\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql: port option
.\" port option: mysql
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
\fB\-P \fR\fB\fIport_num\fR\fR
.sp
-The TCP/IP port number to use for the connection\&.
+The TCP/IP port number to use for the connection or 0 for default to, in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306)\&.
.RE
.sp
.RS 4
@@ -869,12 +888,26 @@ Print the program argument list and exit\&. This must be given as the first argu
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql: progress-reports option
+.\" progress-reports option: mysql
+\fB\-\-progress\-reports\fR
+.sp
+Get progress reports for long running commands (such as ALTER TABLE)\&. (Defaults to on; use \fB\-\-skip\-progress\-reports\fR to disable\&.)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysql: prompt option
.\" prompt option: mysql
\fB\-\-prompt=\fR\fB\fIformat_str\fR\fR
.sp
-Set the prompt to the specified format\&. The default is
-mysql>\&. The special sequences that the prompt can contain are described in
+Set the prompt to the specified format\&. The special sequences that the prompt can contain are described in
the section called \(lqMYSQL COMMANDS\(rq\&.
.RE
.sp
@@ -890,8 +923,7 @@ the section called \(lqMYSQL COMMANDS\(rq\&.
.\" protocol option: mysql
\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
.sp
-The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
-Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
.RE
.sp
.RS 4
@@ -979,8 +1011,8 @@ CHAR(92)
.\" reconnect option: mysql
\fB\-\-reconnect\fR
.sp
-If the connection to the server is lost, automatically try to reconnect\&. A single reconnect attempt is made each time the connection is lost\&. To suppress reconnection behavior, use
-\fB\-\-skip\-reconnect\fR\&.
+If the connection to the server is lost, automatically try to reconnect\&. A single reconnect attempt is made each time the connection is lost\&. Enabled by default, to disable use
+\fB\-\-skip\-reconnect\fR or \fB\-\-disable\-reconnect\fR\&.
.RE
.sp
.RS 4
@@ -1180,12 +1212,137 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
.\}
.\" mysql: SSL options
.\" SSL options: mysql
-\fB\-\-ssl*\fR
-.sp
-Options that begin with
\fB\-\-ssl\fR
-specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: SSL CA option
+.\" SSL CA option: mysql
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: SSL CA Path option
+.\" SSL CA Path option: mysql
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: SSL Cert option
+.\" SSL Cert option: mysql
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: SSL Cipher option
+.\" SSL Cipher option: mysql
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: SSL Key option
+.\" SSL Key option: mysql
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: SSL Crl option
+.\" SSL CRL option: mysql
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: SSL Crlpath option
+.\" SSL Crlpath option: mysql
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysql
+\fB\-\-ssl\-verify\-server\-cert\fR
+.sp
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
.RE
.sp
.RS 4
@@ -1249,7 +1406,7 @@ Flush the buffer after each query\&.
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -1333,36 +1490,7 @@ If the connection cannot be established, wait and retry instead of aborting\&.
\fB\-X\fR
.sp
Produce XML output\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-Prior to MySQL 5\&.1\&.12, there was no differentiation in the output when using this option between columns containing the
-NULL
-value and columns containing the string literal
-\'NULL\'; both were represented as
-.sp .5v
-.RE
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-<field name="\fIcolumn_name\fR">NULL</field>
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-Beginning with MySQL 5\&.1\&.12, the output when
+The output when
\fB\-\-xml\fR
is used with
\fBmysql\fR
@@ -1371,7 +1499,7 @@ matches that of
\fBmysqldump\fR(1)
for details\&.
.sp
-Beginning with MySQL 5\&.1\&.18, the XML output also uses an XML namespace, as shown here:
+The XML output also uses an XML namespace, as shown here:
.sp
.if n \{\
.RS 4
@@ -1398,18 +1526,10 @@ shell> \fBmysql \-\-xml \-uroot \-e "SHOW VARIABLES LIKE \'version%\'"\fR
</row>
</resultset>
.fi
-.if n \{\
-.RE
-.\}
-.sp
-(See
-\m[blue]\fBBug#25946\fR\m[]\&\s-2\u[1]\d\s+2\&.)
.RE
.PP
You can also set the following variables by using
-\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR\&. The
-\fB\-\-set\-variable\fR
-format is deprecated and is removed in MySQL 5\&.5\&.
+\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR\&.
.sp
.RS 4
.ie n \{\
@@ -1504,8 +1624,7 @@ environment variable\&.
.PP
The
\&.mysql_history
-should be protected with a restrictive access mode because sensitive information might be written to it, such as the text of SQL statements that contain passwords\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&.
+should be protected with a restrictive access mode because sensitive information might be written to it, such as the text of SQL statements that contain passwords\&.
.PP
If you do not want to maintain a history file, first remove
\&.mysql_history
@@ -1632,7 +1751,7 @@ If you provide an argument to the
help
command,
\fBmysql\fR
-uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. For more information, see
+uses it as a search string to access server\-side help\&. For more information, see
the section called \(lqMYSQL SERVER-SIDE HELP\(rq\&.
.RE
.sp
@@ -1653,7 +1772,7 @@ Change the default character set and issue a
SET NAMES
statement\&. This enables the character set to remain synchronized on the client and server if
\fBmysql\fR
-is run with auto\-reconnect enabled (which is not recommended), because the specified character set is used for reconnects\&. This command was added in MySQL 5\&.1\&.7\&.
+is run with auto\-reconnect enabled (which is not recommended), because the specified character set is used for reconnects\&.
.RE
.sp
.RS 4
@@ -1705,16 +1824,14 @@ Change the string that
\fBmysql\fR
interprets as the separator between SQL statements\&. The default is the semicolon character (\(lq;\(rq)\&.
.sp
-The delimiter can be specified as an unquoted or quoted argument\&. Quoting can be done with either single quote (\') or douple quote (") characters\&. To include a quote within a quoted string, either quote the string with the other quote character or escape the quote with a backslash (\(lq\e\(rq) character\&. Backslash should be avoided outside of quoted strings because it is the escape character for MySQL\&. For an unquoted argument, the delmiter is read up to the first space or end of line\&. For a quoted argument, the delimiter is read up to the matching quote on the line\&.
+The delimiter can be specified as an unquoted or quoted argument\&. Quoting can be done with either single quote (\') or douple quote (") characters\&. To include a quote within a quoted string, either quote the string with the other quote character or escape the quote with a backslash (\(lq\e\(rq) character\&. Backslash should be avoided outside of quoted strings because it is the escape character for MariaDB\&. For an unquoted argument, the delmiter is read up to the first space or end of line\&. For a quoted argument, the delimiter is read up to the matching quote on the line\&.
.sp
When the delimiter recognized by
\fBmysql\fR
is set to something other than the default of
\(lq;\(rq, instances of that character are sent to the server without interpretation\&. However, the server itself still interprets
\(lq;\(rq
-as a statement delimiter and processes statements accordingly\&. This behavior on the server side comes into play for multiple\-statement execution (see
-Section\ \&21.9.12, \(lqC API Support for Multiple Statement Execution\(rq), and for parsing the body of stored procedures and functions, triggers, and events (see
-Section\ \&19.1, \(lqDefining Stored Programs\(rq)\&.
+as a statement delimiter and processes statements accordingly\&. This behavior on the server side comes into play for multiple\-statement execution, and for parsing the body of stored procedures and functions, triggers, and events\&.
.RE
.sp
.RS 4
@@ -2505,7 +2622,7 @@ You can set the
prompt
option in the
[mysql]
-group of any MySQL option file, such as
+group of any MariaDB option file, such as
/etc/my\&.cnf
or the
\&.my\&.cnf
@@ -2524,8 +2641,7 @@ prompt=(\e\eu@\e\eh) [\e\ed]>\e\e_
.sp
In this example, note that the backslashes are doubled\&. If you set the prompt using the
prompt
-option in an option file, it is advisable to double the backslashes when using the special prompt options\&. There is some overlap in the set of allowable prompt options and the set of special escape sequences that are recognized in option files\&. (The rules for escape sequences in option files are listed in
-Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&.) The overlap may cause you problems if you use single backslashes\&. For example,
+option in an option file, it is advisable to double the backslashes when using the special prompt options\&. There is some overlap in the set of allowable prompt options and the set of special escape sequences that are recognized in option files\&. The overlap may cause you problems if you use single backslashes\&. For example,
\es
is interpreted as a space rather than as the current seconds value\&. The following example shows how to define a prompt within an option file to include the current time in
HH:MM:SS>
@@ -2588,10 +2704,9 @@ If you provide an argument to the
help
command,
\fBmysql\fR
-uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. The proper operation of this command requires that the help tables in the
+uses it as a search string to access server\-side help\&. The proper operation of this command requires that the help tables in the
mysql
-database be initialized with help topic information (see
-Section\ \&5.1.9, \(lqServer-Side Help\(rq)\&.
+database be initialized with help topic information.
.PP
If there is no match for the search string, the search fails:
.sp
@@ -2782,17 +2897,14 @@ with the
\fB\-\-verbose\fR
option, which causes each statement to be displayed before the result that it produces\&.
.PP
-As of MySQL 5\&.1\&.23,
\fBmysql\fR
-ignores Unicode byte order mark (BOM) characters at the beginning of input files\&. Previously, it read them and sent them to the server, resulting in a syntax error\&. Presence of a BOM does not cause
+ignores Unicode byte order mark (BOM) characters at the beginning of input files\&. Presence of a BOM does not cause
\fBmysql\fR
to change its default character set\&. To do that, invoke
\fBmysql\fR
with an option such as
\fB\-\-default\-character\-set=utf8\fR\&.
.PP
-For more information about batch mode, see
-Section\ \&3.5, \(lqUsing mysql in Batch Mode\(rq\&.
.SH "MYSQL TIPS"
.PP
This section describes some techniques that can help you use
@@ -2846,7 +2958,7 @@ When you use the
\fB\-\-safe\-updates\fR
option,
\fBmysql\fR
-issues the following statement when it connects to the MySQL server:
+issues the following statement when it connects to the MariaDB server:
.sp
.if n \{\
.RS 4
@@ -2858,9 +2970,6 @@ SET sql_safe_updates=1, sql_select_limit=1000, sql_max_join_size=1000000;
.RE
.\}
.PP
-See
-Section\ \&5.1.5, \(lqSession System Variables\(rq\&.
-.PP
The
SET
statement has the following effects:
@@ -2980,12 +3089,10 @@ client with the
\fB\-\-skip\-reconnect\fR
option\&.
.PP
-For more information about auto\-reconnect and its effect on state information when a reconnection occurs, see
-Section\ \&21.9.11, \(lqControlling Automatic Reconnection Behavior\(rq\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -3000,8 +3107,6 @@ Bug#25946
\%http://bugs.mysql.com/bug.php?id=25946
.RE
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql.server.1 b/man/mysql.server.1
index dc965921f6f..ba206cb985c 100644
--- a/man/mysql.server.1
+++ b/man/mysql.server.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql.server\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL\&.SERVER\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL\&.SERVER\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -20,35 +13,33 @@
.\" -----------------------------------------------------------------
.\" mysql.server
.SH "NAME"
-mysql.server \- MySQL server startup script
+mysql.server \- MariaDB server startup script
.SH "SYNOPSIS"
.HP \w'\fBmysql\ {start|stop}\fR\ 'u
\fBmysql {start|stop}\fR
.SH "DESCRIPTION"
.PP
-MySQL distributions on Unix include a script named
-\fBmysql\&.server\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the Mac OS X Startup Item for MySQL\&.
+MariaDB distributions on Unix include a script named
+\fBmysql\&.server\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the Mac OS X Startup Item for MariaDB\&.
.PP
\fBmysql\&.server\fR
can be found in the
support\-files
-directory under your MySQL installation directory or in a MySQL source distribution\&.
+directory under your MariaDB installation directory or in a MariaDB source distribution\&.
.PP
If you use the Linux server RPM package (MySQL\-server\-\fIVERSION\fR\&.rpm), the
\fBmysql\&.server\fR
script will be installed in the
/etc/init\&.d
directory with the name
-mysql\&. You need not install it manually\&. See
-Section\ \&2.6.1, \(lqInstalling MySQL from RPM Packages on Linux\(rq, for more information on the Linux RPM packages\&.
+mysql\&. You need not install it manually\&.
.PP
Some vendors provide RPM packages that install a startup script under a different name such as
\fBmysqld\fR\&.
.PP
-If you install MySQL from a source distribution or using a binary distribution format that does not install
+If you install MariaDB from a source distribution or using a binary distribution format that does not install
\fBmysql\&.server\fR
-automatically, you can install it manually\&. Instructions are provided in
-Section\ \&2.13.1.2, \(lqStarting and Stopping MySQL Automatically\(rq\&.
+automatically, you can install it manually\&.
.PP
\fBmysql\&.server\fR
reads options from the
@@ -58,8 +49,7 @@ and
sections of option files\&. For backward compatibility, it also reads
[mysql_server]
sections, although you should rename such sections to
-[mysql\&.server]
-when using MySQL 5\&.1\&.
+[mysql\&.server]&.
.PP
\fBmysql\&.server\fR
supports the following options\&.
@@ -76,7 +66,7 @@ supports the following options\&.
.\" basedir option: mysql.server
\fB\-\-basedir=\fR\fB\fIpath\fR\fR
.sp
-The path to the MySQL installation directory\&.
+The path to the MariaDB installation directory\&.
.RE
.sp
.RS 4
@@ -91,7 +81,7 @@ The path to the MySQL installation directory\&.
.\" datadir option: mysql.server
\fB\-\-datadir=\fR\fB\fIpath\fR\fR
.sp
-The path to the MySQL data directory\&.
+The path to the MariaDB data directory\&.
.RE
.sp
.RS 4
@@ -106,7 +96,7 @@ The path to the MySQL data directory\&.
.\" pid-file option: mysql.server
\fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR
.sp
-The path name of the file in which the server should write its process ID\&.
+The path name of the file in which the server should write its process ID\&. If not provided, the default, "host_name.pid" is used.
.RE
.sp
.RS 4
@@ -123,7 +113,7 @@ The path name of the file in which the server should write its process ID\&.
.sp
How long in seconds to wait for confirmation of server startup\&. If the server does not start within this time,
\fBmysql\&.server\fR
-exits with an error\&. The default value is 900\&. A value of 0 means not to wait at all for startup\&. Negative values mean to wait forever (no timeout)\&. This option was added in MySQL 5\&.1\&.17\&. Before that, a value of 900 is always used\&.
+exits with an error\&. The default value is 900\&. A value of 0 means not to wait at all for startup\&. Negative values mean to wait forever (no timeout)\&.
.RE
.sp
.RS 4
@@ -176,7 +166,7 @@ The login user name to use for running
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -185,8 +175,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1
index a366092012c..d28945bbbe7 100644
--- a/man/mysql_client_test.1
+++ b/man/mysql_client_test.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_client_test\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 03/31/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL
-.\" Language: English
.\"
-.TH "\FBMYSQL_CLIENT_TEST" "1" "03/31/2010" "MySQL" "MySQL Database System"
+.TH "\FBMYSQL_CLIENT_TEST" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -33,7 +26,7 @@ mysql_client_test_embedded \- test client API for embedded server
.PP
The
\fBmysql_client_test\fR
-program is used for testing aspects of the MySQL client API that cannot be tested using
+program is used for testing aspects of the MariaDB client API that cannot be tested using
\fBmysqltest\fR
and its test language\&.
\fBmysql_client_test_embedded\fR
@@ -128,7 +121,7 @@ The database to use\&.
\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
\fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR
.sp
-Write a debugging log if MySQL is built with debugging support\&. The default
+Write a debugging log if MariaDB is built with debugging support\&. The default
\fIdebug_options\fR
value is
\'d:t:o,/tmp/mysql_client_test\&.trace\'\&.
@@ -165,7 +158,7 @@ library\&.
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -304,7 +297,7 @@ may optionally behave in a different way than if called manually, for example by
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -326,7 +319,7 @@ mysql\-test/var\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright \(co 2007, 2010, Oracle and/or its affiliates
+Copyright \(co 2007, 2010, Oracle and/or its affiliates, 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -335,8 +328,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_config.1 b/man/mysql_config.1
index 86086e15f45..dd6df086c59 100644
--- a/man/mysql_config.1
+++ b/man/mysql_config.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_config\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_CONFIG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_CONFIG\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -27,7 +20,7 @@ mysql_config \- get compile options for compiling clients
.SH "DESCRIPTION"
.PP
\fBmysql_config\fR
-provides you with useful information for compiling your MySQL client and connecting it to MySQL\&.
+provides you with useful information for compiling your MariaDB client and connecting it to MariaDB\&.
.PP
\fBmysql_config\fR
supports the following options\&.
@@ -63,7 +56,7 @@ for more portable options that contain only include paths\&.
.\" include option: mysql_config
\fB\-\-include\fR
.sp
-Compiler options to find MySQL include files\&.
+Compiler options to find MariaDB include files\&.
.RE
.sp
.RS 4
@@ -81,7 +74,7 @@ Compiler options to find MySQL include files\&.
\fB\-\-libmysqld\-libs\fR,
\fB\-\-embedded\fR
.sp
-Libraries and options required to link with the MySQL embedded server\&.
+Libraries and options required to link with the MariaDB embedded server\&.
.RE
.sp
.RS 4
@@ -96,7 +89,7 @@ Libraries and options required to link with the MySQL embedded server\&.
.\" libs option: mysql_config
\fB\-\-libs\fR
.sp
-Libraries and options required to link with the MySQL client library\&.
+Libraries and options required to link with the MariaDB client library\&.
.RE
.sp
.RS 4
@@ -111,7 +104,7 @@ Libraries and options required to link with the MySQL client library\&.
.\" libs_r option: mysql_config
\fB\-\-libs_r\fR
.sp
-Libraries and options required to link with the thread\-safe MySQL client library\&.
+Libraries and options required to link with the thread\-safe MariaDB client library\&.
.RE
.sp
.RS 4
@@ -126,7 +119,7 @@ Libraries and options required to link with the thread\-safe MySQL client librar
.\" plugindir option: mysql_config
\fB\-\-plugindir\fR
.sp
-The default plugin directory path name, defined when configuring MySQL\&. This option was added in MySQL 5\&.1\&.24\&.
+The default plugin directory path name, defined when configuring MariaDB\&.
.RE
.sp
.RS 4
@@ -141,7 +134,7 @@ The default plugin directory path name, defined when configuring MySQL\&. This o
.\" port option: mysql_config
\fB\-\-port\fR
.sp
-The default TCP/IP port number, defined when configuring MySQL\&.
+The default TCP/IP port number, defined when configuring MariaDB\&.
.RE
.sp
.RS 4
@@ -156,7 +149,7 @@ The default TCP/IP port number, defined when configuring MySQL\&.
.\" socket option: mysql_config
\fB\-\-socket\fR
.sp
-The default Unix socket file, defined when configuring MySQL\&.
+The default Unix socket file, defined when configuring MariaDB\&.
.RE
.sp
.RS 4
@@ -171,7 +164,7 @@ The default Unix socket file, defined when configuring MySQL\&.
.\" variable option: mysql_config
\fB\-\-variable=VAR\fR
.sp
-Path to MySQL include, library and plugin directories\&. \fBVAR\fR is one of
+Path to MariaDB include, library and plugin directories\&. \fBVAR\fR is one of
`pkgincludedir`, `pkglibdir` and `plugindir`, respectively\&.
.RE
.sp
@@ -187,7 +180,7 @@ Path to MySQL include, library and plugin directories\&. \fBVAR\fR is one of
.\" version option: mysql_config
\fB\-\-version\fR
.sp
-Version number for the MySQL distribution\&.
+Version number for the MariaDB distribution\&.
.RE
.PP
If you invoke
@@ -219,7 +212,7 @@ Options:
.PP
You can use
\fBmysql_config\fR
-within a command line to include the value that it displays for a particular option\&. For example, to compile a MySQL client program, use
+within a command line to include the value that it displays for a particular option\&. For example, to compile a MariaDB client program, use
\fBmysql_config\fR
as follows:
.sp
@@ -240,7 +233,7 @@ this way, be sure to invoke it within backtick (\(lq`\(rq) characters\&. That te
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -249,8 +242,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1
index bb4c76aac56..6fc03b59b23 100644
--- a/man/mysql_convert_table_format.1
+++ b/man/mysql_convert_table_format.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_convert_table_format\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_CONVERT_TAB" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_CONVERT_TAB" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -100,7 +93,7 @@ Continue even if errors occur\&.
.\" host option: mysql_convert_table_format
\fB\-\-host=\fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -115,10 +108,9 @@ Connect to the MySQL server on the given host\&.
.\" password option: mysql_convert_table_format
\fB\-\-password=\fR\fB\fIpassword\fR\fR
.sp
-The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&.
+The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MariaDB programs\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -181,7 +173,7 @@ if this option is not given\&.
.\" user option: mysql_convert_table_format
\fB\-\-user=\fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -216,7 +208,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -225,8 +217,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1
index 50c3e38be32..fd3ea25c502 100644
--- a/man/mysql_find_rows.1
+++ b/man/mysql_find_rows.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_find_rows\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_FIND_ROWS\F" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_FIND_ROWS\F" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -151,7 +144,7 @@ Start output from this row\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -160,8 +153,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1
index fa66348d24c..f53d103055c 100644
--- a/man/mysql_fix_extensions.1
+++ b/man/mysql_fix_extensions.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_fix_extensions\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_FIX_EXTENSI" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_FIX_EXTENSI" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -61,7 +54,7 @@ shell> \fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -70,8 +63,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1
index ff3b216f6da..fa0c86f6568 100644
--- a/man/mysql_install_db.1
+++ b/man/mysql_install_db.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_install_db\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_INSTALL_DB\" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_INSTALL_DB\" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -20,14 +13,14 @@
.\" -----------------------------------------------------------------
.\" mysql_install_db
.SH "NAME"
-mysql_install_db \- initialize MySQL data directory
+mysql_install_db \- initialize MariaDB data directory
.SH "SYNOPSIS"
.HP \w'\fBmysql_install_db\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
\fBmysql_install_db\fR
-initializes the MySQL data directory and creates the system tables that it contains, if they do not exist\&.
+initializes the MariaDB data directory and creates the system tables that it contains, if they do not exist\&.
.PP
To invoke
\fBmysql_install_db\fR, use the following syntax:
@@ -42,7 +35,7 @@ shell> \fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR
.RE
.\}
.PP
-Because the MySQL server,
+Because the MariaDB server,
\fBmysqld\fR, needs to access the data directory when it runs later, you should either run
\fBmysql_install_db\fR
from the same account that will be used for running
@@ -81,7 +74,7 @@ with the
and
\fB\-\-skip\-grant\-tables\fR
options (see
-Section\ \&2.3.2, \(lqTypical configure Options\(rq)\&. If MySQL was configured with the
+Section\ \&2.3.2, \(lqTypical configure Options\(rq)\&. If MariaDB was configured with the
\fB\-\-disable\-grant\-options\fR
option,
\fB\-\-bootstrap\fR
@@ -113,7 +106,7 @@ option file groups\&.
.\" basedir option: mysql_install_db
\fB\-\-basedir=\fR\fB\fIpath\fR\fR
.sp
-The path to the MySQL installation directory\&.
+The path to the MariaDB installation directory\&.
.RE
.sp
.RS 4
@@ -124,13 +117,27 @@ The path to the MySQL installation directory\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysql_install_db: force option
-.\" force option: mysql_install_db
-\fB\-\-force\fR
+.\" mysql_install_db: builddir option
+.\" builddir option: mysql_install_db
+\fB\-\-builddir=\fIpath\fR
.sp
-Cause
-\fBmysql_install_db\fR
-to run even if DNS does not work\&. In that case, grant table entries that normally use host names will use IP addresses\&.
+If using \fB--srcdir\fR with out-of-directory builds, you will need to set this
+to the location of the build directory where built files reside.\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_install_db: cross-bootstrap option
+.\" cross-bootstrap option: mysql_install_db
+\fB\-\-cross\-bootstrap\fR
+.sp
+For internal use. Used when building the MariaDB system tables on a different host than the target.\&.
.RE
.sp
.RS 4
@@ -148,7 +155,102 @@ to run even if DNS does not work\&. In that case, grant table entries that norma
\fB\-\-datadir=\fR\fB\fIpath\fR\fR,
\fB\-\-ldata=\fR\fB\fIpath\fR\fR
.sp
-The path to the MySQL data directory\&.
+The path to the MariaDB data directory\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: defaults-extra-file option
+.\" defaults-extra-file option: mysqlcheck
+\fB\-\-defaults\-extra\-file=\fR\fB\fIfilename\fR\fR
+.sp
+Set \fB\fIfilename\fR\fR as the file to read default options from after the global defaults files has been read\&.
+Must be given as first option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: defaults-file option
+.\" defaults-file option: mysqlcheck
+\fB\-\-defaults\-file=\fR\fB\fIfilename\fR\fR
+.sp
+Set \fB\fIfilename\fR\fR as the file to read default options from, override global defaults files\&.
+Must be given as first option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_install_db: force option
+.\" force option: mysql_install_db
+\fB\-\-force\fR
+.sp
+Cause
+\fBmysql_install_db\fR
+to run even if DNS does not work\&. In that case, grant table entries that normally use host names will use IP addresses\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: help option
+.\" help option: mysqlcheck
+\fB\-\-help\fR
+.sp
+Display a help message and exit\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: no-defaults option
+.\" no-defaults option: mysqlcheck
+\fB\-\-no\-defaults\fR
+.sp
+Do not read default options from any option file\&. This must be given as the first argument\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: print-defaults option
+.\" print-defaults option: mysqlcheck
+\fB\-\-print\-defaults\fR
+.sp
+Print the program argument list and exit\&.
+This must be given as the first argument\&.
.RE
.sp
.RS 4
@@ -163,7 +265,7 @@ The path to the MySQL data directory\&.
.\" rpm option: mysql_install_db
\fB\-\-rpm\fR
.sp
-For internal use\&. This option is used by RPM files during the MySQL installation process\&.
+For internal use\&. This option is used by RPM files during the MariaDB installation process\&.
.RE
.sp
.RS 4
@@ -195,7 +297,7 @@ Use IP addresses rather than host names when creating grant table entries\&. Thi
.sp
For internal use\&. The directory under which
\fBmysql_install_db\fR
-looks for support files such as the error message file and the file for populating the help tables\&. This option was added in MySQL 5\&.1\&.14\&.
+looks for support files such as the error message file and the file for populating the help tables\&.4\&.
.RE
.sp
.RS 4
@@ -252,7 +354,7 @@ For internal use\&. This option is used for creating Windows distributions\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -261,8 +363,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1
index fe4fd137006..c30cd96362c 100644
--- a/man/mysql_plugin.1
+++ b/man/mysql_plugin.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_plugin\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 01/16/2013
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.5
-.\" Language: English
.\"
-.TH "\FBMYSQL_PLUGIN\FR" "1" "01/16/2013" "MySQL 5\&.5" "MySQL Database System"
+.TH "\FBMYSQL_PLUGIN\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -29,7 +22,7 @@
.\" -----------------------------------------------------------------
.\" mysql_plugin
.SH "NAME"
-mysql_plugin \- configure MySQL server plugins
+mysql_plugin \- configure MariaDB server plugins
.SH "SYNOPSIS"
.HP \w'\fBmysql_plugin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIplugin\fR\fR\fB\ {ENABLE|DISABLE}\fR\ 'u
\fBmysql_plugin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIplugin\fR\fR\fB {ENABLE|DISABLE}\fR
@@ -37,15 +30,13 @@ mysql_plugin \- configure MySQL server plugins
.PP
The
\fBmysql_plugin\fR
-utility enables MySQL administrators to manage which plugins a MySQL server loads\&. It provides an alternative to manually specifying the
+utility enables MariaDB administrators to manage which plugins a MariaDB server loads\&. It provides an alternative to manually specifying the
\fB\-\-plugin\-load\fR
option at server startup or using the
INSTALL PLUGIN
and
UNINSTALL PLUGIN
statements at runtime\&.
-\fBmysql_plugin\fR
-is available as of MySQL 5\&.5\&.16\&.
.PP
Depending on whether
\fBmysql_plugin\fR
@@ -53,12 +44,11 @@ is invoked to enable or disable plugins, it inserts or deletes rows in the
mysql\&.plugin
table that serves as a plugin registry\&. (To perform this operation,
\fBmysql_plugin\fR
-invokes the MySQL server in bootstrap mode\&. This means that the server must not already be running\&.) For normal server startups, the server loads and enables plugins listed in
+invokes the MariaDB server in bootstrap mode\&. This means that the server must not already be running\&.) For normal server startups, the server loads and enables plugins listed in
mysql\&.plugin
automatically\&. For additional control over plugin activation, use
\fB\-\-\fR\fB\fIplugin_name\fR\fR
-options named for specific plugins, as described in
-Section\ \&5.1.8.1, \(lqInstalling and Uninstalling Plugins\(rq\&.
+options named for specific plugins\&.
.PP
Each invocation of
\fBmysql_plugin\fR
@@ -150,7 +140,7 @@ An error occurs if
\fBmysql_plugin\fR
cannot find the configuration file or plugin library file, or if
\fBmysql_plugin\fR
-cannot start the MySQL server\&.
+cannot start the MariaDB server\&.
.PP
\fBmysql_plugin\fR
supports the following options, which can be specified on the command line or in the
@@ -163,8 +153,7 @@ recognizes the
\fB\-\-basedir\fR,
\fB\-\-datadir\fR, and
\fB\-\-plugin\-dir\fR
-options and ignores others\&. For information about option files, see
-Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&.
+options and ignores others\&.
.PP
mysql_plugin Options
.sp
@@ -268,7 +257,7 @@ server\&.
Do not read values from the configuration file\&. This option enables an administrator to skip reading defaults from the configuration file\&.
.sp
With
-\fBmysql_plugin\fR, this option need not be given first on the command line, unlike most other MySQL programs that support
+\fBmysql_plugin\fR, this option need not be given first on the command line, unlike most other MariaDB programs that support
\fB\-\-no\-defaults\fR\&.
.RE
.sp
@@ -334,7 +323,7 @@ to print the defaults for
if they are found in the configuration file\&. If no value for a variable is found, nothing is shown\&.
.sp
With
-\fBmysql_plugin\fR, this option need not be given first on the command line, unlike most other MySQL programs that support
+\fBmysql_plugin\fR, this option need not be given first on the command line, unlike most other MariaDB programs that support
\fB\-\-print\-defaults\fR\&.
.RE
.sp
@@ -372,7 +361,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright \(co 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+Copyright \(co 1997, 2013, Oracle and/or its affiliates. All rights reserved., 2013-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -381,8 +370,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Oracle Corporation (http://dev.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1
index 6345aa18d9f..20a77bc3f1e 100644
--- a/man/mysql_secure_installation.1
+++ b/man/mysql_secure_installation.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_secure_installation\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_SECURE_INST" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_SECURE_INST" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -20,13 +13,13 @@
.\" -----------------------------------------------------------------
.\" mysql_secure_installation
.SH "NAME"
-mysql_secure_installation \- improve MySQL installation security
+mysql_secure_installation \- improve MariaDB installation security
.SH "SYNOPSIS"
.HP \w'\fBmysql_secure_installation\fR\ 'u
\fBmysql_secure_installation\fR
.SH "DESCRIPTION"
.PP
-This program enables you to improve the security of your MySQL installation in the following ways:
+This program enables you to improve the security of your MariaDB installation in the following ways:
.sp
.RS 4
.ie n \{\
@@ -96,7 +89,7 @@ The script will prompt you to determine which actions to perform\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -105,8 +98,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1
index 303d247cc55..fca322ef2e2 100644
--- a/man/mysql_setpermission.1
+++ b/man/mysql_setpermission.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_setpermission\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_SETPERMISSI" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_SETPERMISSI" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -27,14 +20,13 @@ mysql_setpermission \- interactively set permissions in grant tables
.SH "DESCRIPTION"
.PP
\fBmysql_setpermission\fR
-is a Perl script that was originally written and contributed by Luuk de Boer\&. It interactively sets permissions in the MySQL grant tables\&.
+is a Perl script that was originally written and contributed by Luuk de Boer\&. It interactively sets permissions in the MariaDB grant tables\&.
\fBmysql_setpermission\fR
is written in Perl and requires that the
DBI
and
DBD::mysql
-Perl modules be installed (see
-Section\ \&2.15, \(lqPerl Installation Notes\(rq)\&.
+Perl modules be installed\&.
.PP
Invoke
\fBmysql_setpermission\fR
@@ -53,9 +45,9 @@ shell> \fBmysql_setpermission [\fR\fB\fIoptions\fR\fR\fB]\fR
\fIoptions\fR
should be either
\fB\-\-help\fR
-to display the help message, or options that indicate how to connect to the MySQL server\&. The account used when you connect determines which permissions you have when attempting to modify existing permissions in the grant tables\&.
+to display the help message, or options that indicate how to connect to the MariaDB server\&. The account used when you connect determines which permissions you have when attempting to modify existing permissions in the grant tables\&.
.PP
-\fBmysql_setpermissions\fR
+\fBmysql_setpermission\fR
also reads options from the
[client]
and
@@ -94,7 +86,7 @@ Display a help message and exit\&.
.\" host option: mysql_setpermission
\fB\-\-host=\fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -109,10 +101,9 @@ Connect to the MySQL server on the given host\&.
.\" password option: mysql_setpermission
\fB\-\-password=\fR\fB\fIpassword\fR\fR
.sp
-The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&.
+The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MariaDB programs\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -158,12 +149,12 @@ localhost, the Unix socket file to use\&.
.\" user option: mysql_setpermission
\fB\-\-user=\fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -172,8 +163,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1
index 5b85d51acd1..1b002a62ea2 100644
--- a/man/mysql_tzinfo_to_sql.1
+++ b/man/mysql_tzinfo_to_sql.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_tzinfo_to_sql\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_TZINFO_TO_S" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_TZINFO_TO_S" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -36,8 +29,7 @@ zoneinfo
database (the set of files describing time zones)\&. Examples of such systems are Linux, FreeBSD, Solaris, and Mac OS X\&. One likely location for these files is the
/usr/share/zoneinfo
directory (/usr/share/lib/zoneinfo
-on Solaris)\&. If your system does not have a zoneinfo database, you can use the downloadable package described in
-Section\ \&9.6, \(lqMySQL Server Time Zone Support\(rq\&.
+on Solaris)\&.
.PP
\fBmysql_tzinfo_to_sql\fR
can be invoked several ways:
@@ -113,7 +105,7 @@ After running
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -122,8 +114,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1
index 6349f927e09..3948a670436 100644
--- a/man/mysql_upgrade.1
+++ b/man/mysql_upgrade.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_upgrade\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_UPGRADE\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_UPGRADE\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -22,27 +15,23 @@
.\" upgrading MySQL
.\" MySQL: upgrading
.SH "NAME"
-mysql_upgrade \- check tables for MySQL upgrade
+mysql_upgrade \- check tables for MariaDB upgrade
.SH "SYNOPSIS"
.HP \w'\fBmysql_upgrade\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysql_upgrade [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
\fBmysql_upgrade\fR
-examines all tables in all databases for incompatibilities with the current version of MySQL Server\&.
+examines all tables in all databases for incompatibilities with the current version of the MariaDB Server\&.
\fBmysql_upgrade\fR
also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added\&.
.PP
\fBmysql_upgrade\fR
-should be executed each time you upgrade MySQL\&. It supersedes the older
-\fBmysql_fix_privilege_tables\fR
-script, which should no longer be used\&.
+should be executed each time you upgrade MariaDB\&.
.PP
If a table is found to have a possible incompatibility,
\fBmysql_upgrade\fR
-performs a table check\&. If any problems are found, a table repair is attempted\&. If the table cannot be repaired, see
-Section\ \&2.4.4, \(lqRebuilding or Repairing Tables or Indexes\(rq
-for manual table repair strategies\&.
+performs a table check\&. If any problems are found, a table repair is attempted\&.
.if n \{\
.sp
.\}
@@ -74,14 +63,9 @@ with administrator privileges\&. You can do this by running a Command Prompt as
.ps -1
.br
.PP
-You should always back up your current MySQL installation
+You should always back up your current MariaDB installation
\fIbefore\fR
-performing an upgrade\&. See
-Section\ \&6.2, \(lqDatabase Backup Methods\(rq\&.
-.PP
-Some upgrade incompatibilities may require special handling before you upgrade your MySQL installation and run
-\fBmysql_upgrade\fR\&. See
-Section\ \&2.4.1, \(lqUpgrading MySQL\(rq, for instructions on determining whether any such incompatibilities apply to your installation and how to handle them\&.
+performing an upgrade\&.
.sp .5v
.RE
.PP
@@ -149,8 +133,7 @@ option entails, see the description of the
FOR UPGRADE
option of the
CHECK TABLE
-statement (see
-Section\ \&12.4.2.3, \(lqCHECK TABLE Syntax\(rq)\&.
+statement\&.
.RE
.sp
.RS 4
@@ -168,52 +151,25 @@ that contains SQL statements to upgrade the tables in the
mysql
database\&.
.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-Prior to MySQL 5\&.1\&.31,
-\fBmysql_upgrade\fR
-does not run the second
-\fBmysqlcheck\fR
-command, which is necessary to re\-encode database or table names that contain nonalphanumeric characters\&. (They still appear after the upgrade with the
-#mysql50#
-prefix described in
-Section\ \&8.2.3, \(lqMapping of Identifiers to File Names\(rq\&.) If you have such database or table names, execute the second
-\fBmysqlcheck\fR
-command manually after executing
-\fBmysql_upgrade\fR\&.
-.RE
.PP
-All checked and repaired tables are marked with the current MySQL version number\&. This ensures that next time you run
+All checked and repaired tables are marked with the current MariaDB version number\&. This ensures that next time you run
\fBmysql_upgrade\fR
with the same version of the server, it can tell whether there is any need to check or repair the table again\&.
.\" mysql_upgrade_info file: mysql_upgrade
.\" mysql_upgrade: mysql_upgrade_info file
.PP
\fBmysql_upgrade\fR
-also saves the MySQL version number in a file named
+also saves the MariaDB version number in a file named
mysql_upgrade_info
in the data directory\&. This is used to quickly check whether all tables have been checked for this release so that table\-checking can be skipped\&. To ignore this file and perform the check regardless, use the
\fB\-\-force\fR
option\&.
.PP
-If you install MySQL from RPM packages on Linux, you must install the server and client RPMs\&.
+If you install MariaDB from RPM packages on Linux, you must install the server and client RPMs\&.
\fBmysql_upgrade\fR
is included in the server RPM but requires the client RPM because the latter includes
-\fBmysqlcheck\fR\&. (See
-Section\ \&2.6.1, \(lqInstalling MySQL from RPM Packages on Linux\(rq\&.)
+\fBmysqlcheck\fR\&.
.PP
-In MySQL 5\&.1\&.7,
-\fBmysql_upgrade \fR
-was added as a shell script and worked only for Unix systems\&. As of MySQL 5\&.1\&.10,
-\fBmysql_upgrade\fR
-is an executable binary and is available on all systems\&.
.PP
\fBmysql_upgrade\fR
supports the following options, which can be specified on the command line or in the
@@ -225,8 +181,7 @@ option file groups\&. Other options are passed to
\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR
option\&.
\fBmysql_upgrade\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
+also supports the options for processing option files\&.
.sp
.RS 4
.ie n \{\
@@ -238,7 +193,8 @@ Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\
.\}
.\" mysql_upgrade: help option
.\" help option: mysql_upgrade
-\fB\-\-help\fR
+\fB\-\-help\fR,
+\fB\-?\fR
.sp
Display a short help message and exit\&.
.RE
@@ -255,7 +211,22 @@ Display a short help message and exit\&.
.\" basedir option: mysql_upgrade
\fB\-\-basedir=\fR\fB\fIpath\fR\fR
.sp
-The path to the MySQL installation directory\&. This option is accepted for backward compatibility but ignored\&.
+Old option accepted for backward compatibility but ignored\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: character-sets-dir option
+.\" character-sets-dir option: mysql_upgrade
+\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
+.sp
+Old option accepted for backward compatibility but ignored\&.
.RE
.sp
.RS 4
@@ -270,7 +241,23 @@ The path to the MySQL installation directory\&. This option is accepted for back
.\" datadir option: mysql_upgrade
\fB\-\-datadir=\fR\fB\fIpath\fR\fR
.sp
-The path to the data directory\&. This option is accepted for backward compatibility but ignored\&.
+Old option accepted for backward compatibility but ignored\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: debug option
+.\" debug option: mysql_upgrade
+\fB\-\-debug=\fR\fB\fIpath\fR\fR,
+\fB\-# \fIpath\fR\fR
+.sp
+For debug builds, output debug log\&.
.RE
.sp
.RS 4
@@ -285,7 +272,7 @@ The path to the data directory\&. This option is accepted for backward compatibi
.\" debug-check option: mysql_upgrade
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
@@ -301,7 +288,22 @@ Print some debugging information when the program exits\&. This option was added
\fB\-\-debug\-info\fR,
\fB\-T\fR
.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: default-character-set option
+.\" default-character-set option: mysql_upgrade
+\fB\-\-default\-character\-set=\fR\fB\fIname\fR\fR
+.sp
+Old option accepted for backward compatibility but ignored\&.
.RE
.sp
.RS 4
@@ -322,7 +324,256 @@ file and force execution of
\fBmysqlcheck\fR
even if
\fBmysql_upgrade\fR
-has already been executed for the current version of MySQL\&.
+has already been executed for the current version of MariaDB\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: host option
+.\" host option: mysql_upgrade
+\fB\-\-host\fR
+.sp
+Connect to MariaDB on the given host\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: password option
+.\" password option: mysql_upgrade
+\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
+\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR
+.sp
+The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you
+\fIcannot\fR
+have a space between the option and the password\&. If you omit the
+\fIpassword\fR
+value following the
+\fB\-\-password\fR
+or
+\fB\-p\fR
+option on the command line,
+\fBmysql_upgrade\fR
+prompts for one\&.
+.sp
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: port option
+.\" port option: mysql_upgrade
+\fB\-\-port=\fR\fB\fIport_num\fR\fR,
+\fB\-P \fR\fB\fIport_num\fR\fR
+.sp
+The TCP/IP port number to use for the connection\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: protocol option
+.\" protocol option: mysql_upgrade
+\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
+.sp
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: silent option
+.\" silent option: mysql_upgrade
+\fB\-\-silent\fR
+.sp
+Print less information\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: socket option
+.\" socket option: mysql_upgrade
+\fB\-\-socket=\fR\fB\fIpath\fR\fR,
+\fB\-S \fR\fB\fIpath\fR\fR
+.sp
+For connections to
+localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL options
+.\" SSL options: mysql_upgrade
+\fB\-\-ssl\fR
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL CA option
+.\" SSL CA option: mysql_upgrade
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL CA Path option
+.\" SSL CA Path option: mysql_upgrade
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL Cert option
+.\" SSL Cert option: mysql_upgrade
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL Cipher option
+.\" SSL Cipher option: mysql_upgrade
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL Key option
+.\" SSL Key option: mysql_upgrade
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL Crl option
+.\" SSL CRL option: mysql_upgrade
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL Crlpath option
+.\" SSL Crlpath option: mysql_upgrade
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysql_upgrade
+\fB\-\-ssl\-verify\-server\-cert\fR
+.sp
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
.RE
.sp
.RS 4
@@ -338,7 +589,23 @@ has already been executed for the current version of MySQL\&.
\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR,
\fB\-t \fR\fB\fIpath\fR\fR
.sp
-The path name of the directory to use for creating temporary files\&. This option was added in MySQL 5\&.1\&.25\&.
+The path name of the directory to use for creating temporary files\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: upgrade-system-tables option
+.\" upgrade-system-tables option: mysql_upgrade
+\fB\-\-upgrade\-system\-tables\fR\fR,
+\fB\-s \fR
+.sp
+Only upgrade the system tables in the mysql database\&. Tables in other databases are not checked or touched\&.
.RE
.sp
.RS 4
@@ -354,8 +621,7 @@ The path name of the directory to use for creating temporary files\&. This optio
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&. The default user name is
-root\&.
+The MariaDB user name to use when connecting to the server and not using the current login\&.
.RE
.sp
.RS 4
@@ -370,7 +636,45 @@ root\&.
.\" verbose option: mysql_upgrade
\fB\-\-verbose\fR
.sp
-Verbose mode\&. Print more information about what the program does\&.
+Display more output about the process\&. Using it twice will print connection
+arguments; using it 3 times will print out all CHECK, RENAME and ALTER TABLE
+commands used during the check phase; using it 4 times (added in MariaDB 10.0.14)
+will also write out all mysqlcheck commands used\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: version option
+.\" version option: mysql_upgrade
+\fB\-\-version\fR,
+\fB\-V\fR
+.sp
+Output version information and exit\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysql_upgrade: version-check option
+.\" version-check option: mysql_upgrade
+\fB\-\-version\-check\fR,
+\fB\-k\fR
+.sp
+Run this program only if its 'server version' matches the version
+of the server to which it's connecting. Note: the 'server version'
+of the program is the version of the MariaDB server with which
+it was built/distributed. Defaults to on; use \fB\-\-skip\-version\-check\fR to disable\&.
.RE
.sp
.RS 4
@@ -389,13 +693,11 @@ Cause binary logging to be enabled while
\fBmysql_upgrade\fR
runs\&. This is the default behavior; to disable binary logging during the upgrade, use the inverse of this option (that is, start the program with
\fB\-\-skip\-write\-binlog\fR)\&.
-.sp
-This option was introduced in MySQL 5\&.1\&.40\&.
.RE
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -404,8 +706,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1
index b767fd6ad38..88f41d97f2d 100644
--- a/man/mysql_waitpid.1
+++ b/man/mysql_waitpid.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_waitpid\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_WAITPID\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_WAITPID\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -120,7 +113,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -129,8 +122,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysql_zap.1 b/man/mysql_zap.1
index f2a261b47a0..186cfeb77d7 100644
--- a/man/mysql_zap.1
+++ b/man/mysql_zap.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysql_zap\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQL_ZAP\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQL_ZAP\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -116,7 +109,7 @@ Test mode\&. Display information about each process but do not kill it\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -125,8 +118,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1
index 9833b3f5e6a..c8f9b97edea 100644
--- a/man/mysqlaccess.1
+++ b/man/mysqlaccess.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqlaccess\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLACCESS\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLACCESS\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -27,7 +20,7 @@ mysqlaccess \- client for checking access privileges
.SH "DESCRIPTION"
.PP
\fBmysqlaccess\fR
-is a diagnostic tool that Yves Carlier has provided for the MySQL distribution\&. It checks the access privileges for a host name, user name, and database combination\&. Note that
+is a diagnostic tool written by Yves Carlier\&. It checks the access privileges for a host name, user name, and database combination\&. Note that
\fBmysqlaccess\fR
checks access using only the
user,
@@ -197,9 +190,8 @@ Display some examples that show how to use
.\" old_server option: mysqlaccess
\fB\-\-old_server\fR
.sp
-Assume that the server is an old MySQL server (before MySQL 3\&.21) that does not yet know how to handle full
-WHERE
-clauses\&.
+Connect to a very old MySQL server (before MySQL 3\&.21) that does not know how to handle full
+WHERE clauses\&.
.RE
.sp
.RS 4
@@ -287,7 +279,7 @@ Display the release notes\&.
\fB\-\-rhost=\fR\fB\fIhost_name\fR\fR,
\fB\-H \fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -396,7 +388,7 @@ The user name to use in the access privileges\&.
Display version information and exit\&.
.RE
.PP
-If your MySQL distribution is installed in some nonstandard location, you must change the location where
+If your MariaDB distribution is installed in some non\-standard location, you must change the location where
\fBmysqlaccess\fR
expects to find the
\fBmysql\fR
@@ -423,7 +415,7 @@ error will occur when you run
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -432,8 +424,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqladmin.1 b/man/mysqladmin.1
index 25b561ffdce..e2b1753ff9f 100644
--- a/man/mysqladmin.1
+++ b/man/mysqladmin.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqladmin\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLADMIN\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLADMIN\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -22,7 +15,7 @@
.\" administration: server
.\" server administration
.SH "NAME"
-mysqladmin \- client for administering a MySQL server
+mysqladmin \- client for administering a MariaB server
.SH "SYNOPSIS"
.HP \w'\fBmysqladmin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-arg\fR\fR\fB]\ [\fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-arg\fR\fR\fB]]\ \&.\&.\&.\fR\ 'u
\fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB] [\fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB]] \&.\&.\&.\fR
@@ -74,8 +67,7 @@ debug
.sp
Tell the server to write debug information to the error log\&.
.sp
-Beginning with MySQL 5\&.1\&.12, this includes information about the Event Scheduler\&. See
-Section\ \&19.4.5, \(lqEvent Scheduler Status\(rq\&.
+This also includes information about the Event Scheduler\&.
.RE
.sp
.RS 4
@@ -210,8 +202,7 @@ old\-password \fInew\-password\fR
.sp
This is like the
password
-command but stores the password using the old (pre\-4\&.1) password\-hashing format\&. (See
-Section\ \&5.3.2.3, \(lqPassword Hashing in MySQL\(rq\&.)
+command but stores the password using the old (pre MySQL 4\&.1) password\-hashing format\&.
.RE
.sp
.RS 4
@@ -303,8 +294,7 @@ SHOW PROCESSLIST
statement\&. If the
\fB\-\-verbose\fR
option is given, the output is like that of
-SHOW FULL PROCESSLIST\&. (See
-Section\ \&12.4.5.31, \(lqSHOW PROCESSLIST Syntax\(rq\&.)
+SHOW FULL PROCESSLIST\&.
.RE
.sp
.RS 4
@@ -448,7 +438,7 @@ command result displays the following values:
.\" uptime
Uptime
.sp
-The number of seconds the MySQL server has been running\&.
+The number of seconds the MariaDB server has been running\&.
.RE
.sp
.RS 4
@@ -492,8 +482,7 @@ Slow queries
.sp
The number of queries that have taken more than
long_query_time
-seconds\&. See
-Section\ \&5.2.5, \(lqThe Slow Query Log\(rq\&.
+seconds\&.
.RE
.sp
.RS 4
@@ -555,7 +544,7 @@ The number of tables that currently are open\&.
Memory in use
.sp
The amount of memory allocated directly by
-\fBmysqld\fR\&. This value is displayed only when MySQL has been compiled with
+\fBmysqld\fR\&. This value is displayed only when MariaDB has been compiled with
\fB\-\-with\-debug=full\fR\&.
.RE
.sp
@@ -571,7 +560,7 @@ The amount of memory allocated directly by
Maximum memory used
.sp
The maximum amount of memory allocated directly by
-\fBmysqld\fR\&. This value is displayed only when MySQL has been compiled with
+\fBmysqld\fR\&. This value is displayed only when MariaDB has been compiled with
\fB\-\-with\-debug=full\fR\&.
.RE
.PP
@@ -591,9 +580,6 @@ supports the following options, which can be specified on the command line or in
and
[client]
option file groups\&.
-\fBmysqladmin\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
.sp
.RS 4
.ie n \{\
@@ -608,7 +594,7 @@ Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\
\fB\-\-help\fR,
\fB\-?\fR
.sp
-Display a help message and exit\&.
+Display help and exit\&.
.RE
.sp
.RS 4
@@ -623,8 +609,7 @@ Display a help message and exit\&.
.\" character-sets-dir option: mysqladmin
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
.sp
-The directory where character sets are installed\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+The directory where character sets are installed\&.
.RE
.sp
.RS 4
@@ -708,7 +693,7 @@ string is
.\" debug-check option: mysqladmin
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Check memory and open file usage at exit.\&.
.RE
.sp
.RS 4
@@ -723,7 +708,22 @@ Print some debugging information when the program exits\&. This option was added
.\" debug-info option: mysqladmin
\fB\-\-debug\-info\fR
.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.14\&.
+Print debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: default-auth option
+.\" default-auth option: mysqladmin
+\fB\-\-default\-auth\fR
+.sp
+Default authentication client-side plugin to use\&.
.RE
.sp
.RS 4
@@ -740,8 +740,7 @@ Print debugging information and memory and CPU usage statistics when the program
.sp
Use
\fIcharset_name\fR
-as the default character set\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+as the default character set\&.
.RE
.sp
.RS 4
@@ -806,7 +805,7 @@ command\&. With multiple commands, continue even if an error occurs\&.
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -822,7 +821,7 @@ Connect to the MySQL server on the given host\&.
\fB\-\-no\-beep\fR,
\fB\-b\fR
.sp
-Suppress the warning beep that is emitted by default for errors such as a failure to connect to the server\&. This option was added in MySQL 5\&.1\&.17\&.
+Suppress the warning beep that is emitted by default for errors such as a failure to connect to the server\&.
.RE
.sp
.RS 4
@@ -865,8 +864,7 @@ option on the command line,
\fBmysqladmin\fR
prompts for one\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&.
.RE
.sp
.RS 4
@@ -898,7 +896,8 @@ On Windows, connect to the server via a named pipe\&. This option applies only i
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
\fB\-P \fR\fB\fIport_num\fR\fR
.sp
-The TCP/IP port number to use for the connection\&.
+The TCP/IP port number to use for the connection or 0 for default to,
+in order of preference, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306)\&.
.RE
.sp
.RS 4
@@ -928,8 +927,7 @@ Print the program argument list and exit\&. This must be given as the first argu
.\" protocol option: mysqladmin
\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
.sp
-The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
-Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
.RE
.sp
.RS 4
@@ -1034,12 +1032,137 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
.\}
.\" mysqladmin: SSL options
.\" SSL options: mysqladmin
-\fB\-\-ssl*\fR
-.sp
-Options that begin with
\fB\-\-ssl\fR
-specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL CA option
+.\" SSL CA option: mysqladmin
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL CA Path option
+.\" SSL CA Path option: mysqladmin
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Cert option
+.\" SSL Cert option: mysqladmin
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Cipher option
+.\" SSL Cipher option: mysqladmin
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Key option
+.\" SSL Key option: mysqladmin
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Crl option
+.\" SSL CRL option: mysqladmin
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Crlpath option
+.\" SSL Crlpath option: mysqladmin
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysqladmin
+\fB\-\-ssl\-verify\-server\-cert\fR
+.sp
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
.RE
.sp
.RS 4
@@ -1055,7 +1178,7 @@ Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -1127,9 +1250,6 @@ value is given, it indicates the number of times to retry\&. The default is one
.PP
You can also set the following variables by using
\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
-The
-\fB\-\-set\-variable\fR
-format is deprecated and is removed in MySQL 5\&.5\&. syntax:
.sp
.RS 4
.ie n \{\
@@ -1163,7 +1283,7 @@ The maximum number of seconds to wait for server shutdown\&. The default value i
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -1172,8 +1292,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1
index 5e9bc6c2f43..15c371a9913 100644
--- a/man/mysqlbinlog.1
+++ b/man/mysqlbinlog.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqlbinlog\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLBINLOG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLBINLOG\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -32,9 +25,7 @@ that describe modifications to database contents\&. The server writes these file
\fBmysqlbinlog\fR
utility\&. You can also use
\fBmysqlbinlog\fR
-to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs\&. The binary log and relay log are discussed further in
-Section\ \&5.2.4, \(lqThe Binary Log\(rq, and
-Section\ \&16.2.2, \(lqReplication Relay and Status Files\(rq\&.
+to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs\&.
.PP
Invoke
\fBmysqlbinlog\fR
@@ -64,8 +55,7 @@ shell> \fBmysqlbinlog binlog\&.0000003\fR
.\}
.PP
The output includes events contained in
-binlog\&.000003\&. For statement\-based logging, event information includes the SQL statement, the ID of the server on which it was executed, the timestamp when the statement was executed, how much time it took, and so forth\&. For row\-based logging, the event indicates a row change rather than an SQL statement\&. See
-Section\ \&16.1.2, \(lqReplication Formats\(rq, for information about logging modes\&.
+binlog\&.000003\&. For statement\-based logging, event information includes the SQL statement, the ID of the server on which it was executed, the timestamp when the statement was executed, how much time it took, and so forth\&. For row\-based logging, the event indicates a row change rather than an SQL statement\&.
.PP
Events are preceded by header comments that provide additional information\&. For example:
.sp
@@ -102,12 +92,11 @@ indicates the result from executing the event\&. Zero means that no error occurr
The output from
\fBmysqlbinlog\fR
can be re\-executed (for example, by using it as input to
-\fBmysql\fR) to redo the statements in the log\&. This is useful for recovery operations after a server crash\&. For other usage examples, see the discussion later in this section and
-Section\ \&6.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq\&.
+\fBmysql\fR) to redo the statements in the log\&. This is useful for recovery operations after a server crash\&. For other usage examples, see the discussion later in this section\&.
.PP
Normally, you use
\fBmysqlbinlog\fR
-to read binary log files directly and apply them to the local MySQL server\&. It is also possible to read binary logs from a remote server by using the
+to read binary log files directly and apply them to the local MariaDB server\&. It is also possible to read binary logs from a remote server by using the
\fB\-\-read\-from\-remote\-server\fR
option\&. To read remote binary logs, the connection parameter options can be given to indicate how to connect to the server\&. These options are
\fB\-\-host\fR,
@@ -125,9 +114,6 @@ supports the following options, which can be specified on the command line or in
and
[client]
option file groups\&.
-\fBmysqlbinlog\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
.sp
.RS 4
.ie n \{\
@@ -211,7 +197,7 @@ displays
BINLOG
statements whenever possible\&. This is the implied value if the option is given as
\fB\-\-base64\-output\fR
-without a value\&.
+without a value\&. Both ALWAYS and not giving a value are deprecated.
.RE
.sp
.RS 4
@@ -255,17 +241,14 @@ NEVER, it does not exit with an error if a row event is found\&.
.RS 4
The
\fB\-\-base64\-output\fR
-option was introduced in MySQL 5\&.1\&.5, to be given as
+can be given as
\fB\-\-base64\-output\fR
or
\fB\-\-skip\-base64\-output\fR
(with the sense of
AUTO
or
-NEVER)\&. The option values described in the preceding list may be used as of MySQL 5\&.1\&.24, with the exception of
-UNSPEC
-and
-DECODE\-ROWS, which are available as of MySQL 5\&.1\&.28\&.
+NEVER)\&.
.sp
For examples that show the effect of
\fB\-\-base64\-output\fR
@@ -274,6 +257,22 @@ and
on row event output, see
the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&.
.RE
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlbinlog: binlog-row-event-max-size option
+.\" binlog-row-event-max-size option: mysqlbinlog
+\fB\-\-binlog\-row\-event\-max\-size\=\fR\fB\fIpath\fR\fR
+.sp
+The directory where character sets are installed\&.
+.RE
.sp
.RS 4
.ie n \{\
@@ -287,8 +286,7 @@ the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&.
.\" character-sets-dir option: mysqlbinlog
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
.sp
-The directory where character sets are installed\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+The directory where character sets are installed\&.
.RE
.sp
.RS 4
@@ -308,7 +306,7 @@ This option causes
\fBmysqlbinlog\fR
to output entries from the binary log (local log only) that occur while
\fIdb_name\fR
-is been selected as the default database by
+has been selected as the default database by
USE\&.
.sp
The
@@ -452,10 +450,11 @@ USE\&. (In particular, no cross\-database updates should be used\&.)
.br
This option did not work correctly for
\fBmysqlbinlog\fR
-with row\-based logging prior to MySQL 5\&.1\&.37\&. (\m[blue]\fBBug#42941\fR\m[]\&\s-2\u[1]\d\s+2)
+with row\-based logging prior to MySQL 5\&.1\&.37\&.
.sp .5v
.RE
.RE
+.RE
.sp
.RS 4
.ie n \{\
@@ -489,7 +488,7 @@ string is
.\" debug-check option: mysqlbinlog
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
@@ -504,7 +503,52 @@ Print some debugging information when the program exits\&. This option was added
.\" debug-info option: mysqlbinlog
\fB\-\-debug\-info\fR
.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlbinlog: defaults-extra-file option
+.\" defaults-extra-file option: mysqlbinlog
+\fB\-\-defaults\-extra\-file=\fR\fB\fIname\fR
+.sp
+Read this file after the global files are read\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlbinlog: defaults-file option
+.\" defaults-file option: mysqlbinlog
+\fB\-\-defaults\-file=\fR\fB\fIname\fR
+.sp
+Only read default options from the given file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlbinlog: default-auth option
+.\" default-auth option: mysqlbinlog
+\fB\-\-default\-auth=\fR\fB\fIname\fR
+.sp
+Default authentication client-side plugin to use\&.
.RE
.sp
.RS 4
@@ -522,7 +566,7 @@ Print debugging information and memory and CPU usage statistics when the program
.sp
Disable binary logging\&. This is useful for avoiding an endless loop if you use the
\fB\-\-to\-last\-log\fR
-option and are sending the output to the same MySQL server\&. This option also is useful when restoring after a crash to avoid duplication of the statements you have logged\&.
+option and are sending the output to the same MariaDB server\&. This option also is useful when restoring after a crash to avoid duplication of the statements you have logged\&.
.sp
This option requires that you have the
SUPER
@@ -545,6 +589,21 @@ privilege\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlbinlog: force-if-open option
+.\" force-if-open option: mysqlbinlog
+\fB\-\-force\-if\-open\fR
+.sp
+Force if binlog was not closed properly. Defaults to on; use \fB--skip-force-if-open\fR to disable\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlbinlog: force-read option
.\" force-read option: mysqlbinlog
\fB\-\-force\-read\fR,
@@ -571,7 +630,7 @@ stops if it reads such an event\&.
\fB\-H\fR
.sp
Display a hex dump of the log in comments, as described in
-the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. The hex output can be helpful for replication debugging\&. This option was added in MySQL 5\&.1\&.2\&.
+the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. The hex output can be helpful for replication debugging\&.
.RE
.sp
.RS 4
@@ -587,7 +646,7 @@ the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. The hex output can be
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Get the binary log from the MySQL server on the given host\&.
+Get the binary log from the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -616,6 +675,21 @@ in the specified directory\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlbinlog: no-defaults option
+.\" no-defaults option: mysqlbinlog
+\fB\-\-no\-defaults\fR
+.sp
+Don't read default options from any option file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlbinlog: offset option
.\" offset option: mysqlbinlog
\fB\-\-offset=\fR\fB\fIN\fR\fR,
@@ -651,8 +725,8 @@ option on the command line,
\fBmysqlbinlog\fR
prompts for one\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You
+can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -663,12 +737,11 @@ Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlbinlog: port option
-.\" port option: mysqlbinlog
-\fB\-\-port=\fR\fB\fIport_num\fR\fR,
-\fB\-P \fR\fB\fIport_num\fR\fR
+.\" mysqlbinlog: plugin-dir option
+.\" plugin-dir option: mysqlbinlog
+\fB\-\-plugin\-dir=\fIdir_name\fR
.sp
-The TCP/IP port number to use for connecting to a remote server\&.
+Directory for client-side plugins\&.
.RE
.sp
.RS 4
@@ -679,15 +752,29 @@ The TCP/IP port number to use for connecting to a remote server\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlbinlog: position option
-.\" position option: mysqlbinlog
-\fB\-\-position=\fR\fB\fIN\fR\fR
+.\" mysqlbinlog: print-defaults option
+.\" print-defaults option: mysqlbinlog
+\fB\-\-print\-defaults\fR
.sp
-Deprecated\&. Use
-\fB\-\-start\-position\fR
-instead\&.
-\fB\-\-position\fR
-is removed in MySQL 5\&.5\&.
+Print the program argument list from all option files and exit\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlbinlog: port option
+.\" port option: mysqlbinlog
+\fB\-\-port=\fR\fB\fIport_num\fR\fR,
+\fB\-P \fR\fB\fIport_num\fR\fR
+.sp
+The TCP/IP port number to use for connecting to a remote server,
+or \fB0\fR for default to, in order of preference, \fBmy.cnf\fR,
+\fB$MYSQL_TCP_PORT\fR, \fB/etc/services\fR, \fRbuilt-in default (3306)\fR\&.
.RE
.sp
.RS 4
@@ -702,8 +789,7 @@ is removed in MySQL 5\&.5\&.
.\" protocol option: mysqlbinlog
\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
.sp
-The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
-Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
.RE
.sp
.RS 4
@@ -735,7 +821,7 @@ Sets the open_files_limit variable, which is used to reserve file descriptors fo
\fB\-\-read\-from\-remote\-server\fR,
\fB\-R\fR
.sp
-Read the binary log from a MySQL server rather than reading a local log file\&. Any connection parameter options are ignored unless this option is given as well\&. These options are
+Read the binary log from a MariaDB server rather than reading a local log file\&. Any connection parameter options are ignored unless this option is given as well\&. These options are
\fB\-\-host\fR,
\fB\-\-password\fR,
\fB\-\-port\fR,
@@ -770,11 +856,37 @@ Direct output to the given file\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlbinlog: rewrite-db option
+.\" rewrite-db option: mysqlbinlog
+\fB\-\-rewrite\-db=\fR\fB\fIname\fR\fR,
+\fB\-r \fR\fB\fIname\fR\fR
+.sp
+Updates to a database with a different name than the original.
+Example: \fBrewrite-db='from->to'\fR\&. For events that are
+binlogged as statements, rewriting the database constitutes changing a
+statement's default database from \fIdb1\fB to \fIdb2\fR\&. There is no statement
+analysis or rewrite of any kind, that is, if one specifies \fB"db1.tbl"\fR
+in the statement explicitly, that occurrence won't be changed to
+\fB"db2.tbl"\fR\&. Row-based events are rewritten correctly to use the new
+database name\&. Filtering (e.g. with \fB--database=name\fR) happens after
+the database rewrites have been performed\&. If you use this option on the
+command line and \fB">"\fR has a special meaning to your command interpreter,
+quote the value (e.g. \fB--rewrite-db="oldname->newname"\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlbinlog: server-id option
.\" server-id option: mysqlbinlog
\fB\-\-server\-id=\fR\fB\fIid\fR\fR
.sp
-Display only those events created by the server having the given server ID\&. This option is available as of MySQL 5\&.1\&.4\&.
+Display only those events created by the server having the given server ID\&.
.RE
.sp
.RS 4
@@ -791,7 +903,7 @@ Display only those events created by the server having the given server ID\&. Th
.sp
Add a
SET NAMES \fIcharset_name\fR
-statement to the output to specify the character set to be used for processing log files\&. This option was added in MySQL 5\&.1\&.12\&.
+statement to the output to specify the character set to be used for processing log files\&.
.RE
.sp
.RS 4
@@ -807,7 +919,10 @@ statement to the output to specify the character set to be used for processing l
\fB\-\-short\-form\fR,
\fB\-s\fR
.sp
-Display only the statements contained in the log, without any extra information\&.
+Display only the statements contained in the log, no extra info
+and no row-based events\&. This is for testing only, and should
+not be used in production systems. If you want to suppress
+base64-output, consider using \fB--base64-output=never\fR instead\&.
.RE
.sp
.RS 4
@@ -854,14 +969,13 @@ data types\&. For example:
.RS 4
.\}
.nf
-shell> \fBmysqlbinlog \-\-start\-datetime="2005\-12\-25 11:25:56" binlog\&.000003\fR
+shell> \fBmysqlbinlog \-\-start\-datetime="2014\-12\-25 11:25:56" binlog\&.000003\fR
.fi
.if n \{\
.RE
.\}
.sp
-This option is useful for point\-in\-time recovery\&. See
-Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
+This option is useful for point\-in\-time recovery\&.
.RE
.sp
.RS 4
@@ -880,8 +994,7 @@ Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
Start reading the binary log at the first event having a position equal to or greater than
\fIN\fR\&. This option applies to the first log file named on the command line\&.
.sp
-This option is useful for point\-in\-time recovery\&. See
-Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
+This option is useful for point\-in\-time recovery\&.
.RE
.sp
.RS 4
@@ -904,8 +1017,7 @@ option for information about the
\fIdatetime\fR
value\&.
.sp
-This option is useful for point\-in\-time recovery\&. See
-Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
+This option is useful for point\-in\-time recovery\&.
.RE
.sp
.RS 4
@@ -923,8 +1035,7 @@ Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
Stop reading the binary log at the first event having a position equal to or greater than
\fIN\fR\&. This option applies to the last log file named on the command line\&.
.sp
-This option is useful for point\-in\-time recovery\&. See
-Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
+This option is useful for point\-in\-time recovery\&.
.RE
.sp
.RS 4
@@ -940,7 +1051,7 @@ Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
\fB\-\-to\-last\-log\fR,
\fB\-t\fR
.sp
-Do not stop at the end of the requested binary log from a MySQL server, but rather continue printing until the end of the last binary log\&. If you send the output to the same MySQL server, this may lead to an endless loop\&. This option requires
+Do not stop at the end of the requested binary log from a MariaDB server, but rather continue printing until the end of the last binary log\&. If you send the output to the same MariaDB server, this may lead to an endless loop, so this option requires
\fB\-\-read\-from\-remote\-server\fR\&.
.RE
.sp
@@ -957,7 +1068,7 @@ Do not stop at the end of the requested binary log from a MySQL server, but rath
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to a remote server\&.
+The MariaDB username to use when connecting to a remote server\&.
.RE
.sp
.RS 4
@@ -973,7 +1084,7 @@ The MySQL user name to use when connecting to a remote server\&.
\fB\-\-verbose\fR,
\fB\-v\fR
.sp
-Reconstruct row events and display them as commented SQL statements\&. If this option is given twice, the output includes comments to indicate column data types and some metadata\&. This option was added in MySQL 5\&.1\&.28\&.
+Reconstruct row events and display them as commented SQL statements\&. If this option is given twice, the output includes comments to indicate column data types and some metadata\&.
.sp
For examples that show the effect of
\fB\-\-base64\-output\fR
@@ -1021,8 +1132,8 @@ You can pipe the output of
\fBmysqlbinlog\fR
into the
\fBmysql\fR
-client to execute the events contained in the binary log\&. This technique is used to recover from a crash when you have an old backup (see
-Section\ \&6.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq)\&. For example:
+client to execute the events contained in the binary log\&. This technique is used to recover from a crash when you have an old
+backup\&. For example:
.sp
.if n \{\
.RS 4
@@ -1073,7 +1184,7 @@ option, it displays only those events with an offset in the binary log greater t
option (to be able to say, for example,
\(lqroll forward my databases to how they were today at 10:30 a\&.m\&.\(rq)\&.
.PP
-If you have more than one binary log to execute on the MySQL server, the safe method is to process them all using a single connection to the server\&. Here is an example that demonstrates what may be
+If you have more than one binary log to execute on the MariaDB server, the safe method is to process them all using a single connection to the server\&. Here is an example that demonstrates what may be
\fIunsafe\fR:
.sp
.if n \{\
@@ -1145,8 +1256,7 @@ LOAD DATA LOCAL INFILE
statements (that is, it adds
LOCAL), both the client and the server that you use to process the statements must be configured with the
LOCAL
-capability enabled\&. See
-Section\ \&5.3.5, \(lqSecurity Issues with LOAD DATA LOCAL\(rq\&.
+capability enabled\&.
.if n \{\
.sp
.\}
@@ -1591,7 +1701,7 @@ type codes\&. The
\fB\-\-base64\-output=DECODE\-ROWS\fR
and
\fB\-\-verbose\fR
-options may be used to affect row event output\&. These options are available as of MySQL 5\&.1\&.28\&.
+options may be used to affect row event output\&.
.PP
Suppose that the server is using row\-based binary logging and that you execute the following sequence of statements:
.sp
@@ -1952,7 +2062,7 @@ option can be used to prevent this header from being written\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -1967,8 +2077,6 @@ Bug#42941
\%http://bugs.mysql.com/bug.php?id=42941
.RE
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqlbug.1 b/man/mysqlbug.1
index 32829a073dc..fc22162ebe9 100644
--- a/man/mysqlbug.1
+++ b/man/mysqlbug.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqlbug\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLBUG\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLBUG\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -26,10 +19,12 @@ mysqlbug \- generate bug report
\fBmysqlbug\fR
.SH "DESCRIPTION"
.PP
-This program enables you to generate a bug report and send it to Oracle Corporation\&. It is a shell script and runs on Unix\&.
+To report MariaDB bugs, see https://mariadb.com/kb/en/mariadb/reporting-bugs/ - the mysqlbug program has now been deprecated by Oracle, and was never useful for MariaDB.
+
+Originally, the program enabled you to generate a bug report and send it to Oracle Corporation\&. It is a shell script and runs on Unix\&.
.PP
-The normal way to report bugs is to visit
-\m[blue]\fB\%http://bugs.mysql.com/\fR\m[], which is the address for our bugs database\&. This database is public and can be browsed and searched by anyone\&. If you log in to the system, you can enter new reports\&. If you have no Web access, you can generate a bug report by using the
+The normal way to report MySQL bugs is to visit
+\m[blue]\fB\%http://bugs.mysql.com/\fR\m[], which is the address for MySQL's bugs database\&. This database is public and can be browsed and searched by anyone\&. If you log in to the system, you can enter new reports\&. If you have no Web access, you can generate a bug report by using the
\fBmysqlbug\fR
script\&.
.PP
@@ -62,7 +57,7 @@ will send the report by email\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -71,8 +66,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1
index 11e968db18c..c175483347c 100644
--- a/man/mysqlcheck.1
+++ b/man/mysqlcheck.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqlcheck\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLCHECK\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLCHECK\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -36,12 +29,7 @@ client performs table maintenance: It checks, repairs, optimizes, or analyzes ta
.PP
Each table is locked and therefore unavailable to other sessions while it is being processed, although for check operations, the table is locked with a
READ
-lock only (see
-Section\ \&12.3.5, \(lqLOCK TABLES and UNLOCK TABLES Syntax\(rq, for more information about
-READ
-and
-WRITE
-locks)\&. Table maintenance operations can be time\-consuming, particularly for large tables\&. If you use the
+lock only\&. Table maintenance operations can be time\-consuming, particularly for large tables\&. If you use the
\fB\-\-databases\fR
or
\fB\-\-all\-databases\fR
@@ -71,8 +59,7 @@ CHECK TABLE,
REPAIR TABLE,
ANALYZE TABLE, and
OPTIMIZE TABLE
-in a convenient way for the user\&. It determines which statements to use for the operation you want to perform, and then sends the statements to the server to be executed\&. For details about which storage engines each statement works with, see the descriptions for those statements in
-Section\ \&12.4.2, \(lqTable Maintenance Statements\(rq\&.
+in a convenient way for the user\&. It determines which statements to use for the operation you want to perform, and then sends the statements to the server to be executed\&.
.PP
The
MyISAM
@@ -100,8 +87,7 @@ note : The storage engine for the table doesn\'t support check
.PP
If
\fBmysqlcheck\fR
-is unable to repair a table, see
-Section\ \&2.4.4, \(lqRebuilding or Repairing Tables or Indexes\(rq
+is unable to repair a table, see the MariaDB Knowledge Base
for manual table repair strategies\&. This will be the case, for example, for
InnoDB
tables, which can be checked with
@@ -110,7 +96,7 @@ REPAIR TABLE\&.
.PP
The use of
\fBmysqlcheck\fR
-with partitioned tables is not supported before MySQL 5\&.1\&.27\&.
+with partitioned tables is not supported\&.
.if n \{\
.sp
.\}
@@ -193,9 +179,6 @@ supports the following options, which can be specified on the command line or in
and
[client]
option file groups\&.
-\fBmysqlcheck\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
.sp
.RS 4
.ie n \{\
@@ -290,8 +273,7 @@ If a checked table is corrupted, automatically fix it\&. Any necessary repairs a
.\" character-sets-dir option: mysqlcheck
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
.sp
-The directory where character sets are installed\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+The directory where character sets are installed\&.
.RE
.sp
.RS 4
@@ -348,8 +330,6 @@ option to check tables for incompatibilities with the current version of the ser
and
\fB\-\-fix\-table\-names\fR
options\&.
-\fB\-\-check\-upgrade\fR
-was added in MySQL 5\&.1\&.7\&.
.RE
.sp
.RS 4
@@ -417,7 +397,7 @@ string is
.\" debug-check option: mysqlcheck
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
@@ -432,7 +412,22 @@ Print some debugging information when the program exits\&. This option was added
.\" debug-info option: mysqlcheck
\fB\-\-debug\-info\fR
.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.14\&.
+Print debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: default-auth option
+.\" default-auth option: mysqlcheck
+\fB\-\-default\-auth=\fR\fB\fIname\fR\fR
+.sp
+Default authentication client-side plugin to use\&.
.RE
.sp
.RS 4
@@ -449,8 +444,7 @@ Print debugging information and memory and CPU usage statistics when the program
.sp
Use
\fIcharset_name\fR
-as the default character set\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+as the default character set\&.
.RE
.sp
.RS 4
@@ -500,7 +494,8 @@ Must be given as first option\&.
.sp
If you are using this option to check tables, it ensures that they are 100% consistent but takes a long time\&.
.sp
-If you are using this option to repair tables, it runs an extended repair that may not only take a long time to execute, but may produce a lot of garbage rows also!
+If you are using this option to repair tables, it will force using the old, slow, repair with keycache method,
+instead of the much faster repair by sorting.
.RE
.sp
.RS 4
@@ -531,7 +526,7 @@ Check only tables that have not been closed properly\&.
.\" fix-db-names option: mysqlcheck
\fB\-\-fix\-db\-names\fR
.sp
-Convert database names to 5\&.1 format\&. Only database names that contain special characters are affected\&. This option was added in MySQL 5\&.1\&.7\&.
+Convert database names to the format used since MySQL 5\&.1\&. Only database names that contain special characters are affected\&.
.RE
.sp
.RS 4
@@ -546,7 +541,23 @@ Convert database names to 5\&.1 format\&. Only database names that contain speci
.\" fix-table-names option: mysqlcheck
\fB\-\-fix\-table\-names\fR
.sp
-Convert table names to 5\&.1 format\&. Only table names that contain special characters are affected\&. This option was added in MySQL 5\&.1\&.7\&. As of MySQL 5\&.1\&.23, this option also applies to views\&.
+Convert table names (including views) to the format used since MySQL 5\&.1\&. Only table names that contain special characters are affected\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: flush option
+.\" flush option: mysqlcheck
+\fB\-\-flush\fR,
+.sp
+Flush each table after check. This is useful if you don't
+want to have the checked tables take up space in the caches after the check\&.
.RE
.sp
.RS 4
@@ -578,7 +589,7 @@ Continue even if an SQL error occurs\&.
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -655,8 +666,7 @@ option on the command line,
\fBmysqlcheck\fR
prompts for one\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -683,12 +693,11 @@ On Windows, connect to the server via a named pipe\&. This option applies only i
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlcheck: port option
-.\" port option: mysqlcheck
-\fB\-\-port=\fR\fB\fIport_num\fR\fR,
-\fB\-P \fR\fB\fIport_num\fR\fR
+.\" mysqlcheck: plugin-dir option
+.\" plugin-dir option: mysqlcheck
+\fB\-\-plugin\-dir=\fR\fB\fIname\fR\fR
.sp
-The TCP/IP port number to use for the connection\&.
+ Directory for client-side plugins\&.
.RE
.sp
.RS 4
@@ -699,12 +708,12 @@ The TCP/IP port number to use for the connection\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlcheck: protocol option
-.\" protocol option: mysqlcheck
-\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
+.\" mysqlcheck: port option
+.\" port option: mysqlcheck
+\fB\-\-port=\fR\fB\fIport_num\fR\fR,
+\fB\-P \fR\fB\fIport_num\fR\fR
.sp
-The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
-Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
+The TCP/IP port number to use for the connection\&.
.RE
.sp
.RS 4
@@ -731,6 +740,51 @@ This must be given as the first argument\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlcheck: process-tables option
+.\" process-tables option: mysqlcheck
+\fB\-\-process\-tables\fR
+.sp
+Perform the requested operation on tables. Defaults to on; use \fB--skip-process-tables\fR to disable\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: process-views option
+.\" process-views option: mysqlcheck
+\fB\-\-process\-views=\fB\fIval\fR
+.sp
+Perform the requested operation (only CHECK VIEW or REPAIR VIEW). Possible values are NO, YES (correct the checksum, if necessary, add the mariadb-version field), UPGRADE_FROM_MYSQL (same as YES and toggle the algorithm MERGE<->TEMPTABLE\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlcheck: protocol option
+.\" protocol option: mysqlcheck
+\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
+.sp
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlcheck: quick option
.\" quick option: mysqlcheck
\fB\-\-quick\fR,
@@ -781,6 +835,22 @@ Silent mode\&. Print only error messages\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlcheck: skip-database option
+.\" skip-database option: mysqlcheck
+\fB\-\-skip\-database=\fB\fIdb_name\fR
+\fB\-s\fR
+.sp
+Don't process the database (case-sensitive) specified as argument\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlcheck: socket option
.\" socket option: mysqlcheck
\fB\-\-socket=\fR\fB\fIpath\fR\fR,
@@ -798,14 +868,139 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlcheck: SSL options
-.\" SSL options: mysqlcheck
-\fB\-\-ssl*\fR
-.sp
-Options that begin with
+.\" mysqladmin: SSL options
+.\" SSL options: mysqladmin
\fB\-\-ssl\fR
-specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL CA option
+.\" SSL CA option: mysqladmin
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL CA Path option
+.\" SSL CA Path option: mysqladmin
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Cert option
+.\" SSL Cert option: mysqladmin
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Cipher option
+.\" SSL Cipher option: mysqladmin
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Key option
+.\" SSL Key option: mysqladmin
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Crl option
+.\" SSL CRL option: mysqladmin
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Crlpath option
+.\" SSL Crlpath option: mysqladmin
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysqladmin
+\fB\-\-ssl\-verify\-server\-cert\fR
+.sp
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
.RE
.sp
.RS 4
@@ -861,7 +1056,7 @@ header is corrupted\&.
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -878,6 +1073,13 @@ The MySQL user name to use when connecting to the server\&.
\fB\-v\fR
.sp
Verbose mode\&. Print information about the various stages of program operation\&.
+Using one \fB--verbose\fR option will give you more information about what mysqlcheck is
+doing\&.
+.sp
+Using two \fB--verbose\fR options will also give you connection information\&.
+.sp
+Using it 3 times will print out all CHECK, RENAME and ALTER TABLE during
+the check phase\&.
.RE
.sp
.RS 4
@@ -920,12 +1122,12 @@ to cause
NO_WRITE_TO_BINLOG
to be added to the statements so that they are not logged\&. Use the
\fB\-\-skip\-write\-binlog\fR
-when these statements should not be sent to replication slaves or run when using the binary logs for recovery from backup\&. This option was added in MySQL 5\&.1\&.18\&.
+when these statements should not be sent to replication slaves or run when using the binary logs for recovery from backup\&.
.RE
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -934,8 +1136,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqld.8 b/man/mysqld.8
index d3f5954d5e4..f9632e020ea 100644
--- a/man/mysqld.8
+++ b/man/mysqld.8
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqld\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLD\FR" "8" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLD\FR" "8" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -18,18 +11,18 @@
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
-.\" mysqld: MySQL server
-.\" MySQL server: mysqld
+.\" mysqld: MariaDB server
+.\" MariaDB server: mysqld
.SH "NAME"
-mysqld \- the MySQL server
+mysqld \- the MariaDB server
.SH "SYNOPSIS"
.HP \w'\fBmysqld\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
\fBmysqld [\fR\fB\fIoptions\fR\fR\fB]\fR
.SH "DESCRIPTION"
.PP
-\fBmysqld\fR, also known as MySQL Server, is the main program that does most of the work in a MySQL installation\&. MySQL Server manages access to the MySQL data directory that contains databases and tables\&. The data directory is also the default location for other information such as log files and status files\&.
+\fBmysqld\fR, also known as MariaDB Server, is the main program that does most of the work in a MariaDB installation\&. MariaDB Server manages access to the MariaDB data directory that contains databases and tables\&. The data directory is also the default location for other information such as log files and status files\&.
.PP
-When MySQL server starts, it listens for network connections from client programs and manages access to databases on behalf of those clients\&.
+When MariaDB server starts, it listens for network connections from client programs and manages access to databases on behalf of those clients\&.
.PP
The
\fBmysqld\fR
@@ -45,15 +38,14 @@ shell> \fBmysqld \-\-verbose \-\-help\fR
.RE
.\}
.PP
-MySQL Server also has a set of system variables that affect its operation as it runs\&. System variables can be set at server startup, and many of them can be changed at runtime to effect dynamic server reconfiguration\&. MySQL Server also has a set of status variables that provide information about its operation\&. You can monitor these status variables to access runtime performance characteristics\&.
+MariaDB Server also has a set of system variables that affect its operation as it runs\&. System variables can be set at server startup, and many of them can be changed at runtime to effect dynamic server reconfiguration\&. MariaDB Server also has a set of status variables that provide information about its operation\&. You can monitor these status variables to access runtime performance characteristics\&.
.PP
-For a full description of MySQL Server command options, system variables, and status variables, see
-Section\ \&5.1, \(lqThe MySQL Server\(rq\&. For information about installing MySQL and setting up the initial configuration, see
-Chapter\ \&2, Installing and Upgrading MySQL\&.
+For a full description of MariaDB Server command options, system variables, and status variables, see
+the MariaDB Knowledge Base\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -62,8 +54,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1
index 07ffa2fd6b4..3f540944c61 100644
--- a/man/mysqld_multi.1
+++ b/man/mysqld_multi.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqld_multi\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLD_MULTI\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLD_MULTI\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -23,7 +16,7 @@
.\" scripts
.\" multi mysqld
.SH "NAME"
-mysqld_multi \- manage multiple MySQL servers
+mysqld_multi \- manage multiple MariaDB servers
.SH "SYNOPSIS"
.HP \w'\fBmysqld_multi\ [\fR\fB\fIoptions\fR\fR\fB]\ {start|stop|report}\ [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB]\ \&.\&.\&.]\fR\ 'u
\fBmysqld_multi [\fR\fB\fIoptions\fR\fR\fB] {start|stop|report} [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB] \&.\&.\&.]\fR
@@ -32,8 +25,7 @@ mysqld_multi \- manage multiple MySQL servers
\fBmysqld_multi\fR
is designed to manage several
\fBmysqld\fR
-processes that listen for connections on different Unix socket files and TCP/IP ports\&. It can start or stop servers, or report their current status\&. The MySQL Instance Manager is an alternative means of managing multiple servers (see
-\fBmysqlmanager\fR(8))\&.
+processes that listen for connections on different Unix socket files and TCP/IP ports\&. It can start or stop servers, or report their current status\&.
.PP
\fBmysqld_multi\fR
searches for groups named
@@ -50,9 +42,7 @@ can be any positive integer\&. This number is referred to in the following discu
to specify which servers you want to start, stop, or obtain a status report for\&. Options listed in these groups are the same that you would use in the
[mysqld]
group used for starting
-\fBmysqld\fR\&. (See, for example,
-Section\ \&2.13.1.2, \(lqStarting and Stopping MySQL Automatically\(rq\&.) However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&. For more information on which options must be unique per server in a multiple\-server environment, see
-Section\ \&5.6, \(lqRunning Multiple MySQL Servers on the Same Machine\(rq\&.
+\fBmysqld\fR\&. However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&.
.PP
To invoke
\fBmysqld_multi\fR, use the following syntax:
@@ -136,7 +126,6 @@ shell> \fBmysqld_multi \-\-example\fR
.RE
.\}
.PP
-As of MySQL 5\&.1\&.18,
\fBmysqld_multi\fR
searches for option files as follows:
.sp
@@ -183,16 +172,6 @@ Otherwise, option files in the standard list of locations are read, including an
option, if one is given\&. (If the option is given multiple times, the last value is used\&.)
.RE
.PP
-Before MySQL 5\&.1\&.18, the preceding options are not recognized\&. Files in the standard locations are read, and any file named by the
-\fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR
-option, if one is given\&. A file named by
-\fB\-\-config\-file\fR
-is read only for
-[mysqld\fIN\fR]
-option groups, not the
-[mysqld_multi]
-group\&.
-.PP
Option files read are searched for
[mysqld_multi]
and
@@ -207,7 +186,7 @@ groups can be used for options passed to specific
\fBmysqld\fR
instances\&.
.PP
-As of MySQL 5\&.1\&.35, the
+The
[mysqld]
or
[mysqld_safe]
@@ -220,11 +199,7 @@ option to use a different configuration file for that instance, in which case th
[mysqld]
or
[mysqld_safe]
-groups from that file will be used for that instance\&. Before MySQL 5\&.1\&.35, some versions of
-\fBmysqld_multi\fR
-pass the
-\fB\-\-no\-defaults\fR
-options to instances, so these techniques are inapplicable\&.
+groups from that file will be used for that instance\&.
.PP
\fBmysqld_multi\fR
supports the following options\&.
@@ -252,38 +227,6 @@ Display a help message and exit\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqld_multi: config-file option
-.\" config-file option: mysqld_multi
-\fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR
-.sp
-As of MySQL 5\&.1\&.18, this option is deprecated\&. If given, it is treated the same way as
-\fB\-\-defaults\-extra\-file\fR, described earlier\&.
-\fB\-\-config\-file\fR
-is removed in MySQL 5\&.5\&.
-.sp
-Before MySQL 5\&.1\&.18, this option specifies the name of an extra option file\&. It affects where
-\fBmysqld_multi\fR
-looks for
-[mysqld\fIN\fR]
-option groups\&. Without this option, all options are read from the usual
-my\&.cnf
-file\&. The option does not affect where
-\fBmysqld_multi\fR
-reads its own options, which are always taken from the
-[mysqld_multi]
-group in the usual
-my\&.cnf
-file\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
.\" mysqld_multi: example option
.\" example option: mysqld_multi
\fB\-\-example\fR
@@ -394,8 +337,8 @@ rather than to the log file\&. By default, output goes to the log file\&.
.\" password option: mysqld_multi
\fB\-\-password=\fR\fB\fIpassword\fR\fR
.sp
-The password of the MySQL account to use when invoking
-\fBmysqladmin\fR\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&.
+The password of the MariaDB account to use when invoking
+\fBmysqladmin\fR\&. Note that the password value is not optional for this option, unlike for other MariaDB programs\&.
.RE
.sp
.RS 4
@@ -425,11 +368,10 @@ Silent mode; disable warnings\&.
.\" tcp-ip option: mysqld_multi
\fB\-\-tcp\-ip\fR
.sp
-Connect to each MySQL server via the TCP/IP port instead of the Unix socket file\&. (If a socket file is missing, the server might still be running, but accessible only via the TCP/IP port\&.) By default, connections are made using the Unix socket file\&. This option affects
-stop
-and
-report
-operations\&.
+Connect to the MariaDB server(s) via the TCP/IP port instead of the UNIX socket\&. This affects stopping
+and reporting. If a socket file is missing, the server may still be running, but can be accessed only
+via the TCP/IP port\&. By default connecting is done via the UNIX socket\&. This option affects
+stop and report operations\&.
.RE
.sp
.RS 4
@@ -444,7 +386,7 @@ operations\&.
.\" user option: mysqld_multi
\fB\-\-user=\fR\fB\fIuser_name\fR\fR
.sp
-The user name of the MySQL account to use when invoking
+The user name of the MariaDB account to use when invoking
\fBmysqladmin\fR\&.
.RE
.sp
@@ -503,8 +445,9 @@ servers with the same data directory\&. Use separate data directories, unless yo
\fIknow\fR
what you are doing\&. Starting multiple servers with the same data directory does
\fInot\fR
-give you extra performance in a threaded system\&. See
-Section\ \&5.6, \(lqRunning Multiple MySQL Servers on the Same Machine\(rq\&.
+give you extra performance in a threaded system\&.
+.sp .5v
+.RE
.RE
.sp
.RS 4
@@ -515,19 +458,7 @@ Section\ \&5.6, \(lqRunning Multiple MySQL Servers on the Same Machine\(rq\&.
.sp -1
.IP \(bu 2.3
.\}
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBImportant\fR
-.ps -1
-.br
-Make sure that the data directory for each server is fully accessible to the Unix account that the specific
+\fBImportant\fR: Make sure that the data directory for each server is fully accessible to the Unix account that the specific
\fBmysqld\fR
process is started as\&.
\fIDo not\fR
@@ -535,8 +466,7 @@ use the Unix
\fIroot\fR
account for this, unless you
\fIknow\fR
-what you are doing\&. See
-Section\ \&5.3.6, \(lqHow to Run MySQL as a Normal User\(rq\&.
+what you are doing\&.
.sp .5v
.RE
.RE
@@ -549,7 +479,7 @@ Section\ \&5.3.6, \(lqHow to Run MySQL as a Normal User\(rq\&.
.sp -1
.IP \(bu 2.3
.\}
-Make sure that the MySQL account used for stopping the
+Make sure that the MariaDB account used for stopping the
\fBmysqld\fR
servers (with the
\fBmysqladmin\fR
@@ -572,10 +502,7 @@ mysql> \fBGRANT SHUTDOWN ON *\&.*\fR
.RE
.\}
.sp
-See
-Section\ \&5.4, \(lqThe MySQL Access Privilege System\(rq\&. You have to do this for each
-\fBmysqld\fR
-server\&. Change the connection parameters appropriately when connecting to each one\&. Note that the host name part of the account name must allow you to connect as
+Change the connection parameters appropriately when connecting to each one\&. Note that the host name part of the account name must allow you to connect as
multi_admin
from the host where you want to run
\fBmysqld_multi\fR\&.
@@ -723,12 +650,10 @@ user = jani
.RE
.\}
.PP
-See
-Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -737,8 +662,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1
index 25848aecb9c..fe89c4e2aad 100644
--- a/man/mysqld_safe.1
+++ b/man/mysqld_safe.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqld_safe\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLD_SAFE\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLD_SAFE\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -22,7 +15,7 @@
.\" tools: mysqld_safe
.\" scripts
.SH "NAME"
-mysqld_safe \- MySQL server startup script
+mysqld_safe \- MariaDB server startup script
.SH "SYNOPSIS"
.HP \w'\fBmysqld_safe\ \fR\fB\fIoptions\fR\fR\ 'u
\fBmysqld_safe \fR\fB\fIoptions\fR\fR
@@ -31,34 +24,10 @@ mysqld_safe \- MySQL server startup script
\fBmysqld_safe\fR
is the recommended way to start a
\fBmysqld\fR
-server on Unix and NetWare\&.
+server on Unix\&.
\fBmysqld_safe\fR
-adds some safety features such as restarting the server when an error occurs and logging runtime information to an error log file\&. Descriptions of error logging and NetWare\-specific behaviors are given later in this section\&.
-.if n \{\
+adds some safety features such as restarting the server when an error occurs and logging runtime information to an error log file\&. Descriptions of error logging is given later in this section\&.
.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.PP
-In MySQL 5\&.1\&.20 (only), the default error logging behavior with
-\fBmysqld_safe\fR
-is to write errors to
-syslog
-on systems that support the
-\fBlogger\fR
-program\&. This differs from the default behavior of writing an error log file for other versions\&.
-.PP
-\fBIn 5\&.1\&.20, logging to \fR\fBsyslog\fR\fB may fail to operate correctly in some cases; if so, use \fR\fB\fB\-\-skip\-syslog\fR\fR\fB to use the default log file or \fR\fB\fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR\fR\fB to specify a log file name explicitly\&.\fR
-.sp .5v
-.RE
-.PP
\fBmysqld_safe\fR
tries to start an executable named
\fBmysqld\fR\&. To override the default behavior and specify explicitly the name of the server you want to run, specify a
@@ -75,8 +44,7 @@ should look for the server\&.
Many of the options to
\fBmysqld_safe\fR
are the same as the options to
-\fBmysqld\fR\&. See
-Section\ \&5.1.2, \(lqServer Command Options\(rq\&.
+\fBmysqld\fR\&.
.PP
Options unknown to
\fBmysqld_safe\fR
@@ -84,8 +52,7 @@ are passed to
\fBmysqld\fR
if they are specified on the command line, but ignored if they are specified in the
[mysqld_safe] or [mariadb_safe]
-groups of an option file\&. See
-Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&.
+groups of an option file\&.
.PP
\fBmysqld_safe\fR
reads all options from the
@@ -117,11 +84,10 @@ also reads
[safe_mysqld]
sections, although you should rename such sections to
[mysqld_safe]
-in MySQL 5\&.1 installations\&.
+in current installations\&.
.PP
\fBmysqld_safe\fR
-supports the options in the following list\&. It also reads option files and supports the options for processing them described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
+supports the options in the following list\&. It also reads option files and supports the options for processing them.
.sp
.RS 4
.ie n \{\
@@ -150,7 +116,7 @@ Display a help message and exit\&.
.\" basedir option: mysqld_safe
\fB\-\-basedir=\fR\fB\fIpath\fR\fR
.sp
-The path to the MySQL installation directory\&.
+The path to the MariaDB installation directory\&.
.RE
.sp
.RS 4
@@ -179,6 +145,21 @@ should be able to create\&. The option value is passed to
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqld_safe: crash-script option
+.\" crash-script option: mysqld_safe
+\fB\-\-crash\-script=\fR\fB\fIfile\fR\fR
+.sp
+Script to call in the event of mysqld crashing\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqld_safe: datadir option
.\" datadir option: mysqld_safe
\fB\-\-datadir=\fR\fB\fIpath\fR\fR
@@ -224,6 +205,21 @@ The name of an option file to be read instead of the usual option files\&. This
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqld_safe: flush-caches option
+.\" flush-caches option: mysqld_safe
+\fB\-\-flush\-caches\fR
+.sp
+Flush and purge buffers/caches before starting the server\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqld_safe: ledir option
.\" ledir option: mysqld_safe
\fB\-\-ledir=\fR\fB\fIpath\fR\fR
@@ -245,8 +241,22 @@ cannot find the server, use this option to indicate the path name to the directo
.\" log-error option: mysqld_safe
\fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR
.sp
-Write the error log to the given file\&. See
-Section\ \&5.2.2, \(lqThe Error Log\(rq\&.
+Write the error log to the given file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqld_safe: malloc-lib option
+.\" malloc-lib option: mysqld_safe
+\fB\-\-malloc\-lib=\fR\fB\fIlib\fR\fR
+.sp
+Preload shared library lib if available\&.
.RE
.sp
.RS 4
@@ -263,7 +273,7 @@ Section\ \&5.2.2, \(lqThe Error Log\(rq\&.
.sp
The name of the server program (in the
ledir
-directory) that you want to start\&. This option is needed if you use the MySQL binary distribution but have the data directory outside of the binary distribution\&. If
+directory) that you want to start\&. This option is needed if you use the MariaDB binary distribution but have the data directory outside of the binary distribution\&. If
\fBmysqld_safe\fR
cannot find the server, use the
\fB\-\-ledir\fR
@@ -328,6 +338,21 @@ program to set the server\'s scheduling priority to the given value\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqld_safe: no-auto-restart option
+.\" no-auto-restart option: mysqld_safe
+\fB\-\-no\-auto\-restart\fR
+.sp
+Exit after starting mysqld\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqld_safe: no-defaults option
.\" no-defaults option: mysqld_safe
\fB\-\-no\-defaults\fR
@@ -343,6 +368,36 @@ Do not read any option files\&. This must be the first option on the command lin
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqld_safe: no-watch option
+.\" no-watch option: mysqld_safe
+\fB\-\-no\-auto\-restart\fR
+.sp
+Exit after starting mysqld\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqld_safe: numa-interleave option
+.\" numa-interleave option: mysqld_safe
+\fB\-\-numa\-interleave\fR
+.sp
+Run mysqld with its memory interleaved on all NUMA nodes\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqld_safe: open-files-limit option
.\" open-files-limit option: mysqld_safe
\fB\-\-open\-files\-limit=\fR\fB\fIcount\fR\fR
@@ -380,6 +435,21 @@ The path name of the process ID file\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqld_safe: plugin-dir option
+.\" plugin-dir option: mysqld_safe
+\fB\-\-plugin\-dir=\fIdir_name\fR
+.sp
+Directory for client-side plugins\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqld_safe: port option
.\" port option: mysqld_safe
\fB\-\-port=\fR\fB\fIport_num\fR\fR
@@ -444,7 +514,7 @@ on systems that support the
program\&.
\-\-skip\-syslog
suppresses the use of
-syslog; messages are written to an error log file\&. These options were added in MySQL 5\&.1\&.20\&.
+syslog; messages are written to an error log file\&.
.RE
.sp
.RS 4
@@ -471,7 +541,7 @@ mysqld, respectively\&. To specify a suffix for the tag, use
\fB\-\-syslog\-tag=\fR\fB\fItag\fR\fR, which modifies the tags to be
mysqld_safe\-\fItag\fR
and
-mysqld\-\fItag\fR\&. This option was added in MySQL 5\&.1\&.21\&.
+mysqld\-\fItag\fR\&.
.RE
.sp
.RS 4
@@ -509,7 +579,7 @@ server as the user having the name
\fIuser_name\fR
or the numeric user ID
\fIuser_id\fR\&. (\(lqUser\(rq
-in this context refers to a system login account, not a MySQL user listed in the grant tables\&.)
+in this context refers to a system login account, not a MariaDB user listed in the grant tables\&.)
.RE
.PP
If you execute
@@ -544,8 +614,7 @@ mysql> \fBmysqld_safe \-\-defaults\-file=\fR\fB\fIfile_name\fR\fR\fB \-\-port=\f
.PP
The
\fBmysqld_safe\fR
-script is written so that it normally can start a server that was installed from either a source or a binary distribution of MySQL, even though these types of distributions typically install the server in slightly different locations\&. (See
-Section\ \&2.1.5, \(lqInstallation Layouts\(rq\&.)
+script is written so that it normally can start a server that was installed from either a source or a binary distribution of MariaDB, even though these types of distributions typically install the server in slightly different locations\&.
\fBmysqld_safe\fR
expects one of the following conditions to be true:
.sp
@@ -571,7 +640,7 @@ and
var
directories\&. This condition should be met if you execute
\fBmysqld_safe\fR
-from your MySQL installation directory (for example,
+from your MariaDB installation directory (for example,
/usr/local/mysql
for a binary distribution)\&.
.RE
@@ -589,14 +658,14 @@ If the server and databases cannot be found relative to the working directory,
attempts to locate them by absolute path names\&. Typical locations are
/usr/local/libexec
and
-/usr/local/var\&. The actual locations are determined from the values configured into the distribution at the time it was built\&. They should be correct if MySQL is installed in the location specified at configuration time\&.
+/usr/local/var\&. The actual locations are determined from the values configured into the distribution at the time it was built\&. They should be correct if MariaDB is installed in the location specified at configuration time\&.
.RE
.PP
Because
\fBmysqld_safe\fR
-tries to find the server and databases relative to its own working directory, you can install a binary distribution of MySQL anywhere, as long as you run
+tries to find the server and databases relative to its own working directory, you can install a binary distribution of MariaDB anywhere, as long as you run
\fBmysqld_safe\fR
-from the MySQL installation directory:
+from the MariaDB installation directory:
.sp
.if n \{\
.RS 4
@@ -611,7 +680,7 @@ shell> \fBbin/mysqld_safe &\fR
.PP
If
\fBmysqld_safe\fR
-fails, even when invoked from the MySQL installation directory, you can specify the
+fails, even when invoked from the MariaDB installation directory, you can specify the
\fB\-\-ledir\fR
and
\fB\-\-datadir\fR
@@ -626,7 +695,7 @@ arranges for error (and notice) messages from itself and from
\fBmysqld\fR
to go to the same destination\&.
.PP
-As of MySQL 5\&.1\&.20, there are several
+There are several
\fBmysqld_safe\fR
options for controlling the destination of these messages:
.sp
@@ -686,9 +755,6 @@ If none of these options is given, the default is
.ps -1
.br
.PP
-In MySQL 5\&.1\&.20
-\fIonly\fR, the default is
-\fB\-\-syslog\fR\&. This differs from logging behavior for other versions of MySQL, for which the default is to write messages to the default error log file\&.
.sp .5v
.RE
.PP
@@ -707,10 +773,6 @@ or the error log file) and
stdout\&. Errors go to the logging destination and
stderr\&.
.PP
-Before MySQL 5\&.1\&.20, error logging is controlled only with the
-\fB\-\-log\-error\fR
-option\&. If it is given, messages go to the named error file\&. Otherwise, messages go to the default error file\&.
-.PP
Normally, you should not edit the
\fBmysqld_safe\fR
script\&. Instead, configure
@@ -723,7 +785,7 @@ option file\&. In rare cases, it might be necessary to edit
\fBmysqld_safe\fR
to get it to start the server properly\&. However, if you do this, your modified version of
\fBmysqld_safe\fR
-might be overwritten if you upgrade MySQL in the future, so you should make a copy of your edited version that you can reinstall\&.
+might be overwritten if you upgrade MariaDB in the future, so you should make a copy of your edited version that you can reinstall\&.
.PP
On NetWare,
\fBmysqld_safe\fR
@@ -761,7 +823,7 @@ tables\&.
.sp -1
.IP " 3." 4.2
.\}
-Provides a screen presence for the MySQL server\&.
+Provides a screen presence for the MariaDB server\&.
.RE
.sp
.RS 4
@@ -808,7 +870,7 @@ file in the data directory\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -817,8 +879,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqldump.1 b/man/mysqldump.1
index c3c0bf4440d..da2e4fa02c5 100644
--- a/man/mysqldump.1
+++ b/man/mysqldump.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqldump\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLDUMP\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLDUMP\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -32,7 +25,7 @@ mysqldump \- a database backup program
.PP
The
\fBmysqldump\fR
-client is a backup program originally written by Igor Romanenko\&. It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server)\&. The dump typically contains SQL statements to create the table, populate it, or both\&. However,
+client is a backup program originally written by Igor Romanenko\&. It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MariaDB server)\&. The dump typically contains SQL statements to create the table, populate it, or both\&. However,
\fBmysqldump\fR
can also be used to generate files in CSV, other delimited text, or XML format\&.
.PP
@@ -68,18 +61,11 @@ option, entire databases are dumped\&.
.PP
\fBmysqldump\fR
does not dump the
-INFORMATION_SCHEMA
-database by default\&. As of MySQL 5\&.1\&.38,
-\fBmysqldump\fR
-dumps
-INFORMATION_SCHEMA
-if you name it explicitly on the command line, although currently you must also use the
+INFORMATION_SCHEMA or performance_schema
+databases by default\&. To dump these,
+name them explicitly on the command line, although you must also use the
\fB\-\-skip\-lock\-tables\fR
-option\&. Before 5\&.1\&.38,
-\fBmysqldump\fR
-silently ignores
-INFORMATION_SCHEMA
-even if you name it explicitly on the command line\&.
+option\&.
.PP
To see a list of the options your version of
\fBmysqldump\fR
@@ -207,22 +193,6 @@ or
option\&. Use
\fB\-\-skip\-opt\fR
instead\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.PP
-\fBmysqldump\fR
-from MySQL 5\&.1\&.21 cannot be used to create dumps from MySQL server 5\&.1\&.20 and older\&. This issue is fixed in MySQL 5\&.1\&.22\&. (\m[blue]\fBBug#30123\fR\m[]\&\s-2\u[1]\d\s+2)
-.sp .5v
.RE
.PP
\fBmysqldump\fR
@@ -232,8 +202,7 @@ and
[client]
option file groups\&.
\fBmysqldump\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
+also supports the options for processing option file\&.
.sp
.RS 4
.ie n \{\
@@ -311,8 +280,7 @@ Surround each table dump with
LOCK TABLES
and
UNLOCK TABLES
-statements\&. This results in faster inserts when the dump file is reloaded\&. See
-Section\ \&7.2.21, \(lqSpeed of INSERT Statements\(rq\&.
+statements\&. This results in faster inserts when the dump file is reloaded\&.
.RE
.sp
.RS 4
@@ -351,7 +319,6 @@ NDBCLUSTER
table\&. This information is not otherwise included in the output from
\fBmysqldump\fR\&. This option is currently relevant only to MySQL Cluster tables\&.
.sp
-This option was added in MySQL 5\&.1\&.6\&.
.RE
.sp
.RS 4
@@ -377,12 +344,26 @@ Allow creation of column names that are keywords\&. This works by prefixing each
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqldump: apply-slave-statements option
+.\" apply-slave-statements option: mysqldump
+\fB\-\-apply\-slave\-statements\fR
+.sp
+Adds 'STOP SLAVE' prior to 'CHANGE MASTER' and 'START SLAVE' to bottom of dump\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqldump: character-sets-dir option
.\" character-sets-dir option: mysqldump
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
.sp
-The directory where character sets are installed\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+The directory where character sets are installed\&.
.RE
.sp
.RS 4
@@ -421,24 +402,6 @@ Produce more compact output\&. This option enables the
\fB\-\-skip\-disable\-keys\fR, and
\fB\-\-skip\-set\-charset\fR
options\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-Prior to MySQL 5\&.1\&.21, this option did not create valid SQL if the database dump contained views\&. The recreation of views requires the creation and removal of temporary tables and this option suppressed the removal of those temporary tables\&. As a workaround, use
-\fB\-\-compact\fR
-with the
-\fB\-\-add\-drop\-table\fR
-option and then manually adjust the dump file\&.
-.sp .5v
.RE
.RE
.sp
@@ -467,14 +430,12 @@ db2,
maxdb,
no_key_options,
no_table_options, or
-no_field_options\&. To use several values, separate them by commas\&. These values have the same meaning as the corresponding options for setting the server SQL mode\&. See
-Section\ \&5.1.8, \(lqServer SQL Modes\(rq\&.
+no_field_options\&. To use several values, separate them by commas\&. These values have the same meaning as the corresponding options for setting the server SQL mode\&.
.sp
This option does not guarantee compatibility with other servers\&. It only enables those SQL mode values that are currently available for making dump output more compatible\&. For example,
\fB\-\-compatible=oracle\fR
does not map data types to Oracle types or use Oracle comment syntax\&.
.sp
-\fIThis option requires a server version of 4\&.1\&.0 or higher\fR\&. With older servers, it does nothing\&.
.RE
.sp
.RS 4
@@ -524,9 +485,9 @@ Compress all information sent between the client and the server if both support
\fB\-\-create\-options\fR,
\fB\-a\fR
.sp
-Include all MySQL\-specific table options in the
+Include all MariaDB\-specific table options in the
CREATE TABLE
-statements\&.
+statements\&. Use \fB\-\-skip-create-options\fR to disable.
.RE
.sp
.RS 4
@@ -583,7 +544,7 @@ string is
.\" debug-check option: mysqldump
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
@@ -598,7 +559,22 @@ Print some debugging information when the program exits\&. This option was added
.\" debug-info option: mysqldump
\fB\-\-debug\-info\fR
.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.14\&.
+Print debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqldump: default-auth option
+.\" default-auth option: mysqldump
+\fB\-\-default\-auth\fR
+.sp
+Default authentication client-side plugin to use\&.
.RE
.sp
.RS 4
@@ -615,16 +591,11 @@ Print debugging information and memory and CPU usage statistics when the program
.sp
Use
\fIcharset_name\fR
-as the default character set\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&. If no character set is specified,
+as the default character set\&. If no character set is specified,
\fBmysqldump\fR
uses
-utf8, and earlier versions use
-latin1\&.
+utf8\&.
.sp
-Prior to MySQL 5\&.1\&.38, this option has no effect for output data files produced by using the
-\fB\-\-tab\fR
-option\&. See the description for that option\&.
.RE
.sp
.RS 4
@@ -667,6 +638,21 @@ Must be given as first option\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" my_print_defaults: defaults-group-suffix option
+.\" defaults-group-suffix option: my_print_defaults
+\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR,
+.sp
+Also read groups with a suffix of \fIstr\fR\&. For example, since mysqldump normally reads the [client] and [mysqldump] groups, \-\-defaults\-group\-suffix=x would cause it to also read the groups [mysqldump_x] and [client_x]\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqldump: delayed-insert option
.\" delayed-insert option: mysqldump
\fB\-\-delayed\-insert\fR
@@ -756,7 +742,7 @@ control whether the date is added to the comment\&. The default is
\fB\-\-dump\-date\fR
(include the date in the comment)\&.
\fB\-\-skip\-dump\-date\fR
-suppresses date printing\&. This option was added in MySQL 5\&.1\&.23\&.
+suppresses date printing\&
.RE
.sp
.RS 4
@@ -772,7 +758,7 @@ suppresses date printing\&. This option was added in MySQL 5\&.1\&.23\&.
\fB\-\-events\fR,
\fB\-E\fR
.sp
-Include Event Scheduler events for the dumped databases in the output\&. This option was added in MySQL 5\&.1\&.8\&.
+Include Event Scheduler events for the dumped databases in the output\&.
.RE
.sp
.RS 4
@@ -821,8 +807,7 @@ These options are used with the
option and have the same meaning as the corresponding
FIELDS
clauses for
-LOAD DATA INFILE\&. See
-Section\ \&12.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
+LOAD DATA INFILE\&.
.RE
.sp
.RS 4
@@ -837,11 +822,9 @@ Section\ \&12.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
.\" first-slave option: mysqldump
\fB\-\-first\-slave\fR
.sp
-Deprecated\&. Use
+Removed in MariaDB 5.5\&. Use
\fB\-\-lock\-all\-tables\fR
instead\&.
-\fB\-\-first\-slave\fR
-is removed in MySQL 5\&.5\&.
.RE
.sp
.RS 4
@@ -857,7 +840,7 @@ is removed in MySQL 5\&.5\&.
\fB\-\-flush\-logs\fR,
\fB\-F\fR
.sp
-Flush the MySQL server log files before starting the dump\&. This option requires the
+Flush the MariaDB server log files before starting the dump\&. This option requires the
RELOAD
privilege\&. If you use this option in combination with the
\fB\-\-all\-databases\fR
@@ -893,7 +876,7 @@ database\&. This option should be used any time the dump contains the
mysql
database and any other database that depends on the data in the
mysql
-database for proper restoration\&. This option was added in MySQL 5\&.1\&.12\&.
+database for proper restoration\&.
.RE
.sp
.RS 4
@@ -930,13 +913,11 @@ prints the error message, but it also writes an SQL comment containing the view
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqldump: host option
-.\" host option: mysqldump
-\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
-\fB\-h \fR\fB\fIhost_name\fR\fR
+.\" mysqldump: gtid option
+.\" gtid option: mysqldump
+\fB\-\-gtid\fR
.sp
-Dump data from the MySQL server on the given host\&. The default host is
-localhost\&.
+Available from MariaDB 10.0.13, and is used together with \fB\-\-master\-data\fR and \fB\-\-dump\-slave\fR to more conveniently set up a new GTID slave\&. It causes those options to output SQL statements that configure the slave to use the global transaction ID to connect to the master instead of old-style filename/offset positions\&. The old-style positions are still included in comments when \fB\-\-gtid\fR is used; likewise the GTID position is included in comments even if \fB\-\-gtid\fR is not used\&.
.RE
.sp
.RS 4
@@ -970,6 +951,23 @@ BIT\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqldump: host option
+.\" host option: mysqldump
+\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
+\fB\-h \fR\fB\fIhost_name\fR\fR
+.sp
+Dump data from the MariaDB server on the given host\&. The default host is
+localhost\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqldump: ignore-table option
.\" ignore-table option: mysqldump
\fB\-\-ignore\-table=\fR\fB\fIdb_name\&.tbl_name\fR\fR
@@ -985,6 +983,22 @@ Do not dump the given table, which must be specified using both the database and
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqldump: include-master-host-port option
+.\" include-master-host-port option: mysqldump
+\fB\-\-include\-master\-host\-port\fR
+.sp
+Add the MASTER_HOST and MASTER_PORT options for the CHANGE MASTER TO statement when using
+the \fB--dump-slave\fR option for a slave dump\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqldump: insert-ignore option
.\" insert-ignore option: mysqldump
\fB\-\-insert\-ignore\fR
@@ -1013,8 +1027,7 @@ This option is used with the
option and has the same meaning as the corresponding
LINES
clause for
-LOAD DATA INFILE\&. See
-Section\ \&12.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
+LOAD DATA INFILE\&.
.RE
.sp
.RS 4
@@ -1063,6 +1076,8 @@ because it does not need to lock the tables at all\&.
Because
\fB\-\-lock\-tables\fR
locks tables for each database separately, this option does not guarantee that the tables in the dump file are logically consistent between databases\&. Tables in different databases may be dumped in completely different states\&.
+.sp
+Use \fB--skip-lock-tables\fR to disable\&.
.RE
.sp
.RS 4
@@ -1077,7 +1092,7 @@ locks tables for each database separately, this option does not guarantee that t
.\" log-error option: mysqldump
\fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR
.sp
-Log warnings and errors by appending them to the named file\&. The default is to do no logging\&. This option was added in MySQL 5\&.1\&.18\&.
+Log warnings and errors by appending them to the named file\&. The default is to do no logging\&.
.RE
.sp
.RS 4
@@ -1110,8 +1125,7 @@ option automatically turns off
\fB\-\-lock\-tables\fR\&. It also turns on
\fB\-\-lock\-all\-tables\fR, unless
\fB\-\-single\-transaction\fR
-also is specified, in which case, a global read lock is acquired only for a short time at the beginning of the dump (see the description for
-\fB\-\-single\-transaction\fR)\&. In all cases, any action on logs happens at the exact moment of the dump\&.
+also is specified\&. In all cases, any action on logs happens at the exact moment of the dump\&.
.sp
It is also possible to set up a slave by dumping an existing slave of the master\&. To do this, use the following procedure on the existing slave:
.sp
@@ -1410,7 +1424,7 @@ This option is shorthand\&. It is the same as specifying
\fB\-\-extended\-insert\fR
\fB\-\-lock\-tables\fR
\fB\-\-quick\fR
-\fB\-\-set\-charset\fR\&. It should give you a fast dump operation and produce a dump file that can be reloaded into a MySQL server quickly\&.
+\fB\-\-set\-charset\fR\&. It should give you a fast dump operation and produce a dump file that can be reloaded into a MariaDB server quickly\&.
.sp
\fIThe \fR\fI\fB\-\-opt\fR\fR\fI option is enabled by default\&. Use \fR\fI\fB\-\-skip\-opt\fR\fR\fI to disable it\&.\fR
See the discussion at the beginning of this section for information about selectively enabling or disabling a subset of the options affected by
@@ -1461,8 +1475,7 @@ option on the command line,
\fBmysqldump\fR
prompts for one\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -1489,6 +1502,21 @@ On Windows, connect to the server via a named pipe\&. This option applies only i
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqldump: plugin-dir option
+.\" plugin-dir option: mysqldump
+\fB\-\-plugin\-dir\fR
+.sp
+Directory for client-side plugins\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqldump: port option
.\" port option: mysqldump
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
@@ -1509,8 +1537,7 @@ The TCP/IP port number to use for the connection\&.
.\" protocol option: mysqldump
\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
.sp
-The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
-Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
.RE
.sp
.RS 4
@@ -1543,7 +1570,7 @@ to retrieve rows for a table from the server a row at a time rather than retriev
.\" print-defaults option: mysqldump
\fB\-\-print\-defaults\fR
.sp
-Print the program argument list and exit\&. This must begiven as the first argument\&.
+Print the program argument list and exit\&. This must be given as the first argument\&.
.RE
.sp
.RS 4
@@ -1588,7 +1615,7 @@ Write
REPLACE
statements rather than
INSERT
-statements\&. This option was added in MySQL 5\&.1\&.3\&.
+statements\&.
.RE
.sp
.RS 4
@@ -1639,15 +1666,10 @@ statements to re\-create the routines\&. However, these statements do not includ
If you require routines to be re\-created with their original timestamp attributes, do not use
\fB\-\-routines\fR\&. Instead, dump and reload the contents of the
mysql\&.proc
-table directly, using a MySQL account that has appropriate privileges for the
+table directly, using a MariaDB account that has appropriate privileges for the
mysql
database\&.
.sp
-This option was added in MySQL 5\&.1\&.2\&. Before that, stored routines are not dumped\&. Routine
-DEFINER
-values are not dumped until MySQL 5\&.1\&.8\&. This means that before 5\&.1\&.8, when routines are reloaded, they will be created with the definer set to the reloading user\&. If you require routines to be re\-created with their original definer, dump and load the contents of the
-mysql\&.proc
-table directly as described earlier\&.
.RE
.sp
.RS 4
@@ -1732,11 +1754,45 @@ option with
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqldump: skip-add-drop-table option
+.\" skip-add-drop-table option: mysqldump
+\fB\-\-skip\-add\-drop\-table\fR
+.sp
+Disable the
+\fB\-\-add\-drop\-table\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqldump: skip-add-locks option
+.\" skip-add-locks option: mysqldump
+\fB\-\-skip\-add\-locks\fR
+.sp
+Disable the
+\fB\-\-add\-locks\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqldump: skip-comments option
.\" skip-comments option: mysqldump
\fB\-\-skip\-comments\fR
.sp
-See the description for the
+Disable the
\fB\-\-comments\fR
option\&.
.RE
@@ -1749,11 +1805,62 @@ option\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqldump: skip-compact option
+.\" skip-compact option: mysqldump
+\fB\-\-skip\-compact\fR
+.sp
+Disable the
+\fB\-\-compact\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqldump: skip-disable-keys option
+.\" skip-disable-keys option: mysqldump
+\fB\-\-skip\-disable\-keys\fR
+.sp
+Disable the
+\fB\-\-disable\-keys\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqldump: skip-extended-insert option
+.\" skip-extended-insert option: mysqldump
+\fB\-\-skip\-extended\-insert\fR
+.sp
+Disable the
+\fB\-\-extended\-insert\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqldump: skip-opt option
.\" skip-opt option: mysqldump
\fB\-\-skip\-opt\fR
.sp
-See the description for the
+Disable the
\fB\-\-opt\fR
option\&.
.RE
@@ -1766,6 +1873,91 @@ option\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqldump: skip-quick option
+.\" skip-quick option: mysqldump
+\fB\-\-skip\-quick\fR
+.sp
+Disable the
+\fB\-\-quick\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqldump: skip-quote-names option
+.\" skip-quote-names option: mysqldump
+\fB\-\-skip\-quote\-names\fR
+.sp
+Disable the
+\fB\-\-quote\-names\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqldump: skip-set-charset option
+.\" skip-set-charset option: mysqldump
+\fB\-\-skip\-set\-charset\fR
+.sp
+Disable the
+\fB\-\-set\-charset\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqldump: skip-triggers option
+.\" skip-triggers option: mysqldump
+\fB\-\-skip\-triggers\fR
+.sp
+Disable the
+\fB\-\-triggers\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqldump: skip-tz-utc option
+.\" skip-tz-utc option: mysqldump
+\fB\-\-skip\-tz\-utc\fR
+.sp
+Disable the
+\fB\-\-tz\-utc\fR
+option\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqldump: socket option
.\" socket option: mysqldump
\fB\-\-socket=\fR\fB\fIpath\fR\fR,
@@ -1783,14 +1975,139 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqldump: SSL options
-.\" SSL options: mysqldump
-\fB\-\-ssl*\fR
-.sp
-Options that begin with
+.\" mysqladmin: SSL options
+.\" SSL options: mysqladmin
\fB\-\-ssl\fR
-specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL CA option
+.\" SSL CA option: mysqladmin
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL CA Path option
+.\" SSL CA Path option: mysqladmin
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Cert option
+.\" SSL Cert option: mysqladmin
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Cipher option
+.\" SSL Cipher option: mysqladmin
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Key option
+.\" SSL Key option: mysqladmin
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Crl option
+.\" SSL CRL option: mysqladmin
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Crlpath option
+.\" SSL Crlpath option: mysqladmin
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysqladmin
+\fB\-\-ssl\-verify\-server\-cert\fR
+.sp
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
.RE
.sp
.RS 4
@@ -1844,11 +2161,9 @@ and
\fB\-\-lines\-terminated\-by\fR
options\&.
.sp
-As of MySQL 5\&.1\&.38, column values are converted to the character set specified by the
+Column values are converted to the character set specified by the
\fB\-\-default\-character\-set\fR
-option\&. Prior to 5\&.1\&.38 or if no such option is present, values are dumped using the
-binary
-character set\&. In effect, there is no character set conversion\&. If a table contains columns in several character sets, the output data file will as well and you may not be able to reload the file correctly\&.
+option\&.
.RE
.sp
.RS 4
@@ -1913,7 +2228,7 @@ columns are dumped and reloaded in the time zones local to the source and destin
also protects against changes due to daylight saving time\&.
\fB\-\-tz\-utc\fR
is enabled by default\&. To disable it, use
-\fB\-\-skip\-tz\-utc\fR\&. This option was added in MySQL 5\&.1\&.2\&.
+\fB\-\-skip\-tz\-utc\fR\&.
.RE
.sp
.RS 4
@@ -1929,7 +2244,7 @@ is enabled by default\&. To disable it, use
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -2042,14 +2357,14 @@ T}:T{
T}
.TE
.sp 1
-Beginning with MySQL 5\&.1\&.12, the output from the
+The output from the
\fBmysql\fR
client when run using the
\fB\-\-xml\fR
option also follows the preceding rules\&. (See
the section called \(lqMYSQL OPTIONS\(rq\&.)
.sp
-Beginning with MySQL 5\&.1\&.18, XML output from
+XML output from
\fBmysqldump\fR
includes the XML namespace, as shown here:
.sp
@@ -2140,7 +2455,7 @@ creates rows up to
net_buffer_length
length\&. If you increase this variable, you should also ensure that the
net_buffer_length
-variable in the MySQL server is at least this large\&.
+variable in the MariaDB server is at least this large\&.
.RE
.PP
A common use of
@@ -2182,7 +2497,7 @@ shell> \fBmysql \-e "source \fR\fB\fI/path\-to\-backup/backup\-file\&.sql\fR\fR\
.\}
.PP
\fBmysqldump\fR
-is also very useful for populating databases by copying data from one MySQL server to another:
+is also very useful for populating databases by copying data from one MariaDB server to another:
.sp
.if n \{\
.RS 4
@@ -2239,12 +2554,11 @@ shell> \fBmysqldump \-\-all\-databases \-\-single\-transaction > all_databases\&
This backup acquires a global read lock on all tables (using
FLUSH TABLES WITH READ LOCK) at the beginning of the dump\&. As soon as this lock has been acquired, the binary log coordinates are read and the lock is released\&. If long updating statements are running when the
FLUSH
-statement is issued, the MySQL server may get stalled until those statements finish\&. After that, the dump becomes lock free and does not disturb reads and writes on the tables\&. If the update statements that the MySQL server receives are short (in terms of execution time), the initial lock period should not be noticeable, even with many updates\&.
+statement is issued, the MariaDB server may get stalled until those statements finish\&. After that, the dump becomes lock free and does not disturb reads and writes on the tables\&. If the update statements that the MariaDB server receives are short (in terms of execution time), the initial lock period should not be noticeable, even with many updates\&.
.PP
For point\-in\-time recovery (also known as
\(lqroll\-forward,\(rq
-when you need to restore an old backup and replay the changes that happened since that backup), it is often useful to rotate the binary log (see
-Section\ \&5.2.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds:
+when you need to restore an old backup and replay the changes that happened since that backup), it is often useful to rotate the binary log or at least know the binary log coordinates to which the dump corresponds:
.sp
.if n \{\
.RS 4
@@ -2277,19 +2591,15 @@ options can be used simultaneously, which provides a convenient way to make an o
InnoDB
storage engine\&.
.PP
-For more information on making backups, see
-Section\ \&6.2, \(lqDatabase Backup Methods\(rq, and
-Section\ \&6.3, \(lqExample Backup and Recovery Strategy\(rq\&.
.\" mysqldump: views
.\" mysqldump: problems
.\" mysqldump: workarounds
.PP
-If you encounter problems backing up views, please read the section that covers restrictions on views which describes a workaround for backing up views when this fails due to insufficient privileges\&. See
-Section\ \&D.4, \(lqRestrictions on Views\(rq\&.
+If you encounter problems backing up views, please read the section that covers restrictions on views which describes a workaround for backing up views when this fails due to insufficient privileges\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -2304,8 +2614,6 @@ Bug#30123
\%http://bugs.mysql.com/bug.php?id=30123
.RE
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1
index d0d48f81747..bd1f5189112 100644
--- a/man/mysqldumpslow.1
+++ b/man/mysqldumpslow.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqldumpslow\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLDUMPSLOW\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLDUMPSLOW\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -26,10 +19,9 @@ mysqldumpslow \- Summarize slow query log files
\fBmysqldumpslow [\fR\fBoptions\fR\fB] [\fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.]\fR
.SH "DESCRIPTION"
.PP
-The MySQL slow query log contains information about queries that take a long time to execute (see
-Section\ \&5.2.5, \(lqThe Slow Query Log\(rq)\&.
+The MariaDB slow query log contains information about queries that take a long time to execute\&.
\fBmysqldumpslow\fR
-parses MySQL slow query log files and prints a summary of their contents\&.
+parses MariaDB slow query log files and prints a summary of their contents\&.
.PP
Normally,
\fBmysqldumpslow\fR
@@ -132,9 +124,9 @@ Consider only queries that match the (\fBgrep\fR\-style) pattern\&.
.\}
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Host name of MySQL server for
+Host name of MariaDB server for
*\-slow\&.log
-file name\&. The value can contain a wildcare\&. The default is
+file name\&. The value can contain a wildcard\&. The default is
*
(match all)\&.
.RE
@@ -309,7 +301,7 @@ Count: 3 Time=2\&.13s (6s) Lock=0\&.00s (0s) Rows=0\&.0 (0), root[root]@local
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -318,8 +310,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1
index 73305ad02f6..ca560d3d643 100644
--- a/man/mysqlhotcopy.1
+++ b/man/mysqlhotcopy.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqlhotcopy\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLHOTCOPY\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLHOTCOPY\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -319,15 +312,29 @@ tables in the backup\&. This makes the backup smaller and faster\&. The indexes
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlhotcopy: old-server option
+.\" old-server option: mysqlhotcopy
+\fB\-\-old\-server\fR
+.sp
+Connect to old MySQL-server (before v5.5) which doesn't have FLUSH TABLES WITH READ LOCK fully implemented.\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlhotcopy: password option
.\" password option: mysqlhotcopy
\fB\-\-password=\fR\fB\fIpassword\fR\fR,
\fB\-p\fR\fB\fIpassword\fR\fR
.sp
-The password to use when connecting to the server\&. The password value is not optional for this option, unlike for other MySQL programs\&.
+The password to use when connecting to the server\&. The password value is not optional for this option, unlike for other MariaDB programs\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -488,7 +495,7 @@ The temporary directory\&. The default is
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.PP
Use
@@ -513,7 +520,7 @@ shell> \fBperldoc mysqlhotcopy\fR
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -522,8 +529,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqlimport.1 b/man/mysqlimport.1
index 6cd494a617c..8624e71dc3e 100644
--- a/man/mysqlimport.1
+++ b/man/mysqlimport.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqlimport\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLIMPORT\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLIMPORT\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -38,8 +31,7 @@ SQL statement\&. Most options to
\fBmysqlimport\fR
correspond directly to clauses of
LOAD DATA INFILE
-syntax\&. See
-Section\ \&12.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
+syntax\&.
.PP
Invoke
\fBmysqlimport\fR
@@ -64,9 +56,6 @@ patient
all would be imported into a table named
patient\&.
.PP
-For additional information about
-\fBmysqldump\fR, see
-Section\ \&6.4, \(lqUsing mysqldump for Backups\(rq\&.
.PP
\fBmysqldump\fR
supports the following options, which can be specified on the command line or in the
@@ -75,8 +64,7 @@ and
[client]
option file groups\&.
\fBmysqldump\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
+also supports the options for processing option files\&.
.sp
.RS 4
.ie n \{\
@@ -106,8 +94,7 @@ Display a help message and exit\&.
.\" character-sets-dir option: mysqlimport
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
.sp
-The directory where character sets are installed\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+The directory where character sets are installed\&.
.RE
.sp
.RS 4
@@ -174,7 +161,7 @@ string is
.\" debug-check option: mysqlimport
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
@@ -189,7 +176,22 @@ Print some debugging information when the program exits\&. This option was added
.\" debug-info option: mysqlimport
\fB\-\-debug\-info\fR
.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.14\&.
+Print debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlimport: default-auth option
+.\" default-auth option: mysqlimport
+\fB\-\-default\-auth=\fIplugin_name\fR
+.sp
+Default authentication client-side plugin to use\&.
.RE
.sp
.RS 4
@@ -206,8 +208,7 @@ Print debugging information and memory and CPU usage statistics when the program
.sp
Use
\fIcharset_name\fR
-as the default character set\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+as the default character set\&.
.RE
.sp
.RS 4
@@ -280,8 +281,7 @@ Empty the table before importing the text file\&.
\fB\-\-fields\-escaped\-by=\&.\&.\&.\fR
.sp
These options have the same meaning as the corresponding clauses for
-LOAD DATA INFILE\&. See
-Section\ \&12.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
+LOAD DATA INFILE\&.
.RE
.sp
.RS 4
@@ -316,7 +316,7 @@ exits if a table does not exist\&.
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Import data to the MySQL server on the given host\&. The default host is
+Import data to the MariaDB server on the given host\&. The default host is
localhost\&.
.RE
.sp
@@ -369,8 +369,7 @@ lines of the data file\&.
.sp
This option has the same meaning as the corresponding clause for
LOAD DATA INFILE\&. For example, to import Windows files that have lines terminated with carriage return/linefeed pairs, use
-\fB\-\-lines\-terminated\-by="\er\en"\fR\&. (You might have to double the backslashes, depending on the escaping conventions of your command interpreter\&.) See
-Section\ \&12.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&.
+\fB\-\-lines\-terminated\-by="\er\en"\fR\&. (You might have to double the backslashes, depending on the escaping conventions of your command interpreter\&.)\&.
.RE
.sp
.RS 4
@@ -468,8 +467,7 @@ option on the command line,
\fBmysqlimport\fR
prompts for one\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -496,6 +494,21 @@ On Windows, connect to the server via a named pipe\&. This option applies only i
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlimport: plugin-dir option
+.\" plugin-dir option: mysqlimport
+\fB\-\-plugin\-dir=\fR\fB\fIname\fR\fR
+.sp
+ Directory for client-side plugins\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlimport: port option
.\" port option: mysqlimport
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
@@ -516,8 +529,7 @@ The TCP/IP port number to use for the connection\&.
.\" protocol option: mysqlimport
\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
.sp
-The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
-Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
.RE
.sp
.RS 4
@@ -599,14 +611,139 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlimport: SSL options
-.\" SSL options: mysqlimport
-\fB\-\-ssl*\fR
-.sp
-Options that begin with
+.\" mysqladmin: SSL options
+.\" SSL options: mysqladmin
\fB\-\-ssl\fR
-specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL CA option
+.\" SSL CA option: mysqladmin
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL CA Path option
+.\" SSL CA Path option: mysqladmin
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Cert option
+.\" SSL Cert option: mysqladmin
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Cipher option
+.\" SSL Cipher option: mysqladmin
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Key option
+.\" SSL Key option: mysqladmin
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Crl option
+.\" SSL CRL option: mysqladmin
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Crlpath option
+.\" SSL Crlpath option: mysqladmin
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqladmin: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysqladmin
+\fB\-\-ssl\-verify\-server\-cert\fR
+.sp
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
.RE
.sp
.RS 4
@@ -622,7 +759,7 @@ Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -639,7 +776,7 @@ The MySQL user name to use when connecting to the server\&.
.sp
Load files in parallel using
\fIN\fR
-threads\&. This option was added in MySQL 5\&.1\&.7\&.
+threads\&.
.RE
.sp
.RS 4
@@ -710,7 +847,7 @@ shell> \fBmysql \-e \'SELECT * FROM imptest\' test\fR
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -719,8 +856,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqlshow.1 b/man/mysqlshow.1
index b8c6fa6a620..3eaa8df7c49 100644
--- a/man/mysqlshow.1
+++ b/man/mysqlshow.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqlshow\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLSHOW\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLSHOW\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -38,8 +31,7 @@ client can be used to quickly see which databases exist, their tables, or a tabl
\fBmysqlshow\fR
provides a command\-line interface to several SQL
SHOW
-statements\&. See
-Section\ \&12.4.5, \(lqSHOW Syntax\(rq\&. The same information can be obtained by using those statements directly\&. For example, you can issue them from the
+statements\&. The same information can be obtained by using those statements directly\&. For example, you can issue them from the
\fBmysql\fR
client program\&.
.PP
@@ -118,8 +110,7 @@ and
[client]
option file groups\&.
\fBmysqlshow\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
+also supports the options for processing option files described.
.sp
.RS 4
.ie n \{\
@@ -148,10 +139,9 @@ Display a help message and exit\&.
.\" mysqlshow: character-sets-dir option
.\" character-sets-dir option: mysqlshow
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR,
-\fB\-c\fR
+\fB\-c\fR \fIpath\fR\fR
.sp
-The directory where character sets are installed\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+The directory where character sets are installed\&.
.RE
.sp
.RS 4
@@ -218,7 +208,7 @@ string is
.\" debug-check option: mysqlshow
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
@@ -233,7 +223,22 @@ Print some debugging information when the program exits\&. This option was added
.\" debug-info option: mysqlshow
\fB\-\-debug\-info\fR
.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.14\&.
+Print debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: default-auth option
+.\" default-auth option: mysqlshow
+\fB\-\-default\-auth=\fR\fB\fIname\fR
+.sp
+Default authentication client-side plugin to use\&.
.RE
.sp
.RS 4
@@ -250,8 +255,7 @@ Print debugging information and memory and CPU usage statistics when the program
.sp
Use
\fIcharset_name\fR
-as the default character set\&. See
-Section\ \&9.5, \(lqCharacter Set Configuration\(rq\&.
+as the default character set\&.
.RE
.sp
.RS 4
@@ -294,12 +298,27 @@ Must be given as first option\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlshow: defaults-group-suffix option
+.\" defaults-group-suffix option: mysqlshow
+\fB\-\-defaults\-group\-suffix=\fR\fB\fIsuffix\fR\fR
+.sp
+In addition to the groups named on the command line, read groups that have the given suffix\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlshow: host option
.\" host option: mysqlshow
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -359,8 +378,7 @@ option on the command line,
\fBmysqlshow\fR
prompts for one\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -387,6 +405,21 @@ On Windows, connect to the server via a named pipe\&. This option applies only i
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqlshow: plugin-dir option
+.\" plugin-dir option: mysqlshow
+\fB\-\-plugin\-dir=\fIdir_name\fR
+.sp
+Directory for client-side plugins\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqlshow: port option
.\" port option: mysqlshow
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
@@ -407,8 +440,7 @@ The TCP/IP port number to use for the connection\&.
.\" protocol option: mysqlshow
\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
.sp
-The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
-Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
.RE
.sp
.RS 4
@@ -474,12 +506,137 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
.\}
.\" mysqlshow: SSL options
.\" SSL options: mysqlshow
-\fB\-\-ssl*\fR
-.sp
-Options that begin with
\fB\-\-ssl\fR
-specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL CA option
+.\" SSL CA option: mysqlshow
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL CA Path option
+.\" SSL CA Path option: mysqlshow
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Cert option
+.\" SSL Cert option: mysqlshow
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Cipher option
+.\" SSL Cipher option: mysqlshow
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Key option
+.\" SSL Key option: mysqlshow
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Crl option
+.\" SSL CRL option: mysqlshow
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Crlpath option
+.\" SSL Crlpath option: mysqlshow
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysqlshow
+\fB\-\-ssl\-verify\-server\-cert\fR
+.sp
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
.RE
.sp
.RS 4
@@ -511,7 +668,7 @@ Display extra information about each table\&.
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -548,7 +705,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -557,8 +714,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqlslap.1 b/man/mysqlslap.1
index e795be397a2..f2ba65e0f03 100644
--- a/man/mysqlslap.1
+++ b/man/mysqlslap.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqlslap\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBMYSQLSLAP\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBMYSQLSLAP\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -28,9 +21,7 @@ mysqlslap \- load emulation client
.SH "DESCRIPTION"
.PP
\fBmysqlslap\fR
-is a diagnostic program designed to emulate client load for a MySQL server and to report the timing of each stage\&. It works as if multiple clients are accessing the server\&.
-\fBmysqlslap\fR
-is available as of MySQL 5\&.1\&.4\&.
+is a diagnostic program designed to emulate client load for a MariaDB server and to report the timing of each stage\&. It works as if multiple clients are accessing the server\&.
.PP
Invoke
\fBmysqlslap\fR
@@ -157,8 +148,7 @@ and
[client]
option file groups\&.
\fBmysqlslap\fR
-also supports the options for processing option files described at
-Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
+also supports the options for processing option files\&.
.sp
.RS 4
.ie n \{\
@@ -206,7 +196,7 @@ Generate SQL statements automatically when they are not supplied in files or via
.sp
Add an
AUTO_INCREMENT
-column to automatically generated tables\&. This option was added in MySQL 5\&.1\&.18\&.
+column to automatically generated tables\&.
.RE
.sp
.RS 4
@@ -221,7 +211,7 @@ column to automatically generated tables\&. This option was added in MySQL 5\&.1
.\" auto-generate-sql-execute-number option: mysqlslap
\fB\-\-auto\-generate\-sql\-execute\-number=\fR\fB\fIN\fR\fR
.sp
-Specify how many queries to generate automatically\&. This option was added in MySQL 5\&.1\&.18\&.
+Specify how many queries to generate automatically\&.
.RE
.sp
.RS 4
@@ -236,7 +226,7 @@ Specify how many queries to generate automatically\&. This option was added in M
.\" auto-generate-sql-guid-primary option: mysqlslap
\fB\-\-auto\-generate\-sql\-guid\-primary\fR
.sp
-Add a GUID\-based primary key to automatically generated tables\&. This option was added in MySQL 5\&.1\&.18\&.
+Add a GUID\-based primary key to automatically generated tables\&.
.RE
.sp
.RS 4
@@ -262,7 +252,7 @@ update
(update primary keys), or
mixed
(half inserts, half scanning selects)\&. The default is
-mixed\&. This option was added in MySQL 5\&.1\&.16\&.
+mixed\&.
.RE
.sp
.RS 4
@@ -277,7 +267,7 @@ mixed\&. This option was added in MySQL 5\&.1\&.16\&.
.\" auto-generate-sql-secondary-indexes option: mysqlslap
\fB\-\-auto\-generate\-sql\-secondary\-indexes=\fR\fB\fIN\fR\fR
.sp
-Specify how many secondary indexes to add to automatically generated tables\&. By default, none are added\&. This option was added in MySQL 5\&.1\&.18\&.
+Specify how many secondary indexes to add to automatically generated tables\&. By default, none are added\&.
.RE
.sp
.RS 4
@@ -294,7 +284,7 @@ Specify how many secondary indexes to add to automatically generated tables\&. B
.sp
How many different queries to generate for automatic tests\&. For example, if you run a
key
-test that performs 1000 selects, you can use this option with a value of 1000 to run 1000 unique queries, or with a value of 50 to perform 50 different selects\&. The default is 10\&. This option was added in MySQL 5\&.1\&.18\&.
+test that performs 1000 selects, you can use this option with a value of 1000 to run 1000 unique queries, or with a value of 50 to perform 50 different selects\&. The default is 10\&.
.RE
.sp
.RS 4
@@ -310,7 +300,7 @@ test that performs 1000 selects, you can use this option with a value of 1000 to
\fB\-\-auto\-generate\-sql\-unique\-write\-number=\fR\fB\fIN\fR\fR
.sp
How many different queries to generate for
-\fB\-\-auto\-generate\-sql\-write\-number\fR\&. The default is 10\&. This option was added in MySQL 5\&.1\&.18\&.
+\fB\-\-auto\-generate\-sql\-write\-number\fR\&. The default is 10\&.
.RE
.sp
.RS 4
@@ -325,7 +315,7 @@ How many different queries to generate for
.\" auto-generate-sql-write-number option: mysqlslap
\fB\-\-auto\-generate\-sql\-write\-number=\fR\fB\fIN\fR\fR
.sp
-How many row inserts to perform on each thread\&. The default is 100\&. This option was added in MySQL 5\&.1\&.16\&.
+How many row inserts to perform on each thread\&. The default is 100\&.
.RE
.sp
.RS 4
@@ -340,7 +330,7 @@ How many row inserts to perform on each thread\&. The default is 100\&. This opt
.\" commit option: mysqlslap
\fB\-\-commit=\fR\fB\fIN\fR\fR
.sp
-How many statements to execute before committing\&. The default is 0 (no commits are done)\&. This option was added in MySQL 5\&.1\&.21\&.
+How many statements to execute before committing\&. The default is 0 (no commits are done)\&.
.RE
.sp
.RS 4
@@ -404,7 +394,7 @@ The file or string containing the statement to use for creating the table\&.
.\" create-schema option: mysqlslap
\fB\-\-create\-schema=\fR\fB\fIvalue\fR\fR
.sp
-The schema in which to run the tests\&. This option was added in MySQL 5\&.1\&.5\&.
+The schema in which to run the tests\&.
.RE
.sp
.RS 4
@@ -419,7 +409,7 @@ The schema in which to run the tests\&. This option was added in MySQL 5\&.1\&.5
.\" csv option: mysqlslap
\fB\-\-csv[=\fR\fB\fIfile_name\fR\fR\fB]\fR
.sp
-Generate output in comma\-separated values format\&. The output goes to the named file, or to the standard output if no file is given\&. This option was added in MySQL 5\&.1\&.5\&.
+Generate output in comma\-separated values format\&. The output goes to the named file, or to the standard output if no file is given\&.
.RE
.sp
.RS 4
@@ -454,7 +444,7 @@ string is
.\" debug-check option: mysqlslap
\fB\-\-debug\-check\fR
.sp
-Print some debugging information when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print some debugging information when the program exits\&.
.RE
.sp
.RS 4
@@ -470,7 +460,22 @@ Print some debugging information when the program exits\&. This option was added
\fB\-\-debug\-info\fR,
\fB\-T\fR
.sp
-Print debugging information and memory and CPU usage statistics when the program exits\&. This option was added in MySQL 5\&.1\&.21\&.
+Print debugging information and memory and CPU usage statistics when the program exits\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlslap: default-auth option
+.\" default-auth option: mysqlslap
+\fB\-\-default\-auth=\fR\fB\fIname\fR
+.sp
+Default authentication client-side plugin to use\&.
.RE
.sp
.RS 4
@@ -535,7 +540,7 @@ The delimiter to use in SQL statements supplied in files or via command options\
.sp
Detach (close and reopen) each connection after each
\fIN\fR
-statements\&. The default is 0 (connections are not detached)\&. This option was added in MySQL 5\&.1\&.21\&.
+statements\&. The default is 0 (connections are not detached)\&.
.RE
.sp
.RS 4
@@ -551,7 +556,9 @@ statements\&. The default is 0 (connections are not detached)\&. This option was
\fB\-\-engine=\fR\fB\fIengine_name\fR\fR,
\fB\-e \fR\fB\fIengine_name\fR\fR
.sp
-The storage engine to use for creating tables\&.
+Comma separated list of storage engines to use for creating the table\&. The test is run for
+each engine\&. You can also specify an option for an engine after a colon, for example
+\fBmemory:max_row=2300\fR\&.
.RE
.sp
.RS 4
@@ -567,7 +574,7 @@ The storage engine to use for creating tables\&.
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -582,7 +589,7 @@ Connect to the MySQL server on the given host\&.
.\" init-command option: mysqlslap
\fB\-\-init\-command=str\fR
.sp
-SQL Command to execute when connecting to MySQL server\&. Will automatically be re\-executed when reconnecting\&.
+SQL Command to execute when connecting to MariaDB server\&. Will automatically be re\-executed when reconnecting\&.
.RE
.sp
.RS 4
@@ -609,21 +616,6 @@ The number of times to run the tests\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: lock-directory option
-.\" lock-directory option: mysqlslap
-\fB\-\-lock\-directory=\fR\fB\fIpath\fR\fR
-.sp
-The directory to use for storing locks\&. This option was added in MySQL 5\&.1\&.5 and removed in 5\&.1\&.18\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
.\" mysqlslap: no-defaults option
.\" no-defaults option: mysqlslap
\fB\-\-no\-defaults\fR
@@ -644,7 +636,7 @@ first argument\&.
.\" no-drop option: mysqlslap
\fB\-\-no\-drop\fR
.sp
-Do not drop the schema after the test\&.
+Do not drop any schema created during the test after the test is complete\&.
.RE
.sp
.RS 4
@@ -715,8 +707,6 @@ shell> \fBmysqlslap \-\-delimiter=";" \-\-number\-of\-queries=10\fR
.if n \{\
.RE
.\}
-.sp
-This option was added in MySQL 5\&.1\&.5\&.
.RE
.sp
.RS 4
@@ -733,7 +723,7 @@ This option was added in MySQL 5\&.1\&.5\&.
.sp
Do not connect to databases\&.
\fBmysqlslap\fR
-only prints what it would have done\&. This option was added in MySQL 5\&.1\&.5\&.
+only prints what it would have done\&.
.RE
.sp
.RS 4
@@ -761,8 +751,7 @@ option on the command line,
\fBmysqlslap\fR
prompts for one\&.
.sp
-Specifying a password on the command line should be considered insecure\&. See
-Section\ \&5.3.2.2, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&.
+Specifying a password on the command line should be considered insecure\&. You can use an option file to avoid giving the password on the command line\&.
.RE
.sp
.RS 4
@@ -789,27 +778,11 @@ On Windows, connect to the server via a named pipe\&. This option applies only i
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: port option
-.\" port option: mysqlslap
-\fB\-\-port=\fR\fB\fIport_num\fR\fR,
-\fB\-P \fR\fB\fIport_num\fR\fR
-.sp
-The TCP/IP port number to use for the connection\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-.\" mysqlslap: post-query option
-.\" post-query option: mysqlslap
-\fB\-\-post\-query=\fR\fB\fIvalue\fR\fR
+.\" mysqlslap: plugin-dir option
+.\" plugin-dir option: mysqlslap
+\fB\-\-plugin\-dir=\fIdir_name\fR
.sp
-The file or string containing the statement to execute after the tests have completed\&. This execution is not counted for timing purposes\&. This option was added in MySQL 5\&.1\&.18\&.
+Directory for client-side plugins\&.
.RE
.sp
.RS 4
@@ -820,11 +793,12 @@ The file or string containing the statement to execute after the tests have comp
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: shared-memory-base-name option
-.\" shared-memory-base-name option: mysqlslap
-\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
+.\" mysqlslap: port option
+.\" port option: mysqlslap
+\fB\-\-port=\fR\fB\fIport_num\fR\fR,
+\fB\-P \fR\fB\fIport_num\fR\fR
.sp
-On Windows, the shared\-memory name to use, for connections made via shared memory to a local server\&. This option applies only if the server supports shared\-memory connections\&.
+The TCP/IP port number to use for the connection\&.
.RE
.sp
.RS 4
@@ -835,12 +809,11 @@ On Windows, the shared\-memory name to use, for connections made via shared memo
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: print-defaults option
-.\" print-defaults option: mysqlslap
-\fB\-\-print\-defaults\fR
+.\" mysqlslap: post-query option
+.\" post-query option: mysqlslap
+\fB\-\-post\-query=\fR\fB\fIvalue\fR\fR
.sp
-Print the program argument list and exit\&.
-This must be given as the first argument\&.
+The file or string containing the statement to execute after the tests have completed\&. This execution is not counted for timing purposes\&.
.RE
.sp
.RS 4
@@ -857,7 +830,7 @@ This must be given as the first argument\&.
.sp
The string to execute via
system()
-after the tests have completed\&. This execution is not counted for timing purposes\&. This option was added in MySQL 5\&.1\&.21\&.
+after the tests have completed\&. This execution is not counted for timing purposes\&.
.RE
.sp
.RS 4
@@ -872,7 +845,7 @@ after the tests have completed\&. This execution is not counted for timing purpo
.\" pre-query option: mysqlslap
\fB\-\-pre\-query=\fR\fB\fIvalue\fR\fR
.sp
-The file or string containing the statement to execute before running the tests\&. This execution is not counted for timing purposes\&. This option was added in MySQL 5\&.1\&.18\&.
+The file or string containing the statement to execute before running the tests\&. This execution is not counted for timing purposes\&.
.RE
.sp
.RS 4
@@ -889,7 +862,7 @@ The file or string containing the statement to execute before running the tests\
.sp
The string to execute via
system()
-before running the tests\&. This execution is not counted for timing purposes\&. This option was added in MySQL 5\&.1\&.21\&.
+before running the tests\&. This execution is not counted for timing purposes\&.
.RE
.sp
.RS 4
@@ -900,17 +873,12 @@ before running the tests\&. This execution is not counted for timing purposes\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: preserve-schema option
-.\" preserve-schema option: mysqlslap
-\fB\-\-preserve\-schema\fR
+.\" mysqlslap: print-defaults option
+.\" print-defaults option: mysqlslap
+\fB\-\-print\-defaults\fR
.sp
-Preserve the schema from the
-\fBmysqlslap\fR
-run\&. The
-\fB\-\-auto\-generate\-sql\fR
-and
-\fB\-\-create\fR
-options disable this option\&. This option was added in MySQL 5\&.1\&.5 and removed in MySQL 5\&.1\&.23\&.
+Print the program argument list and exit\&.
+This must be given as the first argument\&.
.RE
.sp
.RS 4
@@ -925,8 +893,7 @@ options disable this option\&. This option was added in MySQL 5\&.1\&.5 and remo
.\" protocol option: mysqlslap
\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
.sp
-The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the allowable values, see
-Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&.
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
.RE
.sp
.RS 4
@@ -955,12 +922,11 @@ statement to use for retrieving data\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: silent option
-.\" silent option: mysqlslap
-\fB\-\-silent\fR,
-\fB\-s\fR
+.\" mysqlslap: shared-memory-base-name option
+.\" shared-memory-base-name option: mysqlslap
+\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR
.sp
-Silent mode\&. No output\&.
+On Windows, the shared\-memory name to use, for connections made via shared memory to a local server\&. This option applies only if the server supports shared\-memory connections\&.
.RE
.sp
.RS 4
@@ -971,15 +937,12 @@ Silent mode\&. No output\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: slave option
-.\" slave option: mysqlslap
-\fB\-\-slave\fR
+.\" mysqlslap: silent option
+.\" silent option: mysqlslap
+\fB\-\-silent\fR,
+\fB\-s\fR
.sp
-Follow master locks for other
-\fBmysqlslap\fR
-clients\&. Use this option if you are trying to synchronize around one master server with
-\fB\-\-lock\-directory\fR
-plus NFS\&. This option was added in MySQL 5\&.1\&.5 and removed in 5\&.1\&.18\&.
+Silent mode\&. No output\&.
.RE
.sp
.RS 4
@@ -1007,14 +970,124 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: SSL options
-.\" SSL options: mysqlslap
-\fB\-\-ssl*\fR
-.sp
-Options that begin with
+.\" mysqlshow: SSL options
+.\" SSL options: mysqlshow
\fB\-\-ssl\fR
-specify whether to connect to the server via SSL and indicate where to find SSL keys and certificates\&. See
-Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL CA option
+.\" SSL CA option: mysqlshow
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL CA Path option
+.\" SSL CA Path option: mysqlshow
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Cert option
+.\" SSL Cert option: mysqlshow
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Cipher option
+.\" SSL Cipher option: mysqlshow
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Key option
+.\" SSL Key option: mysqlshow
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Crl option
+.\" SSL CRL option: mysqlshow
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqlshow: SSL Crlpath option
+.\" SSL Crlpath option: mysqlshow
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
.RE
.sp
.RS 4
@@ -1025,17 +1098,11 @@ Section\ \&5.5.6.3, \(lqSSL Command Options\(rq\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqlslap: use-threads option
-.\" use-threads option: mysqlslap
-\fB\-\-use\-threads\fR
+.\" mysqlshow: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysqlshow
+\fB\-\-ssl\-verify\-server\-cert\fR
.sp
-On Unix, the default is to use
-fork()
-calls and this option causes
-\fBpthread\fR
-calls to be used instead\&. (On Windows, the default is to use
-pthread
-calls and the option has no effect\&.) This option was added in MySQL 5\&.1\&.6 and removed in 5\&.1\&.18\&.
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
.RE
.sp
.RS 4
@@ -1051,7 +1118,7 @@ calls and the option has no effect\&.) This option was added in MySQL 5\&.1\&.6
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -1088,7 +1155,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -1097,8 +1164,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/mysqltest.1 b/man/mysqltest.1
index c68d851cbfc..80c3852b9a9 100644
--- a/man/mysqltest.1
+++ b/man/mysqltest.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBmysqltest\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 03/31/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL
-.\" Language: English
.\"
-.TH "\FBMYSQLTEST\FR" "1" "03/31/2010" "MySQL" "MySQL Database System"
+.TH "\FBMYSQLTEST\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -33,7 +26,7 @@ mysqltest_embedded \- program to run embedded test cases
.PP
The
\fBmysqltest\fR
-program runs a test case against a MySQL server and optionally compares the output with a result file\&. This program reads input written in a special test language\&. Typically, you invoke
+program runs a test case against a MariaDB server and optionally compares the output with a result file\&. This program reads input written in a special test language\&. Typically, you invoke
\fBmysqltest\fR
via
\fBmysql\-test\-run\&.pl\fR
@@ -55,7 +48,7 @@ Features of
.sp -1
.IP \(bu 2.3
.\}
-Can send SQL statements to MySQL servers for execution
+Can send SQL statements to MariaDB servers for execution
.RE
.sp
.RS 4
@@ -101,7 +94,7 @@ servers and switch between connections
.sp -1
.IP \(bu 2.3
.\}
-Can connect to an embedded server (libmysqld), if MySQL is compiled with support for
+Can connect to an embedded server (libmysqld), if MariaDB is compiled with support for
libmysqld\&. (In this case, the executable is named
\fBmysqltest_embedded\fR
rather than
@@ -206,7 +199,40 @@ Compress all information sent between the client and the server if both support
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqltest: currsor-protocol option
+.\" mysqltest: connect-timeout option
+.\" connect-timeout option: mysqltest
+\fB\-\-connect\-timeout=\fInum\fR
+.sp
+This can be used to set the MYSQL_OPT_CONNECT_TIMEOUT parameter of mysql_options to change the number of seconds before an unsuccessful connection attempt times out\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: continue-on-error option
+.\" continue-on-error option: mysqltest
+\fB\-\-continue\-on\-error\fR
+.sp
+Continue test even if we got an error\&. This is mostly
+useful when testing a storage engine to see what from a
+test file it can execute, or to find all syntax errors in
+a newly created big test file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: cursor-protocol option
.\" cursor-protocol option: mysqltest
\fB\-\-cursor\-protocol\fR
.sp
@@ -242,7 +268,7 @@ The default database to use\&.
\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR,
\fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR
.sp
-Write a debugging log if MySQL is built with debugging support\&. The default
+Write a debugging log if MariaDB is built with debugging support\&. The default
\fIdebug_options\fR
value is
\'d:t:S:i:O,/tmp/mysqltest\&.trace\'\&.
@@ -291,27 +317,7 @@ Print debugging information and memory and CPU usage statistics when the program
\fB\-\-host=\fR\fB\fIhost_name\fR\fR,
\fB\-h \fR\fB\fIhost_name\fR\fR
.sp
-Connect to the MySQL server on the given host\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
-.\" mysqltest: include option
-.\" include option: mysqltest
-\fB\-\-include=\fR\fB\fIfile_name\fR\fR,
-\fB\-i \fR\fB\fIfile_name\fR\fR
-.sp
-Include the contents of the given file before processing the contents of the test file\&. The included file should have the same format as other
-\fBmysqltest\fR
-test files\&. This option has the same effect as putting a
-\-\-source \fIfile_name\fR
-command as the first line of the test file\&.
+Connect to the MariaDB server on the given host\&.
.RE
.sp
.RS 4
@@ -373,8 +379,6 @@ The maximum number of connection attempts when connecting to server\&.
\fB\-\-max\-connections=\fR\fB\fInum\fR\fR
.sp
The maximum number of simultaneous server connections per client (that is, per test)\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&.
-.sp
-This option is available from MySQL 5\&.1\&.45\&.
.RE
.sp
.RS 4
@@ -400,6 +404,36 @@ Do not read default options from any option files\&. If used, this must be the f
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqltest: non-blocking-api option
+.\" non-blocking-api option: mysqltest
+\fB\-\-non\-blocking\-api\fR
+.sp
+Use the non-blocking client API for communication\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: overlay-dir option
+.\" overlay-dir option: mysqltest
+\fB\-\-overlay\-dir=\fIdir_name\fR
+.sp
+Overlay directory\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqltest: password option
.\" password option: mysqltest
\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR,
@@ -424,12 +458,62 @@ option on the command line, you are prompted for one\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqltest: plugin-dir option
+.\" plugin-dir option: mysqltest
+\fB\-\-plugin\-dir=\fIdir_name\fR
+.sp
+Directory for client-side plugins\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqltest: port option
.\" port option: mysqltest
\fB\-\-port=\fR\fB\fIport_num\fR\fR,
\fB\-P \fR\fB\fIport_num\fR\fR
.sp
-The TCP/IP port number to use for the connection\&.
+The TCP/IP port number to use for the connection or 0 for default to, in order of preference,
+my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: prologue option
+.\" prologue option: mysqltest
+\fB\-\-prologue=\fR\fB\fIname\fR\fR
+.sp
+Include the contents of the given file before processing the contents of the test file\&. The included file should have the same format as other
+\fBmysqltest\fR
+test files\&. This option has the same effect as putting a
+\-\-source \fIfile_name\fR
+command as the first line of the test file\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: protocol option
+.\" protocol option: mysqltest
+\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR
+.sp
+The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&.
.RE
.sp
.RS 4
@@ -578,6 +662,21 @@ updates the given file by writing the actual test results to it\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqltest: result-format-version option
+.\" result-format-version option: mysqltest
+\fB\-\-result\-format\-version=\fI#\fR
+.sp
+Version of the result file format to use\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqltest: server-arg option
.\" server-arg option: mysqltest
\fB\-\-server\-arg=\fR\fB\fIvalue\fR\fR,
@@ -629,21 +728,6 @@ Suppress all normal output\&.
.sp -1
.IP \(bu 2.3
.\}
-.\" mysqltest: skip-safemalloc option
-.\" skip-safemalloc option: mysqltest
-\fB\-\-skip\-safemalloc\fR
-.sp
-Do not use memory allocation checking\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
.\" mysqltest: sleep option
.\" sleep option: mysqltest
\fB\-\-sleep=\fR\fB\fInum\fR\fR,
@@ -657,8 +741,7 @@ seconds\&. This option does not affect
real_sleep
commands\&.
.sp
-As of MySQL 5\&.0\&.23, an option value of 0 can be used, which effectively disables
-sleep
+An option value of 0 can be used, which effectively disables sleep
commands in the test case\&.
.RE
.sp
@@ -705,6 +788,164 @@ creates and invokes a stored procedure that executes the statement rather than e
.sp -1
.IP \(bu 2.3
.\}
+.\" mysqltest: SSL options
+.\" SSL options: mysqltest
+\fB\-\-ssl\fR
+.sp
+Enable SSL for connection (automatically enabled with other flags). Disable with
+\fB\-\-skip-ssl\fR\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: SSL CA option
+.\" SSL CA option: mysqltest
+\fB\-\-ssl\-ca=\fIname\fR
+.sp
+CA file in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: SSL CA Path option
+.\" SSL CA Path option: mysqltest
+\fB\-\-ssl\-capath=\fIname\fR
+.sp
+CA directory (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: SSL Cert option
+.\" SSL Cert option: mysqltest
+\fB\-\-ssl\-cert=\fIname\fR
+.sp
+X509 cert in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: SSL Cipher option
+.\" SSL Cipher option: mysqltest
+\fB\-\-ssl\-cipher=\fIname\fR
+.sp
+SSL cipher to use (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: SSL Key option
+.\" SSL Key option: mysqltest
+\fB\-\-ssl\-key=\fIname\fR
+.sp
+X509 key in PEM format (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: SSL Crl option
+.\" SSL CRL option: mysqltest
+\fB\-\-ssl\-crl=\fIname\fR
+.sp
+Certificate revocation list (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: SSL Crlpath option
+.\" SSL Crlpath option: mysqltest
+\fB\-\-ssl\-crlpath=\fIname\fR
+.sp
+Certificate revocation list path (check OpenSSL docs, implies
+\fB\-\-ssl\fR)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: SSL Verify Server Cert option
+.\" SSL Verify Server Cert option: mysqltest
+\fB\-\-ssl\-verify\-server\-cert\fR
+.sp
+Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+.\" mysqltest: suite-dir option
+.\" suite-dir option: mysqltest
+\fB\-\-suite\-dir=\fIdir_name\fR
+.sp
+Suite directory\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
.\" mysqltest: tail-lines option
.\" tail-lines option: mysqltest
\fB\-\-tail\-lines=\fR\fB\fInn\fR\fR
@@ -741,7 +982,7 @@ Read test input from this file\&. The default is to read from the standard input
\fB\-\-timer\-file=\fR\fB\fIfile_name\fR\fR,
\fB\-m \fR\fB\fIfile_name\fR\fR
.sp
-If given, the number of millisecond spent running the test will be written to this file\&. This is used by
+If given, the number of microseconds spent running the test will be written to this file\&. This is used by
\fBmysql\-test\-run\&.pl\fR
for its reporting\&.
.RE
@@ -775,7 +1016,7 @@ The temporary directory where socket files are created\&.
\fB\-\-user=\fR\fB\fIuser_name\fR\fR,
\fB\-u \fR\fB\fIuser_name\fR\fR
.sp
-The MySQL user name to use when connecting to the server\&.
+The MariaDB user name to use when connecting to the server\&.
.RE
.sp
.RS 4
@@ -824,12 +1065,12 @@ Display version information and exit\&.
.sp
Every
SELECT
-statement is wrapped inside a view\&. This option was added in MySQL 5\&.0\&.19\&.
+statement is wrapped inside a view\&.
.RE
.SH "COPYRIGHT"
.br
.PP
-Copyright \(co 2007, 2010, Oracle and/or its affiliates
+Copyright \(co 2007, 2010, Oracle and/or its affiliates, 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -838,8 +1079,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/perror.1 b/man/perror.1
index adf393e8057..5a6c8212f67 100644
--- a/man/perror.1
+++ b/man/perror.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBperror\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBPERROR\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBPERROR\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -29,7 +22,7 @@ perror \- explain error codes
\fBperror [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIerrorcode\fR\fR\fB \&.\&.\&.\fR
.SH "DESCRIPTION"
.PP
-For most system errors, MySQL displays, in addition to an internal text message, the system error code in one of the following styles:
+For most system errors, MariaDB displays, in addition to an internal text message, the system error code in one of the following styles:
.sp
.if n \{\
.RS 4
@@ -150,7 +143,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -159,8 +152,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/replace.1 b/man/replace.1
index 453600fb5a1..993335e6701 100644
--- a/man/replace.1
+++ b/man/replace.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBreplace\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBREPLACE\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBREPLACE\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -160,7 +153,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -169,8 +162,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1
index 956cd12b2da..549107143f4 100644
--- a/man/resolve_stack_dump.1
+++ b/man/resolve_stack_dump.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBresolve_stack_dump\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBRESOLVE_STACK_DUM" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBRESOLVE_STACK_DUM" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -117,7 +110,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -126,8 +119,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/man/resolveip.1 b/man/resolveip.1
index 1b35e6b4cff..97584afc686 100644
--- a/man/resolveip.1
+++ b/man/resolveip.1
@@ -1,13 +1,6 @@
'\" t
-.\" Title: \fBresolveip\fR
-.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 04/06/2010
-.\" Manual: MySQL Database System
-.\" Source: MySQL 5.1
-.\" Language: English
.\"
-.TH "\FBRESOLVEIP\FR" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
+.TH "\FBRESOLVEIP\FR" "1" "04/08/2015" "MariaDB 10\&.0" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -99,7 +92,7 @@ Display version information and exit\&.
.SH "COPYRIGHT"
.br
.PP
-Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
@@ -108,8 +101,6 @@ This documentation is distributed in the hope that it will be useful, but WITHOU
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
-For more information, please refer to the MySQL Reference Manual,
-which may already be installed locally and which is also available
-online at http://dev.mysql.com/doc/.
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
.SH AUTHOR
-Sun Microsystems, Inc. (http://www.mysql.com/).
+MariaDB Foundation (http://www.mariadb.org/).
diff --git a/mysql-test/disabled.def b/mysql-test/disabled.def
index 555b7177228..e82ddcf92d1 100644
--- a/mysql-test/disabled.def
+++ b/mysql-test/disabled.def
@@ -11,9 +11,7 @@
##############################################################################
tablespace : disabled in MariaDB (no TABLESPACE table attribute)
events_time_zone : Test is not predictable as it depends on precise timing.
-lowercase_table3 : Bug#11762269 2010-06-30 alik main.lowercase_table3 on Mac OSX
read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists
-archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc
log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists
mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836
#show_explain : Psergey: random timeout in range-checked-for-each record query.
diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc
index b8625f2f18a..dcaf47c55a2 100644
--- a/mysql-test/include/restart_mysqld.inc
+++ b/mysql-test/include/restart_mysqld.inc
@@ -1,3 +1,9 @@
+# ==== Usage ====
+#
+# [--let $shutdown_timeout= 30]
+# [--let $allow_rpl_inited= 1]
+# --source include/restart_mysqld.inc
+
--source include/not_embedded.inc
if ($rpl_inited)
@@ -8,6 +14,16 @@ if ($rpl_inited)
}
}
+--let $server_shutdown_timeout= 60
+if ($shutdown_timeout)
+{
+ --let $server_shutdown_timeout= $shutdown_timeout
+}
+if ($shutdown_timeout == 0)
+{
+ --let $server_shutdown_timeout= 0
+}
+
# Write file to make mysql-test-run.pl expect the "crash", but don't start
# it until it's told to
--let $_server_id= `SELECT @@server_id`
@@ -15,8 +31,8 @@ if ($rpl_inited)
--exec echo "wait" > $_expect_file_name
# Send shutdown to the connected server and give
-# it 60 seconds to die before zapping it
-shutdown_server 60;
+# it 10 seconds to die before zapping it
+shutdown_server $server_shutdown_timeout;
# Write file to make mysql-test-run.pl start up the server again
if ($restart_parameters)
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 04a0887c624..2435137db6d 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1060,7 +1060,6 @@ sub print_global_resfile {
resfile_global("shutdown-timeout", $opt_shutdown_timeout ? 1 : 0);
resfile_global("warnings", $opt_warnings ? 1 : 0);
resfile_global("max-connections", $opt_max_connections);
-# resfile_global("default-myisam", $opt_default_myisam ? 1 : 0);
resfile_global("product", "MySQL");
# Somewhat hacky code to convert numeric version back to dot notation
my $v1= int($mysql_version_id / 10000);
@@ -1218,7 +1217,6 @@ sub command_line_setup {
'stop-file=s' => \$opt_stop_file,
'stop-keep-alive=i' => \$opt_stop_keep_alive,
'max-connections=i' => \$opt_max_connections,
- 'default-myisam!' => \&collect_option,
'report-times' => \$opt_report_times,
'result-file' => \$opt_resfile,
'stress=s' => \$opt_stress,
@@ -6216,9 +6214,6 @@ Misc options
timediff With --timestamp, also print time passed since
*previous* test started
max-connections=N Max number of open connection to server in mysqltest
- default-myisam Set default storage engine to MyISAM for non-innodb
- tests. This is needed after switching default storage
- engine to InnoDB.
report-times Report how much time has been spent on different
phases of test execution.
stress=ARGS Run stress test, providing options to
diff --git a/mysql-test/r/explain_non_select.result b/mysql-test/r/explain_non_select.result
index 0eee7ee9b1e..5a6b9f841c2 100644
--- a/mysql-test/r/explain_non_select.result
+++ b/mysql-test/r/explain_non_select.result
@@ -232,3 +232,44 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE user index NULL PRIMARY 420 NULL 4 Using index
DROP TABLE t1;
DROP VIEW v1;
+#
+# MDEV-8299: MyISAM or Aria table gets corrupted after EXPLAIN INSERT and INSERT
+#
+CREATE TABLE t1 (pk INT NOT NULL AUTO_INCREMENT PRIMARY KEY, i INT, KEY(i)) ENGINE=MyISAM;
+INSERT INTO t1 (i) VALUES (100),(200);
+CREATE TABLE t2 (j INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (10),(20);
+EXPLAIN INSERT INTO t1 (i) SELECT j FROM t2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2
+INSERT INTO t1 (i) VALUES (300);
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1, t2;
+#
+# MDEV-8321: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status on EXPLAIN INSERT ... UNION
+#
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+CREATE TABLE t3 (c INT);
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (3),(4);
+INSERT INTO t3 VALUES (5),(6);
+EXPLAIN INSERT INTO t1 SELECT * FROM t2 UNION SELECT * FROM t3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2
+2 UNION t3 ALL NULL NULL NULL NULL 2
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
+drop table t1,t2,t3;
+#
+# MDEV-6223: Assertion `! is_set()' fails in Diagnostics_area::set_eof_status on EXPLAIN INSERT executed as a PS
+#
+CREATE TABLE t1 (a INT) ENGINE = MyISAM;
+CREATE TABLE t2 (b INT) ENGINE = MyISAM;
+INSERT INTO t2 VALUES (1),(2);
+PREPARE stmt FROM 'EXPLAIN INSERT INTO t1 SELECT * FROM t2';
+EXECUTE stmt;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2
+drop table t1,t2;
diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result
index c7f548ae2bc..637fd8cd2a2 100644
--- a/mysql-test/r/func_if.result
+++ b/mysql-test/r/func_if.result
@@ -234,3 +234,17 @@ SELECT if(1, NULL, (SELECT min('hello')));
if(1, NULL, (SELECT min('hello')))
NULL
End of 5.2 tests
+#
+# MDEV-8663: IF Statement returns multiple values erroneously
+# (or Assertion `!null_value' failed in Item::send(Protocol*, String*)
+#
+CREATE TABLE `t1` (
+`datas` VARCHAR(25) NOT NULL
+) DEFAULT CHARSET=utf8;
+INSERT INTO `t1` VALUES ('1,2'), ('2,3'), ('3,4');
+SELECT IF(FIND_IN_SET('1', `datas`), 1.5, IF(FIND_IN_SET('2', `datas`), 2, NULL)) AS `First`, '1' AS `Second`, '2' AS `Third` FROM `t1`;
+First Second Third
+1.5 1 2
+2.0 1 2
+NULL 1 2
+drop table t1;
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index df69aff8b59..700fda2e182 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -373,6 +373,207 @@ NULL
Warnings:
Warning 1411 Incorrect timeout value: '-1' for function get_lock
#
+# MDEV-8624 MariaDB hangs on query with many logical condition
+#
+CREATE TABLE `t1` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`submitdate` datetime DEFAULT NULL,
+`lastpage` int(11) DEFAULT NULL,
+`startlanguage` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
+`token` varchar(36) COLLATE utf8_unicode_ci DEFAULT NULL,
+`datestamp` datetime NOT NULL,
+`startdate` datetime NOT NULL,
+`ipaddr` text COLLATE utf8_unicode_ci,
+`refurl` text COLLATE utf8_unicode_ci,
+`57813X540X1723` text COLLATE utf8_unicode_ci,
+`57813X540X1724` text COLLATE utf8_unicode_ci,
+`57813X540X1725` text COLLATE utf8_unicode_ci,
+`57813X540X1726` double DEFAULT NULL,
+`57813X540X1909` double DEFAULT NULL,
+`57813X541X17271` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X541X17272` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X541X17273` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X541X17274` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X541X17275` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X541X17276` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X541X17281` text COLLATE utf8_unicode_ci,
+`57813X541X17282` text COLLATE utf8_unicode_ci,
+`57813X541X17283` text COLLATE utf8_unicode_ci,
+`57813X541X17284` text COLLATE utf8_unicode_ci,
+`57813X541X17285` text COLLATE utf8_unicode_ci,
+`57813X541X17286` text COLLATE utf8_unicode_ci,
+`57813X542X18131` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18132` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18133` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18134` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18135` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18136` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18137` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18138` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18139` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X542X18141` text COLLATE utf8_unicode_ci,
+`57813X542X18142` text COLLATE utf8_unicode_ci,
+`57813X542X18143` text COLLATE utf8_unicode_ci,
+`57813X542X18144` text COLLATE utf8_unicode_ci,
+`57813X542X18145` text COLLATE utf8_unicode_ci,
+`57813X542X18146` text COLLATE utf8_unicode_ci,
+`57813X542X18147` text COLLATE utf8_unicode_ci,
+`57813X542X18148` text COLLATE utf8_unicode_ci,
+`57813X542X18149` text COLLATE utf8_unicode_ci,
+`57813X543X18451` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X543X18452` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X543X18453` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X543X18454` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X543X18455` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X543X18456` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X543X18461` text COLLATE utf8_unicode_ci,
+`57813X543X18462` text COLLATE utf8_unicode_ci,
+`57813X543X18463` text COLLATE utf8_unicode_ci,
+`57813X543X18464` text COLLATE utf8_unicode_ci,
+`57813X543X18465` text COLLATE utf8_unicode_ci,
+`57813X543X18466` text COLLATE utf8_unicode_ci,
+`57813X544X18711` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X544X18712` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X544X18713` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X544X18714` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X544X18715` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X544X18716` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X544X18717` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X544X18718` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X544X18721` text COLLATE utf8_unicode_ci,
+`57813X544X18722` text COLLATE utf8_unicode_ci,
+`57813X544X18723` text COLLATE utf8_unicode_ci,
+`57813X544X18724` text COLLATE utf8_unicode_ci,
+`57813X544X18725` text COLLATE utf8_unicode_ci,
+`57813X544X18726` text COLLATE utf8_unicode_ci,
+`57813X544X18727` text COLLATE utf8_unicode_ci,
+`57813X544X18728` text COLLATE utf8_unicode_ci,
+`57813X546X1902` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X546X1903` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X546X1904` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+`57813X545X1901` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL,
+PRIMARY KEY (`id`),
+KEY `lime_survey_57813_idx` (`token`),
+KEY `57813X540X1723` (`57813X540X1723`(100)),
+KEY `57813X540X1724` (`57813X540X1724`(100)),
+KEY `57813X540X1726` (`57813X540X1726`),
+KEY `57813X540X1725` (`57813X540X1725`(100)),
+KEY `57813X546X1902` (`57813X546X1902`),
+KEY `57813X546X1903` (`57813X546X1903`),
+KEY `57813X546X1904` (`57813X546X1904`)
+);
+SELECT
+COUNT(*) as `N`,
+ROUND(
+(
+SUM(
+(
+(
+IF( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99', 57813X541X17271, 0 ) +
+IF( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99', 57813X541X17272, 0 ) +
+IF( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99', 57813X541X17273, 0 ) +
+IF( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99', 57813X541X17274, 0 ) +
+IF( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99', 57813X541X17275, 0 ) +
+IF( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99', 57813X541X17276, 0 ) +
+IF( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99', 57813X542X18131, 0 ) +
+IF( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99', 57813X542X18132, 0 ) +
+IF( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99', 57813X542X18133, 0 ) +
+IF( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99', 57813X542X18134, 0 ) +
+IF( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99', 57813X542X18135, 0 ) +
+IF( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99', 57813X542X18136, 0 ) +
+IF( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99', 57813X542X18137, 0 ) +
+IF( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99', 57813X542X18138, 0 ) +
+IF( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99', 57813X542X18139, 0 ) +
+IF( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99', 57813X543X18451, 0 ) +
+IF( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99', 57813X543X18452, 0 ) +
+IF( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99', 57813X543X18453, 0 ) +
+IF( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99', 57813X543X18454, 0 ) +
+IF( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99', 57813X543X18455, 0 ) +
+IF( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99', 57813X543X18456, 0 ) +
+IF( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99', 57813X544X18711, 0 ) +
+IF( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99', 57813X544X18712, 0 ) +
+IF( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99', 57813X544X18713, 0 ) +
+IF( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99', 57813X544X18714, 0 ) +
+IF( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99', 57813X544X18715, 0 ) +
+IF( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99', 57813X544X18716, 0 ) +
+IF( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99', 57813X544X18717, 0 ) +
+IF( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99', 57813X544X18718, 0 )
+)
+/
+(
+IF( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99', 1, 0 ) +
+IF( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99', 1, 0 ) +
+IF( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99', 1, 0 ) +
+IF( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99', 1, 0 ) +
+IF( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99', 1, 0 ) +
+IF( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99', 1, 0 ) +
+IF( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99', 1, 0 ) +
+IF( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99', 1, 0 ) +
+IF( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99', 1, 0 ) +
+IF( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99', 1, 0 ) +
+IF( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99', 1, 0 ) +
+IF( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99', 1, 0 ) +
+IF( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99', 1, 0 ) +
+IF( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99', 1, 0 ) +
+IF( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99', 1, 0 ) +
+IF( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99', 1, 0 ) +
+IF( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99', 1, 0 ) +
+IF( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99', 1, 0 ) +
+IF( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99', 1, 0 ) +
+IF( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99', 1, 0 ) +
+IF( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99', 1, 0 ) +
+IF( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99', 1, 0 ) +
+IF( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99', 1, 0 ) +
+IF( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99', 1, 0 ) +
+IF( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99', 1, 0 ) +
+IF( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99', 1, 0 ) +
+IF( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99', 1, 0 ) +
+IF( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99', 1, 0 ) +
+IF( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99', 1, 0 )
+)
+)
+)
+/ COUNT(*) ), 4) as `AVG`
+FROM `t1`
+WHERE `submitdate` IS NOT NULL
+AND (
+( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99' ) OR
+( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99' ) OR
+( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99' ) OR
+( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99' ) OR
+( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99' ) OR
+( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99' ) OR
+( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99' ) OR
+( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99' ) OR
+( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99' ) OR
+( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99' ) OR
+( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99' ) OR
+( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99' ) OR
+( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99' ) OR
+( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99' ) OR
+( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99' ) OR
+( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99' ) OR
+( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99' ) OR
+( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99' ) OR
+( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99' ) OR
+( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99' ) OR
+( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99' ) OR
+( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99' ) OR
+( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99' ) OR
+( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99' ) OR
+( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99' ) OR
+( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99' ) OR
+( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99' ) OR
+( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99' ) OR
+( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99' ) )
+AND 57813X540X1723 = 'Test';
+N AVG
+0 NULL
+drop table t1;
+#
+# End of 5.5 tests
+#
+#
# GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test
#
# IS_USED_LOCK, IS_FREE_LOCK: the lock is not acquired
@@ -593,9 +794,6 @@ select is_free_lock(repeat('a', 193));
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
select release_lock(repeat('a', 193));
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
-#
-# End of 5.5 tests
-#
# --
# -- WL#5787: IPv6-capable INET_ATON and INET_NTOA functions.
diff --git a/mysql-test/r/information_schema2.result b/mysql-test/r/information_schema2.result
index f82301699a7..7e9bdd7088f 100644
--- a/mysql-test/r/information_schema2.result
+++ b/mysql-test/r/information_schema2.result
@@ -6,15 +6,15 @@ select variable_name from information_schema.session_variables where variable_na
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
variable_name
BASEDIR
-create table t1 (a char);
-insert t1 values ('a'),('t'),('z');
-flush status;
-select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1;
-a exists (select 1 from information_schema.columns where table_schema=concat('tes',a))
-a 0
-t 1
-z 0
-show status like 'created_tmp_tables';
-Variable_name Value
-Created_tmp_tables 43
-drop table t1;
+create table t1 (x int);
+create table t2 (x int);
+create table t3 (x int);
+create table t4 AS select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE' ;
+delete from t4 where table_name not in (select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE');
+select * from t4;
+table_name
+t1
+t2
+t3
+t4
+drop table t1, t2, t3, t4;
diff --git a/mysql-test/r/loadxml.result b/mysql-test/r/loadxml.result
index 7742f456252..1128caf9122 100644
--- a/mysql-test/r/loadxml.result
+++ b/mysql-test/r/loadxml.result
@@ -93,3 +93,30 @@ a b
216 !&bb b;
3 !b3
DROP TABLE t1;
+#
+# Bug#16171518 LOAD XML DOES NOT HANDLE EMPTY ELEMENTS
+#
+CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 VARCHAR(3), col4 VARCHAR(4));
+LOAD XML INFILE '../../std_data/bug16171518_1.dat' INTO TABLE t1;
+SELECT * FROM t1 ORDER BY col1, col2, col3, col4;
+col1 col2 col3 col4
+0bc def ghi jkl
+1no NULL pqr stu
+2BC DEF GHI JKL
+3NO NULL PQR STU
+4bc def ghi jkl
+5no pqr stu vwx
+6BC DEF NULL JKL
+7NO PQR STU VWX
+8bc def ghi NULL
+9kl NULL mno pqr
+ABC DEF NULL JKL
+MNO NULL STU VWX
+DROP TABLE t1;
+CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 INTEGER);
+LOAD XML INFILE '../../std_data/bug16171518_2.dat' INTO TABLE t1;
+SELECT * FROM t1 ORDER BY col1, col2, col3;
+col1 col2 col3
+ABC DEF NULL
+GHI NULL 123
+DROP TABLE t1;
diff --git a/mysql-test/r/lowercase_fs_on.result b/mysql-test/r/lowercase_fs_on.result
new file mode 100644
index 00000000000..a090f46cfbf
--- /dev/null
+++ b/mysql-test/r/lowercase_fs_on.result
@@ -0,0 +1,3 @@
+#
+# Bug#20198490 : LOWER_CASE_TABLE_NAMES=0 ON WINDOWS LEADS TO PROBLEMS
+#
diff --git a/mysql-test/r/lowercase_table3.result b/mysql-test/r/lowercase_table3.result
deleted file mode 100644
index 22e80aaeb26..00000000000
--- a/mysql-test/r/lowercase_table3.result
+++ /dev/null
@@ -1,11 +0,0 @@
-call mtr.add_suppression("Cannot find or open table test/BUG29839 from");
-DROP TABLE IF EXISTS t1,T1;
-CREATE TABLE t1 (a INT);
-SELECT * FROM T1;
-a
-FLUSH TABLES;
-DROP TABLE t1;
-CREATE TABLE bug29839 (a INT) ENGINE=INNODB;
-SELECT * FROM BUG29839;
-ERROR 42S02: Table 'test.BUG29839' doesn't exist
-DROP TABLE bug29839;
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index c0f5fdc0e82..6d0dbe8be42 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -909,7 +909,7 @@ The following options may be given as the first argument:
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this
master.
- --silent Don't print [Note] to log during startup.
+ --silent-startup Don't print [Note] to the error log during startup.
--skip-bdb Deprecated option; Exist only for compatibility with old
my.cnf files
--skip-grant-tables Start without grant tables. This gives all users FULL
@@ -1387,7 +1387,7 @@ secure-auth TRUE
secure-file-priv (No default value)
server-id 0
show-slave-auth-info FALSE
-silent FALSE
+silent-startup FALSE
skip-grant-tables TRUE
skip-name-resolve FALSE
skip-networking FALSE
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index bbece88bb98..c6f7fdd7cca 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -4292,7 +4292,6 @@ Abernathy
aberrant
aberration
drop table words;
-mysqlimport: Error: 1146, Table 'test.words' doesn't exist, when using table: words
drop table t1;
drop table t2;
drop table words2;
@@ -5287,6 +5286,35 @@ drop table t1, t2;
#
# End of 5.1 tests
#
+#
+# Bug #20772273 : MYSQLIMPORT --USE-THREADS DOESN'T USE MULTIPLE THREADS
+#
+CREATE DATABASE db_20772273;
+USE db_20772273;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1), (2);
+CREATE TABLE t2(a INT);
+INSERT INTO t2 VALUES (3), (4);
+SELECT * FROM t1;
+a
+1
+2
+SELECT * FROM t2;
+a
+3
+4
+SELECT * FROM t1;
+a
+1
+2
+SELECT * FROM t2;
+a
+3
+4
+DROP TABLE t1;
+DROP TABLE t2;
+DROP DATABASE db_20772273;
+USE test;
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
diff --git a/mysql-test/r/partition_alter.result b/mysql-test/r/partition_alter.result
new file mode 100644
index 00000000000..cbd90b5ba7c
--- /dev/null
+++ b/mysql-test/r/partition_alter.result
@@ -0,0 +1,53 @@
+CREATE TABLE `test_data` (
+`hid` bigint(20) unsigned NOT NULL,
+`itid` bigint(20) unsigned NOT NULL,
+`clocktime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+`values` double(16,4) NOT NULL,
+PRIMARY KEY (`hid`,`itid`,`clocktime`)
+) ;
+INSERT INTO `test_data` (`hid`, `itid`, `clocktime`, `values`) VALUES
+(1, 1, '2015-03-10 06:25:16', 0.0000),
+(1, 1, '2015-03-10 06:26:24', 0.0000),
+(1, 1, '2015-03-10 06:27:32', 0.0000),
+(1, 1, '2015-03-10 06:28:40', 0.0000),
+(1, 1, '2015-03-10 06:29:49', 0.0000),
+(1, 1, '2015-03-10 06:30:57', 0.0000),
+(1, 1, '2015-03-10 06:32:05', 0.0000),
+(1, 1, '2015-03-10 06:33:14', 0.0000),
+(1, 1, '2015-03-10 06:34:22', 0.0000),
+(1, 1, '2015-03-10 06:35:30', 0.0000),
+(1, 1, '2015-03-10 06:36:39', 0.0000),
+(1, 1, '2015-03-10 06:37:47', 0.0000),
+(1, 1, '2015-03-10 06:38:55', 0.0000),
+(1, 1, '2015-03-10 06:40:03', 0.0000),
+(1, 1, '2015-03-10 06:41:09', 0.0000),
+(1, 1, '2015-03-10 06:42:21', 0.0000),
+(1, 1, '2015-03-10 06:43:29', 0.0000),
+(1, 1, '2015-03-10 06:44:37', 0.0000),
+(1, 1, '2015-03-10 06:45:46', 0.0000),
+(1, 1, '2015-03-10 06:47:05', 0.0000),
+(1, 1, '2015-03-10 06:48:21', 0.0000),
+(1, 1, '2015-03-10 06:49:41', 0.0000),
+(1, 1, '2015-03-10 06:50:58', 0.0000),
+(1, 1, '2015-03-10 06:52:08', 0.0000),
+(1, 1, '2015-03-10 06:53:17', 0.0000),
+(1, 1, '2015-03-10 06:54:25', 0.0000),
+(563, 1, '2015-03-17 14:28:28', 0.3125),
+(563, 1, '2015-03-17 14:29:39', 0.2775),
+(563, 1, '2015-03-17 14:30:49', 0.2675);
+CREATE PROCEDURE `create_part_max`()
+alter table `test_data`
+ partition by range(unix_timestamp(clocktime)) (
+partition partMAX values less than MAXVALUE
+);
+call create_part_max();
+call create_part_max();
+drop procedure create_part_max;
+prepare stmt from "alter table `test_data`
+ partition by range(unix_timestamp(clocktime)) (
+ partition partMAX values less than MAXVALUE
+ )";
+execute stmt;
+execute stmt;
+deallocate prepare stmt;
+drop table test_data;
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index 847af86913d..f05b145053d 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -1099,7 +1099,7 @@ partition by key (a)
subpartition by hash (sin(a+b))
(partition x1 (subpartition x11, subpartition x12),
partition x2 (subpartition x21, subpartition x22));
-ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
+ERROR HY000: This partition function is not allowed
select load_file('$MYSQLD_DATADIR/test/t1.par');
load_file('$MYSQLD_DATADIR/test/t1.par')
NULL
diff --git a/mysql-test/r/set_statement.result b/mysql-test/r/set_statement.result
index 2b557de8e05..ad6f3b7bf2e 100644
--- a/mysql-test/r/set_statement.result
+++ b/mysql-test/r/set_statement.result
@@ -1118,6 +1118,7 @@ set statement long_query_time=0.01 for select sleep(0.1)
set global log_output= @save_log_output;
set @@slow_query_log= @save_slow_query_log;
set @@long_query_time= @save_long_query_time;
+truncate table mysql.slow_log;
set statement autocommit=default for select 1;
ERROR 42000: The system variable autocommit cannot be set in SET STATEMENT.
set statement tx_isolation=default for select 1;
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index c38107e5fc6..3f0e6955b67 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -81,7 +81,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
+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 'SELECT 1))' at line 1
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -3597,7 +3597,7 @@ delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
drop table t1, t2;
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
-ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
+ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery'
CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1);
ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
@@ -7043,3 +7043,69 @@ select exists(select 1 from t1 group by `c` in (select `c` from t1));
exists(select 1 from t1 group by `c` in (select `c` from t1))
0
drop table t1;
+#
+# MDEV-7565: Server crash with Signal 6 (part 2)
+#
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+ControlRev
+NULL
+#
+# MDEV-7445:Server crash with Signal 6
+#
+CREATE PROCEDURE procedure2()
+BEGIN
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+ From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+END |
+call procedure2();
+ControlRev
+NULL
+call procedure2();
+ControlRev
+NULL
+drop procedure procedure2;
+SELECT
+(SELECT user FROM mysql.user
+WHERE h.host in (SELECT host FROM mysql.user)
+) AS sq
+FROM mysql.host h GROUP BY h.host;
+sq
+#
+# MDEV-7846:Server crashes in Item_subselect::fix
+#_fields or fails with Thread stack overrun
+#
+CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3),(9);
+CREATE TABLE t2 (column2 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(4);
+CREATE TABLE t3 (column3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (6),(8);
+CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
+INSERT INTO t4 VALUES (2),(5);
+PREPARE stmt FROM "
+SELECT (
+ SELECT MAX( table1.column1 ) AS field1
+ FROM t1 AS table1
+ WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 )
+) AS sq
+FROM t3 AS table3, t4 AS table4 GROUP BY sq
+";
+EXECUTE stmt;
+sq
+NULL
+EXECUTE stmt;
+sq
+NULL
+deallocate prepare stmt;
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result
index b0ba19b315c..34c766ed9b3 100644
--- a/mysql-test/r/subselect_no_exists_to_in.result
+++ b/mysql-test/r/subselect_no_exists_to_in.result
@@ -85,7 +85,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
+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 'SELECT 1))' at line 1
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -3600,7 +3600,7 @@ delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
drop table t1, t2;
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
-ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
+ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery'
CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1);
ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
@@ -7043,6 +7043,72 @@ select exists(select 1 from t1 group by `c` in (select `c` from t1));
exists(select 1 from t1 group by `c` in (select `c` from t1))
0
drop table t1;
+#
+# MDEV-7565: Server crash with Signal 6 (part 2)
+#
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+ControlRev
+NULL
+#
+# MDEV-7445:Server crash with Signal 6
+#
+CREATE PROCEDURE procedure2()
+BEGIN
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+ From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+END |
+call procedure2();
+ControlRev
+NULL
+call procedure2();
+ControlRev
+NULL
+drop procedure procedure2;
+SELECT
+(SELECT user FROM mysql.user
+WHERE h.host in (SELECT host FROM mysql.user)
+) AS sq
+FROM mysql.host h GROUP BY h.host;
+sq
+#
+# MDEV-7846:Server crashes in Item_subselect::fix
+#_fields or fails with Thread stack overrun
+#
+CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3),(9);
+CREATE TABLE t2 (column2 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(4);
+CREATE TABLE t3 (column3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (6),(8);
+CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
+INSERT INTO t4 VALUES (2),(5);
+PREPARE stmt FROM "
+SELECT (
+ SELECT MAX( table1.column1 ) AS field1
+ FROM t1 AS table1
+ WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 )
+) AS sq
+FROM t3 AS table3, t4 AS table4 GROUP BY sq
+";
+EXECUTE stmt;
+sq
+NULL
+EXECUTE stmt;
+sq
+NULL
+deallocate prepare stmt;
+drop table t1,t2,t3,t4;
set optimizer_switch=default;
select @@optimizer_switch like '%exists_to_in=off%';
@@optimizer_switch like '%exists_to_in=off%'
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index 3b999dbcbb6..de21a8dbd96 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -88,7 +88,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
+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 'SELECT 1))' at line 1
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -3600,7 +3600,7 @@ delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
drop table t1, t2;
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
-ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
+ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery'
CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1);
ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
@@ -7036,6 +7036,72 @@ select exists(select 1 from t1 group by `c` in (select `c` from t1));
exists(select 1 from t1 group by `c` in (select `c` from t1))
0
drop table t1;
+#
+# MDEV-7565: Server crash with Signal 6 (part 2)
+#
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+ControlRev
+NULL
+#
+# MDEV-7445:Server crash with Signal 6
+#
+CREATE PROCEDURE procedure2()
+BEGIN
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+ From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+END |
+call procedure2();
+ControlRev
+NULL
+call procedure2();
+ControlRev
+NULL
+drop procedure procedure2;
+SELECT
+(SELECT user FROM mysql.user
+WHERE h.host in (SELECT host FROM mysql.user)
+) AS sq
+FROM mysql.host h GROUP BY h.host;
+sq
+#
+# MDEV-7846:Server crashes in Item_subselect::fix
+#_fields or fails with Thread stack overrun
+#
+CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3),(9);
+CREATE TABLE t2 (column2 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(4);
+CREATE TABLE t3 (column3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (6),(8);
+CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
+INSERT INTO t4 VALUES (2),(5);
+PREPARE stmt FROM "
+SELECT (
+ SELECT MAX( table1.column1 ) AS field1
+ FROM t1 AS table1
+ WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 )
+) AS sq
+FROM t3 AS table3, t4 AS table4 GROUP BY sq
+";
+EXECUTE stmt;
+sq
+NULL
+EXECUTE stmt;
+sq
+NULL
+deallocate prepare stmt;
+drop table t1,t2,t3,t4;
set optimizer_switch=default;
select @@optimizer_switch like '%materialization=on%';
@@optimizer_switch like '%materialization=on%'
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 5a48eaa863c..09d8328a639 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -84,7 +84,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
+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 'SELECT 1))' at line 1
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -3596,7 +3596,7 @@ delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
drop table t1, t2;
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
-ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
+ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery'
CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1);
ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
@@ -7034,4 +7034,70 @@ select exists(select 1 from t1 group by `c` in (select `c` from t1));
exists(select 1 from t1 group by `c` in (select `c` from t1))
0
drop table t1;
+#
+# MDEV-7565: Server crash with Signal 6 (part 2)
+#
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+ControlRev
+NULL
+#
+# MDEV-7445:Server crash with Signal 6
+#
+CREATE PROCEDURE procedure2()
+BEGIN
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+ From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+END |
+call procedure2();
+ControlRev
+NULL
+call procedure2();
+ControlRev
+NULL
+drop procedure procedure2;
+SELECT
+(SELECT user FROM mysql.user
+WHERE h.host in (SELECT host FROM mysql.user)
+) AS sq
+FROM mysql.host h GROUP BY h.host;
+sq
+#
+# MDEV-7846:Server crashes in Item_subselect::fix
+#_fields or fails with Thread stack overrun
+#
+CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3),(9);
+CREATE TABLE t2 (column2 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(4);
+CREATE TABLE t3 (column3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (6),(8);
+CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
+INSERT INTO t4 VALUES (2),(5);
+PREPARE stmt FROM "
+SELECT (
+ SELECT MAX( table1.column1 ) AS field1
+ FROM t1 AS table1
+ WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 )
+) AS sq
+FROM t3 AS table3, t4 AS table4 GROUP BY sq
+";
+EXECUTE stmt;
+sq
+NULL
+EXECUTE stmt;
+sq
+NULL
+deallocate prepare stmt;
+drop table t1,t2,t3,t4;
set @optimizer_switch_for_subselect_test=null;
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index d5462f90708..a164ae98aa0 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -87,7 +87,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
+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 'SELECT 1))' at line 1
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -3603,7 +3603,7 @@ delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
drop table t1, t2;
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
-ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
+ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery'
CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1);
ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
@@ -7049,6 +7049,72 @@ select exists(select 1 from t1 group by `c` in (select `c` from t1));
exists(select 1 from t1 group by `c` in (select `c` from t1))
0
drop table t1;
+#
+# MDEV-7565: Server crash with Signal 6 (part 2)
+#
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+ControlRev
+NULL
+#
+# MDEV-7445:Server crash with Signal 6
+#
+CREATE PROCEDURE procedure2()
+BEGIN
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+ From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+END |
+call procedure2();
+ControlRev
+NULL
+call procedure2();
+ControlRev
+NULL
+drop procedure procedure2;
+SELECT
+(SELECT user FROM mysql.user
+WHERE h.host in (SELECT host FROM mysql.user)
+) AS sq
+FROM mysql.host h GROUP BY h.host;
+sq
+#
+# MDEV-7846:Server crashes in Item_subselect::fix
+#_fields or fails with Thread stack overrun
+#
+CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3),(9);
+CREATE TABLE t2 (column2 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(4);
+CREATE TABLE t3 (column3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (6),(8);
+CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
+INSERT INTO t4 VALUES (2),(5);
+PREPARE stmt FROM "
+SELECT (
+ SELECT MAX( table1.column1 ) AS field1
+ FROM t1 AS table1
+ WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 )
+) AS sq
+FROM t3 AS table3, t4 AS table4 GROUP BY sq
+";
+EXECUTE stmt;
+sq
+NULL
+EXECUTE stmt;
+sq
+NULL
+deallocate prepare stmt;
+drop table t1,t2,t3,t4;
set optimizer_switch=default;
select @@optimizer_switch like '%subquery_cache=on%';
@@optimizer_switch like '%subquery_cache=on%'
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index 288e8eee98e..d15a07fffa6 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -84,7 +84,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
+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 'SELECT 1))' at line 1
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
ERROR 42S22: Unknown column 'a' in 'field list'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL;
@@ -3596,7 +3596,7 @@ delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
drop table t1, t2;
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
-ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
+ERROR 42S22: Unknown column 'no_such_column' in 'IN/ALL/ANY subquery'
CREATE VIEW v2 AS SELECT * FROM t1 WHERE no_such_column = (SELECT 1);
ERROR 42S22: Unknown column 'no_such_column' in 'where clause'
SELECT * FROM t1 WHERE no_such_column = ANY (SELECT 1);
@@ -7034,5 +7034,71 @@ select exists(select 1 from t1 group by `c` in (select `c` from t1));
exists(select 1 from t1 group by `c` in (select `c` from t1))
0
drop table t1;
+#
+# MDEV-7565: Server crash with Signal 6 (part 2)
+#
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+ControlRev
+NULL
+#
+# MDEV-7445:Server crash with Signal 6
+#
+CREATE PROCEDURE procedure2()
+BEGIN
+Select
+(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+) As `ControlRev`
+ From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+END |
+call procedure2();
+ControlRev
+NULL
+call procedure2();
+ControlRev
+NULL
+drop procedure procedure2;
+SELECT
+(SELECT user FROM mysql.user
+WHERE h.host in (SELECT host FROM mysql.user)
+) AS sq
+FROM mysql.host h GROUP BY h.host;
+sq
+#
+# MDEV-7846:Server crashes in Item_subselect::fix
+#_fields or fails with Thread stack overrun
+#
+CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3),(9);
+CREATE TABLE t2 (column2 INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1),(4);
+CREATE TABLE t3 (column3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (6),(8);
+CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
+INSERT INTO t4 VALUES (2),(5);
+PREPARE stmt FROM "
+SELECT (
+ SELECT MAX( table1.column1 ) AS field1
+ FROM t1 AS table1
+ WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 )
+) AS sq
+FROM t3 AS table3, t4 AS table4 GROUP BY sq
+";
+EXECUTE stmt;
+sq
+NULL
+EXECUTE stmt;
+sq
+NULL
+deallocate prepare stmt;
+drop table t1,t2,t3,t4;
set @optimizer_switch_for_subselect_test=null;
set @join_cache_level_for_subselect_test=NULL;
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result
index 9eaf1a46d89..db7c2380398 100644
--- a/mysql-test/r/update.result
+++ b/mysql-test/r/update.result
@@ -561,6 +561,21 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
DROP VIEW v1;
DROP FUNCTION f1;
DROP TABLE t1;
+# Bug #21143080: UPDATE ON VARCHAR AND TEXT COLUMNS PRODUCE INCORRECT
+# RESULTS
+CREATE TABLE t1 (a VARCHAR(50), b TEXT, c CHAR(50)) ENGINE=INNODB;
+INSERT INTO t1 (a, b, c) VALUES ('start trail', '', 'even longer string');
+UPDATE t1 SET b = a, a = 'inject';
+SELECT a, b FROM t1;
+a b
+inject start trail
+UPDATE t1 SET b = c, c = 'inject';
+SELECT c, b FROM t1;
+c b
+inject even longer string
+DROP TABLE t1;
+#
+# MDEV-3948 Assertion `records_are_comparable(table)' fails in compare_record(const TABLE*) on UPDATE with simple AND condition, index_merge+index_merge_intersection, InnoDB
#
# Verify that UPDATE does the same number of handler_update
# operations, no matter if there is ORDER BY or not.
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index eaef3f96ee0..8a502a4a3ba 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -4857,6 +4857,41 @@ View Create View character_set_client collation_connection
v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS (select 'BUG#14117018' AS `col1`) union all (select '' AS `col2`) union all (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
DROP VIEW v1, v2, v3, v4, v5;
#
+# BUG#19886430: VIEW CREATION WITH NAMED COLUMNS, OVER UNION,
+# IS REJECTED
+# Without the patch, reports an error.
+CREATE VIEW v1 (fld1, fld2) AS
+SELECT 1 AS a, 2 AS b
+UNION ALL
+SELECT 1 AS a, 1 AS a;
+# The column names are explicitly specified and not duplicates, hence
+# succeeds.
+CREATE VIEW v2 (fld1, fld2) AS
+SELECT 1 AS a, 2 AS a
+UNION ALL
+SELECT 1 AS a, 1 AS a;
+# The column name in the first SELECT are not duplicates, hence succeeds.
+CREATE VIEW v3 AS
+SELECT 1 AS a, 2 AS b
+UNION ALL
+SELECT 1 AS a, 1 AS a;
+# Should report an error, since the explicitly specified column names are
+# duplicates.
+CREATE VIEW v4 (fld1, fld1) AS
+SELECT 1 AS a, 2 AS b
+UNION ALL
+SELECT 1 AS a, 1 AS a;
+ERROR 42S21: Duplicate column name 'fld1'
+# Should report an error, since duplicate column name is specified in the
+# First SELECT.
+CREATE VIEW v4 AS
+SELECT 1 AS a, 2 AS a
+UNION ALL
+SELECT 1 AS a, 1 AS a;
+ERROR 42S21: Duplicate column name 'a'
+# Cleanup
+DROP VIEW v1, v2, v3;
+#
# lp:833600 Wrong result with view + outer join + uncorrelated subquery (non-semijoin)
#
CREATE TABLE t1 ( a int, b int );
diff --git a/mysql-test/std_data/bug16171518_1.dat b/mysql-test/std_data/bug16171518_1.dat
new file mode 100644
index 00000000000..b65b9359ce1
--- /dev/null
+++ b/mysql-test/std_data/bug16171518_1.dat
@@ -0,0 +1,59 @@
+<test_rows>
+ <row>
+ <col1>0bc</col1>
+ <col2>def</col2>
+ <col3>ghi</col3>
+ <col4>jkl</col4>
+ </row>
+ <row>
+ <col1>1no</col1>
+ <col2/>
+ <col3>pqr</col3>
+ <col4>stu</col4>
+ </row>
+
+ <row>
+ <col1>2BC</col1>
+ <col2>DEF</col2>
+ <col3>GHI</col3>
+ <col4>JKL</col4>
+ </row>
+ <row>
+ <col1>3NO</col1>
+ <col2 />
+ <col3>PQR</col3>
+ <col4>STU</col4>
+ </row>
+
+ <row col1="4bc" col2="def" col3="ghi" col4="jkl"/>
+ <row col1="5no" col2="pqr" col3="stu" col4="vwx" />
+
+ <row>
+ <field name='col1'>6BC</field>
+ <field name='col2'>DEF</field>
+ <field name='col3'></field>
+ <field name='col4'>JKL</field>
+ </row>
+ <row>
+ <field name='col1'>7NO</field>
+ <field name='col2'>PQR</field>
+ <field name='col3'>STU</field>
+ <field name='col4'>VWX</field>
+ </row>
+
+ <row>
+ <col1>8bc</col1>
+ <col2>def</col2>
+ <col3>ghi</col3>
+ <col4 />
+ </row>
+ <row>
+ <col1>9kl</col1>
+ <col2/>
+ <col3>mno</col3>
+ <col4>pqr</col4>
+ </row>
+
+ <row col1="ABC" col2="DEF" col3="" col4="JKL"/>
+ <row col1="MNO" col2="" col3="STU" col4="VWX"/>
+</test_rows>
diff --git a/mysql-test/std_data/bug16171518_2.dat b/mysql-test/std_data/bug16171518_2.dat
new file mode 100644
index 00000000000..8a483337a0f
--- /dev/null
+++ b/mysql-test/std_data/bug16171518_2.dat
@@ -0,0 +1,12 @@
+<test_rows>
+ <row>
+ <col1>ABC</col1>
+ <col2>DEF</col2>
+ <col3 />
+ </row>
+ <row>
+ <col1>GHI</col1>
+ <col2 />
+ <col3>123</col3>
+ </row>
+</test_rows>
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
index 5a8278e898c..a31825735fb 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
@@ -1521,7 +1521,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
-### @1=000000124.450000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */
+### @1=124.45000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
@@ -1538,7 +1538,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
-### @1=-000000543.210000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */
+### @1=-543.21000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
@@ -1555,7 +1555,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
-### @1=000000124.450000000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */
+### @1=124.45000 /* DECIMAL(10,5) meta=2565 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
index 76be60fba18..cf90289c7ca 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
@@ -2400,9 +2400,9 @@ BEGIN
### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
### @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2493,9 +2493,9 @@ BEGIN
### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
### @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2669,9 +2669,9 @@ BEGIN
### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
### @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2762,9 +2762,9 @@ BEGIN
### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
### @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2842,9 +2842,9 @@ BEGIN
### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
### @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2935,9 +2935,9 @@ BEGIN
### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
### @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3015,9 +3015,9 @@ BEGIN
### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
### @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3188,9 +3188,9 @@ BEGIN
### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
### @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3281,9 +3281,9 @@ BEGIN
### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
### @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3454,9 +3454,9 @@ BEGIN
### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
### @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3547,9 +3547,9 @@ BEGIN
### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
### @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3640,9 +3640,9 @@ BEGIN
### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
### @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
index 72184c4a4f5..4d7cc8e9751 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
@@ -2400,9 +2400,9 @@ BEGIN
### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
### @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2496,9 +2496,9 @@ BEGIN
### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
### @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2674,9 +2674,9 @@ BEGIN
### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
### @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2769,9 +2769,9 @@ BEGIN
### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
### @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2849,9 +2849,9 @@ BEGIN
### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
### @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -2944,9 +2944,9 @@ BEGIN
### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
### @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3024,9 +3024,9 @@ BEGIN
### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
### @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3199,9 +3199,9 @@ BEGIN
### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
### @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3294,9 +3294,9 @@ BEGIN
### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
### @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3469,9 +3469,9 @@ BEGIN
### @22=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
### @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3564,9 +3564,9 @@ BEGIN
### @22=-1.797... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=0 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=0 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
### @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
@@ -3659,9 +3659,9 @@ BEGIN
### @22=-2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @23=2.225... /* DOUBLE meta=8 nullable=1 is_null=0 */
### @24=1 /* DOUBLE meta=8 nullable=1 is_null=0 */
-### @25=-000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
-### @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @25=-9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @26=9999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
+### @27=1 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
### @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
### @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
### @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
diff --git a/mysql-test/suite/encryption/r/filekeys_nofile.result b/mysql-test/suite/encryption/r/filekeys_nofile.result
index 558ea1ce88c..690f2e61df0 100644
--- a/mysql-test/suite/encryption/r/filekeys_nofile.result
+++ b/mysql-test/suite/encryption/r/filekeys_nofile.result
@@ -1,7 +1,7 @@
-call mtr.add_suppression("File '' not found");
+call mtr.add_suppression("file-key-management-filename is not set");
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
-FOUND /File '' not found/ in mysqld.1.err
+FOUND /file-key-management-filename is not set/ in mysqld.1.err
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
select plugin_status from information_schema.plugins
diff --git a/mysql-test/suite/encryption/t/filekeys_nofile.test b/mysql-test/suite/encryption/t/filekeys_nofile.test
index c4505ebec81..46f5cd462d7 100644
--- a/mysql-test/suite/encryption/t/filekeys_nofile.test
+++ b/mysql-test/suite/encryption/t/filekeys_nofile.test
@@ -1,2 +1,2 @@
-let SEARCH_PATTERN=File '' not found;
+let SEARCH_PATTERN=file-key-management-filename is not set;
source filekeys_badtest.inc;
diff --git a/mysql-test/suite/innodb/r/innodb_bug68148.result b/mysql-test/suite/innodb/r/innodb_bug68148.result
new file mode 100644
index 00000000000..88247053389
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_bug68148.result
@@ -0,0 +1,36 @@
+set global innodb_file_per_table=1;
+CREATE TABLE ref_table1 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
+CREATE TABLE ref_table2 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
+CREATE TABLE `main` (
+`id` int(11) NOT NULL AUTO_INCREMENT,
+`ref_id1` int(11) NOT NULL,
+`ref_id2` int(11) NOT NULL,
+PRIMARY KEY (`id`),
+UNIQUE KEY `idx_1` (`ref_id1`,`ref_id2`),
+KEY `FK_set_out_analysis_route_id` (`ref_id2`),
+CONSTRAINT `FK_1` FOREIGN KEY (`ref_id1`) REFERENCES `ref_table1` (`id`) ,
+CONSTRAINT `FK_2` FOREIGN KEY (`ref_id2`) REFERENCES `ref_table2` (`id`)
+) ENGINE=InnoDB;
+SET FOREIGN_KEY_CHECKS=0;
+DROP INDEX `idx_1` ON `main`;
+SHOW TABLES;
+Tables_in_test
+main
+ref_table1
+ref_table2
+# restart and see if we can still access the main table
+SET FOREIGN_KEY_CHECKS=0;
+ALTER TABLE `main` ADD INDEX `idx_1` (`ref_id1`);
+SHOW CREATE TABLE `main`;
+Table Create Table
+main CREATE TABLE `main` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ref_id1` int(11) NOT NULL,
+ `ref_id2` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `FK_set_out_analysis_route_id` (`ref_id2`),
+ KEY `idx_1` (`ref_id1`),
+ CONSTRAINT `FK_1` FOREIGN KEY (`ref_id1`) REFERENCES `ref_table1` (`id`),
+ CONSTRAINT `FK_2` FOREIGN KEY (`ref_id2`) REFERENCES `ref_table2` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE main, ref_table1, ref_table2;
diff --git a/mysql-test/suite/innodb/r/innodb_simulate_comp_failures.result b/mysql-test/suite/innodb/r/innodb_simulate_comp_failures.result
index 1cb2cf77050..c2a8ba1f4db 100644
--- a/mysql-test/suite/innodb/r/innodb_simulate_comp_failures.result
+++ b/mysql-test/suite/innodb/r/innodb_simulate_comp_failures.result
@@ -5,4 +5,4 @@ CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255), KEY msg_i(m
SET GLOBAL innodb_simulate_comp_failures = 25;
SELECT COUNT(*) FROM t1;
COUNT(*)
-10000
+1500
diff --git a/mysql-test/suite/innodb/t/innodb_bug60229-master.opt b/mysql-test/suite/innodb/t/innodb_bug60229-master.opt
deleted file mode 100644
index 9b27aef9bf8..00000000000
--- a/mysql-test/suite/innodb/t/innodb_bug60229-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---lower_case_table_names=0
diff --git a/mysql-test/suite/innodb/t/innodb_bug60229.test b/mysql-test/suite/innodb/t/innodb_bug60229.test
index 8dcf15157d6..aee0b96a942 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60229.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60229.test
@@ -2,6 +2,10 @@
# Bug #13083023 - 60229: BROKEN COMPATIBILITY: ERROR WHILE CREATE TABLE
# WITH FOREIGN KEY CONSTRAINT.
+#Server variable option 'lower_case_table_names' sets '0' as default value
+#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of
+#insensitive filsystem is not allowed.
+-- source include/have_case_sensitive_file_system.inc
-- source include/have_innodb.inc
CREATE TABLE PERSON (
diff --git a/mysql-test/suite/innodb/t/innodb_bug68148.test b/mysql-test/suite/innodb/t/innodb_bug68148.test
new file mode 100644
index 00000000000..531baa30e48
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug68148.test
@@ -0,0 +1,41 @@
+-- source include/have_innodb.inc
+-- source include/not_embedded.inc
+
+#
+# Bug #68148: drop index on a foreign key column leads to missing table
+# MDEV-8845: Table disappear after modifying FK
+#
+
+set global innodb_file_per_table=1;
+
+CREATE TABLE ref_table1 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
+
+CREATE TABLE ref_table2 (id int(11) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
+
+CREATE TABLE `main` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `ref_id1` int(11) NOT NULL,
+ `ref_id2` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `idx_1` (`ref_id1`,`ref_id2`),
+ KEY `FK_set_out_analysis_route_id` (`ref_id2`),
+ CONSTRAINT `FK_1` FOREIGN KEY (`ref_id1`) REFERENCES `ref_table1` (`id`) ,
+ CONSTRAINT `FK_2` FOREIGN KEY (`ref_id2`) REFERENCES `ref_table2` (`id`)
+) ENGINE=InnoDB;
+
+SET FOREIGN_KEY_CHECKS=0;
+
+DROP INDEX `idx_1` ON `main`;
+SHOW TABLES;
+
+--echo # restart and see if we can still access the main table
+--source include/restart_mysqld.inc
+
+# This is required to access the table
+SET FOREIGN_KEY_CHECKS=0;
+ALTER TABLE `main` ADD INDEX `idx_1` (`ref_id1`);
+SHOW CREATE TABLE `main`;
+
+DROP TABLE main, ref_table1, ref_table2;
+
+
diff --git a/mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test b/mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test
index ae9e0a9b984..cf22935fad6 100644
--- a/mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test
+++ b/mysql-test/suite/innodb/t/innodb_simulate_comp_failures.test
@@ -1,8 +1,8 @@
--source include/big_test.inc
# test takes too long with valgrind
--source include/not_valgrind.inc
---let $num_inserts = 10000
---let $num_ops = 10000
+--let $num_inserts = 1500
+--let $num_ops = 3500
--source suite/innodb/include/innodb_simulate_comp_failures.inc
# clean exit
--exit
diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test
index 837b33cb3c4..2c1034f3c4d 100644
--- a/mysql-test/suite/innodb/t/xa_recovery.test
+++ b/mysql-test/suite/innodb/t/xa_recovery.test
@@ -6,6 +6,12 @@ if (`select plugin_auth_version <= "5.6.24" from information_schema.plugins wher
# Embedded server does not support restarting.
--source include/not_embedded.inc
+# MDEV-8841 - close tables opened by previous tests,
+# so they don't get marked crashed when the server gets crashed
+--disable_query_log
+FLUSH TABLES;
+--enable_query_log
+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connect (con1,localhost,root);
diff --git a/mysql-test/suite/jp/t/jp_enum_sjis-master.opt b/mysql-test/suite/jp/t/jp_enum_sjis-master.opt
deleted file mode 100644
index 9b27aef9bf8..00000000000
--- a/mysql-test/suite/jp/t/jp_enum_sjis-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---lower_case_table_names=0
diff --git a/mysql-test/suite/jp/t/jp_enum_sjis.test b/mysql-test/suite/jp/t/jp_enum_sjis.test
index e1f22f6fe27..1060f83ec06 100644
--- a/mysql-test/suite/jp/t/jp_enum_sjis.test
+++ b/mysql-test/suite/jp/t/jp_enum_sjis.test
@@ -1,3 +1,7 @@
+#Server variable option 'lower_case_table_names' sets '0' as default value
+#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of
+#insensitive filsystem is not allowed.
+-- source include/have_case_sensitive_file_system.inc
--source include/have_sjis.inc
--source include/have_innodb.inc
--character_set sjis
diff --git a/mysql-test/suite/jp/t/jp_enum_ucs2-master.opt b/mysql-test/suite/jp/t/jp_enum_ucs2-master.opt
deleted file mode 100644
index 9b27aef9bf8..00000000000
--- a/mysql-test/suite/jp/t/jp_enum_ucs2-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---lower_case_table_names=0
diff --git a/mysql-test/suite/jp/t/jp_enum_ucs2.test b/mysql-test/suite/jp/t/jp_enum_ucs2.test
index a3d7c47705d..321f8952148 100644
--- a/mysql-test/suite/jp/t/jp_enum_ucs2.test
+++ b/mysql-test/suite/jp/t/jp_enum_ucs2.test
@@ -1,3 +1,7 @@
+#Server variable option 'lower_case_table_names' sets '0' as default value
+#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of
+#insensitive filsystem is not allowed.
+-- source include/have_case_sensitive_file_system.inc
--source include/have_ucs2.inc
--source include/have_innodb.inc
diff --git a/mysql-test/suite/jp/t/jp_enum_ujis-master.opt b/mysql-test/suite/jp/t/jp_enum_ujis-master.opt
deleted file mode 100644
index 9b27aef9bf8..00000000000
--- a/mysql-test/suite/jp/t/jp_enum_ujis-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---lower_case_table_names=0
diff --git a/mysql-test/suite/jp/t/jp_enum_ujis.test b/mysql-test/suite/jp/t/jp_enum_ujis.test
index 17e41e0691e..10e8ad55a3c 100644
--- a/mysql-test/suite/jp/t/jp_enum_ujis.test
+++ b/mysql-test/suite/jp/t/jp_enum_ujis.test
@@ -1,3 +1,7 @@
+#Server variable option 'lower_case_table_names' sets '0' as default value
+#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of
+#insensitive filsystem is not allowed.
+-- source include/have_case_sensitive_file_system.inc
--source include/have_ujis.inc
--source include/have_innodb.inc
diff --git a/mysql-test/suite/jp/t/jp_enum_utf8-master.opt b/mysql-test/suite/jp/t/jp_enum_utf8-master.opt
deleted file mode 100644
index 9b27aef9bf8..00000000000
--- a/mysql-test/suite/jp/t/jp_enum_utf8-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---lower_case_table_names=0
diff --git a/mysql-test/suite/jp/t/jp_enum_utf8.test b/mysql-test/suite/jp/t/jp_enum_utf8.test
index ff5978da69c..f67939bd02b 100644
--- a/mysql-test/suite/jp/t/jp_enum_utf8.test
+++ b/mysql-test/suite/jp/t/jp_enum_utf8.test
@@ -1,3 +1,7 @@
+#Server variable option 'lower_case_table_names' sets '0' as default value
+#in case sensitive filesystem. Using 'lower_case_table_names=0' in case of
+#insensitive filsystem is not allowed.
+-- source include/have_case_sensitive_file_system.inc
--source include/have_utf8.inc
--source include/have_innodb.inc
--disable_warnings
diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result
index a50c4ffa297..433d793909f 100644
--- a/mysql-test/suite/perfschema/r/misc.result
+++ b/mysql-test/suite/perfschema/r/misc.result
@@ -92,3 +92,18 @@ object_schema object_name index_name count_fetch count_insert count_update count
test t_60905 i 2 0 0 1
test t_60905 NULL 5 5 0 1
DROP TABLE t_60905;
+use test;
+truncate performance_schema.events_statements_history;
+truncate performance_schema.events_statements_history_long;
+select * from t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+
+select mysql_errno, returned_sqlstate, message_text, errors, warnings
+from performance_schema.events_statements_history where errors > 0;
+mysql_errno returned_sqlstate message_text errors warnings
+1146 42S02 Table 'test.t1' doesn't exist 1 0
+
+select mysql_errno, returned_sqlstate, message_text, errors, warnings from
+performance_schema.events_statements_history_long where errors > 0;
+mysql_errno returned_sqlstate message_text errors warnings
+1146 42S02 Table 'test.t1' doesn't exist 1 0
diff --git a/mysql-test/suite/perfschema/r/query_cache.result b/mysql-test/suite/perfschema/r/query_cache.result
index 8786cd055ca..837c2573a72 100644
--- a/mysql-test/suite/perfschema/r/query_cache.result
+++ b/mysql-test/suite/perfschema/r/query_cache.result
@@ -38,7 +38,7 @@ spins
NULL
select * from performance_schema.setup_timers where name='wait';
NAME TIMER_NAME
-wait CYCLE
+wait {CYCLE_OR_NANOSECOND}
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
@@ -53,7 +53,7 @@ spins
NULL
select * from performance_schema.setup_timers where name='wait';
NAME TIMER_NAME
-wait CYCLE
+wait {CYCLE_OR_NANOSECOND}
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test
index af19e8db51d..00b175ec391 100644
--- a/mysql-test/suite/perfschema/t/misc.test
+++ b/mysql-test/suite/perfschema/t/misc.test
@@ -169,3 +169,23 @@ SELECT object_schema,
DROP TABLE t_60905;
+
+#
+# Bug#11929832 - EVENTS_STATEMENTS_HISTORY HAS ERRORS=0 WHEN THERE ARE ERRORS
+#
+# Verify that SQL errors are properly counted.
+
+use test;
+truncate performance_schema.events_statements_history;
+truncate performance_schema.events_statements_history_long;
+
+--error ER_NO_SUCH_TABLE
+select * from t1;
+
+--echo
+select mysql_errno, returned_sqlstate, message_text, errors, warnings
+ from performance_schema.events_statements_history where errors > 0;
+
+--echo
+select mysql_errno, returned_sqlstate, message_text, errors, warnings from
+ performance_schema.events_statements_history_long where errors > 0;
diff --git a/mysql-test/suite/perfschema/t/query_cache.test b/mysql-test/suite/perfschema/t/query_cache.test
index 60d4a648222..802e574f89b 100644
--- a/mysql-test/suite/perfschema/t/query_cache.test
+++ b/mysql-test/suite/perfschema/t/query_cache.test
@@ -34,6 +34,7 @@ show status like "Qcache_hits";
select spins from performance_schema.events_waits_current order by event_name limit 1;
+--replace_result CYCLE {CYCLE_OR_NANOSECOND} NANOSECOND {CYCLE_OR_NANOSECOND}
select * from performance_schema.setup_timers where name='wait';
show status like "Qcache_queries_in_cache";
@@ -42,6 +43,7 @@ show status like "Qcache_hits";
select spins from performance_schema.events_waits_current order by event_name limit 1;
+--replace_result CYCLE {CYCLE_OR_NANOSECOND} NANOSECOND {CYCLE_OR_NANOSECOND}
select * from performance_schema.setup_timers where name='wait';
show status like "Qcache_queries_in_cache";
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_load.result b/mysql-test/suite/plugins/r/feedback_plugin_load.result
index e5d1296ae53..9fd488052e4 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_load.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_load.result
@@ -1,11 +1,15 @@
select plugin_status from information_schema.plugins where plugin_name='feedback';
plugin_status
ACTIVE
+SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+variable_value = @feedback_used + 1
+1
select * from information_schema.feedback where variable_name like 'feed%'
- and variable_name not like '%_uid';
+ and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used';
VARIABLE_NAME VARIABLE_VALUE
-FEEDBACK used 1
FEEDBACK version 1.1
+FEEDBACK_HTTP_PROXY
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_send.result b/mysql-test/suite/plugins/r/feedback_plugin_send.result
index 304294b417e..df55c3fdedb 100644
--- a/mysql-test/suite/plugins/r/feedback_plugin_send.result
+++ b/mysql-test/suite/plugins/r/feedback_plugin_send.result
@@ -1,11 +1,15 @@
select plugin_status from information_schema.plugins where plugin_name='feedback';
plugin_status
ACTIVE
+SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+variable_value = @feedback_used + 1
+1
select * from information_schema.feedback where variable_name like 'feed%'
- and variable_name not like '%_uid';
+ and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used';
VARIABLE_NAME VARIABLE_VALUE
-FEEDBACK used 3
FEEDBACK version 1.1
+FEEDBACK_HTTP_PROXY
FEEDBACK_SEND_RETRY_WAIT 60
FEEDBACK_SEND_TIMEOUT 60
FEEDBACK_URL http://mariadb.org/feedback_plugin/post
diff --git a/mysql-test/suite/plugins/t/feedback_plugin_load.test b/mysql-test/suite/plugins/t/feedback_plugin_load.test
index b1bcb2a6bbd..f2f8c1f97a7 100644
--- a/mysql-test/suite/plugins/t/feedback_plugin_load.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_load.test
@@ -4,11 +4,27 @@ if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'fe
}
select plugin_status from information_schema.plugins where plugin_name='feedback';
+
+# Every SELECT from INFORMATION_SCHEMA.FEEDBACK increases the value of 'FEEDBACK used'.
+# We cannot record the actual value, because the test can be executed more than once,
+# but we can check that the value indeed increases as expected.
+# There is still a room for some race condition, e.g. if at the very moment
+# between first SELECT to store the value and the next SELECT to check that it increases,
+# the feedback plugin is activated. But the probability of it is close to 0,
+# so lets get back to it if it ever happens.
+
+# Lets say the plugin was used X times before this SELECT
+SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+
+# Now $feedback_used == X+1, and 'FEEDBACK used' is also X+1. And variable_value is increased again when we run the next SELECT
+SELECT variable_value = @feedback_used + 1 FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+
+# Now when we are happy with 'FEEDBACK used', we can check everything else
+
--replace_result https http
--sorted_result
select * from information_schema.feedback where variable_name like 'feed%'
- and variable_name not like '%_uid';
-
+ and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used';
# Embedded server does not use the table mysqld.user and thus
# does not automatically use latin1_bin on startup. Use it manually.
diff --git a/mysql-test/suite/plugins/t/feedback_plugin_send.test b/mysql-test/suite/plugins/t/feedback_plugin_send.test
index 45b507f8e78..31542c33482 100644
--- a/mysql-test/suite/plugins/t/feedback_plugin_send.test
+++ b/mysql-test/suite/plugins/t/feedback_plugin_send.test
@@ -14,6 +14,15 @@ if (!$MTR_FEEDBACK_PLUGIN) {
# is doing some work in other workers.
#
sleep 310;
+
+# The test expects that the plugin will send a report at least 2 times,
+# now (5 min after loading) and on server shutdown which happens below.
+# Since we have already waited for 5 min, let's be generous
+# and make sure the server has enough time to shut down properly.
+# We won't lose anything if the shutdown is fast, but if it's slow, the plugin
+# will still be able to finish the job and write about it in the error log.
+
+--let $shutdown_timeout= 60
source include/restart_mysqld.inc;
replace_result https http;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
index cf488e889b4..be420cb021b 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
@@ -18,6 +18,7 @@ RESET MASTER;
SET GLOBAL gtid_slave_pos= 'OLD_GTID_POS';
include/start_slave.inc
INSERT INTO t1 VALUES (4);
+include/save_master_gtid.inc
SET sql_log_bin= 0;
CALL mtr.add_suppression("The binlog on the master is missing the GTID");
SET sql_log_bin= 1;
@@ -25,6 +26,7 @@ include/wait_for_slave_io_error.inc [errno=1236]
STOP SLAVE SQL_THREAD;
SET GLOBAL gtid_slave_pos= 'OLD_GTID_POS';
include/start_slave.inc
+include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
a
1
diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
index 1cf70ba7e67..33284ce58c6 100644
--- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
@@ -47,7 +47,7 @@ include/start_slave.inc
include/stop_slave.inc
reset slave all;
start slave;
-ERROR HY000: The server is not configured as slave; fix in config file or with CHANGE MASTER TO
+ERROR HY000: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
CHANGE MASTER TO MASTER_HOST= 'MASTER_HOST', MASTER_USER= 'MASTER_USER', MASTER_PORT= MASTER_PORT;
include/start_slave.inc
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_to_stmt.result b/mysql-test/suite/rpl/r/rpl_row_to_stmt.result
new file mode 100644
index 00000000000..2dfa82b0305
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_to_stmt.result
@@ -0,0 +1,28 @@
+include/master-slave.inc
+[connection master]
+use test;
+create table t1 (a int primary key);
+insert into t1 values (1),(2),(3),(4),(5);
+update t1 set a=a*10;
+use test;
+select * from t1;
+a
+10
+20
+30
+40
+50
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Gtid # # GTID #-#-#
+slave-bin.000001 # Query # # use `test`; create table t1 (a int primary key)
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+drop table t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_triggers_sbr.result b/mysql-test/suite/rpl/r/rpl_row_triggers_sbr.result
deleted file mode 100644
index 96197393de9..00000000000
--- a/mysql-test/suite/rpl/r/rpl_row_triggers_sbr.result
+++ /dev/null
@@ -1,14 +0,0 @@
-include/master-slave.inc
-[connection master]
-set binlog_format = row;
-create table t1 (i int);
-create table t2 (i int);
-SET @old_slave_run_triggers_for_rbr= @@global.slave_run_triggers_for_rbr;
-set global slave_run_triggers_for_rbr=YES;
-create trigger tr_before before insert on t1 for each row
-insert into t2 values (1);
-insert into t1 values (1);
-include/wait_for_slave_sql_error_and_skip.inc [errno=1666]
-drop tables t1,t2;
-SET @@global.slave_run_triggers_for_rbr= @old_slave_run_triggers_for_rbr;
-include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
index e5870cec2c9..7eb29085099 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
@@ -47,7 +47,7 @@ include/start_slave.inc
include/stop_slave.inc
reset slave all;
start slave;
-ERROR HY000: The server is not configured as slave; fix in config file or with CHANGE MASTER TO
+ERROR HY000: Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO
CHANGE MASTER TO MASTER_HOST= 'MASTER_HOST', MASTER_USER= 'MASTER_USER', MASTER_PORT= MASTER_PORT;
include/start_slave.inc
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test
index 304816a65d1..7f4d851f95c 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4820.test
@@ -34,7 +34,7 @@ eval SET GLOBAL gtid_slave_pos= '$old_gtid_pos';
--connection server_1
INSERT INTO t1 VALUES (4);
---save_master_pos
+--source include/save_master_gtid.inc
--connection server_2
SET sql_log_bin= 0;
@@ -48,7 +48,7 @@ STOP SLAVE SQL_THREAD;
eval SET GLOBAL gtid_slave_pos= '$old_gtid_pos';
--source include/start_slave.inc
---sync_with_master
+--source include/sync_with_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
--source include/stop_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug30888.opt b/mysql-test/suite/rpl/t/rpl_innodb_bug30888.opt
new file mode 100644
index 00000000000..e6685732d90
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_innodb_bug30888.opt
@@ -0,0 +1 @@
+--innodb-flush-log-at-trx-commit=2
diff --git a/mysql-test/suite/rpl/t/rpl_row_to_stmt-master.opt b/mysql-test/suite/rpl/t/rpl_row_to_stmt-master.opt
new file mode 100644
index 00000000000..83ed8522e72
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_to_stmt-master.opt
@@ -0,0 +1 @@
+--binlog-format=row
diff --git a/mysql-test/suite/rpl/t/rpl_row_to_stmt-slave.opt b/mysql-test/suite/rpl/t/rpl_row_to_stmt-slave.opt
new file mode 100644
index 00000000000..af3a211967b
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_to_stmt-slave.opt
@@ -0,0 +1 @@
+--binlog-format=statement
diff --git a/mysql-test/suite/rpl/t/rpl_row_to_stmt.test b/mysql-test/suite/rpl/t/rpl_row_to_stmt.test
new file mode 100644
index 00000000000..5ca583d881f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_to_stmt.test
@@ -0,0 +1,23 @@
+#
+# check that master starterd with log-format=ROW replication can replicate to
+# slave started with log-format=STATEMENT
+#
+
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+use test;
+
+create table t1 (a int primary key);
+insert into t1 values (1),(2),(3),(4),(5);
+update t1 set a=a*10;
+
+sync_slave_with_master;
+use test;
+select * from t1;
+source include/show_binlog_events.inc;
+
+connection master;
+drop table t1;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_triggers_sbr.test b/mysql-test/suite/rpl/t/rpl_row_triggers_sbr.test
deleted file mode 100644
index a801363b931..00000000000
--- a/mysql-test/suite/rpl/t/rpl_row_triggers_sbr.test
+++ /dev/null
@@ -1,43 +0,0 @@
---source include/have_binlog_format_statement.inc
---source include/have_rbr_triggers.inc
---source include/master-slave.inc
-
---disable_query_log
-CALL mtr.add_suppression("Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT");
---enable_query_log
-
-set binlog_format = row;
-
-create table t1 (i int);
-create table t2 (i int);
-
---sync_slave_with_master
---disable_query_log
-CALL mtr.add_suppression("impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT");
---enable_query_log
-
-SET @old_slave_run_triggers_for_rbr= @@global.slave_run_triggers_for_rbr;
-set global slave_run_triggers_for_rbr=YES;
-
-create trigger tr_before before insert on t1 for each row
- insert into t2 values (1);
-
---connection master
-
-insert into t1 values (1);
-
---connection slave
-
---let $slave_sql_errno= 1666
---source include/wait_for_slave_sql_error_and_skip.inc
-
---connection master
-
-drop tables t1,t2;
-
---sync_slave_with_master
-SET @@global.slave_run_triggers_for_rbr= @old_slave_run_triggers_for_rbr;
-
---connection master
-
---source include/rpl_end.inc
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff
index a775ef28ef3..91ebe8bd820 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff
@@ -1221,8 +1221,8 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
--GLOBAL_VALUE 5.6.26
-+GLOBAL_VALUE 5.6.25-73.1
+-GLOBAL_VALUE 5.6.27
++GLOBAL_VALUE 5.6.26-74.0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
index 2d3a7c07467..74590d94d29 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
@@ -661,8 +661,8 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
--GLOBAL_VALUE 5.6.26
-+GLOBAL_VALUE 5.6.25-73.1
+-GLOBAL_VALUE 5.6.27
++GLOBAL_VALUE 5.6.26-74.0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 1d7d52239ba..f59c821ae48 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -2331,7 +2331,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
-GLOBAL_VALUE 5.6.26
+GLOBAL_VALUE 5.6.27
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/t/explain_non_select.test b/mysql-test/t/explain_non_select.test
index e36fd518b61..d9ff0fb7245 100644
--- a/mysql-test/t/explain_non_select.test
+++ b/mysql-test/t/explain_non_select.test
@@ -208,3 +208,45 @@ INSERT INTO t1 VALUES (1),(2);
EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1;
DROP TABLE t1;
DROP VIEW v1;
+
+--echo #
+--echo # MDEV-8299: MyISAM or Aria table gets corrupted after EXPLAIN INSERT and INSERT
+--echo #
+CREATE TABLE t1 (pk INT NOT NULL AUTO_INCREMENT PRIMARY KEY, i INT, KEY(i)) ENGINE=MyISAM;
+INSERT INTO t1 (i) VALUES (100),(200);
+
+CREATE TABLE t2 (j INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (10),(20);
+
+EXPLAIN INSERT INTO t1 (i) SELECT j FROM t2;
+INSERT INTO t1 (i) VALUES (300);
+CHECK TABLE t1;
+
+DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-8321: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status on EXPLAIN INSERT ... UNION
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+CREATE TABLE t3 (c INT);
+
+# Data is not necessary, tables can be empty as well
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (3),(4);
+INSERT INTO t3 VALUES (5),(6);
+
+EXPLAIN INSERT INTO t1 SELECT * FROM t2 UNION SELECT * FROM t3;
+drop table t1,t2,t3;
+
+--echo #
+--echo # MDEV-6223: Assertion `! is_set()' fails in Diagnostics_area::set_eof_status on EXPLAIN INSERT executed as a PS
+--echo #
+CREATE TABLE t1 (a INT) ENGINE = MyISAM;
+CREATE TABLE t2 (b INT) ENGINE = MyISAM;
+INSERT INTO t2 VALUES (1),(2);
+PREPARE stmt FROM 'EXPLAIN INSERT INTO t1 SELECT * FROM t2';
+EXECUTE stmt;
+drop table t1,t2;
+
diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test
index 2b89a618aa6..dc6749da26f 100644
--- a/mysql-test/t/func_if.test
+++ b/mysql-test/t/func_if.test
@@ -206,6 +206,20 @@ SELECT if(1, NULL, (SELECT min('hello')));
--echo End of 5.2 tests
+--echo #
+--echo # MDEV-8663: IF Statement returns multiple values erroneously
+--echo # (or Assertion `!null_value' failed in Item::send(Protocol*, String*)
+--echo #
+CREATE TABLE `t1` (
+`datas` VARCHAR(25) NOT NULL
+) DEFAULT CHARSET=utf8;
+
+INSERT INTO `t1` VALUES ('1,2'), ('2,3'), ('3,4');
+
+SELECT IF(FIND_IN_SET('1', `datas`), 1.5, IF(FIND_IN_SET('2', `datas`), 2, NULL)) AS `First`, '1' AS `Second`, '2' AS `Third` FROM `t1`;
+
+drop table t1;
+
--disable_query_log
# Restore timezone to default
set time_zone= @@global.time_zone;
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 364266d7f6f..47afb6664a5 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -398,6 +398,209 @@ SELECT GET_LOCK('ul1', NULL);
SELECT GET_LOCK('ul1', -1);
--echo #
+--echo # MDEV-8624 MariaDB hangs on query with many logical condition
+--echo #
+CREATE TABLE `t1` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `submitdate` datetime DEFAULT NULL,
+ `lastpage` int(11) DEFAULT NULL,
+ `startlanguage` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
+ `token` varchar(36) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `datestamp` datetime NOT NULL,
+ `startdate` datetime NOT NULL,
+ `ipaddr` text COLLATE utf8_unicode_ci,
+ `refurl` text COLLATE utf8_unicode_ci,
+ `57813X540X1723` text COLLATE utf8_unicode_ci,
+ `57813X540X1724` text COLLATE utf8_unicode_ci,
+ `57813X540X1725` text COLLATE utf8_unicode_ci,
+ `57813X540X1726` double DEFAULT NULL,
+ `57813X540X1909` double DEFAULT NULL,
+ `57813X541X17271` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X541X17272` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X541X17273` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X541X17274` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X541X17275` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X541X17276` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X541X17281` text COLLATE utf8_unicode_ci,
+ `57813X541X17282` text COLLATE utf8_unicode_ci,
+ `57813X541X17283` text COLLATE utf8_unicode_ci,
+ `57813X541X17284` text COLLATE utf8_unicode_ci,
+ `57813X541X17285` text COLLATE utf8_unicode_ci,
+ `57813X541X17286` text COLLATE utf8_unicode_ci,
+ `57813X542X18131` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18132` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18133` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18134` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18135` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18136` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18137` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18138` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18139` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X542X18141` text COLLATE utf8_unicode_ci,
+ `57813X542X18142` text COLLATE utf8_unicode_ci,
+ `57813X542X18143` text COLLATE utf8_unicode_ci,
+ `57813X542X18144` text COLLATE utf8_unicode_ci,
+ `57813X542X18145` text COLLATE utf8_unicode_ci,
+ `57813X542X18146` text COLLATE utf8_unicode_ci,
+ `57813X542X18147` text COLLATE utf8_unicode_ci,
+ `57813X542X18148` text COLLATE utf8_unicode_ci,
+ `57813X542X18149` text COLLATE utf8_unicode_ci,
+ `57813X543X18451` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X543X18452` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X543X18453` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X543X18454` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X543X18455` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X543X18456` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X543X18461` text COLLATE utf8_unicode_ci,
+ `57813X543X18462` text COLLATE utf8_unicode_ci,
+ `57813X543X18463` text COLLATE utf8_unicode_ci,
+ `57813X543X18464` text COLLATE utf8_unicode_ci,
+ `57813X543X18465` text COLLATE utf8_unicode_ci,
+ `57813X543X18466` text COLLATE utf8_unicode_ci,
+ `57813X544X18711` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X544X18712` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X544X18713` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X544X18714` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X544X18715` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X544X18716` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X544X18717` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X544X18718` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X544X18721` text COLLATE utf8_unicode_ci,
+ `57813X544X18722` text COLLATE utf8_unicode_ci,
+ `57813X544X18723` text COLLATE utf8_unicode_ci,
+ `57813X544X18724` text COLLATE utf8_unicode_ci,
+ `57813X544X18725` text COLLATE utf8_unicode_ci,
+ `57813X544X18726` text COLLATE utf8_unicode_ci,
+ `57813X544X18727` text COLLATE utf8_unicode_ci,
+ `57813X544X18728` text COLLATE utf8_unicode_ci,
+ `57813X546X1902` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X546X1903` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X546X1904` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `57813X545X1901` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `lime_survey_57813_idx` (`token`),
+ KEY `57813X540X1723` (`57813X540X1723`(100)),
+ KEY `57813X540X1724` (`57813X540X1724`(100)),
+ KEY `57813X540X1726` (`57813X540X1726`),
+ KEY `57813X540X1725` (`57813X540X1725`(100)),
+ KEY `57813X546X1902` (`57813X546X1902`),
+ KEY `57813X546X1903` (`57813X546X1903`),
+ KEY `57813X546X1904` (`57813X546X1904`)
+);
+
+SELECT
+COUNT(*) as `N`,
+ROUND(
+ (
+ SUM(
+ (
+ (
+ IF( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99', 57813X541X17271, 0 ) +
+ IF( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99', 57813X541X17272, 0 ) +
+ IF( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99', 57813X541X17273, 0 ) +
+ IF( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99', 57813X541X17274, 0 ) +
+ IF( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99', 57813X541X17275, 0 ) +
+ IF( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99', 57813X541X17276, 0 ) +
+ IF( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99', 57813X542X18131, 0 ) +
+ IF( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99', 57813X542X18132, 0 ) +
+ IF( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99', 57813X542X18133, 0 ) +
+ IF( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99', 57813X542X18134, 0 ) +
+ IF( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99', 57813X542X18135, 0 ) +
+ IF( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99', 57813X542X18136, 0 ) +
+ IF( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99', 57813X542X18137, 0 ) +
+ IF( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99', 57813X542X18138, 0 ) +
+ IF( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99', 57813X542X18139, 0 ) +
+ IF( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99', 57813X543X18451, 0 ) +
+ IF( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99', 57813X543X18452, 0 ) +
+ IF( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99', 57813X543X18453, 0 ) +
+ IF( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99', 57813X543X18454, 0 ) +
+ IF( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99', 57813X543X18455, 0 ) +
+ IF( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99', 57813X543X18456, 0 ) +
+ IF( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99', 57813X544X18711, 0 ) +
+ IF( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99', 57813X544X18712, 0 ) +
+ IF( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99', 57813X544X18713, 0 ) +
+ IF( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99', 57813X544X18714, 0 ) +
+ IF( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99', 57813X544X18715, 0 ) +
+ IF( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99', 57813X544X18716, 0 ) +
+ IF( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99', 57813X544X18717, 0 ) +
+ IF( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99', 57813X544X18718, 0 )
+ )
+ /
+ (
+ IF( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99', 1, 0 ) +
+ IF( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99', 1, 0 ) +
+ IF( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99', 1, 0 ) +
+ IF( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99', 1, 0 ) +
+ IF( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99', 1, 0 ) +
+ IF( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99', 1, 0 ) +
+ IF( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99', 1, 0 ) +
+ IF( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99', 1, 0 ) +
+ IF( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99', 1, 0 ) +
+ IF( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99', 1, 0 ) +
+ IF( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99', 1, 0 ) +
+ IF( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99', 1, 0 ) +
+ IF( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99', 1, 0 ) +
+ IF( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99', 1, 0 ) +
+ IF( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99', 1, 0 ) +
+ IF( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99', 1, 0 ) +
+ IF( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99', 1, 0 ) +
+ IF( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99', 1, 0 ) +
+ IF( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99', 1, 0 ) +
+ IF( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99', 1, 0 ) +
+ IF( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99', 1, 0 ) +
+ IF( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99', 1, 0 ) +
+ IF( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99', 1, 0 ) +
+ IF( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99', 1, 0 ) +
+ IF( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99', 1, 0 ) +
+ IF( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99', 1, 0 ) +
+ IF( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99', 1, 0 ) +
+ IF( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99', 1, 0 ) +
+ IF( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99', 1, 0 )
+ )
+ )
+ )
+ / COUNT(*) ), 4) as `AVG`
+FROM `t1`
+WHERE `submitdate` IS NOT NULL
+AND (
+ ( 57813X541X17271 IS NOT NULL AND 57813X541X17271 != '' AND 57813X541X17271 != '99' ) OR
+ ( 57813X541X17272 IS NOT NULL AND 57813X541X17272 != '' AND 57813X541X17272 != '99' ) OR
+ ( 57813X541X17273 IS NOT NULL AND 57813X541X17273 != '' AND 57813X541X17273 != '99' ) OR
+ ( 57813X541X17274 IS NOT NULL AND 57813X541X17274 != '' AND 57813X541X17274 != '99' ) OR
+ ( 57813X541X17275 IS NOT NULL AND 57813X541X17275 != '' AND 57813X541X17275 != '99' ) OR
+ ( 57813X541X17276 IS NOT NULL AND 57813X541X17276 != '' AND 57813X541X17276 != '99' ) OR
+ ( 57813X542X18131 IS NOT NULL AND 57813X542X18131 != '' AND 57813X542X18131 != '99' ) OR
+ ( 57813X542X18132 IS NOT NULL AND 57813X542X18132 != '' AND 57813X542X18132 != '99' ) OR
+ ( 57813X542X18133 IS NOT NULL AND 57813X542X18133 != '' AND 57813X542X18133 != '99' ) OR
+ ( 57813X542X18134 IS NOT NULL AND 57813X542X18134 != '' AND 57813X542X18134 != '99' ) OR
+ ( 57813X542X18135 IS NOT NULL AND 57813X542X18135 != '' AND 57813X542X18135 != '99' ) OR
+ ( 57813X542X18136 IS NOT NULL AND 57813X542X18136 != '' AND 57813X542X18136 != '99' ) OR
+ ( 57813X542X18137 IS NOT NULL AND 57813X542X18137 != '' AND 57813X542X18137 != '99' ) OR
+ ( 57813X542X18138 IS NOT NULL AND 57813X542X18138 != '' AND 57813X542X18138 != '99' ) OR
+ ( 57813X542X18139 IS NOT NULL AND 57813X542X18139 != '' AND 57813X542X18139 != '99' ) OR
+ ( 57813X543X18451 IS NOT NULL AND 57813X543X18451 != '' AND 57813X543X18451 != '99' ) OR
+ ( 57813X543X18452 IS NOT NULL AND 57813X543X18452 != '' AND 57813X543X18452 != '99' ) OR
+ ( 57813X543X18453 IS NOT NULL AND 57813X543X18453 != '' AND 57813X543X18453 != '99' ) OR
+ ( 57813X543X18454 IS NOT NULL AND 57813X543X18454 != '' AND 57813X543X18454 != '99' ) OR
+ ( 57813X543X18455 IS NOT NULL AND 57813X543X18455 != '' AND 57813X543X18455 != '99' ) OR
+ ( 57813X543X18456 IS NOT NULL AND 57813X543X18456 != '' AND 57813X543X18456 != '99' ) OR
+ ( 57813X544X18711 IS NOT NULL AND 57813X544X18711 != '' AND 57813X544X18711 != '99' ) OR
+ ( 57813X544X18712 IS NOT NULL AND 57813X544X18712 != '' AND 57813X544X18712 != '99' ) OR
+ ( 57813X544X18713 IS NOT NULL AND 57813X544X18713 != '' AND 57813X544X18713 != '99' ) OR
+ ( 57813X544X18714 IS NOT NULL AND 57813X544X18714 != '' AND 57813X544X18714 != '99' ) OR
+ ( 57813X544X18715 IS NOT NULL AND 57813X544X18715 != '' AND 57813X544X18715 != '99' ) OR
+ ( 57813X544X18716 IS NOT NULL AND 57813X544X18716 != '' AND 57813X544X18716 != '99' ) OR
+ ( 57813X544X18717 IS NOT NULL AND 57813X544X18717 != '' AND 57813X544X18717 != '99' ) OR
+ ( 57813X544X18718 IS NOT NULL AND 57813X544X18718 != '' AND 57813X544X18718 != '99' ) )
+AND 57813X540X1723 = 'Test';
+
+drop table t1;
+
+--echo #
+--echo # End of 5.5 tests
+--echo #
+
+--echo #
--echo # GET_LOCK, RELEASE_LOCK, IS_USED_LOCK functions test
--echo #
@@ -574,10 +777,6 @@ select is_free_lock(repeat('a', 193));
--error ER_TOO_LONG_IDENT
select release_lock(repeat('a', 193));
---echo #
---echo # End of 5.5 tests
---echo #
-
--echo
--echo # --
diff --git a/mysql-test/t/information_schema2.test b/mysql-test/t/information_schema2.test
index d577cdc1e4d..9810c5a0aae 100644
--- a/mysql-test/t/information_schema2.test
+++ b/mysql-test/t/information_schema2.test
@@ -8,15 +8,12 @@ select variable_name from information_schema.session_variables where variable_na
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
#
-# information_schema tables inside subqueries, they should not be re-populated
-# (i_s.columns needs to scan i_s itself, creating a tmp table for every i_s
-# table. if it's re-populated, it'll do that multiple times)
+# MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows
#
-create table t1 (a char);
-insert t1 values ('a'),('t'),('z');
-flush status;
-select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1;
-# fix the result in ps-protocol
---replace_result 44 43
-show status like 'created_tmp_tables';
-drop table t1;
+create table t1 (x int);
+create table t2 (x int);
+create table t3 (x int);
+create table t4 AS select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE' ;
+delete from t4 where table_name not in (select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE');
+select * from t4;
+drop table t1, t2, t3, t4;
diff --git a/mysql-test/t/loadxml.test b/mysql-test/t/loadxml.test
index 6faf712b6ce..93e6e82189f 100644
--- a/mysql-test/t/loadxml.test
+++ b/mysql-test/t/loadxml.test
@@ -116,3 +116,17 @@ LOAD XML INFILE '../../std_data/loadxml.dat' INTO TABLE t1
ROWS IDENTIFIED BY '<row>' (a,@b) SET b=concat('!',@b);
SELECT * FROM t1 ORDER BY a;
DROP TABLE t1;
+
+
+--echo #
+--echo # Bug#16171518 LOAD XML DOES NOT HANDLE EMPTY ELEMENTS
+--echo #
+CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 VARCHAR(3), col4 VARCHAR(4));
+LOAD XML INFILE '../../std_data/bug16171518_1.dat' INTO TABLE t1;
+SELECT * FROM t1 ORDER BY col1, col2, col3, col4;
+DROP TABLE t1;
+
+CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 INTEGER);
+LOAD XML INFILE '../../std_data/bug16171518_2.dat' INTO TABLE t1;
+SELECT * FROM t1 ORDER BY col1, col2, col3;
+DROP TABLE t1;
diff --git a/mysql-test/t/lowercase_fs_on.test b/mysql-test/t/lowercase_fs_on.test
new file mode 100644
index 00000000000..6da3ef32a0b
--- /dev/null
+++ b/mysql-test/t/lowercase_fs_on.test
@@ -0,0 +1,38 @@
+#
+# Specific tests for case-insensitive file systems
+# i.e. lower_case_filesystem=ON
+#
+-- source include/have_case_insensitive_file_system.inc
+# Embedded server does not support restarting.
+--source include/not_embedded.inc
+
+--echo #
+--echo # Bug#20198490 : LOWER_CASE_TABLE_NAMES=0 ON WINDOWS LEADS TO PROBLEMS
+--echo #
+
+let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
+
+--error 0,1
+--remove_file $SEARCH_FILE
+
+#Shutdown the server
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--shutdown_server
+--source include/wait_until_disconnected.inc
+
+#Start the server with --lower_case_table_names=0 in Windows.
+--enable_reconnect
+--error 1
+--exec $MYSQLD_CMD --lower_case_table_names=0 > $SEARCH_FILE 2>&1
+
+#Search for the error messege in the server error log.
+let SEARCH_PATTERN= \[ERROR\] The server option \'lower_case_table_names\' is configured to use case sensitive table names but the data directory is on a case-insensitive file system which is an unsupported combination\. Please consider either using a case sensitive file system for your data directory or switching to a case-insensitive table name mode\.;
+--source include/search_pattern_in_file.inc
+
+#Restart the server
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/wait_until_connected_again.inc
+
+#Cleanup
+--error 0,1
+--remove_file $SEARCH_FILE
diff --git a/mysql-test/t/lowercase_table3-master.opt b/mysql-test/t/lowercase_table3-master.opt
deleted file mode 100644
index 9b27aef9bf8..00000000000
--- a/mysql-test/t/lowercase_table3-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---lower_case_table_names=0
diff --git a/mysql-test/t/lowercase_table3.test b/mysql-test/t/lowercase_table3.test
deleted file mode 100644
index f7ca8211288..00000000000
--- a/mysql-test/t/lowercase_table3.test
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Test of force of lower-case-table-names=0
-# (User has case insensitive file system and wants to preserve case of
-# table names)
-#
-
---source include/have_innodb.inc
---source include/have_lowercase0.inc
---source include/have_case_insensitive_file_system.inc
---source include/not_windows.inc
-
-call mtr.add_suppression("Cannot find or open table test/BUG29839 from");
-
---disable_warnings
-DROP TABLE IF EXISTS t1,T1;
---enable_warnings
-
-#
-# This is actually an error, but ok as the user has forced this
-# by using --lower-case-table-names=0
-CREATE TABLE t1 (a INT);
-SELECT * FROM T1;
-FLUSH TABLES;
-DROP TABLE t1;
-
-#
-# InnoDB should in this case be case sensitive
-# Note that this is not true on windows as no this OS, InnoDB is always
-# storing things in lower case.
-#
-
-CREATE TABLE bug29839 (a INT) ENGINE=INNODB;
---error ER_NO_SUCH_TABLE
-SELECT * FROM BUG29839;
-DROP TABLE bug29839;
-
-# End of 4.1 tests
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 11652b3bedf..2b9d1e78219 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -905,13 +905,8 @@ select * from t1;
create view v1 as
select * from v3 where b in (1, 2, 3, 4, 5, 6, 7);
-# Disable warnings since LIMIT warning for unsafe statement if
-# binlog_format = STATEMENT. Note: after BUG#45832, the warning should
-# not be issued.
---disable_warnings
create view v2 as
select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1;
---enable_warnings
--exec $MYSQL_DUMP --skip-comments test
@@ -1781,7 +1776,7 @@ drop table words;
--replace_regex /.*mysqlimport(\.exe)*/mysqlimport/
--replace_result mysqldump.exe mysqldump
--error 1
---exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data/words.dat $MYSQLTEST_VARDIR/std_data/words2.dat 2>&1
+--exec $MYSQL_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data/words.dat $MYSQLTEST_VARDIR/std_data/words2.dat
drop table t1;
drop table t2;
@@ -2460,6 +2455,36 @@ drop table t1, t2;
--echo # End of 5.1 tests
--echo #
+--echo #
+--echo # Bug #20772273 : MYSQLIMPORT --USE-THREADS DOESN'T USE MULTIPLE THREADS
+--echo #
+
+CREATE DATABASE db_20772273;
+USE db_20772273;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1), (2);
+CREATE TABLE t2(a INT);
+INSERT INTO t2 VALUES (3), (4);
+
+SELECT * FROM t1;
+SELECT * FROM t2;
+
+--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ db_20772273
+--exec $MYSQL db_20772273 < $MYSQLTEST_VARDIR/tmp/t1.sql
+--exec $MYSQL db_20772273 < $MYSQLTEST_VARDIR/tmp/t2.sql
+
+# Test mysqlimport with multiple threads
+--exec $MYSQL_IMPORT --silent --use-threads=2 db_20772273 $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
+
+SELECT * FROM t1;
+SELECT * FROM t2;
+
+#Cleanup
+DROP TABLE t1;
+DROP TABLE t2;
+DROP DATABASE db_20772273;
+USE test;
+
#
# MDEV-6091 mysqldump goes in a loop and segfaults if --dump-slave is specified and it cannot connect to the server
#
diff --git a/mysql-test/t/partition_alter.test b/mysql-test/t/partition_alter.test
new file mode 100644
index 00000000000..592d8fdaeaa
--- /dev/null
+++ b/mysql-test/t/partition_alter.test
@@ -0,0 +1,66 @@
+--source include/have_partition.inc
+
+CREATE TABLE `test_data` (
+ `hid` bigint(20) unsigned NOT NULL,
+ `itid` bigint(20) unsigned NOT NULL,
+ `clocktime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `values` double(16,4) NOT NULL,
+ PRIMARY KEY (`hid`,`itid`,`clocktime`)
+ ) ;
+
+INSERT INTO `test_data` (`hid`, `itid`, `clocktime`, `values`) VALUES
+ (1, 1, '2015-03-10 06:25:16', 0.0000),
+ (1, 1, '2015-03-10 06:26:24', 0.0000),
+ (1, 1, '2015-03-10 06:27:32', 0.0000),
+ (1, 1, '2015-03-10 06:28:40', 0.0000),
+ (1, 1, '2015-03-10 06:29:49', 0.0000),
+ (1, 1, '2015-03-10 06:30:57', 0.0000),
+ (1, 1, '2015-03-10 06:32:05', 0.0000),
+ (1, 1, '2015-03-10 06:33:14', 0.0000),
+ (1, 1, '2015-03-10 06:34:22', 0.0000),
+ (1, 1, '2015-03-10 06:35:30', 0.0000),
+ (1, 1, '2015-03-10 06:36:39', 0.0000),
+ (1, 1, '2015-03-10 06:37:47', 0.0000),
+ (1, 1, '2015-03-10 06:38:55', 0.0000),
+ (1, 1, '2015-03-10 06:40:03', 0.0000),
+ (1, 1, '2015-03-10 06:41:09', 0.0000),
+ (1, 1, '2015-03-10 06:42:21', 0.0000),
+ (1, 1, '2015-03-10 06:43:29', 0.0000),
+ (1, 1, '2015-03-10 06:44:37', 0.0000),
+ (1, 1, '2015-03-10 06:45:46', 0.0000),
+ (1, 1, '2015-03-10 06:47:05', 0.0000),
+ (1, 1, '2015-03-10 06:48:21', 0.0000),
+ (1, 1, '2015-03-10 06:49:41', 0.0000),
+ (1, 1, '2015-03-10 06:50:58', 0.0000),
+ (1, 1, '2015-03-10 06:52:08', 0.0000),
+ (1, 1, '2015-03-10 06:53:17', 0.0000),
+ (1, 1, '2015-03-10 06:54:25', 0.0000),
+ (563, 1, '2015-03-17 14:28:28', 0.3125),
+ (563, 1, '2015-03-17 14:29:39', 0.2775),
+ (563, 1, '2015-03-17 14:30:49', 0.2675);
+
+
+CREATE PROCEDURE `create_part_max`()
+ alter table `test_data`
+ partition by range(unix_timestamp(clocktime)) (
+ partition partMAX values less than MAXVALUE
+ );
+
+call create_part_max();
+
+call create_part_max();
+
+drop procedure create_part_max;
+
+prepare stmt from "alter table `test_data`
+ partition by range(unix_timestamp(clocktime)) (
+ partition partMAX values less than MAXVALUE
+ )";
+
+execute stmt;
+execute stmt;
+
+deallocate prepare stmt;
+
+drop table test_data;
+
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index 5396b9e3543..858213b1e30 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -1157,7 +1157,7 @@ subpartition by hash (rand(a+b));
#
# Subpartition by hash, wrong subpartition function
#
---error ER_SUBPARTITION_ERROR
+--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (
a int not null,
b int not null,
diff --git a/mysql-test/t/set_statement.test b/mysql-test/t/set_statement.test
index 13c6d08818b..5d6206335fb 100644
--- a/mysql-test/t/set_statement.test
+++ b/mysql-test/t/set_statement.test
@@ -1040,6 +1040,7 @@ select sql_text from mysql.slow_log;
set global log_output= @save_log_output;
set @@slow_query_log= @save_slow_query_log;
set @@long_query_time= @save_long_query_time;
+truncate table mysql.slow_log;
#
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 8fb9658260b..0a542ac9888 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -53,7 +53,7 @@ SELECT 1 IN (SELECT 1);
SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
-- error ER_WRONG_USAGE
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
--- error ER_WRONG_PARAMETERS_TO_PROCEDURE
+-- error ER_PARSE_ERROR
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
-- error ER_BAD_FIELD_ERROR
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
@@ -5892,3 +5892,77 @@ DROP TABLE t1,t2;
create table t1 (c int);
select exists(select 1 from t1 group by `c` in (select `c` from t1));
drop table t1;
+
+--echo #
+--echo # MDEV-7565: Server crash with Signal 6 (part 2)
+--echo #
+Select
+ (Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+ Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+ ) As `ControlRev`
+From
+(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+Group By TestCase.Revenue, TestCase.TemplateID;
+
+--echo #
+--echo # MDEV-7445:Server crash with Signal 6
+--echo #
+
+--delimiter |
+CREATE PROCEDURE procedure2()
+BEGIN
+ Select
+ (Select Sum(`TestCase`.Revenue) From mysql.slow_log E
+ Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
+ ) As `ControlRev`
+ From
+ (Select 3 as Revenue, 4 as TemplateID) As `TestCase`
+ Group By TestCase.Revenue, TestCase.TemplateID;
+
+END |
+--delimiter ;
+call procedure2();
+call procedure2();
+
+drop procedure procedure2;
+
+
+SELECT
+ (SELECT user FROM mysql.user
+ WHERE h.host in (SELECT host FROM mysql.user)
+ ) AS sq
+FROM mysql.host h GROUP BY h.host;
+
+
+--echo #
+--echo # MDEV-7846:Server crashes in Item_subselect::fix
+--echo #_fields or fails with Thread stack overrun
+--echo #
+CREATE TABLE t1 (column1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (3),(9);
+
+CREATE TABLE t2 (column2 INT) ENGINE=MyISAM;
+
+INSERT INTO t2 VALUES (1),(4);
+
+CREATE TABLE t3 (column3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (6),(8);
+
+CREATE TABLE t4 (column4 INT) ENGINE=MyISAM;
+INSERT INTO t4 VALUES (2),(5);
+
+
+PREPARE stmt FROM "
+SELECT (
+ SELECT MAX( table1.column1 ) AS field1
+ FROM t1 AS table1
+ WHERE table3.column3 IN ( SELECT table2.column2 AS field2 FROM t2 AS table2 )
+) AS sq
+FROM t3 AS table3, t4 AS table4 GROUP BY sq
+";
+
+EXECUTE stmt;
+EXECUTE stmt;
+
+deallocate prepare stmt;
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test
index 09d32966c50..05f9ce39bec 100644
--- a/mysql-test/t/update.test
+++ b/mysql-test/t/update.test
@@ -506,6 +506,21 @@ DROP VIEW v1;
DROP FUNCTION f1;
DROP TABLE t1;
+--echo # Bug #21143080: UPDATE ON VARCHAR AND TEXT COLUMNS PRODUCE INCORRECT
+--echo # RESULTS
+
+CREATE TABLE t1 (a VARCHAR(50), b TEXT, c CHAR(50)) ENGINE=INNODB;
+
+INSERT INTO t1 (a, b, c) VALUES ('start trail', '', 'even longer string');
+UPDATE t1 SET b = a, a = 'inject';
+SELECT a, b FROM t1;
+UPDATE t1 SET b = c, c = 'inject';
+SELECT c, b FROM t1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-3948 Assertion `records_are_comparable(table)' fails in compare_record(const TABLE*) on UPDATE with simple AND condition, index_merge+index_merge_intersection, InnoDB
--echo #
--echo # Verify that UPDATE does the same number of handler_update
--echo # operations, no matter if there is ORDER BY or not.
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index e221a836134..f57025bcccb 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -4752,6 +4752,50 @@ SHOW CREATE VIEW v4;
DROP VIEW v1, v2, v3, v4, v5;
+
+--echo #
+--echo # BUG#19886430: VIEW CREATION WITH NAMED COLUMNS, OVER UNION,
+--echo # IS REJECTED
+
+--echo # Without the patch, reports an error.
+CREATE VIEW v1 (fld1, fld2) AS
+ SELECT 1 AS a, 2 AS b
+ UNION ALL
+ SELECT 1 AS a, 1 AS a;
+
+--echo # The column names are explicitly specified and not duplicates, hence
+--echo # succeeds.
+CREATE VIEW v2 (fld1, fld2) AS
+ SELECT 1 AS a, 2 AS a
+ UNION ALL
+ SELECT 1 AS a, 1 AS a;
+
+--echo # The column name in the first SELECT are not duplicates, hence succeeds.
+CREATE VIEW v3 AS
+ SELECT 1 AS a, 2 AS b
+ UNION ALL
+ SELECT 1 AS a, 1 AS a;
+
+--echo # Should report an error, since the explicitly specified column names are
+--echo # duplicates.
+--error ER_DUP_FIELDNAME
+CREATE VIEW v4 (fld1, fld1) AS
+ SELECT 1 AS a, 2 AS b
+ UNION ALL
+ SELECT 1 AS a, 1 AS a;
+
+--echo # Should report an error, since duplicate column name is specified in the
+--echo # First SELECT.
+--error ER_DUP_FIELDNAME
+CREATE VIEW v4 AS
+ SELECT 1 AS a, 2 AS a
+ UNION ALL
+ SELECT 1 AS a, 1 AS a;
+
+--echo # Cleanup
+DROP VIEW v1, v2, v3;
+
+
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
diff --git a/plugin/file_key_management/file_key_management_plugin.cc b/plugin/file_key_management/file_key_management_plugin.cc
index ffe4b940a4d..970fae9c189 100644
--- a/plugin/file_key_management/file_key_management_plugin.cc
+++ b/plugin/file_key_management/file_key_management_plugin.cc
@@ -16,7 +16,6 @@
#include "parser.h"
#include <mysql/plugin_encryption.h>
-#include <mysqld_error.h>
#include <string.h>
static char* filename;
@@ -166,13 +165,6 @@ struct st_mariadb_encryption file_key_management_plugin= {
static int file_key_management_plugin_init(void *p)
{
- if (!filename || !filename[0])
- {
- my_printf_error(ER_CANT_INITIALIZE_UDF,
- "file_key_management-filename is not set", MYF(0));
- return 1;
- }
-
Parser parser(filename, filekey);
return parser.parse(&keys);
}
diff --git a/plugin/file_key_management/parser.cc b/plugin/file_key_management/parser.cc
index 9204f39326d..28cd981df79 100644
--- a/plugin/file_key_management/parser.cc
+++ b/plugin/file_key_management/parser.cc
@@ -298,8 +298,16 @@ int Parser::parse_line(char **line_ptr, keyentry *key)
char* Parser::read_and_decrypt_file(const char *secret)
{
- int f= my_open(filename, O_RDONLY, MYF(MY_WME));
- if (f < 0)
+ if (!filename || !filename[0])
+ {
+ my_printf_error(EE_CANT_OPEN_STREAM,
+ "file-key-management-filename is not set",
+ MYF(ME_NOREFRESH));
+ goto err0;
+ }
+
+ int f;
+ if ((f= my_open(filename, O_RDONLY, MYF(MY_WME))) < 0)
goto err0;
my_off_t file_size;
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 967e7648f0c..f8f36bfd28b 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -202,8 +202,10 @@ cannot_find_file()
fi
echo
- echo "If you compiled from source, you need to run 'make install' to"
+ echo "If you compiled from source, you need to either run 'make install' to"
echo "copy the software into the correct location ready for operation."
+ echo "If you don't want to do a full install, you can use the --srcddir"
+ echo "option to only install the mysql database and privilege tables"
echo
echo "If you are using a binary release, you must either be at the top"
echo "level of the extracted archive, or pass the --basedir option"
diff --git a/sql/field.h b/sql/field.h
index 6cd435f2bec..b24561d7dd9 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1,6 +1,6 @@
#ifndef FIELD_INCLUDED
#define FIELD_INCLUDED
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
+/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2008, 2015, MariaDB
This program is free software; you can redistribute it and/or modify
@@ -1308,6 +1308,16 @@ public:
/* Hash value */
virtual void hash(ulong *nr, ulong *nr2);
+/**
+ Checks whether a string field is part of write_set.
+
+ @return
+ FALSE - If field is not char/varchar/....
+ - If field is char/varchar/.. and is not part of write set.
+ TRUE - If field is char/varchar/.. and is part of write set.
+*/
+ virtual bool is_updatable() const { return FALSE; }
+
/* Check whether the field can be used as a join attribute in hash join */
virtual bool hash_join_is_possible() { return TRUE; }
virtual bool eq_cmp_as_binary() { return TRUE; }
@@ -1582,6 +1592,14 @@ public:
int store_decimal(const my_decimal *d);
uint32 max_data_length() const;
+
+ bool is_updatable() const
+ {
+ DBUG_ASSERT(table && table->write_set);
+ return bitmap_is_set(table->write_set, field_index);
+ }
+ bool match_collation_to_optimize_range() const { return true; }
+
bool can_optimize_keypart_ref(const Item_bool_func *cond,
const Item *item) const;
bool can_optimize_hash_join(const Item_bool_func *cond,
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 14f2947eba7..0ad8cee0c3b 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -1,7 +1,6 @@
/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates.
- Copyright (c) 2010, 2012, Monty Program Ab
-
+ Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2015, MariaDB
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
@@ -906,15 +905,10 @@ int field_conv_incompatible(Field *to, Field *from)
{ // Be sure the value is stored
Field_blob *blob=(Field_blob*) to;
from->val_str(&blob->value);
- /*
- Copy value if copy_blobs is set, or source is not a string and
- we have a pointer to its internal string conversion buffer.
- */
- if (to->table->copy_blobs ||
- (!blob->value.is_alloced() &&
- from_real_type != MYSQL_TYPE_STRING &&
- from_real_type != MYSQL_TYPE_VARCHAR))
+
+ if (!blob->value.is_alloced() && from->is_updatable())
blob->value.copy();
+
return blob->store(blob->value.ptr(),blob->value.length(),from->charset());
}
if (from_real_type == MYSQL_TYPE_ENUM &&
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 764ca000e99..c968ff6f65e 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1236,9 +1236,36 @@ bool Item_in_optimizer::eval_not_null_tables(uchar *opt_arg)
bool Item_in_optimizer::fix_left(THD *thd)
{
DBUG_ENTER("Item_in_optimizer::fix_left");
- if ((!args[0]->fixed && args[0]->fix_fields(thd, args)) ||
- (!cache && !(cache= Item_cache::get_cache(thd, args[0]))))
+ /*
+ Here we will store pointer on place of main storage of left expression.
+ For usual IN (ALL/ANY) it is subquery left_expr.
+ For other cases (MAX/MIN optimization, non-transformed EXISTS (10.0))
+ it is args[0].
+ */
+ Item **ref0= args;
+ if (args[1]->type() == Item::SUBSELECT_ITEM &&
+ ((Item_subselect *)args[1])->is_in_predicate())
+ {
+ /*
+ left_expr->fix_fields() may cause left_expr to be substituted for
+ another item. (e.g. an Item_field may be changed into Item_ref). This
+ transformation is undone at the end of statement execution (e.g. the
+ Item_ref is deleted). However, Item_in_optimizer::args[0] may keep
+ the pointer to the post-transformation item. Because of that, on the
+ next execution we need to copy args[1]->left_expr again.
+ */
+ ref0= &(((Item_in_subselect *)args[1])->left_expr);
+ args[0]= ((Item_in_subselect *)args[1])->left_expr;
+ }
+ if ((!(*ref0)->fixed && (*ref0)->fix_fields(thd, ref0)) ||
+ (!cache && !(cache= Item_cache::get_cache(thd, *ref0))))
DBUG_RETURN(1);
+ /*
+ During fix_field() expression could be substituted.
+ So we copy changes before use
+ */
+ if (args[0] != (*ref0))
+ args[0]= (*ref0);
DBUG_PRINT("info", ("actual fix fields"));
cache->setup(thd, args[0]);
@@ -1300,6 +1327,16 @@ bool Item_in_optimizer::fix_left(THD *thd)
bool Item_in_optimizer::fix_fields(THD *thd, Item **ref)
{
DBUG_ASSERT(fixed == 0);
+ Item_subselect *sub= 0;
+ uint col;
+
+ /*
+ MAX/MIN optimization can convert the subquery into
+ expr + Item_singlerow_subselect
+ */
+ if (args[1]->type() == Item::SUBSELECT_ITEM)
+ sub= (Item_subselect *)args[1];
+
if (fix_left(thd))
return TRUE;
if (args[0]->maybe_null)
@@ -1307,12 +1344,11 @@ bool Item_in_optimizer::fix_fields(THD *thd, Item **ref)
if (!args[1]->fixed && args[1]->fix_fields(thd, args+1))
return TRUE;
-
- Item_in_subselect * sub= (Item_in_subselect *)args[1];
if (!invisible_mode() &&
- args[0]->cols() != sub->engine->cols())
+ ((sub && ((col= args[0]->cols()) != sub->engine->cols())) ||
+ (!sub && (args[1]->cols() != (col= 1)))))
{
- my_error(ER_OPERAND_COLUMNS, MYF(0), args[0]->cols());
+ my_error(ER_OPERAND_COLUMNS, MYF(0), col);
return TRUE;
}
if (args[1]->maybe_null)
@@ -2469,7 +2505,8 @@ Item_func_if::str_op(String *str)
String *res=arg->val_str(str);
if (res)
res->set_charset(collation.collation);
- null_value=arg->null_value;
+ if ((null_value=arg->null_value))
+ res= NULL;
return res;
}
@@ -2480,7 +2517,8 @@ Item_func_if::decimal_op(my_decimal *decimal_value)
DBUG_ASSERT(fixed == 1);
Item *arg= args[0]->val_bool() ? args[1] : args[2];
my_decimal *value= arg->val_decimal(decimal_value);
- null_value= arg->null_value;
+ if ((null_value= arg->null_value))
+ value= NULL;
return value;
}
diff --git a/sql/item_func.cc b/sql/item_func.cc
index c1df7bd6a6e..f3d3a54561c 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -869,7 +869,7 @@ String *Item_func_hybrid_field_type::val_str(String *str)
case DECIMAL_RESULT:
{
my_decimal decimal_value, *val;
- if (!(val= decimal_op(&decimal_value)))
+ if (!(val= decimal_op_with_null_check(&decimal_value)))
return 0; // null is set
my_decimal_round(E_DEC_FATAL_ERROR, val, decimals, FALSE, val);
str->set_charset(collation.collation);
@@ -895,23 +895,21 @@ String *Item_func_hybrid_field_type::val_str(String *str)
case TIME_RESULT:
{
MYSQL_TIME ltime;
- if (date_op(&ltime,
- field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0) ||
- str->alloc(MAX_DATE_STRING_REP_LENGTH))
- {
- null_value= 1;
+ if (date_op_with_null_check(&ltime) ||
+ (null_value= str->alloc(MAX_DATE_STRING_REP_LENGTH)))
return (String *) 0;
- }
ltime.time_type= mysql_type_to_time_type(field_type());
str->length(my_TIME_to_str(&ltime, const_cast<char*>(str->ptr()), decimals));
str->set_charset(&my_charset_bin);
+ DBUG_ASSERT(!null_value);
return str;
}
case STRING_RESULT:
- return str_op(&str_value);
+ return str_op_with_null_check(&str_value);
case ROW_RESULT:
DBUG_ASSERT(0);
}
+ DBUG_ASSERT(!null_value || (str == NULL));
return str;
}
@@ -924,7 +922,7 @@ double Item_func_hybrid_field_type::val_real()
{
my_decimal decimal_value, *val;
double result;
- if (!(val= decimal_op(&decimal_value)))
+ if (!(val= decimal_op_with_null_check(&decimal_value)))
return 0.0; // null is set
my_decimal2double(E_DEC_FATAL_ERROR, val, &result);
return result;
@@ -939,18 +937,14 @@ double Item_func_hybrid_field_type::val_real()
case TIME_RESULT:
{
MYSQL_TIME ltime;
- if (date_op(&ltime,
- field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0 ))
- {
- null_value= 1;
+ if (date_op_with_null_check(&ltime))
return 0;
- }
ltime.time_type= mysql_type_to_time_type(field_type());
return TIME_to_double(&ltime);
}
case STRING_RESULT:
{
- String *res= str_op(&str_value);
+ String *res= str_op_with_null_check(&str_value);
return res ? double_from_string_with_check(res) : 0.0;
}
case ROW_RESULT:
@@ -967,7 +961,7 @@ longlong Item_func_hybrid_field_type::val_int()
case DECIMAL_RESULT:
{
my_decimal decimal_value, *val;
- if (!(val= decimal_op(&decimal_value)))
+ if (!(val= decimal_op_with_null_check(&decimal_value)))
return 0; // null is set
longlong result;
my_decimal2int(E_DEC_FATAL_ERROR, val, unsigned_flag, &result);
@@ -980,18 +974,14 @@ longlong Item_func_hybrid_field_type::val_int()
case TIME_RESULT:
{
MYSQL_TIME ltime;
- if (date_op(&ltime,
- field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0))
- {
- null_value= 1;
+ if (date_op_with_null_check(&ltime))
return 0;
- }
ltime.time_type= mysql_type_to_time_type(field_type());
return TIME_to_ulonglong(&ltime);
}
case STRING_RESULT:
{
- String *res= str_op(&str_value);
+ String *res= str_op_with_null_check(&str_value);
return res ? longlong_from_string_with_check(res) : 0;
}
case ROW_RESULT:
@@ -1007,28 +997,30 @@ my_decimal *Item_func_hybrid_field_type::val_decimal(my_decimal *decimal_value)
DBUG_ASSERT(fixed == 1);
switch (Item_func_hybrid_field_type::cmp_type()) {
case DECIMAL_RESULT:
- val= decimal_op(decimal_value);
+ val= decimal_op_with_null_check(decimal_value);
break;
case INT_RESULT:
{
longlong result= int_op();
+ if (null_value)
+ return NULL;
int2my_decimal(E_DEC_FATAL_ERROR, result, unsigned_flag, decimal_value);
break;
}
case REAL_RESULT:
{
double result= (double)real_op();
+ if (null_value)
+ return NULL;
double2my_decimal(E_DEC_FATAL_ERROR, result, decimal_value);
break;
}
case TIME_RESULT:
{
MYSQL_TIME ltime;
- if (date_op(&ltime,
- field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0))
+ if (date_op_with_null_check(&ltime))
{
my_decimal_set_zero(decimal_value);
- null_value= 1;
return 0;
}
ltime.time_type= mysql_type_to_time_type(field_type());
@@ -1036,7 +1028,7 @@ my_decimal *Item_func_hybrid_field_type::val_decimal(my_decimal *decimal_value)
}
case STRING_RESULT:
{
- String *res= str_op(&str_value);
+ String *res= str_op_with_null_check(&str_value);
return res ? decimal_from_string_with_check(decimal_value, res) : 0;
}
case ROW_RESULT:
@@ -1054,7 +1046,7 @@ bool Item_func_hybrid_field_type::get_date(MYSQL_TIME *ltime,
case DECIMAL_RESULT:
{
my_decimal value, *res;
- if (!(res= decimal_op(&value)) ||
+ if (!(res= decimal_op_with_null_check(&value)) ||
decimal_to_datetime_with_warn(res, ltime, fuzzydate,
field_name_or_null()))
goto err;
@@ -1086,7 +1078,7 @@ bool Item_func_hybrid_field_type::get_date(MYSQL_TIME *ltime,
{
char buff[40];
String tmp(buff,sizeof(buff), &my_charset_bin),*res;
- if (!(res= str_op(&tmp)) ||
+ if (!(res= str_op_with_null_check(&tmp)) ||
str_to_datetime_with_warn(res->charset(), res->ptr(), res->length(),
ltime, fuzzydate))
goto err;
diff --git a/sql/item_func.h b/sql/item_func.h
index eca798dcaf7..dfd404fbfb7 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -336,17 +336,17 @@ public:
void no_rows_in_result()
{
- bool_func_call_args info;
- info.original_func_item= this;
- info.bool_function= &Item::no_rows_in_result;
- walk(&Item::call_bool_func_processor, FALSE, (uchar*) &info);
+ for (uint i= 0; i < arg_count; i++)
+ {
+ args[i]->no_rows_in_result();
+ }
}
void restore_to_before_no_rows_in_result()
{
- bool_func_call_args info;
- info.original_func_item= this;
- info.bool_function= &Item::restore_to_before_no_rows_in_result;
- walk(&Item::call_bool_func_processor, FALSE, (uchar*) &info);
+ for (uint i= 0; i < arg_count; i++)
+ {
+ args[i]->no_rows_in_result();
+ }
}
void convert_const_compared_to_int_field(THD *thd);
/**
@@ -423,6 +423,32 @@ public:
*/
class Item_func_hybrid_field_type: public Item_hybrid_func
{
+ /*
+ Helper methods to make sure that the result of
+ decimal_op(), str_op() and date_op() is properly synched with null_value.
+ */
+ bool date_op_with_null_check(MYSQL_TIME *ltime)
+ {
+ bool rc= date_op(ltime,
+ field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0);
+ DBUG_ASSERT(!rc ^ null_value);
+ return rc;
+ }
+ String *str_op_with_null_check(String *str)
+ {
+ String *res= str_op(str);
+ DBUG_ASSERT((res != NULL) ^ null_value);
+ return res;
+ }
+ my_decimal *decimal_op_with_null_check(my_decimal *decimal_buffer)
+ {
+ my_decimal *res= decimal_op(decimal_buffer);
+ DBUG_ASSERT((res != NULL) ^ null_value);
+ return res;
+ }
+protected:
+ Item_result cached_result_type;
+
public:
Item_func_hybrid_field_type(THD *thd):
Item_hybrid_func(thd)
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index ddfe90fed59..84c21bf2fad 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -1394,7 +1394,7 @@ Item_in_subselect::Item_in_subselect(THD *thd, Item * left_exp,
{
DBUG_ENTER("Item_in_subselect::Item_in_subselect");
DBUG_PRINT("info", ("in_strategy: %u", (uint)in_strategy));
- left_expr= left_exp;
+ left_expr_orig= left_expr= left_exp;
func= &eq_creator;
init(select_lex, new (thd->mem_root) select_exists_subselect(thd, this));
max_columns= UINT_MAX;
@@ -1417,7 +1417,7 @@ Item_allany_subselect::Item_allany_subselect(THD *thd, Item * left_exp,
Item_in_subselect(thd), func_creator(fc), all(all_arg)
{
DBUG_ENTER("Item_allany_subselect::Item_allany_subselect");
- left_expr= left_exp;
+ left_expr_orig= left_expr= left_exp;
func= func_creator(all_arg);
init(select_lex, new (thd->mem_root) select_exists_subselect(thd, this));
max_columns= 1;
@@ -3083,15 +3083,13 @@ Item_in_subselect::select_in_like_transformer(JOIN *join)
arena= thd->activate_stmt_arena_if_needed(&backup);
if (!optimizer)
{
- result= (!(optimizer= new (thd->mem_root) Item_in_optimizer(thd, left_expr, this)));
- if (result)
+ optimizer= new (thd->mem_root) Item_in_optimizer(thd, left_expr_orig, this);
+ if ((result= !optimizer))
goto out;
}
thd->lex->current_select= current->return_after_parsing();
result= optimizer->fix_left(thd);
- /* fix_fields can change reference to left_expr, we need reassign it */
- left_expr= optimizer->arguments()[0];
thd->lex->current_select= current;
if (changed)
@@ -3158,11 +3156,13 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref)
{
uint outer_cols_num;
List<Item> *inner_cols;
+ char const *save_where= thd->where;
DBUG_ENTER("Item_in_subselect::fix_fields");
if (test_strategy(SUBS_SEMI_JOIN))
DBUG_RETURN( !( (*ref)= new (thd->mem_root) Item_int(thd, 1)) );
+ thd->where= "IN/ALL/ANY subquery";
/*
Check if the outer and inner IN operands match in those cases when we
will not perform IN=>EXISTS transformation. Currently this is when we
@@ -3193,7 +3193,7 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref)
if (outer_cols_num != inner_cols->elements)
{
my_error(ER_OPERAND_COLUMNS, MYF(0), outer_cols_num);
- DBUG_RETURN(TRUE);
+ goto err;
}
if (outer_cols_num > 1)
{
@@ -3203,20 +3203,24 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref)
{
inner_col= inner_col_it++;
if (inner_col->check_cols(left_expr->element_index(i)->cols()))
- DBUG_RETURN(TRUE);
+ goto err;
}
}
}
- if (thd_arg->lex->is_view_context_analysis() &&
- left_expr && !left_expr->fixed &&
+ if (left_expr && !left_expr->fixed &&
left_expr->fix_fields(thd_arg, &left_expr))
- DBUG_RETURN(TRUE);
+ goto err;
else
if (Item_subselect::fix_fields(thd_arg, ref))
- DBUG_RETURN(TRUE);
+ goto err;
fixed= TRUE;
+ thd->where= save_where;
DBUG_RETURN(FALSE);
+
+err:
+ thd->where= save_where;
+ DBUG_RETURN(TRUE);
}
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 27d06d715b5..670d0a66639 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -481,6 +481,12 @@ protected:
Item **having_item);
public:
Item *left_expr;
+ /*
+ Important for PS/SP: left_expr_orig is the item that left_expr originally
+ pointed at. That item is allocated on the statement arena, while
+ left_expr could later be changed to something on the execution arena.
+ */
+ Item *left_expr_orig;
/* Priority of this predicate in the convert-to-semi-join-nest process. */
int sj_convert_priority;
/*
diff --git a/sql/log_event.cc b/sql/log_event.cc
index a2a2b814cf9..544e67fb287 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -308,7 +308,7 @@ public:
~Write_on_release_cache()
{
copy_event_cache_to_file_and_reinit(m_cache, m_file);
- if (m_flags | FLUSH_F)
+ if (m_flags & FLUSH_F)
fflush(m_file);
}
@@ -817,6 +817,15 @@ const char* Log_event::get_type_str(Log_event_type type)
case GTID_EVENT: return "Gtid";
case GTID_LIST_EVENT: return "Gtid_list";
case START_ENCRYPTION_EVENT: return "Start_encryption";
+
+ /* The following is only for mysqlbinlog */
+ case IGNORABLE_LOG_EVENT: return "Ignorable log event";
+ case ROWS_QUERY_LOG_EVENT: return "MySQL Rows_query";
+ case GTID_LOG_EVENT: return "MySQL Gtid";
+ case ANONYMOUS_GTID_LOG_EVENT: return "MySQL Anonymous_Gtid";
+ case PREVIOUS_GTIDS_LOG_EVENT: return "MySQL Previous_gtids";
+ case HEARTBEAT_LOG_EVENT: return "Heartbeat";
+
default: return "Unknown"; /* impossible */
}
}
@@ -1541,9 +1550,11 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
DBUG_PRINT("info", ("binlog_version: %d", fdle->binlog_version));
DBUG_DUMP_EVENT_BUF(buf, event_len);
- /* Check the integrity */
- if (event_len < EVENT_LEN_OFFSET ||
- (uchar)buf[EVENT_TYPE_OFFSET] >= ENUM_END_EVENT)
+ /*
+ Check the integrity; This is needed because handle_slave_io() doesn't
+ check if packet is of proper length.
+ */
+ if (event_len < EVENT_LEN_OFFSET)
{
*error="Sanity check failed"; // Needed to free buffer
DBUG_RETURN(NULL); // general sanity check - will fail on a partial read
@@ -1720,6 +1731,15 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
case DELETE_ROWS_EVENT:
ev = new Delete_rows_log_event(buf, event_len, fdle);
break;
+
+ /* MySQL GTID events are ignored */
+ case GTID_LOG_EVENT:
+ case ANONYMOUS_GTID_LOG_EVENT:
+ case PREVIOUS_GTIDS_LOG_EVENT:
+ ev= new Ignorable_log_event(buf, fdle,
+ get_type_str((Log_event_type) event_type));
+ break;
+
case TABLE_MAP_EVENT:
ev = new Table_map_log_event(buf, event_len, fdle);
break;
@@ -1740,10 +1760,22 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
ev = new Start_encryption_log_event(buf, event_len, fdle);
break;
default:
- DBUG_PRINT("error",("Unknown event code: %d",
- (int) buf[EVENT_TYPE_OFFSET]));
- ev= NULL;
- break;
+ /*
+ Create an object of Ignorable_log_event for unrecognized sub-class.
+ So that SLAVE SQL THREAD will only update the position and continue.
+ */
+ if (uint2korr(buf + FLAGS_OFFSET) & LOG_EVENT_IGNORABLE_F)
+ {
+ ev= new Ignorable_log_event(buf, fdle,
+ get_type_str((Log_event_type) event_type));
+ }
+ else
+ {
+ DBUG_PRINT("error",("Unknown event code: %d",
+ (int) buf[EVENT_TYPE_OFFSET]));
+ ev= NULL;
+ break;
+ }
}
}
@@ -2211,19 +2243,12 @@ log_event_print_value(IO_CACHE *file, const uchar *ptr,
uint precision= meta >> 8;
uint decimals= meta & 0xFF;
uint bin_size= my_decimal_get_binary_size(precision, decimals);
- uint length;
my_decimal dec;
binary2my_decimal(E_DEC_FATAL_ERROR, (uchar*) ptr, &dec,
precision, decimals);
- int i, end;
- char buff[512], *pos;
- pos= buff;
- pos+= sprintf(buff, "%s", dec.sign() ? "-" : "");
- end= ROUND_UP(dec.frac) + ROUND_UP(dec.intg)-1;
- for (i=0; i < end; i++)
- pos+= sprintf(pos, "%09d.", dec.buf[i]);
- pos+= sprintf(pos, "%09d", dec.buf[i]);
- length= (uint) (pos - buff);
+ int length= DECIMAL_MAX_STR_LENGTH;
+ char buff[DECIMAL_MAX_STR_LENGTH + 1];
+ decimal2string(&dec, buff, &length, 0, 0, 0);
my_b_write(file, (uchar*)buff, length);
my_snprintf(typestr, typestr_length, "DECIMAL(%d,%d)",
precision, decimals);
@@ -4890,6 +4915,9 @@ Format_description_log_event(uint8 binlog_ver, const char* server_ver)
post_header_len[HEARTBEAT_LOG_EVENT-1]= 0;
post_header_len[IGNORABLE_LOG_EVENT-1]= 0;
post_header_len[ROWS_QUERY_LOG_EVENT-1]= 0;
+ post_header_len[GTID_LOG_EVENT-1]= 0;
+ post_header_len[ANONYMOUS_GTID_LOG_EVENT-1]= 0;
+ post_header_len[PREVIOUS_GTIDS_LOG_EVENT-1]= 0;
post_header_len[WRITE_ROWS_EVENT-1]= ROWS_HEADER_LEN_V2;
post_header_len[UPDATE_ROWS_EVENT-1]= ROWS_HEADER_LEN_V2;
post_header_len[DELETE_ROWS_EVENT-1]= ROWS_HEADER_LEN_V2;
@@ -12618,6 +12646,52 @@ Incident_log_event::write_data_body()
}
#endif
+Ignorable_log_event::Ignorable_log_event(const char *buf,
+ const Format_description_log_event
+ *descr_event,
+ const char *event_name)
+ :Log_event(buf, descr_event), number((int) (uchar) buf[EVENT_TYPE_OFFSET]),
+ description(event_name)
+{
+ DBUG_ENTER("Ignorable_log_event::Ignorable_log_event");
+ DBUG_VOID_RETURN;
+}
+
+Ignorable_log_event::~Ignorable_log_event()
+{
+}
+
+#ifndef MYSQL_CLIENT
+/* Pack info for its unrecognized ignorable event */
+void Ignorable_log_event::pack_info(THD *thd, Protocol *protocol)
+{
+ char buf[256];
+ size_t bytes;
+ bytes= my_snprintf(buf, sizeof(buf), "# Ignorable event type %d (%s)",
+ number, description);
+ protocol->store(buf, bytes, &my_charset_bin);
+}
+#endif
+
+#ifdef MYSQL_CLIENT
+/* Print for its unrecognized ignorable event */
+void
+Ignorable_log_event::print(FILE *file,
+ PRINT_EVENT_INFO *print_event_info)
+{
+ if (print_event_info->short_form)
+ return;
+
+ print_header(&print_event_info->head_cache, print_event_info, FALSE);
+ my_b_printf(&print_event_info->head_cache, "\tIgnorable\n");
+ my_b_printf(&print_event_info->head_cache,
+ "# Ignorable event type %d (%s)\n", number, description);
+ copy_event_cache_to_file_and_reinit(&print_event_info->head_cache,
+ file);
+}
+#endif
+
+
#ifdef MYSQL_CLIENT
/**
The default values for these variables should be values that are
@@ -12699,4 +12773,25 @@ bool rpl_get_position_info(const char **log_file_name, ulonglong *log_pos,
return TRUE;
#endif
}
+
+/**
+ Check if we should write event to the relay log
+
+ This is used to skip events that is only supported by MySQL
+
+ Return:
+ 0 ok
+ 1 Don't write event
+*/
+
+bool event_that_should_be_ignored(const char *buf)
+{
+ uint event_type= (uchar)buf[EVENT_TYPE_OFFSET];
+ if (event_type == GTID_LOG_EVENT ||
+ event_type == ANONYMOUS_GTID_LOG_EVENT ||
+ event_type == PREVIOUS_GTIDS_LOG_EVENT ||
+ (uint2korr(buf + FLAGS_OFFSET) & LOG_EVENT_IGNORABLE_F))
+ return 1;
+ return 0;
+}
#endif
diff --git a/sql/log_event.h b/sql/log_event.h
index f96075db77d..4d22be61d16 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -207,6 +207,7 @@ class String;
#define EXECUTE_LOAD_QUERY_HEADER_LEN (QUERY_HEADER_LEN + EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN)
#define INCIDENT_HEADER_LEN 2
#define HEARTBEAT_HEADER_LEN 0
+#define IGNORABLE_HEADER_LEN 0
#define ROWS_HEADER_LEN_V2 10
#define ANNOTATE_ROWS_HEADER_LEN 0
#define BINLOG_CHECKPOINT_HEADER_LEN 4
@@ -243,7 +244,7 @@ class String;
to the slave. It is used to increase the thd(max_allowed) for both the
DUMP thread on the master and the SQL/IO thread on the slave.
*/
-#define MAX_MAX_ALLOWED_PACKET 1024*1024*1024
+#define MAX_MAX_ALLOWED_PACKET (1024*1024*1024)
/*
Event header offsets;
@@ -468,6 +469,17 @@ class String;
#define LOG_EVENT_RELAY_LOG_F 0x40
/**
+ @def LOG_EVENT_IGNORABLE_F
+
+ For an event, 'e', carrying a type code, that a slave,
+ 's', does not recognize, 's' will check 'e' for
+ LOG_EVENT_IGNORABLE_F, and if the flag is set, then 'e'
+ is ignored. Otherwise, 's' acknowledges that it has
+ found an unknown event in the relay log.
+*/
+#define LOG_EVENT_IGNORABLE_F 0x80
+
+/**
@def LOG_EVENT_SKIP_REPLICATION_F
Flag set by application creating the event (with @@skip_replication); the
@@ -636,6 +648,11 @@ enum Log_event_type
UPDATE_ROWS_EVENT = 31,
DELETE_ROWS_EVENT = 32,
+ /* MySQL 5.6 GTID events, ignored by MariaDB */
+ GTID_LOG_EVENT= 33,
+ ANONYMOUS_GTID_LOG_EVENT= 34,
+ PREVIOUS_GTIDS_LOG_EVENT= 35,
+
/*
Add new events here - right above this comment!
Existing events (except ENUM_END_EVENT) should never change their numbers
@@ -4814,6 +4831,60 @@ private:
LEX_STRING m_message;
};
+/**
+ @class Ignorable_log_event
+
+ Base class for ignorable log events. Events deriving from
+ this class can be safely ignored by slaves that cannot
+ recognize them. Newer slaves, will be able to read and
+ handle them. This has been designed to be an open-ended
+ architecture, so adding new derived events shall not harm
+ the old slaves that support ignorable log event mechanism
+ (they will just ignore unrecognized ignorable events).
+
+ @note The only thing that makes an event ignorable is that it has
+ the LOG_EVENT_IGNORABLE_F flag set. It is not strictly necessary
+ that ignorable event types derive from Ignorable_log_event; they may
+ just as well derive from Log_event and pass LOG_EVENT_IGNORABLE_F as
+ argument to the Log_event constructor.
+**/
+
+class Ignorable_log_event : public Log_event {
+public:
+ int number;
+ const char *description;
+
+#ifndef MYSQL_CLIENT
+ Ignorable_log_event(THD *thd_arg)
+ :Log_event(thd_arg, LOG_EVENT_IGNORABLE_F, FALSE),
+ number(0), description("internal")
+ {
+ DBUG_ENTER("Ignorable_log_event::Ignorable_log_event");
+ DBUG_VOID_RETURN;
+ }
+#endif
+
+ Ignorable_log_event(const char *buf,
+ const Format_description_log_event *descr_event,
+ const char *event_name);
+ virtual ~Ignorable_log_event();
+
+#ifndef MYSQL_CLIENT
+ void pack_info(THD *, Protocol*);
+#endif
+
+#ifdef MYSQL_CLIENT
+ virtual void print(FILE *file, PRINT_EVENT_INFO *print_event_info);
+#endif
+
+ virtual Log_event_type get_type_code() { return IGNORABLE_LOG_EVENT; }
+
+ virtual bool is_valid() const { return 1; }
+
+ virtual int get_data_size() { return IGNORABLE_HEADER_LEN; }
+};
+
+
static inline bool copy_event_cache_to_file_and_reinit(IO_CACHE *cache,
FILE *file)
{
@@ -4878,6 +4949,7 @@ bool rpl_get_position_info(const char **log_file_name, ulonglong *log_pos,
const char **group_relay_log_name,
ulonglong *relay_log_pos);
+bool event_that_should_be_ignored(const char *buf);
bool event_checksum_test(uchar *buf, ulong event_len, enum_binlog_checksum_alg alg);
enum enum_binlog_checksum_alg get_checksum_alg(const char* buf, ulong len);
extern TYPELIB binlog_checksum_typelib;
diff --git a/sql/log_slow.h b/sql/log_slow.h
index 2ae07da97c3..3ae2060cc27 100644
--- a/sql/log_slow.h
+++ b/sql/log_slow.h
@@ -16,23 +16,23 @@
/* Defining what to log to slow log */
#define LOG_SLOW_VERBOSITY_INIT 0
-#define LOG_SLOW_VERBOSITY_INNODB 1 << 0
-#define LOG_SLOW_VERBOSITY_QUERY_PLAN 1 << 1
-#define LOG_SLOW_VERBOSITY_EXPLAIN 1 << 2
+#define LOG_SLOW_VERBOSITY_INNODB (1 << 0)
+#define LOG_SLOW_VERBOSITY_QUERY_PLAN (1 << 1)
+#define LOG_SLOW_VERBOSITY_EXPLAIN (1 << 2)
#define QPLAN_INIT QPLAN_QC_NO
-#define QPLAN_ADMIN 1 << 0
-#define QPLAN_FILESORT 1 << 1
-#define QPLAN_FILESORT_DISK 1 << 2
-#define QPLAN_FULL_JOIN 1 << 3
-#define QPLAN_FULL_SCAN 1 << 4
-#define QPLAN_QC 1 << 5
-#define QPLAN_QC_NO 1 << 6
-#define QPLAN_TMP_DISK 1 << 7
-#define QPLAN_TMP_TABLE 1 << 8
-#define QPLAN_FILESORT_PRIORITY_QUEUE 1 << 9
+#define QPLAN_ADMIN (1 << 0)
+#define QPLAN_FILESORT (1 << 1)
+#define QPLAN_FILESORT_DISK (1 << 2)
+#define QPLAN_FULL_JOIN (1 << 3)
+#define QPLAN_FULL_SCAN (1 << 4)
+#define QPLAN_QC (1 << 5)
+#define QPLAN_QC_NO (1 << 6)
+#define QPLAN_TMP_DISK (1 << 7)
+#define QPLAN_TMP_TABLE (1 << 8)
+#define QPLAN_FILESORT_PRIORITY_QUEUE (1 << 9)
/* ... */
-#define QPLAN_MAX ((ulong) 1) << 31 /* reserved as placeholder */
+#define QPLAN_MAX (((ulong) 1) << 31) /* reserved as placeholder */
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 881bb2282d4..23b3c210dc7 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -360,7 +360,7 @@ static bool max_long_data_size_used= false;
static bool volatile select_thread_in_use, signal_thread_in_use;
static volatile bool ready_to_exit;
static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0;
-static my_bool opt_short_log_format= 0;
+static my_bool opt_short_log_format= 0, opt_silent_startup= 0;
uint kill_cached_threads;
static uint wake_thread;
ulong max_used_connections;
@@ -386,7 +386,7 @@ static DYNAMIC_ARRAY all_options;
/* Global variables */
bool opt_bin_log, opt_bin_log_used=0, opt_ignore_builtin_innodb= 0;
-my_bool opt_log, debug_assert_if_crashed_table= 0, opt_help= 0, opt_silent= 0;
+my_bool opt_log, debug_assert_if_crashed_table= 0, opt_help= 0;
my_bool disable_log_notes;
static my_bool opt_abort;
ulonglong log_output_options;
@@ -4552,14 +4552,24 @@ static int init_common_variables()
{
if (lower_case_table_names_used)
{
+#if MYSQL_VERSION_ID < 100100
if (global_system_variables.log_warnings)
sql_print_warning("You have forced lower_case_table_names to 0 through "
"a command-line option, even though your file system "
"'%s' is case insensitive. This means that you can "
- "corrupt a MyISAM table by accessing it with "
- "different cases. You should consider changing "
- "lower_case_table_names to 1 or 2",
- mysql_real_data_home);
+ "corrupt your tables if you access them using names "
+ "with different letter case. You should consider "
+ "changing lower_case_table_names to 1 or 2",
+ mysql_real_data_home);
+#else
+ sql_print_error("The server option 'lower_case_table_names' is "
+ "configured to use case sensitive table names but the "
+ "data directory resides on a case-insensitive file system. "
+ "Please use a case sensitive file system for your data "
+ "directory or switch to a case-insensitive table name "
+ "mode.");
+#endif
+ return 1;
}
else
{
@@ -7495,8 +7505,8 @@ struct my_option my_long_options[]=
"Show user and password in SHOW SLAVE HOSTS on this master.",
&opt_show_slave_auth_info, &opt_show_slave_auth_info, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"silent", OPT_SILENT, "Don't print [Note] to log during startup.",
- &opt_silent, &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"silent-startup", OPT_SILENT, "Don't print [Note] to the error log during startup.",
+ &opt_silent_startup, &opt_silent_startup, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip-bdb", OPT_DEPRECATED_OPTION,
"Deprecated option; Exist only for compatibility with old my.cnf files",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -9171,9 +9181,6 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
}
}
break;
- case OPT_SILENT:
- disable_log_notes= opt_silent;
- break;
case OPT_PLUGIN_LOAD:
free_list(opt_plugin_load_list_ptr);
/* fall through */
@@ -9387,6 +9394,8 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
(*argc_ptr)++;
(*argv_ptr)--;
+ disable_log_notes= opt_silent_startup;
+
/*
Options have been parsed. Now some of them need additional special
handling, like custom value checking, checking of incompatibilites
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index a6fb7f7793c..64d476c1327 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2008, 2014, Monty Program Ab.
+/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2008, 2015, MariaDB
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
@@ -2511,6 +2511,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
param.key_parts_end=key_parts;
param.alloced_sel_args= 0;
+ max_key_len++; /* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
if (!(param.min_key= (uchar*)alloc_root(&alloc,max_key_len)) ||
!(param.max_key= (uchar*)alloc_root(&alloc,max_key_len)))
{
@@ -2770,6 +2771,7 @@ bool create_key_parts_for_pseudo_indexes(RANGE_OPT_PARAM *param,
}
}
+ max_key_len++; /* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
if (!(param->min_key= (uchar*)alloc_root(param->mem_root, max_key_len)) ||
!(param->max_key= (uchar*)alloc_root(param->mem_root, max_key_len)))
{
@@ -4039,10 +4041,19 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
key_tree->min_flag |
key_tree->max_flag,
&subpart_iter);
- DBUG_ASSERT(res); /* We can't get "no satisfying subpartitions" */
+ if (res == 0)
+ {
+ /*
+ The only case where we can get "no satisfying subpartitions"
+ returned from the above call is when an error has occurred.
+ */
+ DBUG_ASSERT(range_par->thd->is_error());
+ return 0;
+ }
+
if (res == -1)
goto pop_and_go_right; /* all subpartitions satisfy */
-
+
uint32 subpart_id;
bitmap_clear_all(&ppar->subparts_bitmap);
while ((subpart_id= subpart_iter.get_next(&subpart_iter)) !=
@@ -4370,6 +4381,7 @@ static bool create_partition_index_description(PART_PRUNE_PARAM *ppar)
if (cur_key_len > max_key_len)
max_key_len= cur_key_len;
+ max_key_len++; /* Take into account the "+1" in QUICK_RANGE::QUICK_RANGE */
if (!(range_par->min_key= (uchar*)alloc_root(alloc,max_key_len)) ||
!(range_par->max_key= (uchar*)alloc_root(alloc,max_key_len)))
{
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 9c6784437a7..1566ab43074 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -617,6 +617,18 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
thd->stmt_arena->state != Query_arena::PREPARED)
*/
{
+ SELECT_LEX *current= thd->lex->current_select;
+ thd->lex->current_select= current->return_after_parsing();
+ char const *save_where= thd->where;
+ thd->where= "IN/ALL/ANY subquery";
+
+ bool failure= !in_subs->left_expr->fixed &&
+ in_subs->left_expr->fix_fields(thd, &in_subs->left_expr);
+ thd->lex->current_select= current;
+ thd->where= save_where;
+ if (failure)
+ DBUG_RETURN(-1); /* purecov: deadcode */
+
/*
Check if the left and right expressions have the same # of
columns, i.e. we don't have a case like
@@ -630,18 +642,6 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
my_error(ER_OPERAND_COLUMNS, MYF(0), in_subs->left_expr->cols());
DBUG_RETURN(-1);
}
-
- SELECT_LEX *current= thd->lex->current_select;
- thd->lex->current_select= current->return_after_parsing();
- char const *save_where= thd->where;
- thd->where= "IN/ALL/ANY subquery";
-
- bool failure= !in_subs->left_expr->fixed &&
- in_subs->left_expr->fix_fields(thd, &in_subs->left_expr);
- thd->lex->current_select= current;
- thd->where= save_where;
- if (failure)
- DBUG_RETURN(-1); /* purecov: deadcode */
}
DBUG_PRINT("info", ("Checking if subq can be converted to semi-join"));
@@ -705,6 +705,12 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
if (!optimizer_flag(thd, OPTIMIZER_SWITCH_IN_TO_EXISTS) &&
!optimizer_flag(thd, OPTIMIZER_SWITCH_MATERIALIZATION))
my_error(ER_ILLEGAL_SUBQUERY_OPTIMIZER_SWITCHES, MYF(0));
+ /*
+ Transform each subquery predicate according to its overloaded
+ transformer.
+ */
+ if (subselect->select_transformer(join))
+ DBUG_RETURN(-1);
/*
If the subquery predicate is IN/=ANY, analyse and set all possible
@@ -757,12 +763,6 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
allany_subs->add_strategy(strategy);
}
- /*
- Transform each subquery predicate according to its overloaded
- transformer.
- */
- if (subselect->select_transformer(join))
- DBUG_RETURN(-1);
}
}
DBUG_RETURN(0);
@@ -1597,9 +1597,20 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
{
nested_join->sj_outer_expr_list.push_back(subq_pred->left_expr,
thd->mem_root);
+ /*
+ Create Item_func_eq. Note that
+ 1. this is done on the statement, not execution, arena
+ 2. if it's a PS then this happens only once - on the first execution.
+ On following re-executions, the item will be fix_field-ed normally.
+ 3. Thus it should be created as if it was fix_field'ed, in particular
+ all pointers to items in the execution arena should be protected
+ with thd->change_item_tree
+ */
Item_func_eq *item_eq=
- new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr,
+ new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr_orig,
subq_lex->ref_pointer_array[0]);
+ if (subq_pred->left_expr_orig != subq_pred->left_expr)
+ thd->change_item_tree(item_eq->arguments(), subq_pred->left_expr);
item_eq->in_equality_no= 0;
sj_nest->sj_on_expr= and_items(thd, sj_nest->sj_on_expr, item_eq);
}
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index f16ed0e879e..a92c7686eaf 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -1,4 +1,5 @@
-/* Copyright (c) 2006, 2013, Oracle and/or its affiliates.
+/* Copyright (c) 2006, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2015, MariaDB
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
@@ -69,7 +70,7 @@ partition_info *partition_info::get_clone(THD *thd)
part_clone->subpartitions.empty();
while ((subpart= (subpart_it++)))
{
- partition_element *subpart_clone= new partition_element();
+ partition_element *subpart_clone= new (mem_root) partition_element();
if (!subpart_clone)
{
mem_alloc_error(sizeof(partition_element));
@@ -79,6 +80,41 @@ partition_info *partition_info::get_clone(THD *thd)
part_clone->subpartitions.push_back(subpart_clone, mem_root);
}
clone->partitions.push_back(part_clone, mem_root);
+ part_clone->list_val_list.empty();
+ List_iterator<part_elem_value> list_val_it(part->list_val_list);
+ part_elem_value *new_val_arr=
+ (part_elem_value *)alloc_root(mem_root, sizeof(part_elem_value) *
+ part->list_val_list.elements);
+ if (!new_val_arr)
+ {
+ mem_alloc_error(sizeof(part_elem_value) * part->list_val_list.elements);
+ DBUG_RETURN(NULL);
+ }
+ p_column_list_val *new_colval_arr=
+ (p_column_list_val*)alloc_root(mem_root, sizeof(p_column_list_val) *
+ num_columns *
+ part->list_val_list.elements);
+ if (!new_colval_arr)
+ {
+ mem_alloc_error(sizeof(p_column_list_val) * num_columns *
+ part->list_val_list.elements);
+ DBUG_RETURN(NULL);
+ }
+ part_elem_value *val;
+ while ((val= list_val_it++))
+ {
+ part_elem_value *new_val= new_val_arr++;
+ memcpy(new_val, val, sizeof(part_elem_value));
+ if (!val->null_value)
+ {
+ p_column_list_val *new_colval= new_colval_arr;
+ new_colval_arr+= num_columns;
+ memcpy(new_colval, val->col_val_array,
+ sizeof(p_column_list_val) * num_columns);
+ new_val->col_val_array= new_colval;
+ }
+ part_clone->list_val_list.push_back(new_val, mem_root);
+ }
}
DBUG_RETURN(clone);
}
@@ -1627,15 +1663,22 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type,
{
int err= 0;
+ /* Check for partition expression. */
if (!list_of_part_fields)
{
DBUG_ASSERT(part_expr);
err= part_expr->walk(&Item::check_partition_func_processor, 0,
NULL);
- if (!err && is_sub_partitioned() && !list_of_subpart_fields)
- err= subpart_expr->walk(&Item::check_partition_func_processor, 0,
- NULL);
}
+
+ /* Check for sub partition expression. */
+ if (!err && is_sub_partitioned() && !list_of_subpart_fields)
+ {
+ DBUG_ASSERT(subpart_expr);
+ err= subpart_expr->walk(&Item::check_partition_func_processor, 0,
+ NULL);
+ }
+
if (err)
{
my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0));
diff --git a/sql/slave.cc b/sql/slave.cc
index 6e5bfedf89b..fed171bcc4c 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -5692,6 +5692,11 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
error_msg.append_ulonglong(hb.log_pos);
goto err;
}
+
+ /*
+ Heartbeat events doesn't count in the binlog size, so we don't have to
+ increment mi->master_log_pos
+ */
goto skip_relay_logging;
}
break;
@@ -5972,6 +5977,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
else
if ((s_id == global_system_variables.server_id &&
!mi->rli.replicate_same_server_id) ||
+ event_that_should_be_ignored(buf) ||
/*
the following conjunction deals with IGNORE_SERVER_IDS, if set
If the master is on the ignore list, execution of
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 061a227004f..679bd152a39 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -6894,16 +6894,18 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
for (tl= tables; number-- ; tl= tl->next_global)
{
- sctx= MY_TEST(tl->security_ctx) ? tl->security_ctx : thd->security_ctx;
+ TABLE_LIST *const t_ref=
+ tl->correspondent_table ? tl->correspondent_table : tl;
+ sctx= t_ref->security_ctx ? t_ref->security_ctx : thd->security_ctx;
const ACL_internal_table_access *access=
- get_cached_table_access(&tl->grant.m_internal,
- tl->get_db_name(),
- tl->get_table_name());
+ get_cached_table_access(&t_ref->grant.m_internal,
+ t_ref->get_db_name(),
+ t_ref->get_table_name());
if (access)
{
- switch(access->check(orig_want_access, &tl->grant.privilege))
+ switch(access->check(orig_want_access, &t_ref->grant.privilege))
{
case ACL_INTERNAL_ACCESS_GRANTED:
/*
@@ -6927,26 +6929,26 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
if (!want_access)
continue; // ok
- if (!(~tl->grant.privilege & want_access) ||
- tl->is_anonymous_derived_table() || tl->schema_table)
+ if (!(~t_ref->grant.privilege & want_access) ||
+ t_ref->is_anonymous_derived_table() || t_ref->schema_table)
{
/*
- It is subquery in the FROM clause. VIEW set tl->derived after
+ It is subquery in the FROM clause. VIEW set t_ref->derived after
table opening, but this function always called before table opening.
*/
- if (!tl->referencing_view)
+ if (!t_ref->referencing_view)
{
/*
If it's a temporary table created for a subquery in the FROM
clause, or an INFORMATION_SCHEMA table, drop the request for
a privilege.
*/
- tl->grant.want_privilege= 0;
+ t_ref->grant.want_privilege= 0;
}
continue;
}
- if (is_temporary_table(tl))
+ if (is_temporary_table(t_ref))
{
/*
If this table list element corresponds to a pre-opened temporary
@@ -6954,8 +6956,8 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
Note that during creation of temporary table we still need to check
if user has CREATE_TMP_ACL.
*/
- tl->grant.privilege|= TMP_TABLE_ACLS;
- tl->grant.want_privilege= 0;
+ t_ref->grant.privilege|= TMP_TABLE_ACLS;
+ t_ref->grant.want_privilege= 0;
continue;
}
@@ -6966,20 +6968,20 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
}
grant_table= table_hash_search(sctx->host, sctx->ip,
- tl->get_db_name(),
+ t_ref->get_db_name(),
sctx->priv_user,
- tl->get_table_name(),
+ t_ref->get_table_name(),
FALSE);
if (sctx->priv_role[0])
- grant_table_role= table_hash_search("", NULL, tl->get_db_name(),
+ grant_table_role= table_hash_search("", NULL, t_ref->get_db_name(),
sctx->priv_role,
- tl->get_table_name(),
+ t_ref->get_table_name(),
TRUE);
if (!grant_table && !grant_table_role)
{
- want_access&= ~tl->grant.privilege;
- goto err;
+ want_access&= ~t_ref->grant.privilege;
+ goto err; // No grants
}
/*
@@ -6989,19 +6991,19 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
if (any_combination_will_do)
continue;
- tl->grant.grant_table_user= grant_table; // Remember for column test
- tl->grant.grant_table_role= grant_table_role;
- tl->grant.version= grant_version;
- tl->grant.privilege|= grant_table ? grant_table->privs : 0;
- tl->grant.privilege|= grant_table_role ? grant_table_role->privs : 0;
- tl->grant.want_privilege= ((want_access & COL_ACLS) & ~tl->grant.privilege);
+ t_ref->grant.grant_table_user= grant_table; // Remember for column test
+ t_ref->grant.grant_table_role= grant_table_role;
+ t_ref->grant.version= grant_version;
+ t_ref->grant.privilege|= grant_table ? grant_table->privs : 0;
+ t_ref->grant.privilege|= grant_table_role ? grant_table_role->privs : 0;
+ t_ref->grant.want_privilege= ((want_access & COL_ACLS) & ~t_ref->grant.privilege);
- if (!(~tl->grant.privilege & want_access))
+ if (!(~t_ref->grant.privilege & want_access))
continue;
if ((want_access&= ~((grant_table ? grant_table->cols : 0) |
(grant_table_role ? grant_table_role->cols : 0) |
- tl->grant.privilege)))
+ t_ref->grant.privilege)))
{
goto err; // impossible
}
diff --git a/sql/sql_admin.h b/sql/sql_admin.h
index 77fc41e2ec4..96594fad0cb 100644
--- a/sql/sql_admin.h
+++ b/sql/sql_admin.h
@@ -17,7 +17,7 @@
#define SQL_TABLE_MAINTENANCE_H
/* Must be able to hold ALTER TABLE t PARTITION BY ... KEY ALGORITHM = 1 ... */
-#define SQL_ADMIN_MSG_TEXT_SIZE 128 * 1024
+#define SQL_ADMIN_MSG_TEXT_SIZE (128 * 1024)
bool mysql_assign_to_keycache(THD* thd, TABLE_LIST* table_list,
LEX_STRING *key_cache_name);
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index add5532dfc6..ecceec2cffe 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1137,13 +1137,20 @@ bool close_temporary_tables(THD *thd)
DBUG_RETURN(FALSE);
DBUG_ASSERT(!thd->rgi_slave);
+ /*
+ Ensure we don't have open HANDLERs for tables we are about to close.
+ This is necessary when close_temporary_tables() is called as part
+ of execution of BINLOG statement (e.g. for format description event).
+ */
+ mysql_ha_rm_temporary_tables(thd);
if (!mysql_bin_log.is_open())
{
TABLE *tmp_next;
- for (table= thd->temporary_tables; table; table= tmp_next)
+ for (TABLE *t= thd->temporary_tables; t; t= tmp_next)
{
- tmp_next= table->next;
- close_temporary(table, 1, 1);
+ tmp_next= t->next;
+ mysql_lock_remove(thd, thd->lock, t);
+ close_temporary(t, 1, 1);
}
thd->temporary_tables= 0;
DBUG_RETURN(FALSE);
@@ -1239,6 +1246,7 @@ bool close_temporary_tables(THD *thd)
strlen(table->s->table_name.str));
s_query.append(',');
next= table->next;
+ mysql_lock_remove(thd, thd->lock, table);
close_temporary(table, 1, 1);
}
thd->clear_error();
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 0a0d3ca034e..2e899295d23 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -5514,16 +5514,13 @@ int xid_cache_iterate(THD *thd, my_hash_walk_action action, void *arg)
BINLOG_FORMAT = STATEMENT and at least one table uses a storage
engine limited to row-logging.
- 6. Error: Cannot execute row injection: binlogging impossible since
- BINLOG_FORMAT = STATEMENT.
-
- 7. Warning: Unsafe statement binlogged in statement format since
+ 6. Warning: Unsafe statement binlogged in statement format since
BINLOG_FORMAT = STATEMENT.
In addition, we can produce the following error (not depending on
the variables of the decision diagram):
- 8. Error: Cannot execute statement: binlogging impossible since more
+ 7. Error: Cannot execute statement: binlogging impossible since more
than one engine is involved and at least one engine is
self-logging.
@@ -5802,10 +5799,10 @@ int THD::decide_logging_format(TABLE_LIST *tables)
if (lex->is_stmt_row_injection())
{
/*
- 6. Error: Cannot execute row injection since
- BINLOG_FORMAT = STATEMENT
+ We have to log the statement as row or give an error.
+ Better to accept what master gives us than stopping replication.
*/
- my_error((error= ER_BINLOG_ROW_INJECTION_AND_STMT_MODE), MYF(0));
+ set_current_stmt_binlog_format_row();
}
else if ((flags_write_all_set & HA_BINLOG_STMT_CAPABLE) == 0 &&
sqlcom_can_generate_row_events(this))
@@ -5833,7 +5830,7 @@ int THD::decide_logging_format(TABLE_LIST *tables)
DBUG_PRINT("info", ("binlog_unsafe_warning_flags: 0x%x",
binlog_unsafe_warning_flags));
}
- /* log in statement format! */
+ /* log in statement format (or row if row event)! */
}
/* No statement-only engines and binlog_format != STATEMENT.
I.e., nothing prevents us from row logging if needed. */
diff --git a/sql/sql_const.h b/sql/sql_const.h
index c8bb442376e..f856362f4e5 100644
--- a/sql/sql_const.h
+++ b/sql/sql_const.h
@@ -142,7 +142,7 @@
*/
#define STACK_MIN_SIZE 16000 // Abort if less stack during eval.
-#define STACK_MIN_SIZE_FOR_OPEN 1024*80
+#define STACK_MIN_SIZE_FOR_OPEN (1024*80)
#define STACK_BUFF_ALLOC 352 ///< For stack overrun checks
#ifndef MYSQLD_NET_RETRY_COUNT
#define MYSQLD_NET_RETRY_COUNT 10 ///< Abort read after this many int.
@@ -238,7 +238,7 @@
#define DEFAULT_CONCURRENCY 10
#define DELAYED_LIMIT 100 /**< pause after xxx inserts */
#define DELAYED_QUEUE_SIZE 1000
-#define DELAYED_WAIT_TIMEOUT 5*60 /**< Wait for delayed insert */
+#define DELAYED_WAIT_TIMEOUT (5*60) /**< Wait for delayed insert */
#define MAX_CONNECT_ERRORS 100 ///< errors before disabling host
#define LONG_TIMEOUT ((ulong) 3600L*24L*365L)
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 7dcc6fa0e95..673af54ffeb 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2001, 2013, Oracle and/or its affiliates.
- Copyright (c) 2011, 2013, Monty Program Ab.
+/* Copyright (c) 2001, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2011, 2015, MariaDB
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
@@ -1190,3 +1190,36 @@ void mysql_ha_set_explicit_lock_duration(THD *thd)
DBUG_VOID_RETURN;
}
+
+/**
+ Remove temporary tables from the HANDLER's hash table. The reason
+ for having a separate function, rather than calling
+ mysql_ha_rm_tables() is that it is not always feasible (e.g. in
+ close_temporary_tables) to obtain a TABLE_LIST containing the
+ temporary tables.
+
+ @See close_temporary_tables
+ @param thd Thread identifier.
+*/
+void mysql_ha_rm_temporary_tables(THD *thd)
+{
+ DBUG_ENTER("mysql_ha_rm_temporary_tables");
+
+ TABLE_LIST *tmp_handler_tables= NULL;
+ for (uint i= 0; i < thd->handler_tables_hash.records; i++)
+ {
+ TABLE_LIST *handler_table= reinterpret_cast<TABLE_LIST*>
+ (my_hash_element(&thd->handler_tables_hash, i));
+
+ if (handler_table->table && handler_table->table->s->tmp_table)
+ {
+ handler_table->next_local= tmp_handler_tables;
+ tmp_handler_tables= handler_table;
+ }
+ }
+
+ if (tmp_handler_tables)
+ mysql_ha_rm_tables(thd, tmp_handler_tables);
+
+ DBUG_VOID_RETURN;
+}
diff --git a/sql/sql_handler.h b/sql/sql_handler.h
index 133f553675e..7fe5ae5bba8 100644
--- a/sql/sql_handler.h
+++ b/sql/sql_handler.h
@@ -1,6 +1,8 @@
#ifndef SQL_HANDLER_INCLUDED
#define SQL_HANDLER_INCLUDED
-/* Copyright (C) 2010 Monty Program Ab
+/* Copyright (c) 2006, 2015, Oracle and/or its affiliates.
+ Copyright (C) 2010, 2015, MariaDB
+
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
the Free Software Foundation; version 2 of the License.
@@ -73,6 +75,7 @@ void mysql_ha_flush_tables(THD *thd, TABLE_LIST *all_tables);
void mysql_ha_rm_tables(THD *thd, TABLE_LIST *tables);
void mysql_ha_cleanup(THD *thd);
void mysql_ha_set_explicit_lock_duration(THD *thd);
+void mysql_ha_rm_temporary_tables(THD *thd);
SQL_HANDLER *mysql_ha_read_prepare(THD *thd, TABLE_LIST *tables,
enum enum_ha_read_modes mode, char *keyname,
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 6aa6deaaa08..488826acd70 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2010, 2014, SkySQL Ab.
+ Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2015, MariaDB
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
@@ -3944,15 +3944,35 @@ static TABLE *create_table_from_items(THD *thd,
while ((item=it++))
{
- Create_field *cr_field;
- Field *field= item->create_field_for_create_select(thd, &tmp_table);
- if (!field ||
- !(cr_field= (new (thd->mem_root)
- Create_field(thd, field,
- (item->type() == Item::FIELD_ITEM ?
- ((Item_field *) item)->field :
- (Field *) 0)))))
- DBUG_RETURN(0);
+ Field *tmp_field= item->create_field_for_create_select(thd, &tmp_table);
+
+ if (!tmp_field)
+ DBUG_RETURN(NULL);
+
+ Field *table_field;
+
+ switch (item->type())
+ {
+ /*
+ We have to take into account both the real table's fields and
+ pseudo-fields used in trigger's body. These fields are used
+ to copy defaults values later inside constructor of
+ the class Create_field.
+ */
+ case Item::FIELD_ITEM:
+ case Item::TRIGGER_FIELD_ITEM:
+ table_field= ((Item_field *) item)->field;
+ break;
+ default:
+ table_field= NULL;
+ }
+
+ Create_field *cr_field= new (thd->mem_root)
+ Create_field(thd, tmp_field, table_field);
+
+ if (!cr_field)
+ DBUG_RETURN(NULL);
+
if (item->maybe_null)
cr_field->flags &= ~NOT_NULL_FLAG;
alter_info->create_list.push_back(cr_field, thd->mem_root);
@@ -4042,7 +4062,7 @@ static TABLE *create_table_from_items(THD *thd,
{
if (!thd->is_error()) // CREATE ... IF NOT EXISTS
my_ok(thd); // succeed, but did nothing
- DBUG_RETURN(0);
+ DBUG_RETURN(NULL);
}
DEBUG_SYNC(thd,"create_table_select_before_lock");
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 2870e90ef4d..9cf82c1c6d0 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2010, 2014, SkySQL Ab.
+ Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2015, MariaDB
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
@@ -1999,8 +1999,15 @@ int READ_INFO::read_xml(THD *thd)
break;
case '/': /* close tag */
- level--;
chr= my_tospace(GET);
+ /* Decrease the 'level' only when (i) It's not an */
+ /* (without space) empty tag i.e. <tag/> or, (ii) */
+ /* It is of format <row col="val" .../> */
+ if(chr != '>' || in_tag)
+ {
+ level--;
+ in_tag= false;
+ }
if(chr != '>') /* if this is an empty tag <tag /> */
tag.length(0); /* we should keep tag value */
while(chr != '>' && chr != my_b_EOF)
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 257b5d985bc..d6e5082bae6 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2008, 2014, SkySQL Ab.
+/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+ Copyright (c) 2008, 2015, MariaDB
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
@@ -3998,7 +3998,10 @@ end_with_restore_list:
if (lex->analyze_stmt)
((select_result_interceptor*)sel_result)->disable_my_ok_calls();
- res= handle_select(thd, lex, sel_result, OPTION_SETUP_TABLES_DONE);
+ if (explain)
+ res= mysql_explain_union(thd, &thd->lex->unit, sel_result);
+ else
+ res= handle_select(thd, lex, sel_result, OPTION_SETUP_TABLES_DONE);
/*
Invalidate the table in the query cache if something changed
after unlocking when changes become visible.
@@ -4014,6 +4017,16 @@ end_with_restore_list:
query_cache_invalidate3(thd, first_table, 1);
first_table->next_local= save_table;
}
+ if (explain)
+ {
+ /*
+ sel_result needs to be cleaned up properly.
+ INSERT... SELECT statement will call either send_eof() or
+ abort_result_set(). EXPLAIN doesn't call either, so we need
+ to cleanup manually.
+ */
+ sel_result->abort_result_set();
+ }
delete sel_result;
}
@@ -6404,9 +6417,12 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
for (; i < number && tables != first_not_own_table && tables;
tables= tables->next_global, i++)
{
+ TABLE_LIST *const table_ref= tables->correspondent_table ?
+ tables->correspondent_table : tables;
+
ulong want_access= requirements;
- if (tables->security_ctx)
- sctx= tables->security_ctx;
+ if (table_ref->security_ctx)
+ sctx= table_ref->security_ctx;
else
sctx= backup_ctx;
@@ -6414,26 +6430,26 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
Register access for view underlying table.
Remove SHOW_VIEW_ACL, because it will be checked during making view
*/
- tables->grant.orig_want_privilege= (want_access & ~SHOW_VIEW_ACL);
+ table_ref->grant.orig_want_privilege= (want_access & ~SHOW_VIEW_ACL);
- if (tables->schema_table_reformed)
+ if (table_ref->schema_table_reformed)
{
- if (check_show_access(thd, tables))
+ if (check_show_access(thd, table_ref))
goto deny;
continue;
}
- DBUG_PRINT("info", ("derived: %d view: %d", tables->derived != 0,
- tables->view != 0));
+ DBUG_PRINT("info", ("derived: %d view: %d", table_ref->derived != 0,
+ table_ref->view != 0));
- if (tables->is_anonymous_derived_table())
+ if (table_ref->is_anonymous_derived_table())
continue;
thd->security_ctx= sctx;
- if (check_access(thd, want_access, tables->get_db_name(),
- &tables->grant.privilege,
- &tables->grant.m_internal,
+ if (check_access(thd, want_access, table_ref->get_db_name(),
+ &table_ref->grant.privilege,
+ &table_ref->grant.m_internal,
0, no_errors))
goto deny;
}
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 5cf55d89d3e..86e8febc1f4 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -3075,7 +3075,19 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
if (init_master_info(mi,master_info_file_tmp,relay_log_info_file_tmp, 0,
thread_mask))
slave_errno=ER_MASTER_INFO;
- else if (server_id_supplied && *mi->host)
+ else if (!server_id_supplied)
+ {
+ slave_errno= ER_BAD_SLAVE; net_report= 0;
+ my_message(slave_errno, "Misconfigured slave: server_id was not set; Fix in config file",
+ MYF(0));
+ }
+ else if (!*mi->host)
+ {
+ slave_errno= ER_BAD_SLAVE; net_report= 0;
+ my_message(slave_errno, "Misconfigured slave: MASTER_HOST was not set; Fix in config file or with CHANGE MASTER TO",
+ MYF(0));
+ }
+ else
{
/*
If we will start SQL thread we will care about UNTIL options If
@@ -3169,8 +3181,6 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
relay_log_info_file_tmp,
thread_mask);
}
- else
- slave_errno = ER_BAD_SLAVE;
}
else
{
@@ -3519,7 +3529,8 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
*master_info_added= true;
}
if (global_system_variables.log_warnings > 1)
- sql_print_information("Master: '%.*s' Master_info_file: '%s' "
+ sql_print_information("Master connection name: '%.*s' "
+ "Master_info_file: '%s' "
"Relay_info_file: '%s'",
(int) mi->connection_name.length,
mi->connection_name.str,
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index fff0dc162c6..1949163c87a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -15997,6 +15997,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case Item::FIELD_ITEM:
case Item::DEFAULT_VALUE_ITEM:
case Item::INSERT_VALUE_ITEM:
+ case Item::TRIGGER_FIELD_ITEM:
{
Item_field *field= (Item_field*) item;
bool orig_modify= modify_item;
@@ -18501,6 +18502,10 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
if (return_tab < join->return_tab)
join->return_tab= return_tab;
+ /* check for errors evaluating the condition */
+ if (join->thd->is_error())
+ DBUG_RETURN(NESTED_LOOP_ERROR);
+
if (join->return_tab < join_tab)
DBUG_RETURN(NESTED_LOOP_OK);
/*
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index bcc799dce7e..10d8ed23a46 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -7988,20 +7988,13 @@ bool get_schema_tables_result(JOIN *join,
if (table_list->schema_table && thd->fill_information_schema_tables())
{
/*
- Note, currently I_S tables are filled once per query.
- This needs to be changed if if make_cond_for_info_schema()
- will preserve outer fields (and thus I_S content will depend on
- the outer subquery) - in this new case I_S tables will need to
- be re-populated here.
-
- And in that case, get_all_tables() might be called O(N^2) times
- (in self-join of TABLES, for example) and it will allocate
- table names on THD::mem_root O(N^2) times. To fix it, get_all_tables
- needs to be fixed to use a local memroot, that is reset or destroyed
- between get_all_tables invocations. Or fixed not to allocate
- table names on THD::memroot if these names don't satisfy lookup_field
+ I_S tables only need to be re-populated if make_cond_for_info_schema()
+ preserves outer fields
*/
- const bool is_subselect= false;
+ bool is_subselect= &lex->unit != lex->current_select->master_unit() &&
+ lex->current_select->master_unit()->item &&
+ tab->select_cond &&
+ tab->select_cond->used_tables() & OUTER_REF_TABLE_BIT;
/* A value of 0 indicates a dummy implementation */
if (table_list->schema_table->fill_table == 0)
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 9b05cab6a10..bd2adc3220d 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -11682,9 +11682,19 @@ opt_procedure_clause:
if (add_proc_to_list(lex->thd, item))
MYSQL_YYABORT;
Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+
+ /*
+ PROCEDURE CLAUSE cannot handle subquery as one of its parameter,
+ so set expr_allows_subselect as false to disallow any subqueries
+ further. Reset expr_allows_subselect back to true once the
+ parameters are reduced.
+ */
+ Lex->expr_allows_subselect= false;
}
'(' procedure_list ')'
{
+ /* Subqueries are allowed from now.*/
+ Lex->expr_allows_subselect= true;
$$= true;
}
;
diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc
index 68c032fb67b..e720e43498a 100644
--- a/sql/threadpool_unix.cc
+++ b/sql/threadpool_unix.cc
@@ -1634,7 +1634,7 @@ int tp_get_idle_thread_count()
Delay in microseconds, after which "pool blocked" message is printed.
(30 sec == 30 Mio usec)
*/
-#define BLOCK_MSG_DELAY 30*1000000
+#define BLOCK_MSG_DELAY (30*1000000)
#define MAX_THREADS_REACHED_MSG \
"Threadpool could not create additional thread to handle queries, because the \
diff --git a/sql/unireg.h b/sql/unireg.h
index 7599003566c..10751b6ec93 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -110,36 +110,36 @@
The flag means that we need to process tables only to get necessary data.
Views are not processed.
*/
-#define OPEN_TABLE_ONLY OPEN_FRM_FILE_ONLY*2
+#define OPEN_TABLE_ONLY (OPEN_FRM_FILE_ONLY*2)
/**
This flag is used in function get_all_tables() which fills
I_S tables with data which are retrieved from frm files and storage engine
The flag means that we need to process views only to get necessary data.
Tables are not processed.
*/
-#define OPEN_VIEW_ONLY OPEN_TABLE_ONLY*2
+#define OPEN_VIEW_ONLY (OPEN_TABLE_ONLY*2)
/**
This flag is used in function get_all_tables() which fills
I_S tables with data which are retrieved from frm files and storage engine.
The flag means that we need to open a view using
open_normal_and_derived_tables() function.
*/
-#define OPEN_VIEW_FULL OPEN_VIEW_ONLY*2
+#define OPEN_VIEW_FULL (OPEN_VIEW_ONLY*2)
/**
This flag is used in function get_all_tables() which fills
I_S tables with data which are retrieved from frm files and storage engine.
The flag means that I_S table uses optimization algorithm.
*/
-#define OPTIMIZE_I_S_TABLE OPEN_VIEW_FULL*2
+#define OPTIMIZE_I_S_TABLE (OPEN_VIEW_FULL*2)
/**
This flag is used to instruct tdc_open_view() to check metadata version.
*/
-#define CHECK_METADATA_VERSION OPEN_TRIGGER_ONLY*2
+#define CHECK_METADATA_VERSION (OPEN_TRIGGER_ONLY*2)
/*
The flag means that we need to process trigger files only.
*/
-#define OPEN_TRIGGER_ONLY OPTIMIZE_I_S_TABLE*2
+#define OPEN_TRIGGER_ONLY (OPTIMIZE_I_S_TABLE*2)
#define SC_INFO_LENGTH 4 /* Form format constant */
#define TE_INFO_LENGTH 3
diff --git a/storage/archive/archive_test.c b/storage/archive/archive_test.c
index d01c1e0b22e..bb052b8409c 100644
--- a/storage/archive/archive_test.c
+++ b/storage/archive/archive_test.c
@@ -33,7 +33,7 @@
#define ARCHIVE_ROW_HEADER_SIZE 4
-#define BUFFER_LEN 1024 + ARCHIVE_ROW_HEADER_SIZE
+#define BUFFER_LEN (1024 + ARCHIVE_ROW_HEADER_SIZE)
char test_string[BUFFER_LEN];
diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp
index 3008ca1b8ca..ea287558b44 100644
--- a/storage/connect/tabmul.cpp
+++ b/storage/connect/tabmul.cpp
@@ -123,7 +123,7 @@ PTDB TDBMUL::Duplicate(PGLOBAL g)
bool TDBMUL::InitFileNames(PGLOBAL g)
{
#define PFNZ 4096
-#define FNSZ _MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT
+#define FNSZ (_MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT)
char *pfn[PFNZ];
char *filename;
int rc, n = 0;
diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h
index cfda0eadf3e..a23375cbe58 100644
--- a/storage/federated/ha_federated.h
+++ b/storage/federated/ha_federated.h
@@ -34,7 +34,7 @@
*/
#define HA_FEDERATED_ERROR_WITH_REMOTE_SYSTEM 10000
-#define FEDERATED_QUERY_BUFFER_SIZE STRING_BUFFER_USUAL_SIZE * 5
+#define FEDERATED_QUERY_BUFFER_SIZE (STRING_BUFFER_USUAL_SIZE * 5)
#define FEDERATED_RECORDS_IN_RANGE 2
#define FEDERATED_MAX_KEY_LENGTH 3500 // Same as innodb
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index ee637f7ea3f..feea3b33c5e 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
#
# 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
@@ -40,6 +40,9 @@ IF(UNIX)
ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1)
LINK_LIBRARIES(aio)
ENDIF()
+ IF(HAVE_LIBNUMA)
+ LINK_LIBRARIES(numa)
+ ENDIF()
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*")
ADD_DEFINITIONS("-DUNIV_HPUX")
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX")
@@ -162,6 +165,18 @@ IF(NOT CMAKE_CROSSCOMPILING)
}"
HAVE_IB_GCC_ATOMIC_THREAD_FENCE
)
+ CHECK_C_SOURCE_RUNS(
+ "#include<stdint.h>
+ int main()
+ {
+ unsigned char c;
+
+ __atomic_test_and_set(&c, __ATOMIC_ACQUIRE);
+ __atomic_clear(&c, __ATOMIC_RELEASE);
+ return(0);
+ }"
+ HAVE_IB_GCC_ATOMIC_TEST_AND_SET
+ )
ENDIF()
IF(HAVE_IB_GCC_ATOMIC_BUILTINS)
@@ -184,6 +199,10 @@ IF(HAVE_IB_GCC_ATOMIC_THREAD_FENCE)
ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_THREAD_FENCE=1)
ENDIF()
+IF(HAVE_IB_GCC_ATOMIC_TEST_AND_SET)
+ ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_TEST_AND_SET=1)
+ENDIF()
+
# either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
IF(NOT CMAKE_CROSSCOMPILING)
CHECK_C_SOURCE_RUNS(
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index db23b75edf1..b56b4cac392 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2015, MariaDB Corporation.
@@ -2185,6 +2185,7 @@ btr_cur_optimistic_update(
ulint max_size;
ulint new_rec_size;
ulint old_rec_size;
+ ulint max_ins_size = 0;
dtuple_t* new_entry;
roll_ptr_t roll_ptr;
ulint i;
@@ -2313,6 +2314,10 @@ any_extern:
: (old_rec_size
+ page_get_max_insert_size_after_reorganize(page, 1));
+ if (!page_zip) {
+ max_ins_size = page_get_max_insert_size_after_reorganize(page, 1);
+ }
+
if (!(((max_size >= BTR_CUR_PAGE_REORGANIZE_LIMIT)
&& (max_size >= new_rec_size))
|| (page_get_n_recs(page) <= 1))) {
@@ -2372,12 +2377,15 @@ any_extern:
ut_ad(err == DB_SUCCESS);
func_exit:
- if (page_zip
- && !(flags & BTR_KEEP_IBUF_BITMAP)
+ if (!(flags & BTR_KEEP_IBUF_BITMAP)
&& !dict_index_is_clust(index)
&& page_is_leaf(page)) {
- /* Update the free bits in the insert buffer. */
- ibuf_update_free_bits_zip(block, mtr);
+
+ if (page_zip) {
+ ibuf_update_free_bits_zip(block, mtr);
+ } else {
+ ibuf_update_free_bits_low(block, max_ins_size, mtr);
+ }
}
return(err);
@@ -2512,6 +2520,7 @@ btr_cur_pessimistic_update(
ibool was_first;
ulint n_reserved = 0;
ulint n_ext;
+ ulint max_ins_size = 0;
*offsets = NULL;
*big_rec = NULL;
@@ -2690,6 +2699,10 @@ make_external:
}
}
+ if (!page_zip) {
+ max_ins_size = page_get_max_insert_size_after_reorganize(page, 1);
+ }
+
/* Store state of explicit locks on rec on the page infimum record,
before deleting rec. The page infimum acts as a dummy carrier of the
locks, taking care also of lock releases, before we can move the locks
@@ -2735,13 +2748,18 @@ make_external:
rec_offs_make_valid(
page_cursor->rec, index, *offsets);
}
- } else if (page_zip &&
- !dict_index_is_clust(index)
+ } else if (!dict_index_is_clust(index)
&& page_is_leaf(page)) {
+
/* Update the free bits in the insert buffer.
This is the same block which was skipped by
BTR_KEEP_IBUF_BITMAP. */
- ibuf_update_free_bits_zip(block, mtr);
+ if (page_zip) {
+ ibuf_update_free_bits_zip(block, mtr);
+ } else {
+ ibuf_update_free_bits_low(block, max_ins_size,
+ mtr);
+ }
}
err = DB_SUCCESS;
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 4187640fc42..f900c55792c 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -55,6 +55,10 @@ Created 11/5/1995 Heikki Tuuri
#include "page0zip.h"
#include "srv0mon.h"
#include "buf0checksum.h"
+#ifdef HAVE_LIBNUMA
+#include <numa.h>
+#include <numaif.h>
+#endif // HAVE_LIBNUMA
#include "fil0pagecompress.h"
#include "ha_prototypes.h"
#include "ut0byte.h"
@@ -1151,6 +1155,22 @@ buf_chunk_init(
return(NULL);
}
+#ifdef HAVE_LIBNUMA
+ if (srv_numa_interleave) {
+ int st = mbind(chunk->mem, chunk->mem_size,
+ MPOL_INTERLEAVE,
+ numa_all_nodes_ptr->maskp,
+ numa_all_nodes_ptr->size,
+ MPOL_MF_MOVE);
+ if (st != 0) {
+ ib_logf(IB_LOG_LEVEL_WARN,
+ "Failed to set NUMA memory policy of buffer"
+ " pool page frames to MPOL_INTERLEAVE"
+ " (error: %s).", strerror(errno));
+ }
+ }
+#endif // HAVE_LIBNUMA
+
/* Allocate the block descriptors from
the start of the memory block. */
chunk->blocks = (buf_block_t*) chunk->mem;
@@ -1526,6 +1546,21 @@ buf_pool_init(
ut_ad(n_instances <= MAX_BUFFER_POOLS);
ut_ad(n_instances == srv_buf_pool_instances);
+#ifdef HAVE_LIBNUMA
+ if (srv_numa_interleave) {
+ ib_logf(IB_LOG_LEVEL_INFO,
+ "Setting NUMA memory policy to MPOL_INTERLEAVE");
+ if (set_mempolicy(MPOL_INTERLEAVE,
+ numa_all_nodes_ptr->maskp,
+ numa_all_nodes_ptr->size) != 0) {
+ ib_logf(IB_LOG_LEVEL_WARN,
+ "Failed to set NUMA memory policy to"
+ " MPOL_INTERLEAVE (error: %s).",
+ strerror(errno));
+ }
+ }
+#endif // HAVE_LIBNUMA
+
buf_pool_ptr = (buf_pool_t*) mem_zalloc(
n_instances * sizeof *buf_pool_ptr);
@@ -1546,6 +1581,18 @@ buf_pool_init(
btr_search_sys_create(buf_pool_get_curr_size() / sizeof(void*) / 64);
+#ifdef HAVE_LIBNUMA
+ if (srv_numa_interleave) {
+ ib_logf(IB_LOG_LEVEL_INFO,
+ "Setting NUMA memory policy to MPOL_DEFAULT");
+ if (set_mempolicy(MPOL_DEFAULT, NULL, 0) != 0) {
+ ib_logf(IB_LOG_LEVEL_WARN,
+ "Failed to set NUMA memory policy to"
+ " MPOL_DEFAULT (error: %s).", strerror(errno));
+ }
+ }
+#endif // HAVE_LIBNUMA
+
buf_flush_event = os_event_create();
return(DB_SUCCESS);
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index b8c8cc690aa..8f9feaef77e 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -213,14 +213,6 @@ dict_index_remove_from_cache_low(
dict_index_t* index, /*!< in, own: index */
ibool lru_evict); /*!< in: TRUE if page being evicted
to make room in the table LRU list */
-/**********************************************************************//**
-Removes a table object from the dictionary cache. */
-static
-void
-dict_table_remove_from_cache_low(
-/*=============================*/
- dict_table_t* table, /*!< in, own: table */
- ibool lru_evict); /*!< in: TRUE if evicting from LRU */
#ifdef UNIV_DEBUG
/**********************************************************************//**
Validate the dictionary table LRU list.
@@ -788,6 +780,45 @@ dict_table_get_all_fts_indexes(
return(ib_vector_size(indexes));
}
+/** Store autoinc value when the table is evicted.
+@param[in] table table evicted */
+UNIV_INTERN
+void
+dict_table_autoinc_store(
+ const dict_table_t* table)
+{
+ ut_ad(mutex_own(&dict_sys->mutex));
+
+ if (table->autoinc != 0) {
+ ut_ad(dict_sys->autoinc_map->find(table->id)
+ == dict_sys->autoinc_map->end());
+
+ dict_sys->autoinc_map->insert(
+ std::pair<table_id_t, ib_uint64_t>(
+ table->id, table->autoinc));
+ }
+}
+
+/** Restore autoinc value when the table is loaded.
+@param[in] table table loaded */
+UNIV_INTERN
+void
+dict_table_autoinc_restore(
+ dict_table_t* table)
+{
+ ut_ad(mutex_own(&dict_sys->mutex));
+
+ autoinc_map_t::iterator it;
+ it = dict_sys->autoinc_map->find(table->id);
+
+ if (it != dict_sys->autoinc_map->end()) {
+ table->autoinc = it->second;
+ ut_ad(table->autoinc != 0);
+
+ dict_sys->autoinc_map->erase(it);
+ }
+}
+
/********************************************************************//**
Reads the next autoinc value (== autoinc counter value), 0 if not yet
initialized.
@@ -1090,6 +1121,8 @@ dict_init(void)
mutex_create(dict_foreign_err_mutex_key,
&dict_foreign_err_mutex, SYNC_NO_ORDER_CHECK);
}
+
+ dict_sys->autoinc_map = new autoinc_map_t();
}
/**********************************************************************//**
@@ -1357,6 +1390,8 @@ dict_table_add_to_cache(
UT_LIST_ADD_FIRST(table_LRU, dict_sys->table_non_LRU, table);
}
+ dict_table_autoinc_restore(table);
+
ut_ad(dict_lru_validate());
dict_sys->size += mem_heap_get_size(table->heap)
@@ -2046,7 +2081,6 @@ dict_table_change_id_in_cache(
/**********************************************************************//**
Removes a table object from the dictionary cache. */
-static
void
dict_table_remove_from_cache_low(
/*=============================*/
@@ -2108,6 +2142,10 @@ dict_table_remove_from_cache_low(
ut_ad(dict_lru_validate());
+ if (lru_evict) {
+ dict_table_autoinc_store(table);
+ }
+
if (lru_evict && table->drop_aborted) {
/* Do as dict_table_try_drop_aborted() does. */
@@ -6879,6 +6917,8 @@ dict_close(void)
mutex_free(&dict_foreign_err_mutex);
}
+ delete dict_sys->autoinc_map;
+
mem_free(dict_sys);
dict_sys = NULL;
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 5c9a3a18248..d0afdd7d321 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -7725,7 +7725,7 @@ ha_innobase::write_row(
DBUG_ENTER("ha_innobase::write_row");
- if (srv_read_only_mode) {
+ if (high_level_read_only) {
ib_senderrf(ha_thd(), IB_LOG_LEVEL_WARN, ER_READ_ONLY_MODE);
DBUG_RETURN(HA_ERR_TABLE_READONLY);
} else if (prebuilt->trx != trx) {
@@ -8466,7 +8466,7 @@ ha_innobase::update_row(
ut_a(prebuilt->trx == trx);
- if (srv_read_only_mode) {
+ if (high_level_read_only) {
ib_senderrf(ha_thd(), IB_LOG_LEVEL_WARN, ER_READ_ONLY_MODE);
DBUG_RETURN(HA_ERR_TABLE_READONLY);
} else if (!trx_is_started(trx)) {
@@ -8617,7 +8617,7 @@ ha_innobase::delete_row(
ut_a(prebuilt->trx == trx);
- if (srv_read_only_mode) {
+ if (high_level_read_only) {
ib_senderrf(ha_thd(), IB_LOG_LEVEL_WARN, ER_READ_ONLY_MODE);
DBUG_RETURN(HA_ERR_TABLE_READONLY);
} else if (!trx_is_started(trx)) {
@@ -11603,7 +11603,7 @@ ha_innobase::create(
if (form->s->stored_fields > REC_MAX_N_USER_FIELDS) {
DBUG_RETURN(HA_ERR_TOO_MANY_FIELDS);
- } else if (srv_read_only_mode) {
+ } else if (high_level_read_only) {
DBUG_RETURN(HA_ERR_TABLE_READONLY);
}
@@ -11939,7 +11939,7 @@ ha_innobase::discard_or_import_tablespace(
ut_a(prebuilt->trx->magic_n == TRX_MAGIC_N);
ut_a(prebuilt->trx == thd_to_trx(ha_thd()));
- if (srv_read_only_mode) {
+ if (high_level_read_only) {
DBUG_RETURN(HA_ERR_TABLE_READONLY);
}
@@ -12035,7 +12035,7 @@ ha_innobase::truncate()
DBUG_ENTER("ha_innobase::truncate");
- if (srv_read_only_mode) {
+ if (high_level_read_only) {
DBUG_RETURN(HA_ERR_TABLE_READONLY);
}
@@ -12480,7 +12480,7 @@ ha_innobase::rename_table(
DBUG_ENTER("ha_innobase::rename_table");
- if (srv_read_only_mode) {
+ if (high_level_read_only) {
ib_senderrf(thd, IB_LOG_LEVEL_WARN, ER_READ_ONLY_MODE);
DBUG_RETURN(HA_ERR_TABLE_READONLY);
}
@@ -16587,6 +16587,12 @@ innodb_internal_table_validate(
}
dict_table_close(user_table, FALSE, TRUE);
+
+ DBUG_EXECUTE_IF("innodb_evict_autoinc_table",
+ mutex_enter(&dict_sys->mutex);
+ dict_table_remove_from_cache_low(user_table, TRUE);
+ mutex_exit(&dict_sys->mutex);
+ );
}
return(ret);
@@ -19066,6 +19072,13 @@ static MYSQL_SYSVAR_BOOL(use_native_aio, srv_use_native_aio,
"Use native AIO if supported on this platform.",
NULL, NULL, TRUE);
+#ifdef HAVE_LIBNUMA
+static MYSQL_SYSVAR_BOOL(numa_interleave, srv_numa_interleave,
+ PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
+ "Use NUMA interleave memory policy to allocate InnoDB buffer pool.",
+ NULL, NULL, FALSE);
+#endif // HAVE_LIBNUMA
+
static MYSQL_SYSVAR_BOOL(api_enable_binlog, ib_binlog_enabled,
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
"Enable binlog for applications direct access InnoDB through InnoDB APIs",
@@ -19564,6 +19577,9 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(version),
MYSQL_SYSVAR(use_sys_malloc),
MYSQL_SYSVAR(use_native_aio),
+#ifdef HAVE_LIBNUMA
+ MYSQL_SYSVAR(numa_interleave),
+#endif // HAVE_LIBNUMA
MYSQL_SYSVAR(change_buffering),
MYSQL_SYSVAR(change_buffer_max_size),
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 2cede8cd82c..3ae3e5bfe5e 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -241,7 +241,7 @@ ha_innobase::check_if_supported_inplace_alter(
{
DBUG_ENTER("check_if_supported_inplace_alter");
- if (srv_read_only_mode) {
+ if (high_level_read_only) {
ha_alter_info->unsupported_reason =
innobase_get_err_msg(ER_READ_ONLY_MODE);
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index 6b1856b8187..e804573b81b 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -328,6 +328,21 @@ dict_table_autoinc_initialize(
dict_table_t* table, /*!< in/out: table */
ib_uint64_t value) /*!< in: next value to assign to a row */
__attribute__((nonnull));
+
+/** Store autoinc value when the table is evicted.
+@param[in] table table evicted */
+UNIV_INTERN
+void
+dict_table_autoinc_store(
+ const dict_table_t* table);
+
+/** Restore autoinc value when the table is loaded.
+@param[in] table table loaded */
+UNIV_INTERN
+void
+dict_table_autoinc_restore(
+ dict_table_t* table);
+
/********************************************************************//**
Reads the next autoinc value (== autoinc counter value), 0 if not yet
initialized.
@@ -387,6 +402,15 @@ dict_table_remove_from_cache(
dict_table_t* table) /*!< in, own: table */
__attribute__((nonnull));
/**********************************************************************//**
+Removes a table object from the dictionary cache. */
+UNIV_INTERN
+void
+dict_table_remove_from_cache_low(
+/*=============================*/
+ dict_table_t* table, /*!< in, own: table */
+ ibool lru_evict); /*!< in: TRUE if table being evicted
+ to make room in the table LRU list */
+/**********************************************************************//**
Renames a table object.
@return TRUE if success */
UNIV_INTERN
@@ -1613,6 +1637,8 @@ extern dict_sys_t* dict_sys;
/** the data dictionary rw-latch protecting dict_sys */
extern rw_lock_t dict_operation_lock;
+typedef std::map<table_id_t, ib_uint64_t> autoinc_map_t;
+
/* Dictionary system struct */
struct dict_sys_t{
ib_mutex_t mutex; /*!< mutex protecting the data
@@ -1647,6 +1673,8 @@ struct dict_sys_t{
UT_LIST_BASE_NODE_T(dict_table_t)
table_non_LRU; /*!< List of tables that can't be
evicted from the cache */
+ autoinc_map_t* autoinc_map; /*!< Map to store table id and autoinc
+ when table is evicted */
};
#endif /* !UNIV_HOTBACKUP */
diff --git a/storage/innobase/include/ibuf0ibuf.ic b/storage/innobase/include/ibuf0ibuf.ic
index 21747fdceac..a5df9f7b6b4 100644
--- a/storage/innobase/include/ibuf0ibuf.ic
+++ b/storage/innobase/include/ibuf0ibuf.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
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 the Free Software
@@ -128,7 +128,8 @@ ibuf_should_try(
&& ibuf->max_size != 0
&& !dict_index_is_clust(index)
&& index->table->quiesce == QUIESCE_NONE
- && (ignore_sec_unique || !dict_index_is_unique(index)));
+ && (ignore_sec_unique || !dict_index_is_unique(index))
+ && srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE);
}
/******************************************************************//**
diff --git a/storage/innobase/include/os0sync.h b/storage/innobase/include/os0sync.h
index feb64fb1e41..8e4b4f41aae 100644
--- a/storage/innobase/include/os0sync.h
+++ b/storage/innobase/include/os0sync.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
@@ -38,6 +38,26 @@ Created 9/6/1995 Heikki Tuuri
#include "ut0lst.h"
#include "sync0types.h"
+#if defined __i386__ || defined __x86_64__ || defined _M_IX86 \
+ || defined _M_X64 || defined __WIN__
+
+#define IB_STRONG_MEMORY_MODEL
+
+#endif /* __i386__ || __x86_64__ || _M_IX86 || _M_X64 || __WIN__ */
+
+#ifdef HAVE_WINDOWS_ATOMICS
+typedef LONG lock_word_t; /*!< On Windows, InterlockedExchange operates
+ on LONG variable */
+#elif defined(HAVE_ATOMIC_BUILTINS) && !defined(HAVE_ATOMIC_BUILTINS_BYTE)
+typedef ulint lock_word_t;
+#else
+
+#define IB_LOCK_WORD_IS_BYTE
+
+typedef byte lock_word_t;
+
+#endif /* HAVE_WINDOWS_ATOMICS */
+
#ifdef __WIN__
/** Native event (slow)*/
typedef HANDLE os_native_event_t;
@@ -446,11 +466,61 @@ amount to decrement. */
# define os_atomic_decrement_uint64(ptr, amount) \
os_atomic_decrement(ptr, amount)
-/**********************************************************//**
-Returns the old value of *ptr, atomically sets *ptr to new_val */
-
-# define os_atomic_test_and_set_ulint(ptr, new_val) \
- __sync_lock_test_and_set(ptr, new_val)
+# if defined(HAVE_IB_GCC_ATOMIC_TEST_AND_SET)
+
+/** Do an atomic test-and-set.
+@param[in,out] ptr Memory location to set to non-zero
+@return the previous value */
+inline
+lock_word_t
+os_atomic_test_and_set(volatile lock_word_t* ptr)
+{
+ return(__atomic_test_and_set(ptr, __ATOMIC_ACQUIRE));
+}
+
+/** Do an atomic clear.
+@param[in,out] ptr Memory location to set to zero */
+inline
+void
+os_atomic_clear(volatile lock_word_t* ptr)
+{
+ __atomic_clear(ptr, __ATOMIC_RELEASE);
+}
+
+# elif defined(IB_STRONG_MEMORY_MODEL)
+
+/** Do an atomic test and set.
+@param[in,out] ptr Memory location to set to non-zero
+@return the previous value */
+inline
+lock_word_t
+os_atomic_test_and_set(volatile lock_word_t* ptr)
+{
+ return(__sync_lock_test_and_set(ptr, 1));
+}
+
+/** Do an atomic release.
+
+In theory __sync_lock_release should be used to release the lock.
+Unfortunately, it does not work properly alone. The workaround is
+that more conservative __sync_lock_test_and_set is used instead.
+
+Performance regression was observed at some conditions for Intel
+architecture. Disable release barrier on Intel architecture for now.
+@param[in,out] ptr Memory location to write to
+@return the previous value */
+inline
+lock_word_t
+os_atomic_clear(volatile lock_word_t* ptr)
+{
+ return(__sync_lock_test_and_set(ptr, 0));
+}
+
+# else
+
+# error "Unsupported platform"
+
+# endif /* HAVE_IB_GCC_ATOMIC_TEST_AND_SET */
#if defined(__powerpc__) || defined(__aarch64__)
/*
@@ -548,11 +618,51 @@ amount to decrement. */
# define os_atomic_decrement_uint64(ptr, amount) \
os_atomic_increment_uint64(ptr, -(amount))
-/**********************************************************//**
-Returns the old value of *ptr, atomically sets *ptr to new_val */
-
-# define os_atomic_test_and_set_ulint(ptr, new_val) \
- atomic_swap_ulong(ptr, new_val)
+# ifdef IB_LOCK_WORD_IS_BYTE
+
+/** Do an atomic xchg and set to non-zero.
+@param[in,out] ptr Memory location to set to non-zero
+@return the previous value */
+inline
+lock_word_t
+os_atomic_test_and_set(volatile lock_word_t* ptr)
+{
+ return(atomic_swap_uchar(ptr, 1));
+}
+
+/** Do an atomic xchg and set to zero.
+@param[in,out] ptr Memory location to set to zero
+@return the previous value */
+inline
+lock_word_t
+os_atomic_clear(volatile lock_word_t* ptr)
+{
+ return(atomic_swap_uchar(ptr, 0));
+}
+
+# else
+
+/** Do an atomic xchg and set to non-zero.
+@param[in,out] ptr Memory location to set to non-zero
+@return the previous value */
+inline
+lock_word_t
+os_atomic_test_and_set(volatile lock_word_t* ptr)
+{
+ return(atomic_swap_ulong(ptr, 1));
+}
+
+/** Do an atomic xchg and set to zero.
+@param[in,out] ptr Memory location to set to zero
+@return the previous value */
+inline
+lock_word_t
+os_atomic_clear(volatile lock_word_t* ptr)
+{
+ return(atomic_swap_ulong(ptr, 0));
+}
+
+# endif /* IB_LOCK_WORD_IS_BYTE */
# define os_atomic_test_and_set_byte_acquire(ptr, new_val) \
atomic_swap_uchar(ptr, new_val)
@@ -673,18 +783,27 @@ amount to decrement. There is no atomic substract function on Windows */
(ib_int64_t*) ptr, \
-(ib_int64_t) amount) - amount))
-/**********************************************************//**
-Returns the old value of *ptr, atomically sets *ptr to new_val.
-InterlockedExchange() operates on LONG, and the LONG will be
-clobbered */
-
-# define os_atomic_test_and_set_byte_acquire(ptr, new_val) \
- ((byte) InterlockedExchange(ptr, new_val))
-# define os_atomic_test_and_set_byte_release(ptr, new_val) \
- ((byte) InterlockedExchange(ptr, new_val))
-
-# define os_atomic_test_and_set_ulong(ptr, new_val) \
- InterlockedExchange(ptr, new_val)
+/** Do an atomic test and set.
+InterlockedExchange() operates on LONG, and the LONG will be clobbered
+@param[in,out] ptr Memory location to set to non-zero
+@return the previous value */
+inline
+lock_word_t
+os_atomic_test_and_set(volatile lock_word_t* ptr)
+{
+ return(InterlockedExchange(ptr, 1));
+}
+
+/** Do an atomic release.
+InterlockedExchange() operates on LONG, and the LONG will be clobbered
+@param[in,out] ptr Memory location to set to zero
+@return the previous value */
+inline
+lock_word_t
+os_atomic_clear(volatile lock_word_t* ptr)
+{
+ return(InterlockedExchange(ptr, 0));
+}
# define os_atomic_lock_release_byte(ptr) \
(void) InterlockedExchange(ptr, 0)
@@ -737,7 +856,7 @@ for synchronization */
} while (0);
/** barrier definitions for memory ordering */
-#if defined __i386__ || defined __x86_64__ || defined _M_IX86 || defined _M_X64 || defined __WIN__
+#ifdef IB_STRONG_MEMORY_MODEL
/* Performance regression was observed at some conditions for Intel
architecture. Disable memory barrier for Intel architecture for now. */
# define os_rmb do { } while(0)
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 2ae5f1ea13e..2a055058652 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 2009, Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2015, MariaDB Corporation. All Rights Reserved.
@@ -241,6 +241,9 @@ extern char* srv_arch_dir;
recovery and open all tables in RO mode instead of RW mode. We don't
sync the max trx id to disk either. */
extern my_bool srv_read_only_mode;
+/** Set if InnoDB operates in read-only mode or innodb-force-recovery
+is greater than SRV_FORCE_NO_TRX_UNDO. */
+extern my_bool high_level_read_only;
/** store to its own file each table created by an user; data
dictionary tables are in the system tablespace 0 */
extern my_bool srv_file_per_table;
@@ -271,6 +274,7 @@ OS (provided we compiled Innobase with it in), otherwise we will
use simulated aio we build below with threads.
Currently we support native aio on windows and linux */
extern my_bool srv_use_native_aio;
+extern my_bool srv_numa_interleave;
/* Use trim operation */
extern my_bool srv_use_trim;
@@ -1068,6 +1072,7 @@ struct srv_slot_t{
#else /* !UNIV_HOTBACKUP */
# define srv_use_adaptive_hash_indexes FALSE
# define srv_use_native_aio FALSE
+# define srv_numa_interleave FALSE
# define srv_force_recovery 0UL
# define srv_set_io_thread_op_info(t,info) ((void) 0)
# define srv_reset_io_thread_op_info() ((void) 0)
diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h
index d9c9d7cfbac..c2002de9114 100644
--- a/storage/innobase/include/sync0sync.h
+++ b/storage/innobase/include/sync0sync.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2012, Facebook Inc.
@@ -49,13 +49,6 @@ extern my_bool srv_instrument_semaphores;
extern "C" my_bool timed_mutexes;
#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
-#ifdef HAVE_WINDOWS_ATOMICS
-typedef LONG lock_word_t; /*!< On Windows, InterlockedExchange operates
- on LONG variable */
-#else
-typedef byte lock_word_t;
-#endif
-
#if defined UNIV_PFS_MUTEX || defined UNIV_PFS_RWLOCK
/* By default, buffer mutexes and rwlocks will be excluded from
diff --git a/storage/innobase/include/sync0sync.ic b/storage/innobase/include/sync0sync.ic
index d29932b39a6..85c7f7505cd 100644
--- a/storage/innobase/include/sync0sync.ic
+++ b/storage/innobase/include/sync0sync.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
@@ -74,13 +74,13 @@ Performs an atomic test-and-set instruction to the lock_word field of a
mutex.
@return the previous value of lock_word: 0 or 1 */
UNIV_INLINE
-byte
+lock_word_t
ib_mutex_test_and_set(
-/*===============*/
+/*==================*/
ib_mutex_t* mutex) /*!< in: mutex */
{
#if defined(HAVE_ATOMIC_BUILTINS)
- return(os_atomic_test_and_set_byte_acquire(&mutex->lock_word, 1));
+ return(os_atomic_test_and_set(&mutex->lock_word));
#else
ibool ret;
@@ -95,7 +95,7 @@ ib_mutex_test_and_set(
}
return((byte) ret);
-#endif
+#endif /* HAVE_ATOMIC_BUILTINS */
}
/******************************************************************//**
@@ -108,15 +108,12 @@ mutex_reset_lock_word(
ib_mutex_t* mutex) /*!< in: mutex */
{
#if defined(HAVE_ATOMIC_BUILTINS)
- /* In theory __sync_lock_release should be used to release the lock.
- Unfortunately, it does not work properly alone. The workaround is
- that more conservative __sync_lock_test_and_set is used instead. */
- os_atomic_test_and_set_byte_release(&mutex->lock_word, 0);
+ os_atomic_clear(&mutex->lock_word);
#else
mutex->lock_word = 0;
- os_fast_mutex_unlock_full_barrier(&(mutex->os_fast_mutex));
-#endif
+ os_fast_mutex_unlock(&(mutex->os_fast_mutex));
+#endif /* HAVE_ATOMIC_BUILTINS */
}
/******************************************************************//**
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 8dd97cf0070..a6804c71344 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -45,7 +45,7 @@ Created 1/20/1994 Heikki Tuuri
#define INNODB_VERSION_MAJOR 5
#define INNODB_VERSION_MINOR 6
-#define INNODB_VERSION_BUGFIX 26
+#define INNODB_VERSION_BUGFIX 27
/* The following is the InnoDB version as shown in
SELECT plugin_version FROM information_schema.plugins;
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index ac01752bbb1..12f1ecf3a5a 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -2989,8 +2989,8 @@ lock_rec_inherit_to_gap(
/* If srv_locks_unsafe_for_binlog is TRUE or session is using
READ COMMITTED isolation level, we do not want locks set
by an UPDATE or a DELETE to be inherited as gap type locks. But we
- DO want S-locks set by a consistency constraint to be inherited also
- then. */
+ DO want S-locks/X-locks(taken for replace) set by a consistency
+ constraint to be inherited also then */
for (lock = lock_rec_get_first(block, heap_no);
lock != NULL;
@@ -3000,7 +3000,8 @@ lock_rec_inherit_to_gap(
&& !((srv_locks_unsafe_for_binlog
|| lock->trx->isolation_level
<= TRX_ISO_READ_COMMITTED)
- && lock_get_mode(lock) == LOCK_X)) {
+ && lock_get_mode(lock) ==
+ (lock->trx->duplicates ? LOCK_S : LOCK_X))) {
lock_rec_add_to_queue(
LOCK_REC | LOCK_GAP | lock_get_mode(lock),
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
index 82c90275fb3..fd3646a1691 100644
--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2009, Google Inc.
Copyright (c) 2013, SkySQL Ab. All Rights Reserved.
@@ -3434,11 +3434,7 @@ loop:
lsn = log_sys->lsn;
- ut_ad(srv_force_recovery != SRV_FORCE_NO_LOG_REDO
- || lsn == log_sys->last_checkpoint_lsn + LOG_BLOCK_HDR_SIZE);
-
- if ((srv_force_recovery != SRV_FORCE_NO_LOG_REDO
- && lsn != log_sys->last_checkpoint_lsn)
+ if (lsn != log_sys->last_checkpoint_lsn
#ifdef UNIV_LOG_ARCHIVE
|| (srv_log_archive_on
&& lsn != log_sys->archived_lsn + LOG_BLOCK_HDR_SIZE)
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 44ffe9982e9..3bc5a561292 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -2758,6 +2758,8 @@ row_ins_sec_index_entry_low(
goto func_exit;
}
+ DEBUG_SYNC_C("row_ins_sec_index_entry_dup_locks_created");
+
/* We did not find a duplicate and we have now
locked with s-locks the necessary records to
prevent any insertion of a duplicate by another
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index c615b37a99a..98c01b5b7a2 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -2594,7 +2594,7 @@ all_done:
and be ignored when the operation is unsupported. */
fallocate(index->online_log->fd,
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
- ofs, srv_buf_size);
+ ofs, srv_sort_buf_size);
#endif /* FALLOC_FL_PUNCH_HOLE */
next_mrec = index->online_log->head.block;
@@ -3425,7 +3425,7 @@ all_done:
and be ignored when the operation is unsupported. */
fallocate(index->online_log->fd,
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
- ofs, srv_buf_size);
+ ofs, srv_sort_buf_size);
#endif /* FALLOC_FL_PUNCH_HOLE */
next_mrec = index->online_log->head.block;
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 9dd062f3d37..82346323254 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2015, MariaDB Corporation. All Rights Reserved.
@@ -140,6 +140,9 @@ UNIV_INTERN ulint srv_file_format = 0;
UNIV_FORMAT_MAX + 1 means no checking ie. FALSE. The default is to
set it to the highest format we support. */
UNIV_INTERN ulint srv_max_file_format_at_startup = UNIV_FORMAT_MAX;
+/** Set if InnoDB operates in read-only mode or innodb-force-recovery
+is greater than SRV_FORCE_NO_TRX_UNDO. */
+UNIV_INTERN my_bool high_level_read_only;
#if UNIV_FORMAT_A
# error "UNIV_FORMAT_A must be 0!"
@@ -158,6 +161,7 @@ OS (provided we compiled Innobase with it in), otherwise we will
use simulated aio we build below with threads.
Currently we support native aio on windows and linux */
UNIV_INTERN my_bool srv_use_native_aio = TRUE;
+UNIV_INTERN my_bool srv_numa_interleave = FALSE;
/* If this flag is TRUE, then we will use fallocate(PUCH_HOLE)
to the pages */
@@ -2793,13 +2797,8 @@ srv_do_purge(
}
n_pages_purged = trx_purge(
- n_use_threads, srv_purge_batch_size, false);
-
- if (!(count++ % TRX_SYS_N_RSEGS)) {
- /* Force a truncate of the history list. */
- n_pages_purged += trx_purge(
- 1, srv_purge_batch_size, true);
- }
+ n_use_threads, srv_purge_batch_size,
+ (++count % TRX_SYS_N_RSEGS) == 0);
*n_total_purged += n_pages_purged;
@@ -2992,8 +2991,17 @@ DECLARE_THREAD(srv_purge_coordinator_thread)(
n_pages_purged = trx_purge(1, srv_purge_batch_size, false);
}
- /* Force a truncate of the history list. */
- n_pages_purged = trx_purge(1, srv_purge_batch_size, true);
+ /* This trx_purge is called to remove any undo records (added by
+ background threads) after completion of the above loop. When
+ srv_fast_shutdown != 0, a large batch size can cause significant
+ delay in shutdown ,so reducing the batch size to magic number 20
+ (which was default in 5.5), which we hope will be sufficient to
+ remove all the undo records */
+ const uint temp_batch_size = 20;
+
+ n_pages_purged = trx_purge(1, srv_purge_batch_size <= temp_batch_size
+ ? srv_purge_batch_size : temp_batch_size,
+ true);
ut_a(n_pages_purged == 0 || srv_fast_shutdown != 0);
/* The task queue should always be empty, independent of fast
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 7d5405ec02f..a09dad942da 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -1580,9 +1580,8 @@ innobase_start_or_create_for_mysql(void)
/* This should be initialized early */
ut_init_timer();
- if (srv_force_recovery > SRV_FORCE_NO_TRX_UNDO) {
- srv_read_only_mode = true;
- }
+ high_level_read_only = srv_read_only_mode
+ || srv_force_recovery > SRV_FORCE_NO_TRX_UNDO;
if (srv_read_only_mode) {
ib_logf(IB_LOG_LEVEL_INFO, "Started in read only mode");
diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc
index 81df8062c54..76c8613fdbf 100644
--- a/storage/innobase/trx/trx0sys.cc
+++ b/storage/innobase/trx/trx0sys.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
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 the Free Software
@@ -29,7 +29,10 @@ Created 3/26/1996 Heikki Tuuri
#include "trx0sys.ic"
#endif
-#ifndef UNIV_HOTBACKUP
+#ifdef UNIV_HOTBACKUP
+#include "fsp0types.h"
+
+#else /* !UNIV_HOTBACKUP */
#include "fsp0fsp.h"
#include "mtr0log.h"
#include "mtr0log.h"
@@ -1247,18 +1250,15 @@ trx_sys_read_pertable_file_format_id(
/* get the file format from the page */
ptr = page + 54;
flags = mach_read_from_4(ptr);
- if (flags == 0) {
- /* file format is Antelope */
- *format_id = 0;
- return(TRUE);
- } else if (flags & 1) {
- /* tablespace flags are ok */
- *format_id = (flags / 32) % 128;
- return(TRUE);
- } else {
+
+ if (!fsp_flags_is_valid(flags) {
/* bad tablespace flags */
return(FALSE);
}
+
+ *format_id = FSP_FLAGS_GET_POST_ANTELOPE(flags);
+
+ return(TRUE);
}
diff --git a/storage/maria/ma_blockrec.h b/storage/maria/ma_blockrec.h
index 1c2ba57bf07..3ea1fedf237 100644
--- a/storage/maria/ma_blockrec.h
+++ b/storage/maria/ma_blockrec.h
@@ -57,7 +57,7 @@
/* Number of extents reserved MARIA_BITMAP_BLOCKS to store head part */
#define ELEMENTS_RESERVED_FOR_MAIN_PART 4
/* This is just used to prealloc a dynamic array */
-#define AVERAGE_BLOB_SIZE 1024L*1024L
+#define AVERAGE_BLOB_SIZE (1024L*1024L)
/* Number of pages to store continuous blob parts */
#define BLOB_SEGMENT_MIN_SIZE 128
diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h
index 8b48119390a..336f1170d29 100644
--- a/storage/myisam/myisamdef.h
+++ b/storage/myisam/myisamdef.h
@@ -307,7 +307,7 @@ struct st_myisam_info
int rtree_recursion_depth;
};
-#define USE_WHOLE_KEY HA_MAX_KEY_BUFF*2 /* Use whole key in _mi_search() */
+#define USE_WHOLE_KEY (HA_MAX_KEY_BUFF*2) /* Use whole key in _mi_search() */
#define F_EXTRA_LCK -1
/* bits in opt_flag */
#define MEMMAP_USED 32
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index 29e74271670..dcdd9b90c56 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -225,7 +225,7 @@ maria_declare_plugin(perfschema)
0x0001,
pfs_status_vars,
NULL,
- "5.6.26",
+ "5.6.27",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc
index ea8a04a78ae..58d766f480a 100644
--- a/storage/perfschema/pfs.cc
+++ b/storage/perfschema/pfs.cc
@@ -4832,6 +4832,7 @@ static void end_statement_v1(PSI_statement_locker *locker, void *stmt_da)
memcpy(pfs->m_message_text, da->message(), MYSQL_ERRMSG_SIZE);
pfs->m_message_text[MYSQL_ERRMSG_SIZE]= 0;
pfs->m_sql_errno= da->sql_errno();
+ pfs->m_error_count++;
memcpy(pfs->m_sqlstate, da->get_sqlstate(), SQLSTATE_LENGTH);
break;
case Diagnostics_area::DA_DISABLED:
diff --git a/storage/perfschema/pfs_timer.cc b/storage/perfschema/pfs_timer.cc
index 8c3553db2b2..8348f165e5c 100644
--- a/storage/perfschema/pfs_timer.cc
+++ b/storage/perfschema/pfs_timer.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
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
@@ -125,6 +125,42 @@ void init_timers(void)
*/
/*
+ For WAIT, the cycle timer is used by default. However, it is not available
+ on all architectures. Fall back to the nanosecond timer in this case. It is
+ unlikely that neither cycle nor nanosecond are available, but we continue
+ probing less resolution timers anyway for consistency with other events.
+ */
+
+ if (cycle_to_pico != 0)
+ {
+ /* Normal case. */
+ wait_timer= TIMER_NAME_CYCLE;
+ }
+ else if (nanosec_to_pico != 0)
+ {
+ /* Robustness, no known cases. */
+ wait_timer= TIMER_NAME_NANOSEC;
+ }
+ else if (microsec_to_pico != 0)
+ {
+ /* Robustness, no known cases. */
+ wait_timer= TIMER_NAME_MICROSEC;
+ }
+ else if (millisec_to_pico != 0)
+ {
+ /* Robustness, no known cases. */
+ wait_timer= TIMER_NAME_MILLISEC;
+ }
+ else
+ {
+ /*
+ Will never be reached on any architecture, but must provide a default if
+ no other timers are available.
+ */
+ wait_timer= TIMER_NAME_TICK;
+ }
+
+ /*
For STAGE and STATEMENT, a timer with a fixed frequency is better.
The prefered timer is nanosecond, or lower resolutions.
*/
@@ -174,7 +210,7 @@ void init_timers(void)
else if (millisec_to_pico != 0)
{
/* Robustness, no known cases. */
- idle_timer= TIMER_NAME_MILLISEC;
+ wait_timer= TIMER_NAME_MILLISEC;
}
else if (tick_to_pico != 0)
{
diff --git a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result
index 7e92604d0f5..48f66942bc3 100644
--- a/storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result
+++ b/storage/tokudb/mysql-test/tokudb/r/cluster_filter_hidden.result
@@ -9,7 +9,7 @@ insert into t1 values (4,40,400,4000,40000,400000);
insert into t1 values (5,50,500,5000,50000,500000);
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b NULL NULL NULL; Using index
+1 SIMPLE t1 index NULL b NULL NULL NULL Using index
select * from t1;
a b c d e f
1 10 100 1000 10000 100000
@@ -19,7 +19,7 @@ a b c d e f
5 50 500 5000 50000 500000
explain select * from t1 where b > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index b b NULL NULL NULL Using where; Using index
select * from t1 where b > 0;
a b c d e f
1 10 100 1000 10000 100000
@@ -29,7 +29,7 @@ a b c d e f
5 50 500 5000 50000 500000
explain select * from t1 where d > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index
select * from t1 where d > 0;
a b c d e f
1 10 100 1000 10000 100000
@@ -39,7 +39,7 @@ a b c d e f
5 50 500 5000 50000 500000
explain select a from t1 where d > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index
select a from t1 where d > 0;
a
1
@@ -71,7 +71,7 @@ e f
update t1 set a = a+1, b = b+10;
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b NULL NULL NULL; Using index
+1 SIMPLE t1 index NULL b NULL NULL NULL Using index
select * from t1;
a b c d e f
2 20 100 1000 10000 100000
@@ -81,7 +81,7 @@ a b c d e f
6 60 500 5000 50000 500000
explain select * from t1 where b > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index b b NULL NULL NULL Using where; Using index
select * from t1 where b > 0;
a b c d e f
2 20 100 1000 10000 100000
@@ -91,7 +91,7 @@ a b c d e f
6 60 500 5000 50000 500000
explain select * from t1 where d > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index
select * from t1 where d > 0;
a b c d e f
2 20 100 1000 10000 100000
@@ -101,7 +101,7 @@ a b c d e f
6 60 500 5000 50000 500000
explain select a from t1 where d > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index
select a from t1 where d > 0;
a
2
@@ -133,28 +133,28 @@ e f
delete from t1 where b > 35;
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b NULL NULL NULL; Using index
+1 SIMPLE t1 index NULL b NULL NULL NULL Using index
select * from t1;
a b c d e f
2 20 100 1000 10000 100000
3 30 200 2000 20000 200000
explain select * from t1 where b > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index b b NULL NULL NULL Using where; Using index
select * from t1 where b > 0;
a b c d e f
2 20 100 1000 10000 100000
3 30 200 2000 20000 200000
explain select * from t1 where d > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index
select * from t1 where d > 0;
a b c d e f
2 20 100 1000 10000 100000
3 30 200 2000 20000 200000
explain select a from t1 where d > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 index d d NULL NULL NULL Using where; Using index
select a from t1 where d > 0;
a
2
@@ -175,28 +175,28 @@ alter table t1 drop index b, drop index d;
alter table t1 add key b(b) clustering=yes, add index d(d,a) clustering=yes;
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b NULL NULL NULL; Using index
+1 SIMPLE t1 index NULL b NULL NULL NULL Using index
select * from t1;
a b c d e f
2 20 100 1000 10000 100000
3 30 200 2000 20000 200000
explain select * from t1 where b > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index b b NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 X b b NULL NULL NULL Using where; Using index
select * from t1 where b > 0;
a b c d e f
2 20 100 1000 10000 100000
3 30 200 2000 20000 200000
explain select * from t1 where d > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 X d d NULL NULL NULL Using where; Using index
select * from t1 where d > 0;
a b c d e f
2 20 100 1000 10000 100000
3 30 200 2000 20000 200000
explain select a from t1 where d > 0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 NULL d d NULL NULL NULL; Using where; Using index
+1 SIMPLE t1 NULL d d NULL NULL NULL Using where; Using index
select a from t1 where d > 0;
a
2
diff --git a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test
index 2abc9a91ff1..1a72b8e9303 100644
--- a/storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test
+++ b/storage/tokudb/mysql-test/tokudb/t/cluster_filter_hidden.test
@@ -14,19 +14,19 @@ insert into t1 values (4,40,400,4000,40000,400000);
insert into t1 values (5,50,500,5000,50000,500000);
# ignore key_len and rows columns
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1;
select * from t1;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1 where b > 0;
select * from t1 where b > 0;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1 where d > 0;
select * from t1 where d > 0;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select a from t1 where d > 0;
select a from t1 where d > 0;
select e,f from t1 where c > 0;
@@ -34,19 +34,19 @@ select e,f from t1 where b > 0;
select e,f from t1 where d > 0;
update t1 set a = a+1, b = b+10;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1;
select * from t1;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1 where b > 0;
select * from t1 where b > 0;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1 where d > 0;
select * from t1 where d > 0;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select a from t1 where d > 0;
select a from t1 where d > 0;
select e,f from t1 where c > 0;
@@ -54,19 +54,19 @@ select e,f from t1 where b > 0;
select e,f from t1 where d > 0;
delete from t1 where b > 35;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1;
select * from t1;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1 where b > 0;
select * from t1 where b > 0;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1 where d > 0;
select * from t1 where d > 0;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select a from t1 where d > 0;
select a from t1 where d > 0;
select e,f from t1 where c > 0;
@@ -78,25 +78,23 @@ alter table t1 drop index b, drop index d;
alter table t1 add key b(b) clustering=yes, add index d(d,a) clustering=yes;
---replace_column 7 NULL 9 NULL;
+--replace_column 7 NULL 9 NULL
explain select * from t1;
select * from t1;
---replace_column 7 NULL 9 NULL;
+--replace_column 4 X 7 NULL 9 NULL
explain select * from t1 where b > 0;
select * from t1 where b > 0;
---replace_column 7 NULL 9 NULL;
+--replace_column 4 X 7 NULL 9 NULL
explain select * from t1 where d > 0;
select * from t1 where d > 0;
---replace_column 4 NULL 7 NULL 9 NULL;
+--replace_column 4 NULL 7 NULL 9 NULL
explain select a from t1 where d > 0;
select a from t1 where d > 0;
select e,f from t1 where c > 0;
select e,f from t1 where b > 0;
select e,f from t1 where d > 0;
-
-
DROP TABLE t1;
diff --git a/storage/xtradb/api/api0api.cc b/storage/xtradb/api/api0api.cc
index 0fe21423232..739ea9f7572 100644
--- a/storage/xtradb/api/api0api.cc
+++ b/storage/xtradb/api/api0api.cc
@@ -245,7 +245,7 @@ ib_open_table_by_id(
dict_mutex_enter_for_mysql();
}
- table = dict_table_open_on_id(table_id, FALSE, DICT_TABLE_OP_NORMAL);
+ table = dict_table_open_on_id(table_id, TRUE, DICT_TABLE_OP_NORMAL);
if (table != NULL && table->ibd_file_missing) {
table = NULL;
@@ -2116,6 +2116,10 @@ ib_cursor_moveto(
n_fields = dict_index_get_n_ordering_defined_by_user(prebuilt->index);
+ if (n_fields > dtuple_get_n_fields(tuple->ptr)) {
+ n_fields = dtuple_get_n_fields(tuple->ptr);
+ }
+
dtuple_set_n_fields(search_tuple, n_fields);
dtuple_set_n_fields_cmp(search_tuple, n_fields);
@@ -3753,14 +3757,14 @@ ib_table_truncate(
if (trunc_err == DB_SUCCESS) {
ut_a(ib_trx_state(ib_trx) == static_cast<ib_trx_state_t>(
TRX_STATE_NOT_STARTED));
-
- err = ib_trx_release(ib_trx);
- ut_a(err == DB_SUCCESS);
} else {
err = ib_trx_rollback(ib_trx);
ut_a(err == DB_SUCCESS);
}
+ err = ib_trx_release(ib_trx);
+ ut_a(err == DB_SUCCESS);
+
/* Set the memcached_sync_count back. */
if (table != NULL && memcached_sync != 0) {
dict_mutex_enter_for_mysql();
diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc
index 44b0e50fa0f..e2592b5dbd8 100644
--- a/storage/xtradb/btr/btr0cur.cc
+++ b/storage/xtradb/btr/btr0cur.cc
@@ -4253,6 +4253,14 @@ btr_estimate_number_of_different_key_vals(
page = btr_cur_get_page(&cursor);
SRV_CORRUPT_TABLE_CHECK(page, goto exit_loop;);
+ DBUG_EXECUTE_IF("ib_corrupt_page_while_stats_calc",
+ page = NULL;);
+
+ SRV_CORRUPT_TABLE_CHECK(page,
+ {
+ mtr_commit(&mtr);
+ goto exit_loop;
+ });
rec = page_rec_get_next(page_get_infimum_rec(page));
diff --git a/storage/xtradb/buf/buf0flu.cc b/storage/xtradb/buf/buf0flu.cc
index c891e53381a..037d94dd514 100644
--- a/storage/xtradb/buf/buf0flu.cc
+++ b/storage/xtradb/buf/buf0flu.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates
-Copyright (c) 2013, 2015, SkySQL Ab
+Copyright (c) 1995, 2015, Oracle and/or its affiliates
+Copyright (c) 2013, 2015, MariaDB
Copyright (c) 2013, 2014, Fusion-io
This program is free software; you can redistribute it and/or modify it under
@@ -931,12 +931,12 @@ buf_flush_write_block_low(
break;
case BUF_BLOCK_ZIP_DIRTY:
frame = bpage->zip.data;
-
mach_write_to_8(frame + FIL_PAGE_LSN,
bpage->newest_modification);
- memset(frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 0, 8);
ut_a(page_zip_verify_checksum(frame, zip_size));
+
+ memset(frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 0, 8);
break;
case BUF_BLOCK_FILE_PAGE:
frame = bpage->zip.data;
@@ -2907,8 +2907,6 @@ DECLARE_THREAD(buf_flush_lru_manager_thread)(
while (srv_shutdown_state == SRV_SHUTDOWN_NONE
|| srv_shutdown_state == SRV_SHUTDOWN_CLEANUP) {
- ulint n_flushed_lru;
-
srv_current_thread_priority = srv_cleaner_thread_priority;
page_cleaner_sleep_if_needed(next_loop_time);
@@ -2917,16 +2915,7 @@ DECLARE_THREAD(buf_flush_lru_manager_thread)(
next_loop_time = ut_time_ms() + lru_sleep_time;
- n_flushed_lru = buf_flush_LRU_tail();
-
- if (n_flushed_lru) {
-
- MONITOR_INC_VALUE_CUMULATIVE(
- MONITOR_FLUSH_BACKGROUND_TOTAL_PAGE,
- MONITOR_FLUSH_BACKGROUND_COUNT,
- MONITOR_FLUSH_BACKGROUND_PAGES,
- n_flushed_lru);
- }
+ buf_flush_LRU_tail();
}
buf_lru_manager_is_active = false;
diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc
index 8738e2bbf9e..12278de5aad 100644
--- a/storage/xtradb/dict/dict0dict.cc
+++ b/storage/xtradb/dict/dict0dict.cc
@@ -3317,71 +3317,6 @@ dict_table_is_referenced_by_foreign_key(
return(!table->referenced_set.empty());
}
-/*********************************************************************//**
-Check if the index is referenced by a foreign key, if TRUE return foreign
-else return NULL
-@return pointer to foreign key struct if index is defined for foreign
-key, otherwise NULL */
-UNIV_INTERN
-dict_foreign_t*
-dict_table_get_referenced_constraint(
-/*=================================*/
- dict_table_t* table, /*!< in: InnoDB table */
- dict_index_t* index) /*!< in: InnoDB index */
-{
- dict_foreign_t* foreign;
-
- ut_ad(index != NULL);
- ut_ad(table != NULL);
-
- for (dict_foreign_set::iterator it = table->referenced_set.begin();
- it != table->referenced_set.end();
- ++it) {
-
- foreign = *it;
-
- if (foreign->referenced_index == index) {
-
- return(foreign);
- }
- }
-
- return(NULL);
-}
-
-/*********************************************************************//**
-Checks if a index is defined for a foreign key constraint. Index is a part
-of a foreign key constraint if the index is referenced by foreign key
-or index is a foreign key index.
-@return pointer to foreign key struct if index is defined for foreign
-key, otherwise NULL */
-UNIV_INTERN
-dict_foreign_t*
-dict_table_get_foreign_constraint(
-/*==============================*/
- dict_table_t* table, /*!< in: InnoDB table */
- dict_index_t* index) /*!< in: InnoDB index */
-{
- dict_foreign_t* foreign;
-
- ut_ad(index != NULL);
- ut_ad(table != NULL);
-
- for (dict_foreign_set::iterator it = table->foreign_set.begin();
- it != table->foreign_set.end();
- ++it) {
-
- foreign = *it;
-
- if (foreign->foreign_index == index) {
-
- return(foreign);
- }
- }
-
- return(NULL);
-}
-
/**********************************************************************//**
Removes a foreign constraint struct from the dictionary cache. */
UNIV_INTERN
diff --git a/storage/xtradb/dict/dict0stats_bg.cc b/storage/xtradb/dict/dict0stats_bg.cc
index d480e5457de..e7842d3da9a 100644
--- a/storage/xtradb/dict/dict0stats_bg.cc
+++ b/storage/xtradb/dict/dict0stats_bg.cc
@@ -549,6 +549,14 @@ DECLARE_THREAD(dict_stats_thread)(
break;
}
+#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
+ if (srv_ibuf_disable_background_merge) {
+ usleep(100000);
+ os_event_reset(dict_stats_event);
+ continue;
+ }
+#endif
+
dict_stats_process_entry_from_recalc_pool();
while (defrag_pool.size())
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index 70f0ee14ab5..8823db1c98a 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2015, MariaDB Corporation. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
@@ -5788,9 +5788,10 @@ _fil_io(
space = fil_space_get_by_id(space_id);
- /* If we are deleting a tablespace we don't allow any read
- operations on that. However, we do allow write operations. */
- if (space == 0 || (type == OS_FILE_READ && space->stop_new_ops)) {
+ /* If we are deleting a tablespace we don't allow async read operations
+ on that. However, we do allow write and sync read operations */
+ if (space == 0
+ || (type == OS_FILE_READ && !sync && space->stop_new_ops)) {
mutex_exit(&fil_system->mutex);
ib_logf(IB_LOG_LEVEL_ERROR,
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index f1c57ad746f..39eef6de86d 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -1393,6 +1393,17 @@ innobase_end(
handlerton* hton, /* in: Innodb handlerton */
ha_panic_function type);
+#if NOT_USED
+/*****************************************************************//**
+Stores the current binlog coordinates in the trx system header. */
+static
+int
+innobase_store_binlog_info(
+/*=======================*/
+ handlerton* hton, /*!< in: InnoDB handlerton */
+ THD* thd); /*!< in: MySQL thread handle */
+#endif
+
/*****************************************************************//**
Creates an InnoDB transaction struct for the thd if it does not yet have one.
Starts a new InnoDB transaction if a transaction is not yet started. And
@@ -3496,6 +3507,9 @@ innobase_init(
innobase_hton->start_consistent_snapshot =
innobase_start_trx_and_assign_read_view;
+ /*innobase_hton->store_binlog_info =
+ innobase_store_binlog_info;*/
+
innobase_hton->flush_logs = innobase_flush_logs;
innobase_hton->show_status = innobase_show_status;
innobase_hton->flags = HTON_SUPPORTS_EXTENDED_KEYS |
@@ -4305,6 +4319,38 @@ innobase_commit_low(
#endif /* WITH_WSREP */
}
+#if NOT_USED
+/*****************************************************************//**
+Stores the current binlog coordinates in the trx system header. */
+static
+int
+innobase_store_binlog_info(
+/*=======================*/
+ handlerton* hton, /*!< in: InnoDB handlerton */
+ THD* thd) /*!< in: MySQL thread handle */
+
+{
+ const char* file_name;
+ unsigned long long pos;
+ mtr_t mtr;
+
+ DBUG_ENTER("innobase_store_binlog_info");
+
+ thd_binlog_pos(thd, &file_name, &pos);
+
+ mtr_start(&mtr);
+
+ trx_sys_update_mysql_binlog_offset(file_name, pos,
+ TRX_SYS_MYSQL_LOG_INFO, &mtr);
+
+ mtr_commit(&mtr);
+
+ innobase_flush_logs(hton);
+
+ DBUG_RETURN(0);
+}
+#endif
+
/*****************************************************************//**
Creates an InnoDB transaction struct for the thd if it does not yet have one.
Starts a new InnoDB transaction if a transaction is not yet started. And
@@ -10615,6 +10661,27 @@ wsrep_append_key(
DBUG_RETURN(0);
}
+static bool
+referenced_by_foreign_key2(dict_table_t* table,
+ dict_index_t* index) {
+ ut_ad(table != NULL);
+ ut_ad(index != NULL);
+
+ const dict_foreign_set* fks = &table->referenced_set;
+ for (dict_foreign_set::const_iterator it = fks->begin();
+ it != fks->end();
+ ++it)
+ {
+ dict_foreign_t* foreign = *it;
+ if (foreign->referenced_index != index) {
+ continue;
+ }
+ ut_ad(table == foreign->referenced_table);
+ return true;
+ }
+ return false;
+}
+
int
ha_innobase::wsrep_append_keys(
/*==================*/
@@ -10694,7 +10761,7 @@ ha_innobase::wsrep_append_keys(
/* !hasPK == table with no PK, must append all non-unique keys */
if (!hasPK || key_info->flags & HA_NOSAME ||
((tab &&
- dict_table_get_referenced_constraint(tab, idx)) ||
+ referenced_by_foreign_key2(tab, idx)) ||
(!tab && referenced_by_foreign_key()))) {
len = wsrep_store_key_val_for_row(
@@ -10909,7 +10976,8 @@ create_table_def(
/* MySQL does the name length check. But we do additional check
on the name length here */
- if (strlen(table_name) > MAX_FULL_NAME_LEN) {
+ const size_t table_name_len = strlen(table_name);
+ if (table_name_len > MAX_FULL_NAME_LEN) {
push_warning_printf(
thd, Sql_condition::WARN_LEVEL_WARN,
ER_TABLE_NAME,
@@ -10918,6 +10986,15 @@ create_table_def(
DBUG_RETURN(ER_TABLE_NAME);
}
+ if (table_name[table_name_len - 1] == '/') {
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_TABLE_NAME,
+ "InnoDB: Table name is empty");
+
+ DBUG_RETURN(ER_WRONG_TABLE_NAME);
+ }
+
n_cols = form->s->fields;
s_cols = form->s->stored_fields;
@@ -12432,6 +12509,10 @@ ha_innobase::discard_or_import_tablespace(
DBUG_RETURN(HA_ERR_TABLE_READONLY);
}
+ if (UNIV_UNLIKELY(prebuilt->trx->fake_changes)) {
+ DBUG_RETURN(HA_ERR_WRONG_COMMAND);
+ }
+
dict_table = prebuilt->table;
if (dict_table->space == TRX_SYS_SPACE) {
@@ -14259,8 +14340,8 @@ ha_innobase::check(
my_error(ER_QUERY_INTERRUPTED, MYF(0));
}
- if (UNIV_UNLIKELY(share->ib_table->is_corrupt)) {
- return(HA_ADMIN_CORRUPT);
+ if (UNIV_UNLIKELY(prebuilt->table && prebuilt->table->corrupted)) {
+ DBUG_RETURN(HA_ADMIN_CORRUPT);
}
DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT);
@@ -16789,6 +16870,9 @@ innodb_log_archive_update(
void* var_ptr,
const void* save)
{
+ if (srv_read_only_mode)
+ return;
+
my_bool in_val = *static_cast<const my_bool*>(save);
if (in_val) {
diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc
index c47b0f499de..60ab98828ce 100644
--- a/storage/xtradb/handler/handler0alter.cc
+++ b/storage/xtradb/handler/handler0alter.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2015, MariaDB Corporation. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
@@ -30,6 +30,7 @@ Smart ALTER TABLE
#include <innodb_priv.h>
#include <sql_alter.h>
#include <sql_class.h>
+#include <sql_table.h>
#include "dict0crea.h"
#include "dict0dict.h"
@@ -557,12 +558,9 @@ ha_innobase::check_if_supported_inplace_alter(
} else if (((ha_alter_info->handler_flags
& Alter_inplace_info::ADD_PK_INDEX)
|| innobase_need_rebuild(ha_alter_info))
- && (innobase_fulltext_exist(altered_table)
- || (prebuilt->table->flags2
- & DICT_TF2_FTS_HAS_DOC_ID))) {
+ && (innobase_fulltext_exist(altered_table))) {
/* Refuse to rebuild the table online, if
- fulltext indexes are to survive the rebuild,
- or if the table contains a hidden FTS_DOC_ID column. */
+ fulltext indexes are to survive the rebuild. */
online = false;
/* If the table already contains fulltext indexes,
refuse to rebuild the table natively altogether. */
@@ -920,10 +918,8 @@ innobase_get_foreign_key_info(
char* tbl_namep = NULL;
ulint db_name_len = 0;
ulint tbl_name_len = 0;
-#ifdef __WIN__
char db_name[MAX_DATABASE_NAME_LEN];
char tbl_name[MAX_TABLE_NAME_LEN];
-#endif
fk_key = static_cast<Foreign_key*>(key);
@@ -976,24 +972,29 @@ innobase_get_foreign_key_info(
add_fk[num_fk] = dict_mem_foreign_create();
#ifndef __WIN__
- tbl_namep = fk_key->ref_table.str;
- tbl_name_len = fk_key->ref_table.length;
- db_namep = fk_key->ref_db.str;
- db_name_len = fk_key->ref_db.length;
+ if(fk_key->ref_db.str) {
+ tablename_to_filename(fk_key->ref_db.str, db_name,
+ MAX_DATABASE_NAME_LEN);
+ db_namep = db_name;
+ db_name_len = strlen(db_name);
+ }
+ if (fk_key->ref_table.str) {
+ tablename_to_filename(fk_key->ref_table.str, tbl_name,
+ MAX_TABLE_NAME_LEN);
+ tbl_namep = tbl_name;
+ tbl_name_len = strlen(tbl_name);
+ }
#else
ut_ad(fk_key->ref_table.str);
-
- memcpy(tbl_name, fk_key->ref_table.str,
- fk_key->ref_table.length);
- tbl_name[fk_key->ref_table.length] = 0;
+ tablename_to_filename(fk_key->ref_table.str, tbl_name,
+ MAX_TABLE_NAME_LEN);
innobase_casedn_str(tbl_name);
tbl_name_len = strlen(tbl_name);
tbl_namep = &tbl_name[0];
if (fk_key->ref_db.str != NULL) {
- memcpy(db_name, fk_key->ref_db.str,
- fk_key->ref_db.length);
- db_name[fk_key->ref_db.length] = 0;
+ tablename_to_filename(fk_key->ref_db.str, db_name,
+ MAX_DATABASE_NAME_LEN);
innobase_casedn_str(db_name);
db_name_len = strlen(db_name);
db_namep = &db_name[0];
@@ -3356,58 +3357,74 @@ innobase_check_foreign_key_index(
ulint n_drop_fk) /*!< in: Number of foreign keys
to drop */
{
- dict_foreign_t* foreign;
+ ut_ad(index != NULL);
+ ut_ad(indexed_table != NULL);
- /* Check if the index is referenced. */
- foreign = dict_table_get_referenced_constraint(indexed_table, index);
-
- ut_ad(!foreign || indexed_table
- == foreign->referenced_table);
-
- if (foreign
- && !dict_foreign_find_index(
- indexed_table, col_names,
- foreign->referenced_col_names,
- foreign->n_fields, index,
- /*check_charsets=*/TRUE,
- /*check_null=*/FALSE, NULL, NULL, NULL)
- && !innobase_find_equiv_index(
- foreign->referenced_col_names,
- foreign->n_fields,
- ha_alter_info->key_info_buffer,
- ha_alter_info->index_add_buffer,
- ha_alter_info->index_add_count)
- ) {
- trx->error_info = index;
- return(true);
+ const dict_foreign_set* fks = &indexed_table->referenced_set;
+
+ /* Check for all FK references from other tables to the index. */
+ for (dict_foreign_set::const_iterator it = fks->begin();
+ it != fks->end(); ++it) {
+
+ dict_foreign_t* foreign = *it;
+ if (foreign->referenced_index != index) {
+ continue;
+ }
+ ut_ad(indexed_table == foreign->referenced_table);
+
+ if (NULL == dict_foreign_find_index(
+ indexed_table, col_names,
+ foreign->referenced_col_names,
+ foreign->n_fields, index,
+ /*check_charsets=*/TRUE,
+ /*check_null=*/FALSE,
+ 0,0,0)
+ && NULL == innobase_find_equiv_index(
+ foreign->referenced_col_names,
+ foreign->n_fields,
+ ha_alter_info->key_info_buffer,
+ ha_alter_info->index_add_buffer,
+ ha_alter_info->index_add_count)) {
+
+ /* Index cannot be dropped. */
+ trx->error_info = index;
+ return(true);
+ }
}
- /* Check if this index references some
- other table */
- foreign = dict_table_get_foreign_constraint(
- indexed_table, index);
-
- ut_ad(!foreign || indexed_table
- == foreign->foreign_table);
-
- if (foreign
- && !innobase_dropping_foreign(
- foreign, drop_fk, n_drop_fk)
- && !dict_foreign_find_index(
- indexed_table, col_names,
- foreign->foreign_col_names,
- foreign->n_fields, index,
- /*check_charsets=*/TRUE,
- /*check_null=*/FALSE, NULL,NULL, NULL)
- && !innobase_find_equiv_index(
- foreign->foreign_col_names,
- foreign->n_fields,
- ha_alter_info->key_info_buffer,
- ha_alter_info->index_add_buffer,
- ha_alter_info->index_add_count)
- ) {
- trx->error_info = index;
- return(true);
+ fks = &indexed_table->foreign_set;
+
+ /* Check for all FK references in current table using the index. */
+ for (dict_foreign_set::const_iterator it = fks->begin();
+ it != fks->end(); ++it) {
+
+ dict_foreign_t* foreign = *it;
+ if (foreign->foreign_index != index) {
+ continue;
+ }
+
+ ut_ad(indexed_table == foreign->foreign_table);
+
+ if (!innobase_dropping_foreign(
+ foreign, drop_fk, n_drop_fk)
+ && NULL == dict_foreign_find_index(
+ indexed_table, col_names,
+ foreign->foreign_col_names,
+ foreign->n_fields, index,
+ /*check_charsets=*/TRUE,
+ /*check_null=*/FALSE,
+ 0, 0, 0)
+ && NULL == innobase_find_equiv_index(
+ foreign->foreign_col_names,
+ foreign->n_fields,
+ ha_alter_info->key_info_buffer,
+ ha_alter_info->index_add_buffer,
+ ha_alter_info->index_add_count)) {
+
+ /* Index cannot be dropped. */
+ trx->error_info = index;
+ return(true);
+ }
}
return(false);
@@ -3646,6 +3663,19 @@ check_if_ok_to_rename:
if (index->type & DICT_FTS) {
DBUG_ASSERT(index->type == DICT_FTS
|| (index->type & DICT_CORRUPT));
+
+ /* We need to drop any corrupted fts indexes
+ before we add a new fts index. */
+ if (add_fts_idx && index->type & DICT_CORRUPT) {
+ ib_errf(user_thd, IB_LOG_LEVEL_ERROR,
+ ER_INNODB_INDEX_CORRUPT,
+ "Fulltext index '%s' is corrupt. "
+ "you should drop this index first.",
+ index->name);
+
+ goto err_exit_no_heap;
+ }
+
continue;
}
diff --git a/storage/xtradb/ibuf/ibuf0ibuf.cc b/storage/xtradb/ibuf/ibuf0ibuf.cc
index ff5c2961cdd..9ee22d4d0f7 100644
--- a/storage/xtradb/ibuf/ibuf0ibuf.cc
+++ b/storage/xtradb/ibuf/ibuf0ibuf.cc
@@ -2740,7 +2740,9 @@ ibuf_merge_space(
&pages[0], &spaces[0], &versions[0], n_pages,
&mtr);
- ++sum_sizes;
+ if (*n_pages > 0) {
+ ++sum_sizes;
+ }
}
ibuf_mtr_commit(&mtr);
diff --git a/storage/xtradb/include/dict0dict.h b/storage/xtradb/include/dict0dict.h
index 5dfdba54f29..d994da5b3c1 100644
--- a/storage/xtradb/include/dict0dict.h
+++ b/storage/xtradb/include/dict0dict.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, SkySQL Ab. All Rights Reserved.
@@ -449,18 +449,6 @@ dict_foreign_add_to_cache(
/*!< in: error to be ignored */
__attribute__((nonnull(1), warn_unused_result));
/*********************************************************************//**
-Check if the index is referenced by a foreign key, if TRUE return the
-matching instance NULL otherwise.
-@return pointer to foreign key struct if index is defined for foreign
-key, otherwise NULL */
-UNIV_INTERN
-dict_foreign_t*
-dict_table_get_referenced_constraint(
-/*=================================*/
- dict_table_t* table, /*!< in: InnoDB table */
- dict_index_t* index) /*!< in: InnoDB index */
- __attribute__((nonnull, warn_unused_result));
-/*********************************************************************//**
Checks if a table is referenced by foreign keys.
@return TRUE if table is referenced by a foreign key */
UNIV_INTERN
@@ -495,19 +483,6 @@ dict_str_starts_with_keyword(
const char* keyword) /*!< in: keyword to look for */
__attribute__((nonnull, warn_unused_result));
/*********************************************************************//**
-Checks if a index is defined for a foreign key constraint. Index is a part
-of a foreign key constraint if the index is referenced by foreign key
-or index is a foreign key index
-@return pointer to foreign key struct if index is defined for foreign
-key, otherwise NULL */
-UNIV_INTERN
-dict_foreign_t*
-dict_table_get_foreign_constraint(
-/*==============================*/
- dict_table_t* table, /*!< in: InnoDB table */
- dict_index_t* index) /*!< in: InnoDB index */
- __attribute__((nonnull, warn_unused_result));
-/*********************************************************************//**
Scans a table create SQL string and adds to the data dictionary
the foreign key constraints declared in the string. This function
should be called after the indexes for a table have been created.
diff --git a/storage/xtradb/include/dict0dict.ic b/storage/xtradb/include/dict0dict.ic
index e5f4ec21bd2..2f9fc3bcfe6 100644
--- a/storage/xtradb/include/dict0dict.ic
+++ b/storage/xtradb/include/dict0dict.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
+Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2013, 2015, MariaDB
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 the Free Software
diff --git a/storage/xtradb/include/fts0fts.h b/storage/xtradb/include/fts0fts.h
index a2996ecacc8..d54ed281d9a 100644
--- a/storage/xtradb/include/fts0fts.h
+++ b/storage/xtradb/include/fts0fts.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
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 the Free Software
diff --git a/storage/xtradb/include/row0purge.h b/storage/xtradb/include/row0purge.h
index 93dcf9cf49b..888289a6c79 100644
--- a/storage/xtradb/include/row0purge.h
+++ b/storage/xtradb/include/row0purge.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
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 the Free Software
@@ -119,6 +119,16 @@ struct purge_node_t{
clustered index record */
ibool done; /* Debug flag */
+#ifdef UNIV_DEBUG
+ /***********************************************************//**
+ Validate the persisent cursor. The purge node has two references
+ to the clustered index record - one via the ref member, and the
+ other via the persistent cursor. These two references must match
+ each other if the found_clust flag is set.
+ @return true if the persistent cursor is consistent with
+ the ref member.*/
+ bool validate_pcur();
+#endif
};
#ifndef UNIV_NONINL
diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i
index 8105d1f318b..7b75c9fb44a 100644
--- a/storage/xtradb/include/univ.i
+++ b/storage/xtradb/include/univ.i
@@ -45,10 +45,10 @@ Created 1/20/1994 Heikki Tuuri
#define INNODB_VERSION_MAJOR 5
#define INNODB_VERSION_MINOR 6
-#define INNODB_VERSION_BUGFIX 25
+#define INNODB_VERSION_BUGFIX 26
#ifndef PERCONA_INNODB_VERSION
-#define PERCONA_INNODB_VERSION 73.1
+#define PERCONA_INNODB_VERSION 74.0
#endif
/* Enable UNIV_LOG_ARCHIVE in XtraDB */
@@ -647,6 +647,7 @@ Windows, so define a typedef for it and a macro to use at the end of such
functions. */
#ifdef __WIN__
+#define usleep(a) Sleep((a)/1000)
typedef ulint os_thread_ret_t;
#define OS_THREAD_DUMMY_RETURN return(0)
#else
diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc
index 64459b9c2c7..ff7bfa9edd7 100644
--- a/storage/xtradb/log/log0log.cc
+++ b/storage/xtradb/log/log0log.cc
@@ -3371,6 +3371,7 @@ ulint
log_archive_noarchivelog(void)
/*==========================*/
{
+ ut_ad(!srv_read_only_mode);
loop:
mutex_enter(&(log_sys->mutex));
@@ -3403,6 +3404,8 @@ ulint
log_archive_archivelog(void)
/*========================*/
{
+ ut_ad(!srv_read_only_mode);
+
mutex_enter(&(log_sys->mutex));
if (log_sys->archiving_state == LOG_ARCH_OFF) {
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index e87ce888e10..f72d8169da4 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -1642,6 +1642,7 @@ os_file_create_simple_no_error_handling_func(
*success = (file != INVALID_HANDLE_VALUE);
#else /* __WIN__ */
int create_flag;
+ const char* mode_str = NULL;
ut_a(name);
if (create_mode != OS_FILE_OPEN && create_mode != OS_FILE_OPEN_RAW)
@@ -1652,6 +1653,8 @@ os_file_create_simple_no_error_handling_func(
if (create_mode == OS_FILE_OPEN) {
+ mode_str = "OPEN";
+
if (access_type == OS_FILE_READ_ONLY) {
create_flag = O_RDONLY;
@@ -1670,10 +1673,14 @@ os_file_create_simple_no_error_handling_func(
} else if (srv_read_only_mode) {
+ mode_str = "OPEN";
+
create_flag = O_RDONLY;
} else if (create_mode == OS_FILE_CREATE) {
+ mode_str = "CREATE";
+
create_flag = O_RDWR | O_CREAT | O_EXCL;
} else {
@@ -1688,6 +1695,17 @@ os_file_create_simple_no_error_handling_func(
*success = file == -1 ? FALSE : TRUE;
+ /* This function is always called for data files, we should disable
+ OS caching (O_DIRECT) here as we do in os_file_create_func(), so
+ we open the same file in the same mode, see man page of open(2). */
+ if (!srv_read_only_mode
+ && *success
+ && (srv_unix_file_flush_method == SRV_UNIX_O_DIRECT
+ || srv_unix_file_flush_method == SRV_UNIX_O_DIRECT_NO_FSYNC)) {
+
+ os_file_set_nocache(file, name, mode_str);
+ }
+
#ifdef USE_FILE_LOCK
if (!srv_read_only_mode
&& *success
diff --git a/storage/xtradb/row/row0import.cc b/storage/xtradb/row/row0import.cc
index cbcbb705857..ac6380e5a27 100644
--- a/storage/xtradb/row/row0import.cc
+++ b/storage/xtradb/row/row0import.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -140,14 +140,6 @@ struct row_import {
ulint find_col(const char* name) const UNIV_NOTHROW;
/**
- Find the index field entry in in the cfg indexes fields.
- @name - of the index to look for
- @return instance if found else 0. */
- const dict_field_t* find_field(
- const row_index_t* cfg_index,
- const char* name) const UNIV_NOTHROW;
-
- /**
Get the number of rows for which purge failed during the convert phase.
@param name - index name
@return number of rows for which purge failed. */
@@ -1142,30 +1134,6 @@ row_import::find_col(
}
/**
-Find the index field entry in in the cfg indexes fields.
-@name - of the index to look for
-@return instance if found else 0. */
-const dict_field_t*
-row_import::find_field(
- const row_index_t* cfg_index,
- const char* name) const UNIV_NOTHROW
-{
- const dict_field_t* field = cfg_index->m_fields;
-
- for (ulint i = 0; i < cfg_index->m_n_fields; ++i, ++field) {
- const char* field_name;
-
- field_name = reinterpret_cast<const char*>(field->name);
-
- if (strcmp(field_name, name) == 0) {
- return(field);
- }
- }
-
- return(0);
-}
-
-/**
Check if the index schema that was read from the .cfg file matches the
in memory index definition.
@return DB_SUCCESS or error code. */
@@ -1188,51 +1156,60 @@ row_import::match_index_columns(
return(DB_ERROR);
}
- cfg_index->m_srv_index = index;
+ if (cfg_index->m_n_fields != index->n_fields) {
- const dict_field_t* field = index->fields;
+ ib_errf(thd, IB_LOG_LEVEL_ERROR,
+ ER_TABLE_SCHEMA_MISMATCH,
+ "Index field count %lu doesn't match"
+ " tablespace metadata file value %lu",
+ (ulong) index->n_fields,
+ (ulong) cfg_index->m_n_fields);
- for (ulint i = 0; i < index->n_fields; ++i, ++field) {
+ return(DB_ERROR);
+ }
- const dict_field_t* cfg_field;
+ cfg_index->m_srv_index = index;
- cfg_field = find_field(cfg_index, field->name);
+ const dict_field_t* field = index->fields;
+ const dict_field_t* cfg_field = cfg_index->m_fields;
- if (cfg_field == 0) {
+ for (ulint i = 0; i < index->n_fields; ++i, ++field, ++cfg_field) {
+
+ if (strcmp(field->name, cfg_field->name) != 0) {
ib_errf(thd, IB_LOG_LEVEL_ERROR,
ER_TABLE_SCHEMA_MISMATCH,
- "Index %s field %s not found in tablespace "
- "meta-data file.",
- index->name, field->name);
+ "Index field name %s doesn't match"
+ " tablespace metadata field name %s"
+ " for field position %lu",
+ field->name, cfg_field->name, (ulong) i);
err = DB_ERROR;
- } else {
+ }
- if (cfg_field->prefix_len != field->prefix_len) {
- ib_errf(thd, IB_LOG_LEVEL_ERROR,
- ER_TABLE_SCHEMA_MISMATCH,
- "Index %s field %s prefix len %lu "
- "doesn't match meta-data file value "
- "%lu",
- index->name, field->name,
- (ulong) field->prefix_len,
- (ulong) cfg_field->prefix_len);
+ if (cfg_field->prefix_len != field->prefix_len) {
+ ib_errf(thd, IB_LOG_LEVEL_ERROR,
+ ER_TABLE_SCHEMA_MISMATCH,
+ "Index %s field %s prefix len %lu"
+ " doesn't match metadata file value"
+ " %lu",
+ index->name, field->name,
+ (ulong) field->prefix_len,
+ (ulong) cfg_field->prefix_len);
- err = DB_ERROR;
- }
+ err = DB_ERROR;
+ }
- if (cfg_field->fixed_len != field->fixed_len) {
- ib_errf(thd, IB_LOG_LEVEL_ERROR,
- ER_TABLE_SCHEMA_MISMATCH,
- "Index %s field %s fixed len %lu "
- "doesn't match meta-data file value "
- "%lu",
- index->name, field->name,
- (ulong) field->fixed_len,
- (ulong) cfg_field->fixed_len);
+ if (cfg_field->fixed_len != field->fixed_len) {
+ ib_errf(thd, IB_LOG_LEVEL_ERROR,
+ ER_TABLE_SCHEMA_MISMATCH,
+ "Index %s field %s fixed len %lu"
+ " doesn't match metadata file value"
+ " %lu",
+ index->name, field->name,
+ (ulong) field->fixed_len,
+ (ulong) cfg_field->fixed_len);
- err = DB_ERROR;
- }
+ err = DB_ERROR;
}
}
diff --git a/storage/xtradb/row/row0ins.cc b/storage/xtradb/row/row0ins.cc
index ae63f0c323b..bd185f04eaf 100644
--- a/storage/xtradb/row/row0ins.cc
+++ b/storage/xtradb/row/row0ins.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
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 the Free Software
@@ -2354,24 +2354,34 @@ row_ins_clust_index_entry_low(
big_rec_t* big_rec = NULL;
mtr_t mtr;
mem_heap_t* offsets_heap = NULL;
+ ulint search_mode;
ut_ad(dict_index_is_clust(index));
ut_ad(!dict_index_is_unique(index)
|| n_uniq == dict_index_get_n_unique(index));
ut_ad(!n_uniq || n_uniq == dict_index_get_n_unique(index));
+ /* If running with fake_changes mode on then switch from modify to
+ search so that code takes only s-latch and not x-latch.
+ For dry-run (fake-changes) s-latch is acceptable. Taking x-latch will
+ make it more restrictive and will block real changes/workflow. */
+ if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) {
+ search_mode = (mode & BTR_MODIFY_TREE)
+ ? BTR_SEARCH_TREE : BTR_SEARCH_LEAF;
+ } else {
+ search_mode = mode;
+ }
+
mtr_start_trx(&mtr, thr_get_trx(thr));
if (mode == BTR_MODIFY_LEAF && dict_index_is_online_ddl(index)) {
- if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) {
- mode = BTR_SEARCH_LEAF | BTR_ALREADY_S_LATCHED;
- } else {
- mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED;
- }
+
+ /* We really don't need to OR mode but will leave it for
+ code consistency. */
+ mode |= BTR_ALREADY_S_LATCHED;
+ search_mode |= BTR_ALREADY_S_LATCHED;
+
mtr_s_lock(dict_index_get_lock(index), &mtr);
- } else if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) {
- mode = (mode & BTR_MODIFY_TREE)
- ? BTR_SEARCH_TREE : BTR_SEARCH_LEAF;
}
cursor.thr = thr;
@@ -2380,7 +2390,7 @@ row_ins_clust_index_entry_low(
the function will return in both low_match and up_match of the
cursor sensible values */
- err = btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, mode,
+ err = btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, search_mode,
&cursor, 0, __FILE__, __LINE__, &mtr);
if (err != DB_SUCCESS) {
@@ -2659,7 +2669,7 @@ row_ins_sec_index_entry_low(
que_thr_t* thr) /*!< in: query thread */
{
btr_cur_t cursor;
- ulint search_mode = mode | BTR_INSERT;
+ ulint search_mode;
dberr_t err = DB_SUCCESS;
ulint n_unique;
mtr_t mtr;
@@ -2673,6 +2683,18 @@ row_ins_sec_index_entry_low(
ut_ad(thr_get_trx(thr)->id);
mtr_start_trx(&mtr, trx);
+ /* If running with fake_changes mode on then avoid using insert buffer
+ and also switch from modify to search so that code takes only s-latch
+ and not x-latch. For dry-run (fake-changes) s-latch is acceptable.
+ Taking x-latch will make it more restrictive and will block real
+ changes/workflow. */
+ if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) {
+ search_mode = (mode & BTR_MODIFY_TREE)
+ ? BTR_SEARCH_TREE : BTR_SEARCH_LEAF;
+ } else {
+ search_mode = mode | BTR_INSERT;
+ }
+
/* Ensure that we acquire index->lock when inserting into an
index with index->online_status == ONLINE_INDEX_COMPLETE, but
could still be subject to rollback_inplace_alter_table().
@@ -2680,11 +2702,24 @@ row_ins_sec_index_entry_low(
The memory object cannot be freed as long as we have an open
reference to the table, or index->table->n_ref_count > 0. */
const bool check = *index->name == TEMP_INDEX_PREFIX;
+
if (check) {
+
DEBUG_SYNC_C("row_ins_sec_index_enter");
- if (mode == BTR_MODIFY_LEAF) {
+
+ /* mode = MODIFY_LEAF is synonymous to search_mode = SEARCH_LEAF
+ search_mode = SEARCH_TREE suggest operation in fake_change mode
+ so continue to s-latch in this mode too. */
+
+ if (mode == BTR_MODIFY_LEAF || search_mode == BTR_SEARCH_TREE) {
+
+ ut_ad((search_mode == BTR_SEARCH_TREE
+ && thr_get_trx(thr)->fake_changes)
+ || mode == BTR_MODIFY_LEAF);
+
search_mode |= BTR_ALREADY_S_LATCHED;
mtr_s_lock(dict_index_get_lock(index), &mtr);
+
} else {
mtr_x_lock(dict_index_get_lock(index), &mtr);
}
@@ -2695,14 +2730,13 @@ row_ins_sec_index_entry_low(
}
}
- /* Note that we use PAGE_CUR_LE as the search mode, because then
- the function will return in both low_match and up_match of the
- cursor sensible values */
-
if (!thr_get_trx(thr)->check_unique_secondary) {
search_mode |= BTR_IGNORE_SEC_UNIQUE;
}
+ /* Note that we use PAGE_CUR_LE as the search mode, because then
+ the function will return in both low_match and up_match of the
+ cursor sensible values */
err = btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE,
search_mode,
&cursor, 0, __FILE__, __LINE__, &mtr);
@@ -2795,10 +2829,7 @@ row_ins_sec_index_entry_low(
btr_cur_search_to_nth_level(
index, 0, entry, PAGE_CUR_LE,
- UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)
- ? BTR_SEARCH_LEAF
- : (btr_latch_mode)
- (search_mode & ~(BTR_INSERT | BTR_IGNORE_SEC_UNIQUE)),
+ search_mode & ~(BTR_INSERT | BTR_IGNORE_SEC_UNIQUE),
&cursor, 0, __FILE__, __LINE__, &mtr);
}
diff --git a/storage/xtradb/row/row0log.cc b/storage/xtradb/row/row0log.cc
index 9d403e64fd0..abca363b80a 100644
--- a/storage/xtradb/row/row0log.cc
+++ b/storage/xtradb/row/row0log.cc
@@ -2592,7 +2592,7 @@ all_done:
and be ignored when the operation is unsupported. */
fallocate(index->online_log->fd,
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
- ofs, srv_buf_size);
+ ofs, srv_sort_buf_size);
#endif /* FALLOC_FL_PUNCH_HOLE */
next_mrec = index->online_log->head.block;
@@ -3420,7 +3420,7 @@ all_done:
and be ignored when the operation is unsupported. */
fallocate(index->online_log->fd,
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
- ofs, srv_buf_size);
+ ofs, srv_sort_buf_size);
#endif /* FALLOC_FL_PUNCH_HOLE */
next_mrec = index->online_log->head.block;
diff --git a/storage/xtradb/row/row0purge.cc b/storage/xtradb/row/row0purge.cc
index 8212a7b43e0..b26ba971a95 100644
--- a/storage/xtradb/row/row0purge.cc
+++ b/storage/xtradb/row/row0purge.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
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 the Free Software
@@ -84,7 +84,7 @@ row_purge_node_create(
/***********************************************************//**
Repositions the pcur in the purge node on the clustered index record,
-if found.
+if found. If the record is not found, close pcur.
@return TRUE if the record was found */
static
ibool
@@ -95,11 +95,10 @@ row_purge_reposition_pcur(
mtr_t* mtr) /*!< in: mtr */
{
if (node->found_clust) {
- ibool found;
+ ut_ad(node->validate_pcur());
- found = btr_pcur_restore_position(mode, &node->pcur, mtr);
+ node->found_clust = btr_pcur_restore_position(mode, &node->pcur, mtr);
- return(found);
} else {
node->found_clust = row_search_on_row_ref(
&node->pcur, mode, node->table, node->ref, mtr);
@@ -109,6 +108,11 @@ row_purge_reposition_pcur(
}
}
+ /* Close the current cursor if we fail to position it correctly. */
+ if (!node->found_clust) {
+ btr_pcur_close(&node->pcur);
+ }
+
return(node->found_clust);
}
@@ -182,7 +186,12 @@ func_exit:
mem_heap_free(heap);
}
- btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
+ /* Persistent cursor is closed if reposition fails. */
+ if (node->found_clust) {
+ btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
+ } else {
+ mtr_commit(&mtr);
+ }
return(success);
}
@@ -251,7 +260,12 @@ row_purge_poss_sec(
btr_pcur_get_rec(&node->pcur),
&mtr, index, entry);
- btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
+ /* Persistent cursor is closed if reposition fails. */
+ if (node->found_clust) {
+ btr_pcur_commit_specify_mtr(&node->pcur, &mtr);
+ } else {
+ mtr_commit(&mtr);
+ }
return(can_delete);
}
@@ -831,6 +845,8 @@ row_purge_record_func(
dict_index_t* clust_index;
bool purged = true;
+ ut_ad(!node->found_clust);
+
clust_index = dict_table_get_first_index(node->table);
node->index = dict_table_get_next_index(clust_index);
@@ -986,3 +1002,52 @@ row_purge_step(
return(thr);
}
+
+#ifdef UNIV_DEBUG
+/***********************************************************//**
+Validate the persisent cursor. The purge node has two references
+to the clustered index record - one via the ref member, and the
+other via the persistent cursor. These two references must match
+each other if the found_clust flag is set.
+@return true if the stored copy of persistent cursor is consistent
+with the ref member.*/
+bool
+purge_node_t::validate_pcur()
+{
+ if (!found_clust) {
+ return(true);
+ }
+
+ if (index == NULL) {
+ return(true);
+ }
+
+ if (index->type == DICT_FTS) {
+ return(true);
+ }
+
+ if (pcur.old_stored != BTR_PCUR_OLD_STORED) {
+ return(true);
+ }
+
+ dict_index_t* clust_index = pcur.btr_cur.index;
+
+ ulint* offsets = rec_get_offsets(
+ pcur.old_rec, clust_index, NULL, pcur.old_n_fields, &heap);
+
+ /* Here we are comparing the purge ref record and the stored initial
+ part in persistent cursor. Both cases we store n_uniq fields of the
+ cluster index and so it is fine to do the comparison. We note this
+ dependency here as pcur and ref belong to different modules. */
+ int st = cmp_dtuple_rec(ref, pcur.old_rec, offsets);
+
+ if (st != 0) {
+ fprintf(stderr, "Purge node pcur validation failed\n");
+ dtuple_print(stderr, ref);
+ rec_print(stderr, pcur.old_rec, clust_index);
+ return(false);
+ }
+
+ return(true);
+}
+#endif /* UNIV_DEBUG */
diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc
index 0be97e12e0a..35719391fae 100644
--- a/storage/xtradb/row/row0sel.cc
+++ b/storage/xtradb/row/row0sel.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2015, MariaDB Corporation.
diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc
index abe47e91339..b816d7e90ca 100644
--- a/storage/xtradb/srv/srv0srv.cc
+++ b/storage/xtradb/srv/srv0srv.cc
@@ -2354,8 +2354,7 @@ rescan_idle:
mutex_enter(&trx_sys->mutex);
trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list);
while (trx) {
- if (!trx_state_eq(trx, TRX_STATE_NOT_STARTED)
- && trx_state_eq(trx, TRX_STATE_ACTIVE)
+ if (trx->state == TRX_STATE_ACTIVE
&& trx->mysql_thd
&& innobase_thd_is_idle(trx->mysql_thd)) {
ib_int64_t start_time = innobase_thd_get_start_time(trx->mysql_thd);
diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc
index 54ac04e7248..8c3e0a8455e 100644
--- a/storage/xtradb/srv/srv0start.cc
+++ b/storage/xtradb/srv/srv0start.cc
@@ -2729,24 +2729,25 @@ files_checked:
}
#ifdef UNIV_LOG_ARCHIVE
- /* Archiving is always off under MySQL */
- if (!srv_log_archive_on) {
- ut_a(DB_SUCCESS == log_archive_noarchivelog());
- } else {
- bool start_archive;
+ if (!srv_read_only_mode) {
+ if (!srv_log_archive_on) {
+ ut_a(DB_SUCCESS == log_archive_noarchivelog());
+ } else {
+ bool start_archive;
- mutex_enter(&(log_sys->mutex));
+ mutex_enter(&(log_sys->mutex));
- start_archive = FALSE;
+ start_archive = false;
- if (log_sys->archiving_state == LOG_ARCH_OFF) {
- start_archive = TRUE;
- }
+ if (log_sys->archiving_state == LOG_ARCH_OFF) {
+ start_archive = true;
+ }
- mutex_exit(&(log_sys->mutex));
+ mutex_exit(&(log_sys->mutex));
- if (start_archive) {
- ut_a(DB_SUCCESS == log_archive_archivelog());
+ if (start_archive) {
+ ut_a(DB_SUCCESS == log_archive_archivelog());
+ }
}
}
#endif /* UNIV_LOG_ARCHIVE */
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 8d25ac8e7ed..28d2fd1515e 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -23,7 +23,7 @@
#define ROW_LEN 16
#define ROW16_LEN 8
-#define MAX_BUF 64*1024
+#define MAX_BUF (64*1024)
static struct charset_info_st all_charsets[512];
diff --git a/strings/ctype.c b/strings/ctype.c
index aa40e2b338c..f871a219245 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -264,7 +264,7 @@ static const struct my_cs_file_section_st
}
#define MY_CS_CSDESCR_SIZE 64
-#define MY_CS_TAILORING_SIZE 32*1024
+#define MY_CS_TAILORING_SIZE (32*1024)
#define MY_CS_UCA_VERSION_SIZE 64
#define MY_CS_CONTEXT_SIZE 64
diff --git a/win/packaging/ca/CustomAction.cpp b/win/packaging/ca/CustomAction.cpp
index 17bfca1debb..3cb8520b65d 100644
--- a/win/packaging/ca/CustomAction.cpp
+++ b/win/packaging/ca/CustomAction.cpp
@@ -17,6 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define UNICODE
#endif
+#undef NOMINMAX
+
#include <winsock2.h>
#include <windows.h>
#include <winreg.h>