Browse Source

Merge branch '10.1' of github.com:MariaDB/server into 10.1

Conflicts:
	storage/xtradb/handler/ha_innodb.cc
pull/4/head
Jan Lindström 12 years ago
parent
commit
aa22471633
  1. 7
      CMakeLists.txt
  2. 29
      cmake/build_configurations/mysql_release.cmake
  3. 2
      cmake/install_macros.cmake
  4. 138
      cmake/plugin.cmake
  5. 2
      cmake/ssl.cmake
  6. 1
      config.h.cmake
  7. 2
      extra/CMakeLists.txt
  8. 2
      mysql-test/mysql-test-run.pl
  9. 8
      mysql-test/r/myisam.result
  10. 121
      mysql-test/r/mysqld--help.result
  11. 4
      mysql-test/r/not_embedded_server.result
  12. 3
      mysql-test/r/sp-destruct.result
  13. 20
      mysql-test/r/temp_table_frm.result
  14. 8
      mysql-test/suite/rpl/r/rpl_skip_replication.result
  15. 22
      mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
  16. 6
      mysql-test/suite/sys_vars/r/innodb_cleaner_lsn_age_factor_basic.result
  17. 6
      mysql-test/suite/sys_vars/r/innodb_empty_free_list_algorithm_basic.result
  18. 6
      mysql-test/suite/sys_vars/r/innodb_foreground_preflush_basic.result
  19. 22
      mysql-test/suite/sys_vars/r/innodb_log_checksum_algorithm_basic.result
  20. 38
      mysql-test/suite/sys_vars/r/myisam_stats_method_basic.result
  21. 6
      mysql-test/suite/sys_vars/r/myisam_stats_method_func.result
  22. 12
      mysql-test/suite/sys_vars/r/replicate_events_marked_for_skip_basic.result
  23. 2
      mysql-test/t/not_embedded_server.test
  24. 1
      mysql-test/t/sp-destruct.test
  25. 13
      mysql-test/t/temp_table_frm.test
  26. 93
      mysys/my_getopt.c
  27. 12
      plugin/auth_pam/CMakeLists.txt
  28. 5
      plugin/auth_socket/CMakeLists.txt
  29. 12
      plugin/feedback/CMakeLists.txt
  30. 2
      plugin/server_audit/server_audit.c
  31. 2
      scripts/CMakeLists.txt
  32. 1
      sql/handler.h
  33. 3
      sql/log.cc
  34. 8
      sql/mysqld.cc
  35. 666
      sql/sql_acl.cc
  36. 8
      sql/sql_acl.h
  37. 14
      sql/sql_base.cc
  38. 3
      sql/sql_base.h
  39. 2
      sql/sql_plugin.cc
  40. 27
      sql/sql_table.cc
  41. 68
      sql/sql_truncate.cc
  42. 90
      sql/sys_vars.cc
  43. 3
      sql/unireg.cc
  44. 52
      storage/cassandra/CMakeLists.txt
  45. 2
      storage/connect/CMakeLists.txt
  46. 12
      storage/innobase/handler/ha_innodb.cc
  47. 14
      storage/maria/ha_maria.cc
  48. 7
      storage/myisam/ha_myisam.cc
  49. 26
      storage/oqgraph/CMakeLists.txt
  50. 1
      storage/tokudb/CMakeLists.txt
  51. 18
      storage/xtradb/CMakeLists.txt
  52. 33
      storage/xtradb/handler/ha_innodb.cc

7
CMakeLists.txt

@ -114,7 +114,6 @@ ENDIF()
INCLUDE(maintainer)
SET(MYSQL_MAINTAINER_MODE "OFF" CACHE STRING "MySQL maintainer-specific development environment. Options are: ON OFF AUTO.")
MARK_AS_ADVANCED(MYSQL_MAINTAINER_MODE)
# Whether the maintainer mode compiler options should be enabled.
IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
@ -168,13 +167,12 @@ IF(DISABLE_SHARED)
ENDIF()
OPTION(ENABLED_PROFILING "Enable profiling" ON)
OPTION(CYBOZU "" OFF)
OPTION(BACKUP_TEST "" OFF)
OPTION(WITHOUT_SERVER OFF)
OPTION(WITHOUT_SERVER "Build only the client library and clients" OFF)
IF(UNIX)
OPTION(WITH_VALGRIND "Valgrind instrumentation" OFF)
ENDIF()
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED)
MARK_AS_ADVANCED(CYBOZU)
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
@ -272,7 +270,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3")
OPTION(ENABLED_LOCAL_INFILE
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE)
OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF)
MARK_AS_ADVANCED(WITH_FAST_MUTEXES)

29
cmake/build_configurations/mysql_release.cmake

@ -46,8 +46,6 @@ SET(FEATURE_SET_large 5)
SET(FEATURE_SET_xlarge 6)
SET(FEATURE_SET_community 7)
#SET(WITH_CASSANDRA_STORAGE_ENGINE ON)
IF(FEATURE_SET)
STRING(TOLOWER ${FEATURE_SET} feature_set)
SET(num ${FEATURE_SET_${feature_set}})
@ -56,7 +54,7 @@ IF(FEATURE_SET)
Should be xsmall, small, classic, large, or community
")
ENDIF()
SET(WITH_PARTITION_STORAGE_ENGINE OFF)
SET(PLUGIN_PARTITION "NO")
IF(num EQUAL FEATURE_SET_xsmall)
SET(WITH_NONE ON)
ENDIF()
@ -65,34 +63,23 @@ IF(FEATURE_SET)
SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "")
ENDIF()
IF(num GREATER FEATURE_SET_small)
SET(WITH_ARCHIVE_STORAGE_ENGINE ON)
SET(WITH_BLACKHOLE_STORAGE_ENGINE ON)
SET(WITH_FEDERATEDX_STORAGE_ENGINE ON)
SET(WITH_PLUGIN_FEEDBACK ON)
SET(PLUGIN_ARCHIVE "STATIC")
SET(PLUGIN_BLACKHOLE "STATIC")
SET(PLUGIN_FEDERATEDX "STATIC")
SET(PLUGIN_FEEDBACK "STATIC")
ENDIF()
IF(num GREATER FEATURE_SET_classic)
SET(WITH_INNOBASE_STORAGE_ENGINE ON)
SET(PLUGIN_INNOBASE "STATIC")
ENDIF()
IF(num GREATER FEATURE_SET_large)
SET(WITH_PARTITION_STORAGE_ENGINE ON)
SET(PLUGIN_PARTITION "STATIC")
#SET(PLUGIN_CASSANDRA "STATIC")
ENDIF()
IF(num GREATER FEATURE_SET_xlarge)
# OPTION(WITH_ALL ON)
# better no set this, otherwise server would be linked
# statically with experimental stuff like audit_null
ENDIF()
# Update cache with current values, remove engines we do not care about
# from build.
FOREACH(eng ARCHIVE BLACKHOLE FEDERATED INNOBASE PARTITION)
IF(NOT WITH_${eng}_STORAGE_ENGINE)
SET(WITHOUT_${eng}_STORAGE_ENGINE ON CACHE BOOL "")
MARK_AS_ADVANCED(WITHOUT_${eng}_STORAGE_ENGINE)
SET(WITH_${eng}_STORAGE_ENGINE OFF CACHE BOOL "")
ELSE()
SET(WITH_${eng}_STORAGE_ENGINE ON CACHE BOOL "")
ENDIF()
ENDFOREACH()
ENDIF()
OPTION(ENABLED_LOCAL_INFILE "" ON)

2
cmake/install_macros.cmake

@ -312,7 +312,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET")
ENDIF()
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
IF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
STRING(REPLACE "${CMAKE_BINARY_DIR}" "${DEBUGBUILDDIR}" debug_target_location "${target_location}")
ELSE()
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug" debug_target_location "${target_location}" )

138
cmake/plugin.cmake

@ -29,11 +29,11 @@ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake)
MACRO(MYSQL_ADD_PLUGIN)
MYSQL_PARSE_ARGUMENTS(ARG
"LINK_LIBRARIES;DEPENDENCIES;MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME;COMPONENT;CONFIG"
"LINK_LIBRARIES;DEPENDENCIES;MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME;COMPONENT;CONFIG;ONLY_IF"
"STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;RECOMPILE_FOR_EMBEDDED"
${ARGN}
)
# Add common include directories
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
@ -47,45 +47,58 @@ MACRO(MYSQL_ADD_PLUGIN)
STRING(TOUPPER ${plugin} plugin)
STRING(TOLOWER ${plugin} target)
# Figure out whether to build plugin
IF(WITH_PLUGIN_${plugin})
SET(WITH_${plugin} 1)
ENDIF()
IF(WITH_MAX_NO_NDB)
SET(WITH_MAX 1)
SET(WITHOUT_NDBCLUSTER 1)
ENDIF()
IF (ARG_MANDATORY)
UNSET(PLUGIN_${plugin} CACHE)
SET(PLUGIN_${plugin} "YES")
ELSE()
SET (compat ".")
# Figure out whether to build plugin.
# recognize and support the maze of old WITH/WITHOUT combinations
IF(WITHOUT_${plugin}_STORAGE_ENGINE
OR WITHOUT_${plugin}
OR WITHOUT_PLUGIN_${plugin}
OR WITH_NONE)
SET(compat "${compat}without")
ENDIF()
IF(WITH_${plugin}_STORAGE_ENGINE
OR WITH_${plugin}
OR WITH_PLUGIN_${plugin}
OR WITH_ALL
OR WITH_MAX
OR WITH_MAX_NO_NDB
OR ARG_DEFAULT)
SET(compat "with${compat}")
ENDIF()
IF(ARG_DEFAULT)
IF(NOT DEFINED WITH_${plugin} AND
NOT DEFINED WITH_${plugin}_STORAGE_ENGINE)
SET(WITH_${plugin} 1)
IF (compat STREQUAL ".")
SET(howtobuild DYNAMIC)
ELSEIF (compat STREQUAL "with.")
IF (NOT ARG_MODULE_ONLY)
SET(howtobuild STATIC)
ELSE()
SET(howtobuild DYNAMIC)
ENDIF()
ELSEIF (compat STREQUAL ".without")
SET(howtobuild NO)
ELSEIF (compat STREQUAL "with.without")
SET(howtobuild STATIC)
ENDIF()
# NO - not at all
# YES - static if possible, otherwise dynamic if possible, otherwise abort
# AUTO - static if possible, otherwise dynamic, if possible
# STATIC - static if possible, otherwise not at all
# DYNAMIC - dynamic if possible, otherwise not at all
SET(PLUGIN_${plugin} ${howtobuild}
CACHE STRING "How to build plugin ${plugin}. Options are: NO STATIC DYNAMIC YES AUTO.")
ENDIF()
IF(WITH_${plugin}_STORAGE_ENGINE
OR WITH_{$plugin}
OR WITH_ALL
OR WITH_MAX
AND NOT WITHOUT_${plugin}_STORAGE_ENGINE
AND NOT WITHOUT_${plugin}
AND NOT ARG_MODULE_ONLY)
SET(WITH_${plugin} 1)
ELSEIF(WITHOUT_${plugin} OR WITHOUT_${plugin}_STORAGE_ENGINE OR
WITH_NONE OR ${plugin}_DISABLED)
SET(WITHOUT_${plugin} 1)
SET(WITH_${plugin}_STORAGE_ENGINE 0)
SET(WITH_${plugin} 0)
ENDIF()
IF(ARG_MANDATORY)
SET(WITH_${plugin} 1)
IF (NOT PLUGIN_${plugin} MATCHES "^(NO|YES|AUTO|STATIC|DYNAMIC)$")
MESSAGE(FATAL_ERROR "Invalid value for PLUGIN_${plugin}")
ENDIF()
IF(ARG_STORAGE_ENGINE)
SET(with_var "WITH_${plugin}_STORAGE_ENGINE" )
ELSE()
@ -95,7 +108,6 @@ MACRO(MYSQL_ADD_PLUGIN)
IF(NOT ARG_DEPENDENCIES)
SET(ARG_DEPENDENCIES)
ENDIF()
SET(BUILD_PLUGIN 1)
IF(NOT ARG_MODULE_OUTPUT_NAME)
IF(ARG_STORAGE_ENGINE)
@ -105,10 +117,15 @@ MACRO(MYSQL_ADD_PLUGIN)
ENDIF()
ENDIF()
IF(ARG_ONLY_IF AND NOT ${ARG_ONLY_IF})
SET(ARG_DISABLED 1)
ENDIF()
# Build either static library or module
IF (WITH_${plugin} AND NOT ARG_MODULE_ONLY)
IF (PLUGIN_${plugin} MATCHES "(STATIC|AUTO|YES)" AND NOT ARG_MODULE_ONLY
AND NOT ARG_DISABLED)
IF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
# If there is a shared library from previous shared build,
# remove it. This is done just for mysql-test-run.pl
# so it does not try to use stale shared lib as plugin
@ -142,17 +159,15 @@ MACRO(MYSQL_ADD_PLUGIN)
OUTPUT_NAME ${ARG_STATIC_OUTPUT_NAME})
ENDIF()
IF(ARG_LINK_LIBRARIES)
TARGET_LINK_LIBRARIES (${target} ${ARG_LINK_LIBRARIES})
ENDIF()
# Update mysqld dependencies
SET (MYSQLD_STATIC_PLUGIN_LIBS ${MYSQLD_STATIC_PLUGIN_LIBS}
${target} ${ARG_LINK_LIBRARIES} CACHE INTERNAL "" FORCE)
IF(ARG_MANDATORY)
SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server"
FORCE)
ELSE()
SET(${with_var} ON CACHE BOOL "Link ${plugin} statically to the server"
FORCE)
ENDIF()
SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server" FORCE)
IF(ARG_MANDATORY)
SET (mysql_mandatory_plugins
@ -163,14 +178,16 @@ MACRO(MYSQL_ADD_PLUGIN)
"${mysql_optional_plugins} builtin_maria_${target}_plugin,")
SET (mysql_optional_plugins ${mysql_optional_plugins} PARENT_SCOPE)
ENDIF()
ELSEIF(NOT WITHOUT_${plugin} AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS)
ELSEIF(PLUGIN_${plugin} MATCHES "(DYNAMIC|AUTO|YES)"
AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS
AND NOT ARG_DISABLED)
ADD_VERSION_INFO(${target} MODULE SOURCES)
ADD_LIBRARY(${target} MODULE ${SOURCES})
DTRACE_INSTRUMENT(${target})
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX ""
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
TARGET_LINK_LIBRARIES (${target} mysqlservices)
TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES})
# Plugin uses symbols defined in mysqld executable.
# Some operating systems like Windows and OSX and are pretty strict about
@ -180,15 +197,12 @@ MACRO(MYSQL_ADD_PLUGIN)
# Thus we skip TARGET_LINK_LIBRARIES on Linux, as it would only generate
# an additional dependency.
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
TARGET_LINK_LIBRARIES (${target} mysqld ${ARG_LINK_LIBRARIES})
TARGET_LINK_LIBRARIES (${target} mysqld)
ENDIF()
ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES})
IF(NOT ARG_MODULE_ONLY)
# set cached variable, e.g with checkbox in GUI
SET(${with_var} OFF CACHE BOOL "Link ${plugin} statically to the server"
FORCE)
ENDIF()
UNSET(${with_var} CACHE)
SET_TARGET_PROPERTIES(${target} PROPERTIES
OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}")
# Install dynamic library
@ -213,18 +227,8 @@ MACRO(MYSQL_ADD_PLUGIN)
ENDIF()
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT ${ARG_COMPONENT})
#INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug COMPONENT ${ARG_COMPONENT})
ELSE()
IF(WITHOUT_${plugin})
# Update cache variable
STRING(REPLACE "WITH_" "WITHOUT_" without_var ${with_var})
SET(${without_var} ON CACHE BOOL "Don't build ${plugin}"
FORCE)
ENDIF()
SET(BUILD_PLUGIN 0)
ENDIF()
IF(BUILD_PLUGIN AND ARG_LINK_LIBRARIES)
TARGET_LINK_LIBRARIES (${target} ${ARG_LINK_LIBRARIES})
ELSEIF(PLUGIN_${plugin} MATCHES "YES")
MESSAGE(FATAL_ERROR "Plugin ${plugin} cannot be built")
ENDIF()
GET_FILENAME_COMPONENT(subpath ${CMAKE_CURRENT_SOURCE_DIR} NAME)

2
cmake/ssl.cmake

@ -152,6 +152,8 @@ MACRO (MYSQL_CHECK_SSL)
FIND_LIBRARY(CRYPTO_LIBRARY
NAMES crypto libeay32
HINTS ${OPENSSL_ROOT_DIR}/lib)
MARK_AS_ADVANCED(CRYPTO_LIBRARY OPENSSL_LIBRARIES OPENSSL_ROOT_DIR
OPENSSL_INCLUDE_DIR)
IF (WITH_SSL_PATH)
LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES)
ENDIF()

1
config.h.cmake

@ -526,7 +526,6 @@
#cmakedefine ENABLED_LOCAL_INFILE 1
#cmakedefine ENABLED_PROFILING 1
#cmakedefine EXTRA_DEBUG 1
#cmakedefine BACKUP_TEST 1
#cmakedefine CYBOZU 1
#cmakedefine USE_SYMDIR 1

2
extra/CMakeLists.txt

@ -72,7 +72,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
ENDIF()
ENDIF()
IF(WITH_INNOBASE_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE OR WITH_XTRADB_STORAGE_ENGINE)
# Add path to the InnoDB headers
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innobase/include)
# We use the InnoDB code directly in case the code changes.

2
mysql-test/mysql-test-run.pl

@ -1900,7 +1900,7 @@ sub collect_mysqld_features {
# they are listed in the --help output as
# --archive[=name] Enable or disable ARCHIVE plugin. Possible values are ON, OFF, FORCE (don't start if the plugin fails to load).
push @optional_plugins, $1
if /^ --([-a-z0-9]+)\[=name\] +Enable or disable \w+ plugin. Possible values are ON, OFF, FORCE/;
if /^ --([-a-z0-9]+)\[=name\] +Enable or disable \w+ plugin. One of: ON, OFF, FORCE/;
next;
}

8
mysql-test/r/myisam.result

@ -656,7 +656,7 @@ test.t2 984116287
drop table t1, t2;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method nulls_unequal
myisam_stats_method NULLS_UNEQUAL
create table t1 (a int, key(a));
insert into t1 values (0),(1),(2),(3),(4);
insert into t1 select NULL from t1;
@ -677,7 +677,7 @@ t1 1 a 1 a A 10 NULL NULL YES BTREE
set myisam_stats_method=nulls_equal;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method nulls_equal
myisam_stats_method NULLS_EQUAL
insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
@ -697,7 +697,7 @@ t1 1 a 1 a A 5 NULL NULL YES BTREE
set myisam_stats_method=DEFAULT;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method nulls_unequal
myisam_stats_method NULLS_UNEQUAL
insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
@ -718,7 +718,7 @@ drop table t1;
set myisam_stats_method=nulls_ignored;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method nulls_ignored
myisam_stats_method NULLS_IGNORED
create table t1 (
a char(3), b char(4), c char(5), d char(6),
key(a,b,c,d)

121
mysql-test/r/mysqld--help.result

@ -39,8 +39,7 @@ The following options may be given as the first argument:
increase this to get more performance
--binlog-checksum=name
Type of BINLOG_CHECKSUM_ALG. Include checksum for log
events in the binary log. Possible values are NONE and
CRC32; default is NONE.
events in the binary log. One of: NONE, CRC32
--binlog-commit-wait-count=#
If non-zero, binlog write will wait at most
binlog_commit_wait_usec microseconds for at least this
@ -71,10 +70,7 @@ The following options may be given as the first argument:
statements where only row-based is correct: those which
involve user-defined functions (i.e. UDFs) or the UUID()
function; for those, row-based binary logging is
automatically used. If NDBCLUSTER is enabled and
binlog-format is MIXED, the format switches to row-based
and back implicitly per each query accessing an
NDBCLUSTER table
automatically used.
--binlog-ignore-db=name
Tells the master that updates to the given database
should not be logged to the binary log.
@ -114,11 +110,11 @@ The following options may be given as the first argument:
--collation-server=name
Set the default collation.
--completion-type=name
The transaction completion type, one of NO_CHAIN, CHAIN,
The transaction completion type. One of: NO_CHAIN, CHAIN,
RELEASE
--concurrent-insert[=name]
Use concurrent insert with MyISAM. Possible values are
NEVER, AUTO, ALWAYS
Use concurrent insert with MyISAM. One of: NEVER, AUTO,
ALWAYS
--console Write error output on screen; don't remove the console
window on windows.
--core-file Write core on errors.
@ -137,9 +133,8 @@ The following options may be given as the first argument:
Short timeout for the two-step deadlock detection (in
microseconds)
--default-regex-flags=name
Default flags for the regex library. Syntax:
default-regex-flags='[flag[,flag[,flag...]]]'. See the
manual for the complete list of valid flags
Default flags for the regex library. Any combination of:
DOTALL, DUPNAMES, EXTENDED, EXTRA, MULTILINE, UNGREEDY
--default-storage-engine=name
The default storage engine for new tables
--default-time-zone=name
@ -150,7 +145,7 @@ The following options may be given as the first argument:
--default-week-format=#
The default week format used by WEEK() functions
--delay-key-write[=name]
Type of DELAY_KEY_WRITE
Type of DELAY_KEY_WRITE. One of: OFF, ON, ALL
--delayed-insert-limit=#
After inserting delayed_insert_limit rows, the INSERT
DELAYED handler will check if there are any SELECT
@ -252,7 +247,7 @@ The following options may be given as the first argument:
(unless the user has SUPER privilege)
--init-file=name Read SQL commands from this file at startup
--init-rpl-role=name
Set the replication role.
Set the replication role. One of: MASTER, SLAVE
--init-slave=name Command(s) that are executed by a slave server each time
the SQL thread starts
--interactive-timeout=#
@ -329,8 +324,8 @@ The following options may be given as the first argument:
not specified then 'datadir'/'log-basename'.err or the
'pid-file' path with extension .err is used
--log-isam[=name] Log all MyISAM changes to file.
--log-output=name Syntax: log-output=value[,value...], where "value" could
be TABLE, FILE or NONE
--log-output=name How logs should be written. Any combination of: NONE,
FILE, TABLE
--log-queries-not-using-indexes
Log queries that are executed without benefit of any
index to the slow log if it is open
@ -343,10 +338,9 @@ The following options may be given as the first argument:
Log slow OPTIMIZE, ANALYZE, ALTER and other
administrative statements to the slow log if it is open.
--log-slow-filter=name
Log only certain types of queries. Multiple flags can be
specified, separated by commas. Valid values are admin,
slave, filesort, filesort_on_disk, full_join, full_scan,
query_cache, query_cache_miss, tmp_table,
Log only certain types of queries. Any combination of:
admin, filesort, filesort_on_disk, full_join, full_scan,
query_cache, query_cache_miss, tmp_table,
tmp_table_on_disk
--log-slow-rate-limit=#
Write to slow log every #th slow query. Set to 1 to log
@ -356,8 +350,8 @@ The following options may be given as the first argument:
Log slow statements executed by slave thread to the slow
log if it is open.
--log-slow-verbosity=name
log-slow-verbosity=[value[,value ...]] where value is one
of 'innodb', 'query_plan', 'explain'
Verbosity level for the slow log. Any combination of:
innodb, query_plan, explain
--log-tc=name Path to transaction coordinator log (used for
transactions that affect more than one storage engine,
when binary log is disabled).
@ -458,9 +452,9 @@ The following options may be given as the first argument:
Restricts the total memory used for memory mapping of
MySQL tables
--myisam-recover-options[=name]
Syntax: myisam-recover-options[=option[,option...]],
where option can be DEFAULT, BACKUP, BACKUP_ALL, FORCE,
QUICK, or OFF
Specifies how corrupted tables should be automatically
repaired. Any combination of: DEFAULT, BACKUP, FORCE,
QUICK, BACKUP_ALL, OFF
--myisam-repair-threads=#
If larger than 1, when repairing a MyISAM table all
indexes will be created in parallel, with one thread per
@ -489,8 +483,9 @@ The following options may be given as the first argument:
See also --old-mode
--old-alter-table Use old, non-optimized alter table
--old-mode=name Used to emulate old behavior from earlier MariaDB or
MySQL versions. Syntax: old_mode=mode[,mode[,mode...]].
See the manual for the complete list of valid old modes
MySQL versions. Any combination of:
NO_DUP_KEY_WARNINGS_WITH_IGNORE, NO_PROGRESS_INFO,
ZERO_DATE_TIME_CAST
--old-passwords Use old password encryption method (needed for 4.0 and
older clients)
--old-style-user-limits
@ -524,19 +519,20 @@ The following options may be given as the first argument:
Controls number of record samples to check condition
selectivity
--optimizer-switch=name
optimizer_switch=option=val[,option=val...], where option
is one of {derived_merge, derived_with_keys, firstmatch,
in_to_exists, engine_condition_pushdown,
index_condition_pushdown, index_merge,
index_merge_intersection, index_merge_sort_intersection,
index_merge_sort_union, index_merge_union,
join_cache_bka, join_cache_hashed,
join_cache_incremental, loosescan, materialization, mrr,
mrr_cost_based, mrr_sort_keys, optimize_join_buffer_size,
outer_join_with_cache, partial_match_rowid_merge,
partial_match_table_scan, semijoin, semijoin_with_cache,
subquery_cache, table_elimination, extended_keys,
exists_to_in } and val is one of {on, off, default}
Fine-tune the optimizer behavior. Takes a comma-separated
list of option=value pairs, where value is on, off, or
default, and options are: index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection,
index_merge_sort_intersection, engine_condition_pushdown,
index_condition_pushdown, derived_merge,
derived_with_keys, firstmatch, loosescan, materialization,
in_to_exists, semijoin, partial_match_rowid_merge,
partial_match_table_scan, subquery_cache, mrr,
mrr_cost_based, mrr_sort_keys, outer_join_with_cache,
semijoin_with_cache, join_cache_incremental,
join_cache_hashed, join_cache_bka,
optimize_join_buffer_size, table_elimination,
extended_keys, exists_to_in
--optimizer-use-condition-selectivity=#
Controls selectivity of which conditions the optimizer
takes into account to calculate cardinality of a partial
@ -689,9 +685,9 @@ The following options may be given as the first argument:
in an incremental way. It can be specified many times,
adding more plugins every time.
--plugin-maturity=name
The lowest desirable plugin maturity (unknown,
experimental, alpha, beta, gamma, or stable). Plugins
less mature than that will not be installed or loaded.
The lowest desirable plugin maturity. Plugins less mature
than that will not be installed or loaded. One of:
unknown, experimental, alpha, beta, gamma, stable
-P, --port=# Port number to use for connection or 0 to default to,
my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default
(3306), whatever comes first
@ -934,11 +930,10 @@ The following options may be given as the first argument:
transaction in case it failed with a deadlock or elapsed
lock wait timeout, before giving up and stopping
--slave-type-conversions=name
Set of slave type conversions that are enabled. Legal
values are: ALL_LOSSY to enable lossy conversions and
ALL_NON_LOSSY to enable non-lossy conversions. If the
variable is assigned the empty set, no conversions are
allowed and it is expected that the types match exactly.
Set of slave type conversions that are enabled. If the
variable is empty, no conversions are allowed and it is
expected that the types match exactly. Any combination
of: ALL_LOSSY, ALL_NON_LOSSY
--slow-launch-time=#
If creating the thread takes longer than this value (in
seconds), the Slow_launch_threads counter will be
@ -955,8 +950,18 @@ The following options may be given as the first argument:
--sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of
this size
--sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
for the complete list of valid sql modes
--sql-mode=name Sets the sql mode. Any combination of: REAL_AS_FLOAT,
PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE,
IGNORE_BAD_TABLE_OPTIONS, ONLY_FULL_GROUP_BY,
NO_UNSIGNED_SUBTRACTION, NO_DIR_IN_CREATE, POSTGRESQL,
ORACLE, MSSQL, DB2, MAXDB, NO_KEY_OPTIONS,
NO_TABLE_OPTIONS, NO_FIELD_OPTIONS, MYSQL323, MYSQL40,
ANSI, NO_AUTO_VALUE_ON_ZERO, NO_BACKSLASH_ESCAPES,
STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE,
NO_ZERO_DATE, ALLOW_INVALID_DATES,
ERROR_FOR_DIVISION_BY_ZERO, TRADITIONAL,
NO_AUTO_CREATE_USER, HIGH_NOT_PRECEDENCE,
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
--stored-program-cache=#
@ -987,8 +992,8 @@ The following options may be given as the first argument:
--table-open-cache=#
The number of cached open tables
--tc-heuristic-recover=name
Decision to use in heuristic recover process. Possible
values are COMMIT or ROLLBACK.
Decision to use in heuristic recover process. One of:
COMMIT, ROLLBACK
--thread-cache-size=#
How many threads we should keep in a cache for reuse
--thread-pool-idle-timeout=#
@ -1024,7 +1029,9 @@ The following options may be given as the first argument:
Allocation block size for transactions to be stored in
binary log
--transaction-isolation=name
Default transaction isolation level.
Default transaction isolation level. One of:
READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ,
SERIALIZABLE
--transaction-prealloc-size=#
Persistent buffer for transactions to be stored in binary
log
@ -1039,8 +1046,8 @@ The following options may be given as the first argument:
of the underlying table and the query uses a LIMIT clause
(usually get from GUI tools)
--use-stat-tables=name
Specifies how to use system statistics tables. Possible
values are NEVER, COMPLEMENTARY, PREFERABLY
Specifies how to use system statistics tables. One of:
NEVER, COMPLEMENTARY, PREFERABLY
-u, --user=name Run mysqld daemon as user.
--userstat Enables statistics gathering for USER_STATISTICS,
CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS
@ -1196,7 +1203,7 @@ myisam-mmap-size 18446744073709551615
myisam-recover-options DEFAULT
myisam-repair-threads 1
myisam-sort-buffer-size 134216704
myisam-stats-method nulls_unequal
myisam-stats-method NULLS_UNEQUAL
myisam-use-mmap FALSE
net-buffer-length 16384
net-read-timeout 30
@ -1282,7 +1289,7 @@ relay-log-purge TRUE
relay-log-recovery FALSE
relay-log-space-limit 0
replicate-annotate-row-events FALSE
replicate-events-marked-for-skip replicate
replicate-events-marked-for-skip REPLICATE
replicate-same-server-id FALSE
report-host (No default value)
report-password (No default value)

4
mysql-test/r/not_embedded_server.result

@ -1,4 +1,4 @@
call mtr.add_suppression("Can't open and lock privilege tables: Table 'host' was not locked with LOCK TABLES");
call mtr.add_suppression("Can't open and lock privilege tables: Table 'user' was not locked with LOCK TABLES");
SHOW VARIABLES like 'slave_skip_errors';
Variable_name Value
slave_skip_errors OFF
@ -16,7 +16,7 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT);
LOCK TABLES t1 READ;
FLUSH PRIVILEGES;
ERROR HY000: Table 'host' was not locked with LOCK TABLES
ERROR HY000: Table 'user' was not locked with LOCK TABLES
UNLOCK TABLES;
DROP TABLE t1;
#

3
mysql-test/r/sp-destruct.result

@ -128,11 +128,8 @@ CREATE FUNCTION f1() RETURNS INT RETURN 1;
RENAME TABLE mysql.procs_priv TO procs_priv_backup;
FLUSH TABLE mysql.procs_priv;
DROP FUNCTION f1;
ERROR 42S02: Table 'mysql.procs_priv' doesn't exist
SHOW WARNINGS;
Level Code Message
Error 1146 Table 'mysql.procs_priv' doesn't exist
Warning 1405 Failed to revoke all privileges to dropped routine
# Restore the procs_priv table
RENAME TABLE procs_priv_backup TO mysql.procs_priv;
FLUSH TABLE mysql.procs_priv;

20
mysql-test/r/temp_table_frm.result

@ -0,0 +1,20 @@
create table t1 select * from information_schema.session_status where variable_name like 'Opened%';
create temporary table t2 (a int) engine=memory;
select variable_name, session_status.variable_value - t1.variable_value
from information_schema.session_status join t1 using (variable_name);
variable_name session_status.variable_value - t1.variable_value
OPENED_FILES 0
OPENED_PLUGIN_LIBRARIES 0
OPENED_TABLE_DEFINITIONS 2
OPENED_TABLES 2
OPENED_VIEWS 0
truncate table t2;
select variable_name, session_status.variable_value - t1.variable_value
from information_schema.session_status join t1 using (variable_name);
variable_name session_status.variable_value - t1.variable_value
OPENED_FILES 0
OPENED_PLUGIN_LIBRARIES 0
OPENED_TABLE_DEFINITIONS 2
OPENED_TABLES 2
OPENED_VIEWS 0
drop table t1;

8
mysql-test/suite/rpl/r/rpl_skip_replication.result

@ -8,22 +8,22 @@ ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) fo
DROP USER'nonsuperuser'@'127.0.0.1';
SELECT @@global.replicate_events_marked_for_skip;
@@global.replicate_events_marked_for_skip
replicate
REPLICATE
SET GLOBAL replicate_events_marked_for_skip=FILTER_ON_SLAVE;
ERROR HY000: This operation cannot be performed as you have a running slave ''; run STOP SLAVE '' first
SELECT @@global.replicate_events_marked_for_skip;
@@global.replicate_events_marked_for_skip
replicate
REPLICATE
STOP SLAVE;
SET SESSION replicate_events_marked_for_skip=FILTER_ON_MASTER;
ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@global.replicate_events_marked_for_skip;
@@global.replicate_events_marked_for_skip
replicate
REPLICATE
SET GLOBAL replicate_events_marked_for_skip=FILTER_ON_MASTER;
SELECT @@global.replicate_events_marked_for_skip;
@@global.replicate_events_marked_for_skip
filter_on_master
FILTER_ON_MASTER
START SLAVE;
SELECT @@skip_replication;
@@skip_replication

22
mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result

@ -1,47 +1,47 @@
SET @orig = @@global.innodb_checksum_algorithm;
SELECT @orig;
@orig
innodb
INNODB
SET GLOBAL innodb_checksum_algorithm = 'crc32';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
crc32
CRC32
SET GLOBAL innodb_checksum_algorithm = 'strict_crc32';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
strict_crc32
STRICT_CRC32
SET GLOBAL innodb_checksum_algorithm = 'innodb';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
innodb
INNODB
SET GLOBAL innodb_checksum_algorithm = 'strict_innodb';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
strict_innodb
STRICT_INNODB
SET GLOBAL innodb_checksum_algorithm = 'none';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
none
NONE
SET GLOBAL innodb_checksum_algorithm = 'strict_none';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
strict_none
STRICT_NONE
SET GLOBAL innodb_checksum_algorithm = '';
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of ''
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
strict_none
STRICT_NONE
SET GLOBAL innodb_checksum_algorithm = 'foobar';
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of 'foobar'
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
strict_none
STRICT_NONE
SET GLOBAL innodb_checksum_algorithm = 123;
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of '123'
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
strict_none
STRICT_NONE
SET GLOBAL innodb_checksum_algorithm = @orig;
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
innodb
INNODB

6
mysql-test/suite/sys_vars/r/innodb_cleaner_lsn_age_factor_basic.result

@ -1,17 +1,17 @@
SET @start_value = @@GLOBAL.innodb_cleaner_lsn_age_factor;
SELECT @@GLOBAL.innodb_cleaner_lsn_age_factor;
@@GLOBAL.innodb_cleaner_lsn_age_factor
high_checkpoint
HIGH_CHECKPOINT
SELECT @@SESSION.innodb_cleaner_lsn_age_factor;
ERROR HY000: Variable 'innodb_cleaner_lsn_age_factor' is a GLOBAL variable
SET GLOBAL innodb_cleaner_lsn_age_factor='legacy';
SELECT @@GLOBAL.innodb_cleaner_lsn_age_factor;
@@GLOBAL.innodb_cleaner_lsn_age_factor
legacy
LEGACY
SET GLOBAL innodb_cleaner_lsn_age_factor='high_checkpoint';
SELECT @@GLOBAL.innodb_cleaner_lsn_age_factor;
@@GLOBAL.innodb_cleaner_lsn_age_factor
high_checkpoint
HIGH_CHECKPOINT
SET GLOBAL innodb_cleaner_lsn_age_factor=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_cleaner_lsn_age_factor'
SET GLOBAL innodb_cleaner_lsn_age_factor=1e1;

6
mysql-test/suite/sys_vars/r/innodb_empty_free_list_algorithm_basic.result

@ -1,17 +1,17 @@
SET @start_value = @@GLOBAL.innodb_empty_free_list_algorithm;
SELECT @@GLOBAL.innodb_empty_free_list_algorithm;
@@GLOBAL.innodb_empty_free_list_algorithm
backoff
BACKOFF
SELECT @@SESSION.innodb_empty_free_list_algorithm;
ERROR HY000: Variable 'innodb_empty_free_list_algorithm' is a GLOBAL variable
SET GLOBAL innodb_empty_free_list_algorithm='legacy';
SELECT @@GLOBAL.innodb_empty_free_list_algorithm;
@@GLOBAL.innodb_empty_free_list_algorithm
legacy
LEGACY
SET GLOBAL innodb_empty_free_list_algorithm='backoff';
SELECT @@GLOBAL.innodb_empty_free_list_algorithm;
@@GLOBAL.innodb_empty_free_list_algorithm
backoff
BACKOFF
SET GLOBAL innodb_empty_free_list_algorithm=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_empty_free_list_algorithm'
SET GLOBAL innodb_empty_free_list_algorithm=1e1;

6
mysql-test/suite/sys_vars/r/innodb_foreground_preflush_basic.result

@ -1,17 +1,17 @@
SET @start_value = @@GLOBAL.innodb_foreground_preflush;
SELECT @@GLOBAL.innodb_foreground_preflush;
@@GLOBAL.innodb_foreground_preflush
exponential_backoff
EXPONENTIAL_BACKOFF
SELECT @@SESSION.innodb_foreground_preflush;
ERROR HY000: Variable 'innodb_foreground_preflush' is a GLOBAL variable
SET GLOBAL innodb_foreground_preflush='sync_preflush';
SELECT @@GLOBAL.innodb_foreground_preflush;
@@GLOBAL.innodb_foreground_preflush
sync_preflush
SYNC_PREFLUSH
SET GLOBAL innodb_foreground_preflush='exponential_backoff';
SELECT @@GLOBAL.innodb_foreground_preflush;
@@GLOBAL.innodb_foreground_preflush
exponential_backoff
EXPONENTIAL_BACKOFF
SET GLOBAL innodb_foreground_preflush=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_foreground_preflush'
SET GLOBAL innodb_foreground_preflush=1e1;

22
mysql-test/suite/sys_vars/r/innodb_log_checksum_algorithm_basic.result

@ -1,47 +1,47 @@
SET @orig = @@global.innodb_log_checksum_algorithm;
SELECT @orig;
@orig
innodb
INNODB
SET GLOBAL innodb_log_checksum_algorithm = 'crc32';
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
crc32
CRC32
SET GLOBAL innodb_log_checksum_algorithm = 'strict_crc32';
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
strict_crc32
STRICT_CRC32
SET GLOBAL innodb_log_checksum_algorithm = 'innodb';
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
innodb
INNODB
SET GLOBAL innodb_log_checksum_algorithm = 'strict_innodb';
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
strict_innodb
STRICT_INNODB
SET GLOBAL innodb_log_checksum_algorithm = 'none';
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
none
NONE
SET GLOBAL innodb_log_checksum_algorithm = 'strict_none';
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
strict_none
STRICT_NONE
SET GLOBAL innodb_log_checksum_algorithm = '';
ERROR 42000: Variable 'innodb_log_checksum_algorithm' can't be set to the value of ''
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
strict_none
STRICT_NONE
SET GLOBAL innodb_log_checksum_algorithm = 'foobar';
ERROR 42000: Variable 'innodb_log_checksum_algorithm' can't be set to the value of 'foobar'
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
strict_none
STRICT_NONE
SET GLOBAL innodb_log_checksum_algorithm = 123;
ERROR 42000: Variable 'innodb_log_checksum_algorithm' can't be set to the value of '123'
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
strict_none
STRICT_NONE
SET GLOBAL innodb_log_checksum_algorithm = @orig;
SELECT @@global.innodb_log_checksum_algorithm;
@@global.innodb_log_checksum_algorithm
innodb
INNODB

38
mysql-test/suite/sys_vars/r/myisam_stats_method_basic.result

@ -1,22 +1,22 @@
SET @global_start_value = @@global.myisam_stats_method;
SELECT @global_start_value;
@global_start_value
nulls_unequal
NULLS_UNEQUAL
SET @session_start_value = @@session.myisam_stats_method;
SELECT @session_start_value;
@session_start_value
nulls_unequal
NULLS_UNEQUAL
'#--------------------FN_DYNVARS_097_01------------------------#'
SET @@global.myisam_stats_method = nulls_equal;
SET @@global.myisam_stats_method = DEFAULT;
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_unequal
NULLS_UNEQUAL
SET @@session.myisam_stats_method = nulls_equal;
SET @@session.myisam_stats_method = DEFAULT;
SELECT @@session.myisam_stats_method;
@@session.myisam_stats_method
nulls_unequal
NULLS_UNEQUAL
'#---------------------FN_DYNVARS_097_02-------------------------#'
SET @@global.myisam_stats_method = NULL;
ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of 'NULL'
@ -30,28 +30,28 @@ ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of ''
SET @@global.myisam_stats_method = 'nulls_equal';
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_equal
NULLS_EQUAL
SET @@global.myisam_stats_method = 'nulls_unequal';
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_unequal
NULLS_UNEQUAL
SET @@global.myisam_stats_method = 'nulls_ignored';
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_ignored
NULLS_IGNORED
'Bug: Value of nulls_ignored is not documented. Its ordinal value is 2'
SET @@session.myisam_stats_method = 'nulls_equal';
SELECT @@session.myisam_stats_method;
@@session.myisam_stats_method
nulls_equal
NULLS_EQUAL
SET @@session.myisam_stats_method = 'nulls_unequal';
SELECT @@session.myisam_stats_method;
@@session.myisam_stats_method
nulls_unequal
NULLS_UNEQUAL
SET @@session.myisam_stats_method = 'nulls_ignored';
SELECT @@session.myisam_stats_method;
@@session.myisam_stats_method
nulls_ignored
NULLS_IGNORED
'#--------------------FN_DYNVARS_097_04-------------------------#'
SET @@global.myisam_stats_method = -1;
ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of '-1'
@ -81,15 +81,15 @@ WHERE VARIABLE_NAME='myisam_stats_method';
SET @@global.myisam_stats_method = 0;
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_unequal
NULLS_UNEQUAL
SET @@global.myisam_stats_method = 1;
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_equal
NULLS_EQUAL
SET @@global.myisam_stats_method = 2;
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_ignored
NULLS_IGNORED
SET @@global.myisam_stats_method = 0.4;
ERROR 42000: Incorrect argument type to variable 'myisam_stats_method'
SET @@global.myisam_stats_method = 3;
@ -98,11 +98,11 @@ ERROR 42000: Variable 'myisam_stats_method' can't be set to the value of '3'
SET @@global.myisam_stats_method = TRUE;
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_equal
NULLS_EQUAL
SET @@global.myisam_stats_method = FALSE;
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_unequal
NULLS_UNEQUAL
'#---------------------FN_DYNVARS_097_09----------------------#'
SET myisam_stats_method = 'nulls_equal';
SET session.myisam_stats_method = 'nulls_equal';
@ -112,16 +112,16 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SET session myisam_stats_method = 'nulls_equal';
SELECT @@myisam_stats_method;
@@myisam_stats_method
nulls_equal
NULLS_EQUAL
SET global myisam_stats_method = 'nulls_equal';
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_equal
NULLS_EQUAL
SET @@global.myisam_stats_method = @global_start_value;
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_unequal
NULLS_UNEQUAL
SET @@session.myisam_stats_method = @session_start_value;
SELECT @@session.myisam_stats_method;
@@session.myisam_stats_method
nulls_unequal
NULLS_UNEQUAL

6
mysql-test/suite/sys_vars/r/myisam_stats_method_func.result

@ -5,10 +5,10 @@ SET @@global.myisam_stats_method = nulls_equal;
'connection con1'
SELECT @@global.myisam_stats_method;
@@global.myisam_stats_method
nulls_equal
NULLS_EQUAL
SELECT @@session.myisam_stats_method;
@@session.myisam_stats_method
nulls_equal
NULLS_EQUAL
'#--------------------FN_DYNVARS_097_02-------------------------#'
'connection default'
DROP TABLE IF EXISTS t1;
@ -53,7 +53,7 @@ t1 1 a 1 a A 5 NULL NULL YES BTREE
SET myisam_stats_method = nulls_ignored;
SHOW VARIABLES LIKE 'myisam_stats_method';
Variable_name Value
myisam_stats_method nulls_ignored
myisam_stats_method NULLS_IGNORED
DROP TABLE t1;
CREATE TABLE t1 (
a CHAR(3), b CHAR(4), c CHAR(5), d CHAR(6),

12
mysql-test/suite/sys_vars/r/replicate_events_marked_for_skip_basic.result

@ -4,7 +4,7 @@
SET @save_replicate_events_marked_for_skip = @@GLOBAL.replicate_events_marked_for_skip;
SELECT @save_replicate_events_marked_for_skip;
@save_replicate_events_marked_for_skip
replicate
REPLICATE
# Scope.
SET @@SESSION.replicate_events_marked_for_skip = "";
ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable and should be set with SET GLOBAL
@ -14,22 +14,22 @@ ERROR HY000: Variable 'replicate_events_marked_for_skip' is a GLOBAL variable
SET @@GLOBAL.replicate_events_marked_for_skip=filter_on_master;
SELECT @@GLOBAL.replicate_events_marked_for_skip;
@@GLOBAL.replicate_events_marked_for_skip
filter_on_master
FILTER_ON_MASTER
SET @@GLOBAL.replicate_events_marked_for_skip=filter_on_slave;
SELECT @@GLOBAL.replicate_events_marked_for_skip;
@@GLOBAL.replicate_events_marked_for_skip
filter_on_slave
FILTER_ON_SLAVE
SET @@GLOBAL.replicate_events_marked_for_skip=replicate;
SELECT @@GLOBAL.replicate_events_marked_for_skip;
@@GLOBAL.replicate_events_marked_for_skip
replicate
REPLICATE
SET @@GLOBAL.replicate_events_marked_for_skip=filter;
ERROR 42000: Variable 'replicate_events_marked_for_skip' can't be set to the value of 'filter'
SELECT @@GLOBAL.replicate_events_marked_for_skip;
@@GLOBAL.replicate_events_marked_for_skip
replicate
REPLICATE
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='replicate_events_marked_for_skip';
VARIABLE_NAME VARIABLE_VALUE
REPLICATE_EVENTS_MARKED_FOR_SKIP replicate
REPLICATE_EVENTS_MARKED_FOR_SKIP REPLICATE
# Cleanup.
SET @@GLOBAL.replicate_events_marked_for_skip = @save_replicate_events_marked_for_skip;

2
mysql-test/t/not_embedded_server.test

@ -6,7 +6,7 @@
# End of 4.1 tests
call mtr.add_suppression("Can't open and lock privilege tables: Table 'host' was not locked with LOCK TABLES");
call mtr.add_suppression("Can't open and lock privilege tables: Table 'user' was not locked with LOCK TABLES");
#
# Bug#43835: SHOW VARIABLES does not include 0 for slave_skip_errors

1
mysql-test/t/sp-destruct.test

@ -214,7 +214,6 @@ RENAME TABLE mysql.procs_priv TO procs_priv_backup;
FLUSH TABLE mysql.procs_priv;
# DROP FUNCTION used to cause an assert.
--error ER_NO_SUCH_TABLE
DROP FUNCTION f1;
SHOW WARNINGS;

13
mysql-test/t/temp_table_frm.test

@ -0,0 +1,13 @@
#
# MDEV-4260 Don't create frm files for temporary tables
#
create table t1 select * from information_schema.session_status where variable_name like 'Opened%';
create temporary table t2 (a int) engine=memory;
select variable_name, session_status.variable_value - t1.variable_value
from information_schema.session_status join t1 using (variable_name);
let $tmpdir= `select @@tmpdir`;
--list_files $tmpdir/ #sql*
truncate table t2;
select variable_name, session_status.variable_value - t1.variable_value
from information_schema.session_status join t1 using (variable_name);
drop table t1;

93
mysys/my_getopt.c

@ -1300,6 +1300,48 @@ static uint print_name(const struct my_option *optp)
return s - optp->name;
}
/** prints option comment with indentation and wrapping.
The comment column starts at startpos, and has width of width
Current cursor position is curpos, returns new cursor position
@note can print one character beyond width!
*/
static uint print_comment(const char *comment,
int curpos, int startpos, int width)
{
const char *end= strend(comment);
int endpos= startpos + width;
for (; curpos < startpos; curpos++)
putchar(' ');
if (*comment == '.' || *comment == ',')
{
putchar(*comment);
comment++;
curpos++;
}
while (end - comment > endpos - curpos)
{
const char *line_end;
for (line_end= comment + endpos - curpos;
line_end > comment && *line_end != ' ';
line_end--);
for (; comment < line_end; comment++)
putchar(*comment);
while (*comment == ' ')
comment++; /* skip the space, as a newline will take it's place now */
putchar('\n');
for (curpos= 0; curpos < startpos; curpos++)
putchar(' ');
}
printf("%s", comment);
return curpos + (end - comment);
}
/*
function: my_print_options
@ -1309,12 +1351,12 @@ static uint print_name(const struct my_option *optp)
void my_print_help(const struct my_option *options)
{
uint col, name_space= 22, comment_space= 57;
const char *line_end;
const struct my_option *optp;
DBUG_ENTER("my_print_help");
for (optp= options; optp->name; optp++)
{
const char *typelib_help= 0;
if (!optp->comment)
continue;
if (optp->id && optp->id < 256)
@ -1353,29 +1395,46 @@ void my_print_help(const struct my_option *options)
optp->arg_type == OPT_ARG ? "]" : "");
col+= (optp->arg_type == OPT_ARG) ? 5 : 3;
}
if (col > name_space && optp->comment && *optp->comment)
{
putchar('\n');
col= 0;
}
}
for (; col < name_space; col++)
putchar(' ');
if (optp->comment && *optp->comment)
{
const char *comment= optp->comment, *end= strend(comment);
uint count;
while ((uint) (end - comment) > comment_space)
if (col > name_space)
{
for (line_end= comment + comment_space; *line_end != ' '; line_end--);
for (; comment != line_end; comment++)
putchar(*comment);
comment++; /* skip the space, as a newline will take it's place now */
putchar('\n');
for (col= 0; col < name_space; col++)
putchar(' ');
col= 0;
}
col= print_comment(optp->comment, col, name_space, comment_space);
switch (optp->var_type & GET_TYPE_MASK) {
case GET_ENUM:
typelib_help= ". One of: ";
count= optp->typelib->count;
break;
case GET_SET:
typelib_help= ". Any combination of: ";
count= optp->typelib->count;
break;
case GET_FLAGSET:
typelib_help= ". Takes a comma-separated list of option=value pairs, "
"where value is on, off, or default, and options are: ";
count= optp->typelib->count - 1;
break;
}
if (typelib_help &&
strstr(optp->comment, optp->typelib->type_names[0]) == NULL)
{
int i;
col= print_comment(typelib_help, col, name_space, comment_space);
col= print_comment(optp->typelib->type_names[0], col, name_space, comment_space);
for (i= 1; i < count; i++)
{
col= print_comment(", ", col, name_space, comment_space);
col= print_comment(optp->typelib->type_names[i], col, name_space, comment_space);
}
}
printf("%s", comment);
}
putchar('\n');
if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL)

12
plugin/auth_pam/CMakeLists.txt

@ -4,10 +4,10 @@ INCLUDE (CheckFunctionExists)
CHECK_INCLUDE_FILES (security/pam_appl.h HAVE_PAM_APPL_H)
CHECK_FUNCTION_EXISTS (strndup HAVE_STRNDUP)
IF(HAVE_PAM_APPL_H)
IF(HAVE_STRNDUP)
ADD_DEFINITIONS(-DHAVE_STRNDUP)
ENDIF(HAVE_STRNDUP)
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
ENDIF(HAVE_PAM_APPL_H)
IF(HAVE_STRNDUP)
ADD_DEFINITIONS(-DHAVE_STRNDUP)
ENDIF(HAVE_STRNDUP)
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c ONLY_IF HAVE_PAM_APPL_H
LINK_LIBRARIES pam MODULE_ONLY)

5
plugin/auth_socket/CMakeLists.txt

@ -35,5 +35,8 @@ IF (NOT HAVE_PEERCRED)
ENDIF()
IF(HAVE_PEERCRED OR HAVE_SOCKPEERCRED)
MYSQL_ADD_PLUGIN(auth_socket auth_socket.c MODULE_ONLY)
SET(AUTH_SOCKET_OK 1)
ENDIF()
MYSQL_ADD_PLUGIN(auth_socket auth_socket.c ONLY_IF AUTH_SOCKET_OK MODULE_ONLY)

12
plugin/feedback/CMakeLists.txt

@ -14,10 +14,10 @@ IF(HAVE_NETDB_H)
ENDIF(HAVE_NETDB_H)
IF(WIN32)
MYSQL_ADD_PLUGIN(FEEDBACK ${FEEDBACK_SOURCES}
LINK_LIBRARIES ${SSL_LIBRARIES}
STATIC_ONLY DEFAULT)
ELSE(WIN32)
MYSQL_ADD_PLUGIN(FEEDBACK ${FEEDBACK_SOURCES}
LINK_LIBRARIES ${SSL_LIBRARIES})
SET(MAYBE_STATIC_ONLY STATIC_ONLY)
ENDIF(WIN32)
MYSQL_ADD_PLUGIN(FEEDBACK ${FEEDBACK_SOURCES}
LINK_LIBRARIES ${SSL_LIBRARIES}
${MAYBE_STATIC_ONLY} DEFAULT)

2
plugin/server_audit/server_audit.c

@ -242,7 +242,7 @@ static TYPELIB events_typelib=
array_elements(event_names) - 1, "", event_names, NULL
};
static MYSQL_SYSVAR_SET(events, events, PLUGIN_VAR_RQCMDARG,
"Specifies the set of events to monitor. Can be CONNECT, QUERY, TABLE.",
"Specifies the set of events to monitor",
NULL, NULL, 0, &events_typelib);
#define OUTPUT_SYSLOG 0
#define OUTPUT_FILE 1

2
scripts/CMakeLists.txt

@ -88,7 +88,7 @@ IF(MALLOC_LIB)
INSTALL(FILES ${MALLOC_LIB} DESTINATION ${INSTALL_LIBDIR} OPTIONAL)
ENDIF()
IF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
# Strip maintainer mode options if necessary
STRING(REPLACE "${MY_MAINTAINER_C_WARNINGS}" "" CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
STRING(REPLACE "${MY_MAINTAINER_CXX_WARNINGS}" "" CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")

1
sql/handler.h

@ -1369,7 +1369,6 @@ handlerton *ha_default_tmp_handlerton(THD *thd);
#define HTON_ALTER_NOT_SUPPORTED (1 << 1) //Engine does not support alter
#define HTON_CAN_RECREATE (1 << 2) //Delete all is used for truncate
#define HTON_HIDDEN (1 << 3) //Engine does not appear in lists
#define HTON_FLUSH_AFTER_RENAME (1 << 4)
#define HTON_NOT_USER_SELECTABLE (1 << 5)
#define HTON_TEMPORARY_NOT_SUPPORTED (1 << 6) //Having temporary tables not supported
#define HTON_SUPPORT_LOG_TABLES (1 << 7) //Engine supports log tables

3
sql/log.cc

@ -9569,8 +9569,7 @@ static MYSQL_SYSVAR_ENUM(
binlog_checksum_options,
PLUGIN_VAR_RQCMDARG,
"Type of BINLOG_CHECKSUM_ALG. Include checksum for "
"log events in the binary log. Possible values are NONE and CRC32; "
"default is NONE.",
"log events in the binary log",
NULL,
binlog_checksum_update,
BINLOG_CHECKSUM_ALG_OFF,

8
sql/mysqld.cc

@ -6965,7 +6965,7 @@ struct my_option my_long_options[]=
&master_retry_count, &master_retry_count, 0, GET_ULONG,
REQUIRED_ARG, 3600*24, 0, 0, 0, 0, 0},
#ifdef HAVE_REPLICATION
{"init-rpl-role", 0, "Set the replication role.",
{"init-rpl-role", 0, "Set the replication role",
&rpl_status, &rpl_status, &rpl_role_typelib,
GET_ENUM, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif /* HAVE_REPLICATION */
@ -7093,8 +7093,8 @@ struct my_option my_long_options[]=
&global_system_variables.sysdate_is_now,
0, 0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
{"tc-heuristic-recover", 0,
"Decision to use in heuristic recover process. Possible values are COMMIT "
"or ROLLBACK.", &tc_heuristic_recover, &tc_heuristic_recover,
"Decision to use in heuristic recover process",
&tc_heuristic_recover, &tc_heuristic_recover,
&tc_heuristic_recover_typelib, GET_ENUM, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"temp-pool", 0,
#if (ENABLE_TEMP_POOL)
@ -7106,7 +7106,7 @@ struct my_option my_long_options[]=
&use_temp_pool, &use_temp_pool, 0, GET_BOOL, NO_ARG, 1,
0, 0, 0, 0, 0},
{"transaction-isolation", 0,
"Default transaction isolation level.",
"Default transaction isolation level",
&global_system_variables.tx_isolation,
&global_system_variables.tx_isolation, &tx_isolation_typelib,
GET_ENUM, REQUIRED_ARG, ISO_REPEATABLE_READ, 0, 0, 0, 0, 0},

666
sql/sql_acl.cc
File diff suppressed because it is too large
View File

8
sql/sql_acl.h

@ -197,8 +197,8 @@ static inline int access_denied_error_code(int passwd_used)
/* prototypes */
bool hostname_requires_resolving(const char *hostname);
my_bool acl_init(bool dont_read_acl_tables);
my_bool acl_reload(THD *thd);
bool acl_init(bool dont_read_acl_tables);
bool acl_reload(THD *thd);
void acl_free(bool end=0);
ulong acl_get(const char *host, const char *ip,
const char *user, const char *db, my_bool db_is_pattern);
@ -220,9 +220,9 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table, List <LEX_USER> &user_list,
bool mysql_routine_grant(THD *thd, TABLE_LIST *table, bool is_proc,
List <LEX_USER> &user_list, ulong rights,
bool revoke, bool write_to_binlog);
my_bool grant_init();
bool grant_init();
void grant_free(void);
my_bool grant_reload(THD *thd);
bool grant_reload(THD *thd);
bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
bool any_combination_will_do, uint number, bool no_errors);
bool check_grant_column (THD *thd, GRANT_INFO *grant,

14
sql/sql_base.cc

@ -5508,6 +5508,7 @@ void close_tables_for_reopen(THD *thd, TABLE_LIST **tables,
@param thd Thread context.
@param hton Storage engine of the table, if known,
or NULL otherwise.
@param frm frm image
@param path Path (without .frm)
@param db Database name.
@param table_name Table name.
@ -5527,6 +5528,7 @@ void close_tables_for_reopen(THD *thd, TABLE_LIST **tables,
*/
TABLE *open_table_uncached(THD *thd, handlerton *hton,
LEX_CUSTRING *frm,
const char *path, const char *db,
const char *table_name,
bool add_to_temporary_tables_list,
@ -5561,7 +5563,17 @@ TABLE *open_table_uncached(THD *thd, handlerton *hton,
strend(saved_cache_key)+1, tmp_path);
share->db_plugin= ha_lock_engine(thd, hton);
if (open_table_def(thd, share, GTS_TABLE | GTS_USE_DISCOVERY))
/*
Use the frm image, if possible, open the file otherwise.
The image might be unavailable in ALTER TABLE, when the discovering
engine took over the ownership (see TABLE::read_frm_image).
*/
int res= frm->str
? share->init_from_binary_frm_image(thd, false, frm->str, frm->length)
: open_table_def(thd, share, GTS_TABLE | GTS_USE_DISCOVERY);
if (res)
{
/* No need to lock share->mutex as this is not needed for tmp tables */
free_table_share(share);

3
sql/sql_base.h

@ -127,7 +127,8 @@ bool open_new_frm(THD *thd, TABLE_SHARE *share, const char *alias,
bool get_key_map_from_key_list(key_map *map, TABLE *table,
List<String> *index_list);
TABLE *open_table_uncached(THD *thd, handlerton *hton, const char *path,
TABLE *open_table_uncached(THD *thd, handlerton *hton,
LEX_CUSTRING *frm, const char *path,
const char *db, const char *table_name,
bool add_to_temporary_tables_list,
bool open_in_engine);

2
sql/sql_plugin.cc

@ -3597,7 +3597,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
options[0].typelib= options[1].typelib= &global_plugin_typelib;
strxnmov(comment, max_comment_len, "Enable or disable ", plugin_name,
" plugin. Possible values are ON, OFF, FORCE (don't start "
" plugin. One of: ON, OFF, FORCE (don't start "
"if the plugin fails to load).", NullS);
options[0].comment= comment;
/*

27
sql/sql_table.cc

@ -4847,7 +4847,7 @@ int create_table_impl(THD *thd,
THD::temporary_tables list.
*/
TABLE *table= open_table_uncached(thd, create_info->db_type, path,
TABLE *table= open_table_uncached(thd, create_info->db_type, frm, path,
db, table_name, true, true);
if (!table)
@ -8691,7 +8691,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
// We assume that the table is non-temporary.
DBUG_ASSERT(!table->s->tmp_table);
if (!(altered_table= open_table_uncached(thd, new_db_type,
if (!(altered_table= open_table_uncached(thd, new_db_type, &frm,
alter_ctx.get_tmp_path(),
alter_ctx.new_db,
alter_ctx.tmp_name,
@ -8845,7 +8845,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
if (create_info->tmp_table())
{
if (!open_table_uncached(thd, new_db_type,
if (!open_table_uncached(thd, new_db_type, &frm,
alter_ctx.get_tmp_path(),
alter_ctx.new_db, alter_ctx.tmp_name,
true, true))
@ -8867,7 +8867,8 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
/* table is a normal table: Create temporary table in same directory */
/* Open our intermediate table. */
new_table= open_table_uncached(thd, new_db_type, alter_ctx.get_tmp_path(),
new_table= open_table_uncached(thd, new_db_type, &frm,
alter_ctx.get_tmp_path(),
alter_ctx.new_db, alter_ctx.tmp_name,
true, true);
}
@ -9073,24 +9074,6 @@ end_inplace:
if (write_bin_log(thd, true, thd->query(), thd->query_length()))
DBUG_RETURN(true);
if (ha_check_storage_engine_flag(old_db_type, HTON_FLUSH_AFTER_RENAME))
{
/*
For the alter table to be properly flushed to the logs, we
have to open the new table. If not, we get a problem on server
shutdown. But we do not need to attach MERGE children.
*/
TABLE *t_table;
t_table= open_table_uncached(thd, new_db_type, alter_ctx.get_new_path(),
alter_ctx.new_db, alter_ctx.new_name,
false, true);
if (t_table)
intern_close_table(t_table);
else
sql_print_warning("Could not open table %s.%s after rename\n",
alter_ctx.new_db, alter_ctx.table_name);
ha_flush_logs(old_db_type);
}
table_list->table= NULL; // For query cache
query_cache_invalidate3(thd, table_list, false);

68
sql/sql_truncate.cc

@ -261,52 +261,6 @@ Sql_cmd_truncate_table::handler_truncate(THD *thd, TABLE_LIST *table_ref,
}
/*
Close and recreate a temporary table. In case of success,
write truncate statement into the binary log if in statement
mode.
@param thd Thread context.
@param table The temporary table.
@retval FALSE Success.
@retval TRUE Error.
*/
static bool recreate_temporary_table(THD *thd, TABLE *table)
{
bool error= TRUE;
TABLE_SHARE *share= table->s;
handlerton *table_type= table->s->db_type();
TABLE *new_table;
DBUG_ENTER("recreate_temporary_table");
table->file->info(HA_STATUS_AUTO | HA_STATUS_NO_LOCK);
/* Don't free share. */
close_temporary_table(thd, table, FALSE, FALSE);
dd_recreate_table(thd, share->db.str, share->table_name.str,
share->normalized_path.str);
if ((new_table= open_table_uncached(thd, table_type, share->path.str,
share->db.str,
share->table_name.str, true, true)))
{
error= FALSE;
thd->thread_specific_used= TRUE;
new_table->s->table_creation_was_logged= share->table_creation_was_logged;
}
else
rm_temporary_table(table_type, share->path.str);
free_table_share(share);
my_free(table);
DBUG_RETURN(error);
}
/*
Handle locking a base table for truncate.
@ -441,30 +395,10 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref)
/* If it is a temporary table, no need to take locks. */
if (is_temporary_table(table_ref))
{
TABLE *tmp_table= table_ref->table;
/* In RBR, the statement is not binlogged if the table is temporary. */
binlog_stmt= !thd->is_current_stmt_binlog_format_row();
/* Note that a temporary table cannot be partitioned. */
if (ha_check_storage_engine_flag(tmp_table->s->db_type(),
HTON_CAN_RECREATE))
{
if ((error= recreate_temporary_table(thd, tmp_table)))
binlog_stmt= FALSE; /* No need to binlog failed truncate-by-recreate. */
DBUG_ASSERT(! thd->transaction.stmt.modified_non_trans_table);
}
else
{
/*
The engine does not support truncate-by-recreate. Open the
table and invoke the handler truncate. In such a manner this
can in fact open several tables if it's a temporary MyISAMMRG
table.
*/
error= handler_truncate(thd, table_ref, TRUE);
}
error= handler_truncate(thd, table_ref, TRUE);
/*
No need to invalidate the query cache, queries with temporary

90
sql/sys_vars.cc

@ -483,9 +483,7 @@ static Sys_var_enum Sys_binlog_format(
"based binary logging except for those statements where only row-"
"based is correct: those which involve user-defined functions (i.e. "
"UDFs) or the UUID() function; for those, row-based binary logging is "
"automatically used. If NDBCLUSTER is enabled and binlog-format is "
"MIXED, the format switches to row-based and back implicitly per each "
"query accessing an NDBCLUSTER table",
"automatically used.",
SESSION_VAR(binlog_format), CMD_LINE(REQUIRED_ARG, OPT_BINLOG_FORMAT),
binlog_format_names, DEFAULT(BINLOG_FORMAT_STMT),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(binlog_format_check),
@ -649,8 +647,7 @@ static Sys_var_struct Sys_character_set_filesystem(
static const char *completion_type_names[]= {"NO_CHAIN", "CHAIN", "RELEASE", 0};
static Sys_var_enum Sys_completion_type(
"completion_type", "The transaction completion type, one of "
"NO_CHAIN, CHAIN, RELEASE",
"completion_type", "The transaction completion type",
SESSION_VAR(completion_type), CMD_LINE(REQUIRED_ARG),
completion_type_names, DEFAULT(0));
@ -717,8 +714,7 @@ static Sys_var_struct Sys_collation_server(
static const char *concurrent_insert_names[]= {"NEVER", "AUTO", "ALWAYS", 0};
static Sys_var_enum Sys_concurrent_insert(
"concurrent_insert", "Use concurrent insert with MyISAM. Possible "
"values are NEVER, AUTO, ALWAYS",
"concurrent_insert", "Use concurrent insert with MyISAM",
GLOBAL_VAR(myisam_concurrent_insert), CMD_LINE(OPT_ARG),
concurrent_insert_names, DEFAULT(1));
@ -2196,37 +2192,7 @@ static bool fix_optimizer_switch(sys_var *self, THD *thd,
}
static Sys_var_flagset Sys_optimizer_switch(
"optimizer_switch",
"optimizer_switch=option=val[,option=val...], where option is one of {"
"derived_merge, "
"derived_with_keys, "
"firstmatch, "
"in_to_exists, "
"engine_condition_pushdown, "
"index_condition_pushdown, "
"index_merge, "
"index_merge_intersection, "
"index_merge_sort_intersection, "
"index_merge_sort_union, "
"index_merge_union, "
"join_cache_bka, "
"join_cache_hashed, "
"join_cache_incremental, "
"loosescan, "
"materialization, "
"mrr, "
"mrr_cost_based, "
"mrr_sort_keys, "
"optimize_join_buffer_size, "
"outer_join_with_cache, "
"partial_match_rowid_merge, "
"partial_match_table_scan, "
"semijoin, "
"semijoin_with_cache, "
"subquery_cache, "
"table_elimination, "
"extended_keys, "
"exists_to_in "
"} and val is one of {on, off, default}",
"Fine-tune the optimizer behavior",
SESSION_VAR(optimizer_switch), CMD_LINE(REQUIRED_ARG),
optimizer_switch_names, DEFAULT(OPTIMIZER_SWITCH_DEFAULT),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
@ -2546,12 +2512,8 @@ static const char *thread_handling_names[]=
static Sys_var_enum Sys_thread_handling(
"thread_handling",
"Define threads usage for handling queries, one of "
"one-thread-per-connection, no-threads"
#ifdef HAVE_POOL_OF_THREADS
", pool-of-threads"
#endif
, READ_ONLY GLOBAL_VAR(thread_handling), CMD_LINE(REQUIRED_ARG),
"Define threads usage for handling queries",
READ_ONLY GLOBAL_VAR(thread_handling), CMD_LINE(REQUIRED_ARG),
thread_handling_names,
DEFAULT(DEFAULT_THREAD_HANDLING)
);
@ -2758,11 +2720,9 @@ static Sys_var_enum Slave_run_triggers_for_rbr(
static const char *slave_type_conversions_name[]= {"ALL_LOSSY", "ALL_NON_LOSSY", 0};
static Sys_var_set Slave_type_conversions(
"slave_type_conversions",
"Set of slave type conversions that are enabled. Legal values are:"
" ALL_LOSSY to enable lossy conversions and"
" ALL_NON_LOSSY to enable non-lossy conversions."
" If the variable is assigned the empty set, no conversions are"
" allowed and it is expected that the types match exactly.",
"Set of slave type conversions that are enabled."
" If the variable is empty, no conversions are"
" allowed and it is expected that the types match exactly",
GLOBAL_VAR(slave_type_conversions_options), CMD_LINE(REQUIRED_ARG),
slave_type_conversions_name,
DEFAULT(0));
@ -2785,7 +2745,7 @@ static Sys_var_mybool Sys_master_verify_checksum(
/* These names must match RPL_SKIP_XXX #defines in slave.h. */
static const char *replicate_events_marked_for_skip_names[]= {
"replicate", "filter_on_slave", "filter_on_master", 0
"REPLICATE", "FILTER_ON_SLAVE", "FILTER_ON_MASTER", 0
};
bool
@ -2931,8 +2891,7 @@ export bool sql_mode_string_representation(THD *thd, ulonglong sql_mode,
*/
static Sys_var_set Sys_sql_mode(
"sql_mode",
"Syntax: sql-mode=mode[,mode[,mode...]]. See the manual for the "
"complete list of valid sql modes",
"Sets the sql mode",
SESSION_VAR(sql_mode), CMD_LINE(REQUIRED_ARG),
sql_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
ON_CHECK(check_sql_mode), ON_UPDATE(fix_sql_mode));
@ -2957,9 +2916,7 @@ export bool old_mode_string_representation(THD *thd, ulonglong sql_mode,
*/
static Sys_var_set Sys_old_behavior(
"old_mode",
"Used to emulate old behavior from earlier MariaDB or MySQL versions. "
"Syntax: old_mode=mode[,mode[,mode...]]. "
"See the manual for the complete list of valid old modes",
"Used to emulate old behavior from earlier MariaDB or MySQL versions",
SESSION_VAR(old_behavior), CMD_LINE(REQUIRED_ARG),
old_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG);
@ -4009,8 +3966,7 @@ static bool fix_log_output(sys_var *self, THD *thd, enum_var_type type)
static const char *log_output_names[] = { "NONE", "FILE", "TABLE", NULL};
static Sys_var_set Sys_log_output(
"log_output", "Syntax: log-output=value[,value...], "
"where \"value\" could be TABLE, FILE or NONE",
"log_output", "How logs should be written",
GLOBAL_VAR(log_output_options), CMD_LINE(REQUIRED_ARG),
log_output_names, DEFAULT(LOG_FILE), NO_MUTEX_GUARD, NOT_IN_BINLOG,
ON_CHECK(check_not_empty_set), ON_UPDATE(fix_log_output));
@ -4494,9 +4450,8 @@ export const char *plugin_maturity_names[]=
{ "unknown", "experimental", "alpha", "beta", "gamma", "stable", 0 };
static Sys_var_enum Sys_plugin_maturity(
"plugin_maturity",
"The lowest desirable plugin maturity "
"(unknown, experimental, alpha, beta, gamma, or stable). "
"Plugins less mature than that will not be installed or loaded.",
"The lowest desirable plugin maturity. "
"Plugins less mature than that will not be installed or loaded",
READ_ONLY GLOBAL_VAR(plugin_maturity), CMD_LINE(REQUIRED_ARG),
plugin_maturity_names, DEFAULT(MariaDB_PLUGIN_MATURITY_UNKNOWN));
@ -4567,10 +4522,7 @@ static const char *log_slow_filter_names[]=
};
static Sys_var_set Sys_log_slow_filter(
"log_slow_filter",
"Log only certain types of queries. Multiple "
"flags can be specified, separated by commas. Valid values are admin, "
"slave, filesort, filesort_on_disk, full_join, full_scan, query_cache, "
"query_cache_miss, tmp_table, tmp_table_on_disk",
"Log only certain types of queries",
SESSION_VAR(log_slow_filter), CMD_LINE(REQUIRED_ARG),
log_slow_filter_names,
DEFAULT(MAX_SET(array_elements(log_slow_filter_names)-1)));
@ -4608,9 +4560,7 @@ int default_regex_flags_pcre(const THD *thd)
}
static Sys_var_set Sys_default_regex_flags(
"default_regex_flags",
"Default flags for the regex library. "
"Syntax: default-regex-flags='[flag[,flag[,flag...]]]'. "
"See the manual for the complete list of valid flags",
"Default flags for the regex library",
SESSION_VAR(default_regex_flags), CMD_LINE(REQUIRED_ARG),
default_regex_flags_names,
DEFAULT(0));
@ -4627,8 +4577,7 @@ static const char *log_slow_verbosity_names[]= { "innodb", "query_plan",
"explain", 0 };
static Sys_var_set Sys_log_slow_verbosity(
"log_slow_verbosity",
"log-slow-verbosity=[value[,value ...]] where value is one of "
"'innodb', 'query_plan', 'explain' ",
"Verbosity level for the slow log",
SESSION_VAR(log_slow_verbosity), CMD_LINE(REQUIRED_ARG),
log_slow_verbosity_names, DEFAULT(LOG_SLOW_VERBOSITY_INIT));
@ -4694,8 +4643,7 @@ const char *use_stat_tables_modes[] =
{"NEVER", "COMPLEMENTARY", "PREFERABLY", 0};
static Sys_var_enum Sys_optimizer_use_stat_tables(
"use_stat_tables",
"Specifies how to use system statistics tables. Possible values are "
"NEVER, COMPLEMENTARY, PREFERABLY",
"Specifies how to use system statistics tables",
SESSION_VAR(use_stat_tables), CMD_LINE(REQUIRED_ARG),
use_stat_tables_modes, DEFAULT(0));

3
sql/unireg.cc

@ -354,8 +354,7 @@ int rea_create_table(THD *thd, LEX_CUSTRING *frm,
{
DBUG_ENTER("rea_create_table");
// TODO don't write frm for temp tables
if (no_ha_create_table || create_info->tmp_table())
if (no_ha_create_table)
{
if (writefrm(path, db, table_name, true, frm->str, frm->length))
goto err_frm;

52
storage/cassandra/CMakeLists.txt

@ -12,20 +12,19 @@ ${Thrift_INCLUDE_DIR} # this may be set
# Verify that thrift linking library is found
SET(Thrift_LIB_PATHS ${Thrift_LIB_PATHS} /usr/local/lib /opt/local/lib /opt/lib)
FIND_LIBRARY(Thrift_LIBS NAMES thrift PATHS ${Thrift_LIB_PATHS} ${Thrift_LIB})
MARK_AS_ADVANCED(Thrift_LIBS Thrift_INCLUDE_DIRS)
IF(EXISTS ${Thrift_LIBS})
GET_FILENAME_COMPONENT(LINK_DIR ${Thrift_LIBS} PATH ABSOLUTE)
ELSE()
RETURN()
ENDIF()
INCLUDE_DIRECTORIES(AFTER ${Thrift_INCLUDE_DIRS}/..)
SET(CMAKE_REQUIRED_INCLUDES ${Thrift_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(AFTER ${Thrift_INCLUDE_DIRS}/..)
SET(CMAKE_REQUIRED_INCLUDES ${Thrift_INCLUDE_DIRS})
STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
SET(CMAKE_REQUIRED_INCLUDES "${Thrift_INCLUDE_DIRS}/..")
CHECK_CXX_SOURCE_COMPILES(
SET(CMAKE_REQUIRED_INCLUDES "${Thrift_INCLUDE_DIRS}/..")
CHECK_CXX_SOURCE_COMPILES(
"
#include <thrift/Thrift.h>
#include <boost/shared_ptr.hpp>
@ -34,24 +33,25 @@ int main() {
return 0;
}
" CASSANDRASE_OK)
ENDIF()
IF(CASSANDRASE_OK)
SET(cassandra_sources
ha_cassandra.cc
ha_cassandra.h
cassandra_se.h
cassandra_se.cc
gen-cpp/Cassandra.cpp
gen-cpp/cassandra_types.h
gen-cpp/cassandra_types.cpp
gen-cpp/cassandra_constants.h
gen-cpp/cassandra_constants.cpp
gen-cpp/Cassandra.h)
SET(cassandra_sources
ha_cassandra.cc
ha_cassandra.h
cassandra_se.h
cassandra_se.cc
gen-cpp/Cassandra.cpp
gen-cpp/cassandra_types.h
gen-cpp/cassandra_types.cpp
gen-cpp/cassandra_constants.h
gen-cpp/cassandra_constants.cpp
gen-cpp/Cassandra.h)
LINK_DIRECTORIES(${LINK_DIR})
LINK_DIRECTORIES(${LINK_DIR})
SET(CASSANDRA_DEB_FILES "usr/lib/mysql/plugin/ha_cassandra.so" PARENT_SCOPE)
SET(CASSANDRA_DEB_FILES "usr/lib/mysql/plugin/ha_cassandra.so" PARENT_SCOPE)
MYSQL_ADD_PLUGIN(cassandra ${cassandra_sources} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES thrift COMPONENT cassandra-engine)
MYSQL_ADD_PLUGIN(cassandra ${cassandra_sources} STORAGE_ENGINE
ONLY_IF CASSANDRASE_OK
MODULE_ONLY LINK_LIBRARIES thrift COMPONENT cassandra-engine)
ENDIF(CASSANDRASE_OK)

2
storage/connect/CMakeLists.txt

@ -232,6 +232,8 @@ IF(CONNECT_WITH_ODBC)
DOC "Specify the ODBC driver manager library here."
)
mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDE_DIR)
IF(ODBC_INCLUDE_DIR AND ODBC_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${ODBC_LIBRARY})
set(CMAKE_REQUIRED_INCLUDES ${ODBC_INCLUDE_DIR})

12
storage/innobase/handler/ha_innodb.cc

@ -225,12 +225,12 @@ static TYPELIB innodb_stats_method_typelib = {
/** Possible values for system variable "innodb_checksum_algorithm". */
static const char* innodb_checksum_algorithm_names[] = {
"crc32",
"strict_crc32",
"innodb",
"strict_innodb",
"none",
"strict_none",
"CRC32",
"STRICT_CRC32",
"INNODB",
"STRICT_INNODB",
"NONE",
"STRICT_NONE",
NullS
};

14
storage/maria/ha_maria.cc

@ -217,9 +217,7 @@ static MYSQL_SYSVAR_ULONG(group_commit_interval, maria_group_commit_interval,
static MYSQL_SYSVAR_ENUM(log_purge_type, log_purge_type,
PLUGIN_VAR_RQCMDARG,
"Specifies how Aria transactional log will be purged. "
"Possible values of name are \"immediate\", \"external\" "
"and \"at_flush\"",
"Specifies how Aria transactional log will be purged",
NULL, NULL, TRANSLOG_PURGE_IMMIDIATE,
&maria_translog_purge_type_typelib);
@ -251,9 +249,7 @@ static MYSQL_SYSVAR_ULONG(pagecache_division_limit, pagecache_division_limit,
100, 1, 100, 1);
static MYSQL_SYSVAR_SET(recover, maria_recover_options, PLUGIN_VAR_OPCMDARG,
"Specifies how corrupted tables should be automatically repaired."
" Possible values are one or more of \"NORMAL\" (the default), "
"\"BACKUP\", \"FORCE\", or \"QUICK\".",
"Specifies how corrupted tables should be automatically repaired",
NULL, NULL, HA_RECOVER_DEFAULT, &maria_recover_typelib);
static MYSQL_THDVAR_ULONG(repair_threads, PLUGIN_VAR_RQCMDARG,
@ -268,13 +264,11 @@ static MYSQL_THDVAR_ULONGLONG(sort_buffer_size, PLUGIN_VAR_RQCMDARG,
static MYSQL_THDVAR_ENUM(stats_method, PLUGIN_VAR_RQCMDARG,
"Specifies how Aria index statistics collection code should treat "
"NULLs. Possible values are \"nulls_unequal\", \"nulls_equal\", "
"and \"nulls_ignored\".", 0, 0, 0, &maria_stats_method_typelib);
"NULLs", 0, 0, 0, &maria_stats_method_typelib);
static MYSQL_SYSVAR_ENUM(sync_log_dir, sync_log_dir, PLUGIN_VAR_RQCMDARG,
"Controls syncing directory after log file growth and new file "
"creation. Possible values are \"never\", \"newfile\" and "
"\"always\").", NULL, NULL, TRANSLOG_SYNC_DIR_NEWFILE,
"creation", NULL, NULL, TRANSLOG_SYNC_DIR_NEWFILE,
&maria_sync_log_dir_typelib);
#ifdef USE_ARIA_FOR_TMP_TABLES

7
storage/myisam/ha_myisam.cc

@ -42,8 +42,8 @@ const char *myisam_recover_names[] =
TYPELIB myisam_recover_typelib= {array_elements(myisam_recover_names)-1,"",
myisam_recover_names, NULL};
const char *myisam_stats_method_names[] = {"nulls_unequal", "nulls_equal",
"nulls_ignored", NullS};
const char *myisam_stats_method_names[] = {"NULLS_UNEQUAL", "NULLS_EQUAL",
"NULLS_IGNORED", NullS};
TYPELIB myisam_stats_method_typelib= {
array_elements(myisam_stats_method_names) - 1, "",
myisam_stats_method_names, NULL};
@ -66,8 +66,7 @@ static MYSQL_SYSVAR_ULONGLONG(max_sort_file_size, myisam_max_temp_length,
static MYSQL_SYSVAR_SET(recover_options, myisam_recover_options,
PLUGIN_VAR_OPCMDARG|PLUGIN_VAR_READONLY,
"Syntax: myisam-recover-options[=option[,option...]], where option can be "
"DEFAULT, BACKUP, BACKUP_ALL, FORCE, QUICK, or OFF",
"Specifies how corrupted tables should be automatically repaired",
NULL, NULL, 1, &myisam_recover_typelib);
static MYSQL_THDVAR_ULONG(repair_threads, PLUGIN_VAR_RQCMDARG,

26
storage/oqgraph/CMakeLists.txt

@ -1,9 +1,10 @@
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
FUNCTION(CHECK_OQGRAPH)
MESSAGE(STATUS "Configuring OQGraph")
FIND_PACKAGE(Boost)
IF(NOT Boost_FOUND)
MESSAGE(STATUS "Boost not found. OQGraph will not be compiled")
MESSAGE(STATUS "Boost not found. OQGraph will not be compiled")
RETURN()
ENDIF()
INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS})
@ -37,26 +38,29 @@ ENDIF()
IF(BOOST_OK)
ADD_DEFINITIONS(-DHAVE_OQGRAPH)
IF(MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc" PARENT_SCOPE)
# Fix problem with judy not finding inttypes.h on Windows:
ADD_DEFINITIONS(-DJU_WIN)
ELSE(MSVC)
# Fix lp bug 1221555 with -fpermissive, so that errors in gcc 4.7 become warnings for the time being
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing -fpermissive")
STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing -fpermissive" PARENT_SCOPE)
ENDIF(MSVC)
ADD_DEFINITIONS(-DBOOST_NO_RTTI=1 -DBOOST_NO_TYPEID=1 -DBOOST_DISABLE_ASSERTS=1)
MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc graphcore-graph.cc
oqgraph_shim.cc oqgraph_thunk.cc oqgraph_judy.cc
STORAGE_ENGINE
MODULE_ONLY
RECOMPILE_FOR_EMBEDDED
COMPONENT oqgraph-engine
LINK_LIBRARIES ${Judy_LIBRARIES})
MESSAGE(STATUS "OQGraph OK")
ELSE(BOOST_OK)
MESSAGE(STATUS "Requisites for OQGraph not met. OQGraph will not be compiled")
ENDIF(BOOST_OK)
ENDFUNCTION()
CHECK_OQGRAPH()
MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc graphcore-graph.cc
oqgraph_shim.cc oqgraph_thunk.cc oqgraph_judy.cc
STORAGE_ENGINE
ONLY_IF BOOST_OK
MODULE_ONLY
RECOMPILE_FOR_EMBEDDED
COMPONENT oqgraph-engine
LINK_LIBRARIES ${Judy_LIBRARIES})

1
storage/tokudb/CMakeLists.txt

@ -10,6 +10,7 @@ int main() { return 0; }
ENDIF()
IF(NOT TOKUDB_OK OR WITHOUT_TOKUDB OR WITHOUT_TOKUDB_STORAGE_ENGINE)
MYSQL_ADD_PLUGIN(tokudb DISABLED)
RETURN()
ENDIF()

18
storage/xtradb/CMakeLists.txt

@ -32,6 +32,7 @@ IF(UNIX)
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ENDIF()
FIND_LIBRARY(AIO_LIBRARY aio)
MARK_AS_ADVANCED(AIO_LIBRARY)
IF(AIO_LIBRARY)
CHECK_LIBRARY_EXISTS(${AIO_LIBRARY} io_queue_init "" HAVE_LIBAIO)
IF(HAVE_LIBAIO AND HAVE_LIBAIO_H)
@ -402,17 +403,12 @@ SET(INNOBASE_SOURCES
ut/ut0vec.cc
ut/ut0wqueue.cc)
IF(WITH_INNODB)
# Legacy option
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
ENDIF()
IF(XTRADB_OK)
MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
DEFAULT
RECOMPILE_FOR_EMBEDDED
LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
ELSE()
IF(NOT XTRADB_OK)
MESSAGE(FATAL_ERROR "Percona XtraDB is not supported on this platform")
ENDIF()
MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
DEFAULT ONLY_IF XTRADB_OK
RECOMPILE_FOR_EMBEDDED
LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})

33
storage/xtradb/handler/ha_innodb.cc

@ -231,12 +231,12 @@ static TYPELIB innodb_stats_method_typelib = {
/** Possible values for system variables "innodb_checksum_algorithm" and
"innodb_log_checksum_algorithm". */
static const char* innodb_checksum_algorithm_names[] = {
"crc32",
"strict_crc32",
"innodb",
"strict_innodb",
"none",
"strict_none",
"CRC32",
"STRICT_CRC32",
"INNODB",
"STRICT_INNODB",
"NONE",
"STRICT_NONE",
NullS
};
@ -251,8 +251,8 @@ static TYPELIB innodb_checksum_algorithm_typelib = {
/** Possible values for system variable "innodb_cleaner_lsn_age_factor". */
static const char* innodb_cleaner_lsn_age_factor_names[] = {
"legacy",
"high_checkpoint",
"LEGACY",
"HIGH_CHECKPOINT",
NullS
};
@ -266,8 +266,8 @@ static TYPELIB innodb_cleaner_lsn_age_factor_typelib = {
/** Possible values for system variable "innodb_foreground_preflush". */
static const char* innodb_foreground_preflush_names[] = {
"sync_preflush",
"exponential_backoff",
"SYNC_PREFLUSH",
"EXPONENTIAL_BACKOFF",
NullS
};
@ -281,8 +281,8 @@ static TYPELIB innodb_foreground_preflush_typelib = {
/** Possible values for system variable "innodb_empty_free_list_algorithm". */
static const char* innodb_empty_free_list_algorithm_names[] = {
"legacy",
"backoff",
"LEGACY",
"BACKOFF",
NullS
};
@ -17185,9 +17185,7 @@ static MYSQL_SYSVAR_ENUM(log_checksum_algorithm, srv_log_checksum_algorithm,
static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums,
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
"DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting "
"this to OFF. "
"Enable InnoDB checksums validation (enabled by default). "
"Disable with --skip-innodb-checksums.",
"this to OFF",
NULL, NULL, TRUE);
static MYSQL_SYSVAR_ULONG(log_block_size, innobase_log_block_size,
@ -18028,8 +18026,7 @@ static MYSQL_SYSVAR_UINT(change_buffer_max_size,
static MYSQL_SYSVAR_ENUM(stats_method, srv_innodb_stats_method,
PLUGIN_VAR_RQCMDARG,
"Specifies how InnoDB index statistics collection code should "
"treat NULLs. Possible values are NULLS_EQUAL (default), "
"NULLS_UNEQUAL and NULLS_IGNORED",
"treat NULLs",
NULL, NULL, SRV_STATS_NULLS_EQUAL, &innodb_stats_method_typelib);
#ifdef UNIV_DEBUG
@ -18194,7 +18191,7 @@ static MYSQL_SYSVAR_ENUM(corrupt_table_action, srv_pass_corrupt_table,
"Warn corruptions of user tables as 'corrupt table' instead of not crashing itself, "
"when used with file_per_table. "
"All file io for the datafile after detected as corrupt are disabled, "
"except for the deletion. Possible options are 'assert', 'warn' & 'salvage'",
"except for the deletion",
NULL, NULL, 0, &corrupt_table_action_typelib);
static MYSQL_SYSVAR_BOOL(locking_fake_changes, srv_fake_changes_locks,

Loading…
Cancel
Save