diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef8786aff12ed684e0e768ce065638e7db8998ea..54645e0b5c229380bca8f1d0ca7d13f668445f5a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -214,6 +214,15 @@ IF (WITH_ASAN)
ENDIF()
ENDIF()
+OPTION(WITH_UBSAN "Enable undefined behavior sanitizer" OFF)
+IF (WITH_UBSAN)
+ IF(SECURITY_HARDENED)
+ MESSAGE(FATAL_ERROR "WITH_UBSAN and SECURITY_HARDENED are mutually exclusive")
+ ENDIF()
+ MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=undefined" DEBUG RELWITHDEBINFO)
+ENDIF()
+
+
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load
IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6")
@@ -490,6 +499,8 @@ IF(UNIX)
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY Docs/README-wsrep COMPONENT Readme)
ENDIF()
+INCLUDE(build_depends)
+
INCLUDE(CPack)
IF(WIN32 AND SIGNCODE)
@@ -500,5 +511,5 @@ ENDIF()
IF(NON_DISTRIBUTABLE_WARNING)
MESSAGE(WARNING "
-You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation.")
+You have linked MariaDB with ${NON_DISTRIBUTABLE_WARNING} libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with the Free Software Foundation.")
ENDIF()
diff --git a/Docs/INFO_SRC b/Docs/INFO_SRC
index 8562cee91b032639fbf21fdd7ec7179a2c665486..35eb9f9925f17fef46759b314dfca421a2275624 100644
--- a/Docs/INFO_SRC
+++ b/Docs/INFO_SRC
@@ -1,8 +1,8 @@
-commit: 4c490d6df63695dc97b2c808e59954e6877d3a51
-date: 2019-02-04 18:55:35 +0200
-build-date: 2019-02-04 17:02:14 +0000
-short: 4c490d6
+commit: e9da78ee92c3f44b341a1a68504da72494a684b9
+date: 2019-04-30 23:58:14 +0300
+build-date: 2019-04-30 21:10:19 +0000
+short: e9da78e
branch: HEAD
-MariaDB source 10.1.38
+MariaDB source 10.1.39
diff --git a/VERSION b/VERSION
index f95ab5017dc842699e1ca8e92d7fdbd1e8f104cc..a7dbe7dfb74a1501d985751c59112f10f0202e4e 100644
--- a/VERSION
+++ b/VERSION
@@ -1,3 +1,3 @@
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=1
-MYSQL_VERSION_PATCH=38
+MYSQL_VERSION_PATCH=39
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index c760a9dbf14d8407dcdc7e25e9bf835bac35d2c2..40df176c6e63d459e3b4c48907815b0d435953f7 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -1,5 +1,5 @@
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2008, 2018, MariaDB Corporation
+# Copyright (c) 2008, 2019, MariaDB Corporation
#
# 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
diff --git a/client/mysql.cc b/client/mysql.cc
index 3a21e2857c917bba5d1a6ae4a40c626192bcb459..cb7761f8195c67bc449b9c62e280a35248f2664b 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -3785,9 +3785,10 @@ print_table_data_html(MYSQL_RES *result)
MYSQL_FIELD *field;
mysql_field_seek(result,0);
- (void) tee_fputs("
", PAGER);
+ (void) tee_fputs("", PAGER);
if (column_names)
{
+ (void) tee_fputs("", PAGER);
while((field = mysql_fetch_field(result)))
{
tee_fputs("", PAGER);
diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c
index 76108c7a287c1a59f3ba62d1abe6739e9defcf81..c353fb039d651d7325a9440b35cf32936c808420 100644
--- a/client/mysql_plugin.c
+++ b/client/mysql_plugin.c
@@ -321,7 +321,7 @@ static int get_default_values()
int ret= 0;
FILE *file= 0;
- bzero(tool_path, FN_REFLEN);
+ memset(tool_path, 0, FN_REFLEN);
if ((error= find_tool("my_print_defaults" FN_EXEEXT, tool_path)))
goto exit;
else
@@ -334,9 +334,9 @@ static int get_default_values()
char *format_str= 0;
if (has_spaces(tool_path) || has_spaces(defaults_file))
- format_str = "\"%s mysqld > %s\"";
+ format_str = "\"%s --mysqld > %s\"";
else
- format_str = "%s mysqld > %s";
+ format_str = "%s --mysqld > %s";
snprintf(defaults_cmd, sizeof(defaults_cmd), format_str,
add_quotes(tool_path), add_quotes(defaults_file));
@@ -347,7 +347,7 @@ static int get_default_values()
}
#else
snprintf(defaults_cmd, sizeof(defaults_cmd),
- "%s mysqld > %s", tool_path, defaults_file);
+ "%s --mysqld > %s", tool_path, defaults_file);
#endif
/* Execute the command */
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 2c05bb806a936afc7823be271c7f9e9964fc786f..4ba76cb3ba12d8ab0faeb647f86dc741d51136bb 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -2867,16 +2867,25 @@ void *sql_alloc(size_t size)
return alloc_root(&s_mem_root, size);
}
+uint e_key_get_latest_version_func(uint) { return 1; }
+uint e_key_get_func(uint, uint, uchar*, uint*) { return 1; }
+uint e_ctx_size_func(uint, uint) { return 1; }
+int e_ctx_init_func(void *, const uchar*, uint, const uchar*, uint,
+ int, uint, uint) { return 1; }
+int e_ctx_update_func(void *, const uchar*, uint, uchar*, uint*) { return 1; }
+int e_ctx_finish_func(void *, uchar*, uint*) { return 1; }
+uint e_encrypted_length_func(uint, uint, uint) { return 1; }
+
uint dummy1() { return 1; }
struct encryption_service_st encryption_handler=
{
- (uint(*)(uint))dummy1,
- (uint(*)(uint, uint, uchar*, uint*))dummy1,
- (uint(*)(uint, uint))dummy1,
- (int (*)(void*, const uchar*, uint, const uchar*, uint, int, uint, uint))dummy1,
- (int (*)(void*, const uchar*, uint, uchar*, uint*))dummy1,
- (int (*)(void*, uchar*, uint*))dummy1,
- (uint (*)(uint, uint, uint))dummy1
+ e_key_get_latest_version_func,
+ e_key_get_func,
+ e_ctx_size_func,
+ e_ctx_init_func,
+ e_ctx_update_func,
+ e_ctx_finish_func,
+ e_encrypted_length_func
};
/*
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index a4410eba8aa9b67d227ccfb728790c66377e7e80..eafd47132adab589e3b603d6f6b2a0466d28008e 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -953,7 +953,8 @@ static int handle_request_for_tables(char *tables, size_t length,
puts(query);
if (mysql_real_query(sock, query, query_length))
{
- sprintf(message, "when executing '%s%s... %s'", op, tab_view, options);
+ my_snprintf(message, sizeof(message), "when executing '%s%s... %s'",
+ op, tab_view, options);
DBerror(sock, message);
my_free(query);
DBUG_RETURN(1);
diff --git a/client/mysqldump.c b/client/mysqldump.c
index f67e52c1b127ec20cf4ba1a071e3afc19076a306..f00d1188502ef42af9e9dd2b5f777e75f776c963 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -3262,7 +3262,7 @@ static void dump_trigger_old(FILE *sql_file, MYSQL_RES *show_triggers_rs,
char name_buff[NAME_LEN * 4 + 3];
const char *xml_msg= "\nWarning! mysqldump being run against old server "
- "that does not\nsupport 'SHOW CREATE TRIGGERS' "
+ "that does not\nsupport 'SHOW CREATE TRIGGER' "
"statement. Skipping..\n";
DBUG_ENTER("dump_trigger_old");
@@ -3413,12 +3413,14 @@ static int dump_triggers_for_table(char *table_name, char *db_name)
char db_cl_name[MY_CS_NAME_SIZE];
int ret= TRUE;
+ /* Servers below 5.1.21 do not support SHOW CREATE TRIGGER */
+ const int use_show_create_trigger= mysql_get_server_version(mysql) >= 50121;
DBUG_ENTER("dump_triggers_for_table");
DBUG_PRINT("enter", ("db: %s, table_name: %s", db_name, table_name));
- if (path && !(sql_file= open_sql_file_for_table(table_name,
- O_WRONLY | O_APPEND)))
+ if (path &&
+ !(sql_file= open_sql_file_for_table(table_name, O_WRONLY | O_APPEND)))
DBUG_RETURN(1);
/* Do not use ANSI_QUOTES on triggers in dump */
@@ -3434,11 +3436,15 @@ static int dump_triggers_for_table(char *table_name, char *db_name)
/* Get list of triggers. */
- my_snprintf(query_buff, sizeof(query_buff),
- "SELECT TRIGGER_NAME FROM INFORMATION_SCHEMA.TRIGGERS "
- "WHERE EVENT_OBJECT_SCHEMA = DATABASE() AND "
- "EVENT_OBJECT_TABLE = %s",
- quote_for_equal(table_name, name_buff));
+ if (use_show_create_trigger)
+ my_snprintf(query_buff, sizeof(query_buff),
+ "SELECT TRIGGER_NAME FROM INFORMATION_SCHEMA.TRIGGERS "
+ "WHERE EVENT_OBJECT_SCHEMA = DATABASE() AND "
+ "EVENT_OBJECT_TABLE = %s",
+ quote_for_equal(table_name, name_buff));
+ else
+ my_snprintf(query_buff, sizeof(query_buff), "SHOW TRIGGERS LIKE %s",
+ quote_for_like(table_name, name_buff));
if (mysql_query_with_error_report(mysql, &show_triggers_rs, query_buff))
goto done;
@@ -3454,35 +3460,28 @@ static int dump_triggers_for_table(char *table_name, char *db_name)
while ((row= mysql_fetch_row(show_triggers_rs)))
{
-
- my_snprintf(query_buff, sizeof (query_buff),
- "SHOW CREATE TRIGGER %s",
- quote_name(row[0], name_buff, TRUE));
-
- if (mysql_query(mysql, query_buff))
+ if (use_show_create_trigger)
{
- /*
- mysqldump is being run against old server, that does not support
- SHOW CREATE TRIGGER statement. We should use SHOW TRIGGERS output.
+ MYSQL_RES *show_create_trigger_rs;
- NOTE: the dump may be incorrect, as old SHOW TRIGGERS does not
- provide all the necessary information to restore trigger properly.
- */
+ my_snprintf(query_buff, sizeof (query_buff), "SHOW CREATE TRIGGER %s",
+ quote_name(row[0], name_buff, TRUE));
- dump_trigger_old(sql_file, show_triggers_rs, &row, table_name);
- }
- else
- {
- MYSQL_RES *show_create_trigger_rs= mysql_store_result(mysql);
-
- int error= (!show_create_trigger_rs ||
- dump_trigger(sql_file, show_create_trigger_rs, db_name,
- db_cl_name));
- mysql_free_result(show_create_trigger_rs);
- if (error)
+ if (mysql_query_with_error_report(mysql, &show_create_trigger_rs,
+ query_buff))
goto done;
+ else
+ {
+ int error= (!show_create_trigger_rs ||
+ dump_trigger(sql_file, show_create_trigger_rs, db_name,
+ db_cl_name));
+ mysql_free_result(show_create_trigger_rs);
+ if (error)
+ goto done;
+ }
}
-
+ else
+ dump_trigger_old(sql_file, show_triggers_rs, &row, table_name);
}
if (opt_xml)
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index b2a632877093c3593dd87038bd651a579c4d80a0..cc1d61e5d791246f8d491552666bdfc28d409747 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -8219,6 +8219,12 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
DBUG_ENTER("run_query_stmt");
DBUG_PRINT("query", ("'%-.60s'", query));
+ if (!mysql)
+ {
+ handle_no_active_connection(command, cn, ds);
+ DBUG_VOID_RETURN;
+ }
+
/*
Init a new stmt if it's not already one created for this connection
*/
@@ -8744,18 +8750,56 @@ void init_re(void)
*/
const char *ps_re_str =
"^("
- "[[:space:]]*REPLACE[[:space:]]|"
- "[[:space:]]*INSERT[[:space:]]|"
- "[[:space:]]*UPDATE[[:space:]]|"
- "[[:space:]]*DELETE[[:space:]]|"
- "[[:space:]]*SELECT[[:space:]]|"
+ "[[:space:]]*ALTER[[:space:]]+SEQUENCE[[:space:]]|"
+ "[[:space:]]*ALTER[[:space:]]+TABLE[[:space:]]|"
+ "[[:space:]]*ALTER[[:space:]]+USER[[:space:]]|"
+ "[[:space:]]*ANALYZE[[:space:]]|"
+ "[[:space:]]*ASSIGN[[:space:]]|"
+ //"[[:space:]]*CALL[[:space:]]|" // XXX run_query_stmt doesn't read multiple result sets
+ "[[:space:]]*CHANGE[[:space:]]|"
+ "[[:space:]]*CHECKSUM[[:space:]]|"
+ "[[:space:]]*COMMIT[[:space:]]|"
+ "[[:space:]]*COMPOUND[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+DATABASE[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+INDEX[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+ROLE[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+SEQUENCE[[:space:]]|"
"[[:space:]]*CREATE[[:space:]]+TABLE[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+USER[[:space:]]|"
+ "[[:space:]]*CREATE[[:space:]]+VIEW[[:space:]]|"
+ "[[:space:]]*DELETE[[:space:]]|"
"[[:space:]]*DO[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+DATABASE[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+INDEX[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+ROLE[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+SEQUENCE[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+TABLE[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+USER[[:space:]]|"
+ "[[:space:]]*DROP[[:space:]]+VIEW[[:space:]]|"
+ "[[:space:]]*FLUSH[[:space:]]|"
+ "[[:space:]]*GRANT[[:space:]]|"
"[[:space:]]*HANDLER[[:space:]]+.*[[:space:]]+READ[[:space:]]|"
+ "[[:space:]]*INSERT[[:space:]]|"
+ "[[:space:]]*INSTALL[[:space:]]+|"
+ "[[:space:]]*KILL[[:space:]]|"
+ "[[:space:]]*OPTIMIZE[[:space:]]|"
+ "[[:space:]]*PRELOAD[[:space:]]|"
+ "[[:space:]]*RENAME[[:space:]]+TABLE[[:space:]]|"
+ "[[:space:]]*RENAME[[:space:]]+USER[[:space:]]|"
+ "[[:space:]]*REPAIR[[:space:]]|"
+ "[[:space:]]*REPLACE[[:space:]]|"
+ "[[:space:]]*RESET[[:space:]]|"
+ "[[:space:]]*REVOKE[[:space:]]|"
+ "[[:space:]]*ROLLBACK[[:space:]]|"
+ "[[:space:]]*SELECT[[:space:]]|"
"[[:space:]]*SET[[:space:]]+OPTION[[:space:]]|"
- "[[:space:]]*DELETE[[:space:]]+MULTI[[:space:]]|"
- "[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|"
- "[[:space:]]*INSERT[[:space:]]+SELECT[[:space:]])";
+ "[[:space:]]*SHOW[[:space:]]|"
+ "[[:space:]]*SHUTDOWN[[:space:]]|"
+ "[[:space:]]*SLAVE[[:space:]]|"
+ "[[:space:]]*TRUNCATE[[:space:]]|"
+ "[[:space:]]*UNINSTALL[[:space:]]+|"
+ "[[:space:]]*UPDATE[[:space:]]"
+ ")";
/*
Filter for queries that can be run using the
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index b73b44cddc3a96b2dad15a731c7c4565810f091d..709d97ec69319c5e302ae3d8747f2d262aa64329 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -89,8 +89,8 @@ IF(WIN32)
ELSEIF(RPM)
SET(WITH_SSL system CACHE STRING "")
SET(WITH_ZLIB system CACHE STRING "")
- SET(CHECKMODULE /usr/bin/checkmodule CACHE STRING "")
- SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE STRING "")
+ SET(CHECKMODULE /usr/bin/checkmodule CACHE FILEPATH "")
+ SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE FILEPATH "")
SET(WITH_LIBARCHIVE ON CACHE STRING "")
ELSEIF(DEB)
SET(WITH_SSL system CACHE STRING "")
diff --git a/cmake/build_depends.cmake b/cmake/build_depends.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..0d17c22cf98061e214765ec114695507c6fa3e37
--- /dev/null
+++ b/cmake/build_depends.cmake
@@ -0,0 +1,39 @@
+IF(RPM)
+ MACRO(FIND_DEP V)
+ SET(out ${V}_DEP)
+ IF (NOT DEFINED ${out})
+ IF(EXISTS ${${V}} AND NOT IS_DIRECTORY ${${V}})
+ EXECUTE_PROCESS(COMMAND ${ARGN} RESULT_VARIABLE res OUTPUT_VARIABLE O OUTPUT_STRIP_TRAILING_WHITESPACE)
+ ELSE()
+ SET(res 1)
+ ENDIF()
+ IF (res)
+ SET(O)
+ ELSE()
+ MESSAGE(STATUS "Need ${O} for ${${V}}")
+ ENDIF()
+ SET(${out} ${O} CACHE INTERNAL "Package that contains ${${V}}" FORCE)
+ ENDIF()
+ ENDMACRO()
+
+ GET_CMAKE_PROPERTY(ALL_VARS CACHE_VARIABLES)
+ FOREACH (V ${ALL_VARS})
+ GET_PROPERTY(H CACHE ${V} PROPERTY HELPSTRING)
+ IF (H MATCHES "^Have library [^/]" AND ${V})
+ STRING(REGEX REPLACE "^Have library " "" L ${H})
+ SET(V ${L}_LIBRARY)
+ FIND_LIBRARY(${V} ${L})
+ ENDIF()
+ GET_PROPERTY(T CACHE ${V} PROPERTY TYPE)
+ IF ((T STREQUAL FILEPATH OR V MATCHES "^CMAKE_COMMAND$") AND ${V} MATCHES "^/")
+ IF (RPM)
+ FIND_DEP(${V} rpm -q --qf "%{NAME}" -f ${${V}})
+ ELSE() # must be DEB
+ MESSAGE(FATAL_ERROR "Not implemented")
+ ENDIF ()
+ SET(BUILD_DEPS ${BUILD_DEPS} ${${V}_DEP})
+ ENDIF()
+ ENDFOREACH()
+ LIST(REMOVE_DUPLICATES BUILD_DEPS)
+ STRING(REPLACE ";" " " CPACK_RPM_BUILDREQUIRES "${BUILD_DEPS}")
+ENDIF(RPM)
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake
index 962c9f1f56d0df3967645a18d9d084373f21f625..02886ef6a6532c0ab73cf5f1132201f1bb135bfa 100644
--- a/cmake/cpack_rpm.cmake
+++ b/cmake/cpack_rpm.cmake
@@ -67,6 +67,14 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE "
%define _bindir ${INSTALL_BINDIRABS}
%define _sbindir ${INSTALL_SBINDIRABS}
%define _sysconfdir ${INSTALL_SYSCONFDIR}
+
+%{?filter_setup:
+%filter_provides_in \\\\.\\\\(test\\\\|result\\\\|h\\\\|cc\\\\|c\\\\|inc\\\\|opt\\\\|ic\\\\|cnf\\\\|rdiff\\\\|cpp\\\\)$
+%filter_requires_in \\\\.\\\\(test\\\\|result\\\\|h\\\\|cc\\\\|c\\\\|inc\\\\|opt\\\\|ic\\\\|cnf\\\\|rdiff\\\\|cpp\\\\)$
+%filter_from_provides /perl(\\\\(mtr\\\\|My::\\\\)/d
+%filter_from_requires /\\\\(lib\\\\(ft\\\\|lzma\\\\|tokuportability\\\\)\\\\)\\\\|\\\\(perl(\\\\(.*mtr\\\\|My::\\\\|.*HandlerSocket\\\\|Mysql\\\\)\\\\)/d
+%filter_setup
+}
")
# this creative hack is described here: http://www.cmake.org/pipermail/cmake/2012-January/048416.html
@@ -225,36 +233,6 @@ ELSEIF(RPM MATCHES "fedora" OR RPM MATCHES "(rhel|centos)7")
SET(CPACK_RPM_common_PACKAGE_CONFLICTS "mariadb-libs < 1:%{version}-%{release}")
ENDIF()
-# workaround for lots of perl dependencies added by rpmbuild
-SETA(CPACK_RPM_test_PACKAGE_PROVIDES
- "perl(lib::mtr_gcov.pl)"
- "perl(lib::mtr_gprof.pl)"
- "perl(lib::mtr_io.pl)"
- "perl(lib::mtr_misc.pl)"
- "perl(lib::mtr_process.pl)"
- "perl(lib::v1/mtr_cases.pl)"
- "perl(lib::v1/mtr_gcov.pl)"
- "perl(lib::v1/mtr_gprof.pl)"
- "perl(lib::v1/mtr_im.pl)"
- "perl(lib::v1/mtr_io.pl)"
- "perl(lib::v1/mtr_match.pl)"
- "perl(lib::v1/mtr_misc.pl)"
- "perl(lib::v1/mtr_process.pl)"
- "perl(lib::v1/mtr_report.pl)"
- "perl(lib::v1/mtr_stress.pl)"
- "perl(lib::v1/mtr_timer.pl)"
- "perl(lib::v1/mtr_unique.pl)"
- "perl(mtr_cases)"
- "perl(mtr_io.pl)"
- "perl(mtr_match)"
- "perl(mtr_misc.pl)"
- "perl(mtr_gcov.pl)"
- "perl(mtr_gprof.pl)"
- "perl(mtr_process.pl)"
- "perl(mtr_report)"
- "perl(mtr_results)"
- "perl(mtr_unique)")
-
# If we want to build build MariaDB-shared-compat,
# extract compat libraries from MariaDB-shared-5.3 rpm
FILE(GLOB compat_rpm RELATIVE ${CMAKE_SOURCE_DIR}
@@ -284,5 +262,24 @@ ENDIF(compat_rpm)
SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1
SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5")
-ENDIF(RPM)
+################
+IF(CMAKE_VERSION VERSION_GREATER "3.9.99")
+
+SET(CPACK_SOURCE_GENERATOR "RPM")
+SETA(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS
+ "-DBUILD_CONFIG=mysql_release"
+ "-DRPM=${RPM}"
+ "-DCPACK_RPM_BUILD_SOURCE_DIRS_PREFIX=/usr/src/debug/${CPACK_RPM_PACKAGE_NAME}-${VERSION}"
+ )
+MACRO(ADDIF var)
+ IF(DEFINED ${var})
+ SETA(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS "-D${var}=${${var}}")
+ ENDIF()
+ENDMACRO()
+
+ADDIF(BUILD_CONFIG)
+ADDIF(WITH_SSL)
+
+ENDIF()
+ENDIF(RPM)
diff --git a/cmake/cpack_source_ignore_files.cmake b/cmake/cpack_source_ignore_files.cmake
index 0654fa3838856510f24c3e7916f7ecfebc602ae7..8e1b7bd5edafec54a893529fdfc3e57af361d32e 100644
--- a/cmake/cpack_source_ignore_files.cmake
+++ b/cmake/cpack_source_ignore_files.cmake
@@ -15,18 +15,19 @@
SET(CPACK_SOURCE_IGNORE_FILES
\\\\.git/
-\\\\.gitignore
-CMakeCache\\\\.txt
-cmake_dist\\\\.cmake
-CPackSourceConfig\\\\.cmake
-CPackConfig.cmake
-/cmake_install\\\\.cmake
-/CTestTestfile\\\\.cmake
+\\\\.gitignore$
+\\\\.gitattributes$
+CMakeCache\\\\.txt$
+cmake_dist\\\\.cmake$
+CPackSourceConfig\\\\.cmake$
+CPackConfig.cmake$
+/cmake_install\\\\.cmake$
+/CTestTestfile\\\\.cmake$
/CMakeFiles/
/version_resources/
/_CPack_Packages/
-$\\\\.gz
-$\\\\.zip
+\\\\.gz$
+\\\\.zip$
/CMakeFiles/
/version_resources/
/_CPack_Packages/
@@ -50,5 +51,6 @@ include/config\\\\.h$
include/my_config\\\\.h$
/autom4te\\\\.cache/
errmsg\\\\.sys$
+\\\\.rpm$
#
)
diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake
index 4e902d7fed8c59c683b50ce47ff7d079507f87b4..caba370c4ae86499afab714f3f59468b7b2dba1d 100644
--- a/cmake/maintainer.cmake
+++ b/cmake/maintainer.cmake
@@ -28,10 +28,15 @@ SET(MY_WARNING_FLAGS
-Woverloaded-virtual
-Wvla
-Wwrite-strings
+ -Werror
)
-IF(MYSQL_MAINTAINER_MODE MATCHES "ON")
- SET(WHERE)
+IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
+ SET(MY_WARNING_FLAGS ${MY_WARNING_FLAGS} -Wno-error=maybe-uninitialized)
+ENDIF()
+
+IF(MYSQL_MAINTAINER_MODE MATCHES "OFF")
+ RETURN()
ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
SET(WHERE DEBUG)
ENDIF()
diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake
index b0680d92a1b7ba8e4028f62ea1883db53d89e7ef..55be86748027defd8f63752eb783c61d49eb5d34 100644
--- a/cmake/os/Linux.cmake
+++ b/cmake/os/Linux.cmake
@@ -35,7 +35,7 @@ ENDFOREACH()
# Ensure we have clean build for shared libraries
# without unresolved symbols
# Not supported with AddressSanitizer
-IF(NOT WITH_ASAN)
+IF(NOT WITH_ASAN AND NOT WITH_UBSAN)
SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
ENDIF()
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 9c9c7082a430b4047ada266a1ae22533121f6403..4396a0a6c25432f6a36dcccb1d420d2b2bb8d43d 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -209,7 +209,7 @@ MACRO(MYSQL_ADD_PLUGIN)
ELSEIF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
TARGET_LINK_LIBRARIES (${target} mysqld)
ENDIF()
- ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT WITH_ASAN AND NOT WITH_UBSAN)
TARGET_LINK_LIBRARIES (${target} "-Wl,--no-undefined")
ENDIF()
@@ -236,9 +236,6 @@ MACRO(MYSQL_ADD_PLUGIN)
IF (NOT ARG_CLIENT)
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB${ver}" PARENT_SCOPE)
ENDIF()
- # workarounds for cmake issues #13248 and #12864:
- SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_PROVIDES "cmake_bug_13248" PARENT_SCOPE)
- SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_OBSOLETES "cmake_bug_13248" PARENT_SCOPE)
SET(CPACK_RPM_${ARG_COMPONENT}_USER_FILELIST ${ignored} PARENT_SCOPE)
IF(NOT ARG_CLIENT AND NOT ARG_CONFIG AND UNIX)
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
diff --git a/cmake/readline.cmake b/cmake/readline.cmake
index d03fe5038821167a084442f412c8fe7cb90b9b41..9cfbe4f0d551ed2af405df4d4734e0acaef17739 100644
--- a/cmake/readline.cmake
+++ b/cmake/readline.cmake
@@ -157,7 +157,7 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
SET(USE_NEW_READLINE_INTERFACE 1)
ELSE()
IF(NOT_FOR_DISTRIBUTION)
- SET(NON_DISTRIBUTABLE_WARNING 1)
+ SET(NON_DISTRIBUTABLE_WARNING "GPLv3")
SET(USE_NEW_READLINE_INTERFACE 1)
ELSE()
SET(USE_NEW_READLINE_INTERFACE 0)
diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake
index 692d4df9f26b6f240a2d75ac8453745af8af8743..478930c9f3dd32a709c641d4968e7647a1c9b629 100644
--- a/cmake/systemd.cmake
+++ b/cmake/systemd.cmake
@@ -39,22 +39,14 @@ MACRO(CHECK_SYSTEMD)
SET(LIBSYSTEMD systemd)
ENDIF()
SET(CMAKE_REQUIRED_LIBRARIES ${LIBSYSTEMD})
- CHECK_C_SOURCE_COMPILES(
- "
- #include
- int main()
- {
- sd_listen_fds(0);
- }"
- HAVE_SYSTEMD)
+ CHECK_LIBRARY_EXISTS(systemd sd_listen_fds "" HAVE_SYSTEMD_SD_LISTEN_FDS)
CHECK_INCLUDE_FILES(systemd/sd-daemon.h HAVE_SYSTEMD_SD_DAEMON_H)
- CHECK_FUNCTION_EXISTS(sd_listen_fds HAVE_SYSTEMD_SD_LISTEN_FDS)
CHECK_FUNCTION_EXISTS(sd_notify HAVE_SYSTEMD_SD_NOTIFY)
CHECK_FUNCTION_EXISTS(sd_notifyf HAVE_SYSTEMD_SD_NOTIFYF)
SET(CMAKE_REQUIRED_LIBRARIES)
- IF(HAVE_SYSTEMD AND HAVE_SYSTEMD_SD_DAEMON_H AND HAVE_SYSTEMD_SD_LISTEN_FDS
+ IF(HAVE_SYSTEMD_SD_DAEMON_H AND HAVE_SYSTEMD_SD_LISTEN_FDS
AND HAVE_SYSTEMD_SD_NOTIFY AND HAVE_SYSTEMD_SD_NOTIFYF)
- ADD_DEFINITIONS(-DHAVE_SYSTEMD)
+ SET(HAVE_SYSTEMD TRUE)
SET(SYSTEMD_SCRIPTS mariadb-service-convert galera_new_cluster galera_recovery)
SET(SYSTEMD_DEB_FILES "usr/bin/mariadb-service-convert
usr/bin/galera_new_cluster
diff --git a/configure.cmake b/configure.cmake
index d37dccbea4aeeb495b3d61a361c5a11987349bfa..38165e5b444730d4fd42824ec49d767f3bbb2399 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -258,7 +258,7 @@ SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DPACKAGE=test) # b
CHECK_INCLUDE_FILES (bfd.h BFD_H_EXISTS)
IF(BFD_H_EXISTS)
IF(NOT_FOR_DISTRIBUTION)
- SET(NON_DISTRIBUTABLE_WARNING 1)
+ SET(NON_DISTRIBUTABLE_WARNING "GPLv3")
SET(HAVE_BFD_H 1)
ENDIF()
ENDIF()
diff --git a/dbug/tests.c b/dbug/tests.c
index 22a445fdeca420081edc747d119c7d1ebe4637b7..70424046bf453fbdf029d31795c96a13232db940 100644
--- a/dbug/tests.c
+++ b/dbug/tests.c
@@ -86,3 +86,11 @@ int main (int argc __attribute__((unused)),
return 0;
#endif /* DBUG_OFF */
}
+
+#ifdef __SANITIZE_ADDRESS__
+/* Disable LeakSanitizer in this executable */
+const char* __asan_default_options()
+{
+ return "detect_leaks=0";
+}
+#endif
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index 895ef744ea1c36ab0714b9a1d03c11ff4fe4190f..a270325211ecef4023006c65fe6735cddd8b9abc 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -501,7 +501,8 @@ datafile_open(const char *file, datafile_cur_t *cursor, uint thread_n)
5.6+. We want to make "local" copies for the backup. */
strncpy(cursor->rel_path,
xb_get_relative_path(cursor->abs_path, FALSE),
- sizeof(cursor->rel_path));
+ (sizeof cursor->rel_path) - 1);
+ cursor->rel_path[(sizeof cursor->rel_path) - 1] = '\0';
cursor->file = os_file_create_simple_no_error_handling(0,
cursor->abs_path,
@@ -642,8 +643,7 @@ mkdirp(const char *pathname, int Flags, myf MyFlags)
/* make a parent directory path */
if (!(parent= (char *)malloc(len)))
return(-1);
- strncpy(parent, pathname, len);
- parent[len-1]= 0;
+ memcpy(parent, pathname, len);
for (p = parent + strlen(parent);
!is_path_separator(*p) && p != parent; p--);
@@ -1216,6 +1216,7 @@ copy_or_move_file(const char *src_file_path,
if (!directory_exists(dst_dir, true)) {
ret = false;
+ free(link_filepath);
goto cleanup;
}
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index 7f0ad8a8361bf92e10b9579e106cb97ba49a67c4..ac46a854fb7c93c9bd8fb1f6bee74acd5461b928 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -54,7 +54,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "mysqld.h"
#include "encryption_plugin.h"
#include
-
+#include "page0zip.h"
char *tool_name;
char tool_args[2048];
@@ -66,7 +66,6 @@ unsigned long mysql_server_version = 0;
/* server capabilities */
bool have_changed_page_bitmaps = false;
bool have_backup_locks = false;
-bool have_backup_safe_binlog_info = false;
bool have_lock_wait_timeout = false;
bool have_galera_enabled = false;
bool have_flush_engine_logs = false;
@@ -334,7 +333,6 @@ get_mysql_vars(MYSQL *connection)
char *version_comment_var = NULL;
char *innodb_version_var = NULL;
char *have_backup_locks_var = NULL;
- char *have_backup_safe_binlog_info_var = NULL;
char *log_bin_var = NULL;
char *lock_wait_timeout_var= NULL;
char *wsrep_on_var = NULL;
@@ -350,6 +348,7 @@ get_mysql_vars(MYSQL *connection)
char *innodb_undo_directory_var = NULL;
char *innodb_page_size_var = NULL;
char *innodb_undo_tablespaces_var = NULL;
+ char *page_zip_level_var = NULL;
char *endptr;
unsigned long server_version = mysql_get_server_version(connection);
@@ -357,8 +356,6 @@ get_mysql_vars(MYSQL *connection)
mysql_variable mysql_vars[] = {
{"have_backup_locks", &have_backup_locks_var},
- {"have_backup_safe_binlog_info",
- &have_backup_safe_binlog_info_var},
{"log_bin", &log_bin_var},
{"lock_wait_timeout", &lock_wait_timeout_var},
{"gtid_mode", >id_mode_var},
@@ -379,6 +376,7 @@ get_mysql_vars(MYSQL *connection)
{"innodb_undo_directory", &innodb_undo_directory_var},
{"innodb_page_size", &innodb_page_size_var},
{"innodb_undo_tablespaces", &innodb_undo_tablespaces_var},
+ {"innodb_compression_level", &page_zip_level_var},
{NULL, NULL}
};
@@ -390,22 +388,12 @@ get_mysql_vars(MYSQL *connection)
}
if (opt_binlog_info == BINLOG_INFO_AUTO) {
-
- if (have_backup_safe_binlog_info_var != NULL)
- opt_binlog_info = BINLOG_INFO_LOCKLESS;
- else if (log_bin_var != NULL && !strcmp(log_bin_var, "ON"))
+ if (log_bin_var != NULL && !strcmp(log_bin_var, "ON"))
opt_binlog_info = BINLOG_INFO_ON;
else
opt_binlog_info = BINLOG_INFO_OFF;
}
- if (have_backup_safe_binlog_info_var == NULL &&
- opt_binlog_info == BINLOG_INFO_LOCKLESS) {
-
- msg("Error: --binlog-info=LOCKLESS is not supported by the "
- "server\n");
- return(false);
- }
if (lock_wait_timeout_var != NULL) {
have_lock_wait_timeout = true;
@@ -512,7 +500,13 @@ get_mysql_vars(MYSQL *connection)
}
if (innodb_undo_tablespaces_var) {
- srv_undo_tablespaces = strtoul(innodb_undo_tablespaces_var, &endptr, 10);
+ srv_undo_tablespaces = strtoul(innodb_undo_tablespaces_var,
+ &endptr, 10);
+ ut_ad(*endptr == 0);
+ }
+
+ if (page_zip_level_var != NULL) {
+ page_zip_level = strtoul(page_zip_level_var, &endptr, 10);
ut_ad(*endptr == 0);
}
@@ -1574,6 +1568,7 @@ bool write_backup_config_file()
"innodb_log_block_size=%lu\n"
"innodb_undo_directory=%s\n"
"innodb_undo_tablespaces=%lu\n"
+ "innodb_compression_level=%u\n"
"%s%s\n"
"%s%s\n"
"%s\n",
@@ -1586,6 +1581,7 @@ bool write_backup_config_file()
srv_log_block_size,
srv_undo_dir,
srv_undo_tablespaces,
+ page_zip_level,
innobase_doublewrite_file ? "innodb_doublewrite_file=" : "",
innobase_doublewrite_file ? innobase_doublewrite_file : "",
innobase_buffer_pool_filename ?
diff --git a/extra/mariabackup/changed_page_bitmap.cc b/extra/mariabackup/changed_page_bitmap.cc
index d5185b189714c75725805728f9ad687cbac0efaa..d4d3b71f99445faf24efd6cf350053b858e3c6dc 100644
--- a/extra/mariabackup/changed_page_bitmap.cc
+++ b/extra/mariabackup/changed_page_bitmap.cc
@@ -381,6 +381,7 @@ log_online_setup_bitmap_file_range(
msg("InnoDB: Error: inconsistent bitmap file "
"directory\n");
+ os_file_closedir(bitmap_dir);
free(bitmap_files->files);
return FALSE;
}
diff --git a/extra/mariabackup/ds_compress.c b/extra/mariabackup/ds_compress.c
index 88f508573620de505de3d1e789b61c02c4e440d4..af848db2f24764fe2bd46fb417923f5c107c4bd2 100644
--- a/extra/mariabackup/ds_compress.c
+++ b/extra/mariabackup/ds_compress.c
@@ -384,6 +384,7 @@ create_worker_threads(uint n)
return threads;
err:
+ my_free(threads);
return NULL;
}
diff --git a/extra/mariabackup/encryption_plugin.cc b/extra/mariabackup/encryption_plugin.cc
index 8f7741b057a87128735835cdc669f4eda96a1ba6..b5acd385d0a8364f0ede82568bbe3b85625490fa 100644
--- a/extra/mariabackup/encryption_plugin.cc
+++ b/extra/mariabackup/encryption_plugin.cc
@@ -67,7 +67,8 @@ void encryption_plugin_backup_init(MYSQL *mysql)
/* Required to load the plugin later.*/
add_to_plugin_load_list(plugin_load.c_str());
- strncpy(opt_plugin_dir, dir, FN_REFLEN);
+ strncpy(opt_plugin_dir, dir, FN_REFLEN - 1);
+ opt_plugin_dir[FN_REFLEN - 1] = '\0';
oss << "plugin_dir=" << '"' << dir << '"' << endl;
@@ -133,7 +134,10 @@ void encryption_plugin_prepare_init(int argc, char **argv)
add_to_plugin_load_list(xb_plugin_load);
if (xb_plugin_dir)
- strncpy(opt_plugin_dir, xb_plugin_dir, FN_REFLEN);
+ {
+ strncpy(opt_plugin_dir, xb_plugin_dir, FN_REFLEN - 1);
+ opt_plugin_dir[FN_REFLEN - 1] = '\0';
+ }
char **new_argv = new char *[argc + 1];
new_argv[0] = XTRABACKUP_EXE;
diff --git a/extra/mariabackup/fil_cur.cc b/extra/mariabackup/fil_cur.cc
index 46465575a4877c52bb22f69f1cfca9ae26a718ed..ce9aaecfc9cfa87a8d92a84d4516fc1733200a11 100644
--- a/extra/mariabackup/fil_cur.cc
+++ b/extra/mariabackup/fil_cur.cc
@@ -152,7 +152,8 @@ xb_fil_cur_open(
cursor->space_id = node->space->id;
cursor->is_system = !fil_is_user_tablespace_id(node->space->id);
- strncpy(cursor->abs_path, node->name, sizeof(cursor->abs_path));
+ strncpy(cursor->abs_path, node->name, (sizeof cursor->abs_path) - 1);
+ cursor->abs_path[(sizeof cursor->abs_path) - 1] = '\0';
/* Get the relative path for the destination tablespace name, i.e. the
one that can be appended to the backup root directory. Non-system
@@ -160,7 +161,8 @@ xb_fil_cur_open(
5.6+. We want to make "local" copies for the backup. */
strncpy(cursor->rel_path,
xb_get_relative_path(cursor->abs_path, cursor->is_system),
- sizeof(cursor->rel_path));
+ (sizeof cursor->rel_path) - 1);
+ cursor->rel_path[(sizeof cursor->rel_path) - 1] = '\0';
/* In the backup mode we should already have a tablespace handle created
by fil_load_single_table_tablespace() unless it is a system
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 2d28a6caa84f154f03c22a555a9bb8beaa0b8dda..e5d2474ba94ece212c08598bf3e4a0536df4864a 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -366,9 +366,6 @@ uint opt_safe_slave_backup_timeout = 0;
const char *opt_history = NULL;
-/* Whether xtrabackup_binlog_info should be created on recovery */
-static bool recover_binlog_info;
-
/* Simple datasink creation tracking...add datasinks in the reverse order you
want them destroyed. */
#define XTRABACKUP_MAX_DATASINKS 10
@@ -597,7 +594,8 @@ enum options_xtrabackup
OPT_XTRA_TABLES_EXCLUDE,
OPT_XTRA_DATABASES_EXCLUDE,
- OPT_PROTOCOL
+ OPT_PROTOCOL,
+ OPT_INNODB_COMPRESSION_LEVEL
};
struct my_option xb_client_options[] =
@@ -1145,6 +1143,11 @@ Disable with --skip-innodb-doublewrite.", (G_PTR*) &innobase_use_doublewrite,
(G_PTR*)&srv_undo_tablespaces, (G_PTR*)&srv_undo_tablespaces,
0, GET_ULONG, REQUIRED_ARG, 0, 0, 126, 0, 1, 0},
+ {"innodb_compression_level", OPT_INNODB_COMPRESSION_LEVEL,
+ "Compression level used for zlib compression.",
+ (G_PTR*)&page_zip_level, (G_PTR*)&page_zip_level,
+ 0, GET_UINT, REQUIRED_ARG, 6, 0, 9, 0, 0, 0},
+
{"defaults_group", OPT_DEFAULTS_GROUP, "defaults group in config file (default \"mysqld\").",
(G_PTR*) &defaults_group, (G_PTR*) &defaults_group,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1381,6 +1384,10 @@ xb_get_one_option(int optid,
ADD_PRINT_PARAM_OPT(innodb_checksum_algorithm_names[srv_log_checksum_algorithm]);
break;
+ case OPT_INNODB_COMPRESSION_LEVEL:
+ ADD_PRINT_PARAM_OPT(page_zip_level);
+ break;
+
case OPT_INNODB_BUFFER_POOL_FILENAME:
ADD_PRINT_PARAM_OPT(innobase_buffer_pool_filename);
@@ -1854,7 +1861,6 @@ xtrabackup_read_metadata(char *filename)
{
FILE *fp;
my_bool r = TRUE;
- int t;
fp = fopen(filename,"r");
if(!fp) {
@@ -1885,9 +1891,6 @@ xtrabackup_read_metadata(char *filename)
}
/* Optional fields */
- if (fscanf(fp, "recover_binlog_info = %d\n", &t) == 1) {
- recover_binlog_info = (t == 1);
- }
end:
fclose(fp);
@@ -1906,13 +1909,11 @@ xtrabackup_print_metadata(char *buf, size_t buf_len)
"backup_type = %s\n"
"from_lsn = " UINT64PF "\n"
"to_lsn = " UINT64PF "\n"
- "last_lsn = " UINT64PF "\n"
- "recover_binlog_info = %d\n",
+ "last_lsn = " UINT64PF "\n",
metadata_type,
metadata_from_lsn,
metadata_to_lsn,
- metadata_last_lsn,
- MY_TEST(opt_binlog_info == BINLOG_INFO_LOCKLESS));
+ metadata_last_lsn);
}
/***********************************************************************
@@ -2251,8 +2252,9 @@ check_if_skip_table(
return(FALSE);
}
- strncpy(buf, dbname, FN_REFLEN);
- buf[tbname - 1 - dbname] = 0;
+ strncpy(buf, dbname, FN_REFLEN - 1);
+ buf[FN_REFLEN - 1] = '\0';
+ buf[tbname - 1 - dbname] = '\0';
const skip_database_check_result skip_database =
check_if_skip_database(buf);
@@ -2260,7 +2262,6 @@ check_if_skip_table(
return (TRUE);
}
- buf[FN_REFLEN - 1] = '\0';
buf[tbname - 1 - dbname] = '.';
/* Check if there's a suffix in the table name. If so, truncate it. We
@@ -4990,7 +4991,8 @@ xtrabackup_apply_delta(
}
dst_path[strlen(dst_path) - 6] = '\0';
- strncpy(space_name, filename, FN_REFLEN);
+ strncpy(space_name, filename, FN_REFLEN - 1);
+ space_name[FN_REFLEN - 1] = '\0';
space_name[strlen(space_name) - 6] = 0;
if (!get_meta_path(src_path, meta_path)) {
@@ -5325,6 +5327,7 @@ xb_process_datadir(
fileinfo.name, data))
{
os_file_closedir(dbdir);
+ os_file_closedir(dir);
return(FALSE);
}
}
@@ -5789,35 +5792,6 @@ innodb_free_param()
free_tmpdir(&mysql_tmpdir_list);
}
-
-/**************************************************************************
-Store the current binary log coordinates in a specified file.
-@return 'false' on error. */
-static bool
-store_binlog_info(
-/*==============*/
- const char *filename) /*!< in: output file name */
-{
- FILE *fp;
-
- if (trx_sys_mysql_bin_log_name[0] == '\0') {
- return(true);
- }
-
- fp = fopen(filename, "w");
-
- if (!fp) {
- msg("mariabackup: failed to open '%s'\n", filename);
- return(false);
- }
-
- fprintf(fp, "%s\t" UINT64PF "\n",
- trx_sys_mysql_bin_log_name, trx_sys_mysql_bin_log_pos);
- fclose(fp);
-
- return(true);
-}
-
static void
xtrabackup_prepare_func(int argc, char ** argv)
{
@@ -6036,7 +6010,8 @@ xtrabackup_prepare_func(int argc, char ** argv)
p = next + 1;
}
info_file_path[len - 4] = 0;
- strncpy(table_name, prev, FN_REFLEN);
+ strncpy(table_name, prev, FN_REFLEN - 1);
+ table_name[FN_REFLEN - 1] = '\0';
info_file_path[len - 4] = '.';
@@ -6072,8 +6047,7 @@ xtrabackup_prepare_func(int argc, char ** argv)
mach_write_to_4(page , 0x78706f72UL);
mach_write_to_4(page + 4, 0x74696e66UL);/*"xportinf"*/
mach_write_to_4(page + 8, n_index);
- strncpy((char *) page + 12,
- table_name, 500);
+ strncpy((char *) page + 12, table_name, FN_REFLEN);
msg("mariabackup: export metadata of "
"table '%s' to file `%s` "
@@ -6137,17 +6111,6 @@ xtrabackup_prepare_func(int argc, char ** argv)
trx_sys_print_mysql_binlog_offset();
msg("\n");
- /* output to xtrabackup_binlog_pos_innodb and (if
- backup_safe_binlog_info was available on the server) to
- xtrabackup_binlog_info. In the latter case xtrabackup_binlog_pos_innodb
- becomes redundant and is created only for compatibility. */
- if (!store_binlog_info("xtrabackup_binlog_pos_innodb") ||
- (recover_binlog_info &&
- !store_binlog_info(XTRABACKUP_BINLOG_INFO))) {
-
- exit(EXIT_FAILURE);
- }
-
/* Check whether the log is applied enough or not. */
if ((xtrabackup_incremental
&& srv_start_lsn < incremental_to_lsn)
diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h
index e870ecbe2eb348d590be37db418914493283f5e4..38c0020830eee8382efda3e8f622794e01607a6b 100644
--- a/extra/mariabackup/xtrabackup.h
+++ b/extra/mariabackup/xtrabackup.h
@@ -161,7 +161,7 @@ extern uint opt_safe_slave_backup_timeout;
extern const char *opt_history;
-enum binlog_info_enum { BINLOG_INFO_OFF, BINLOG_INFO_LOCKLESS, BINLOG_INFO_ON,
+enum binlog_info_enum { BINLOG_INFO_OFF, BINLOG_INFO_ON,
BINLOG_INFO_AUTO};
extern ulong opt_binlog_info;
diff --git a/include/my_pthread.h b/include/my_pthread.h
index ae2f912f979b279ff6489cab80e30145d9fdc092..2b3edb735283eafa5fa0bc8fc3e69728607db3c4 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -734,7 +734,11 @@ extern void my_mutex_end(void);
We need to have at least 256K stack to handle calls to myisamchk_init()
with the current number of keys and key parts.
*/
-#define DEFAULT_THREAD_STACK (289*1024L)
+#ifdef __SANITIZE_ADDRESS__
+#define DEFAULT_THREAD_STACK (364*1024L)
+#else
+#define DEFAULT_THREAD_STACK (292*1024L)
+#endif
#endif
#define MY_PTHREAD_LOCK_READ 0
diff --git a/include/my_tree.h b/include/my_tree.h
index 02cab02b52e7521e40f5defb99e9e8d84b6b1e9c..59d02218a21e196f1c68a9c8fef8a8698c725075 100644
--- a/include/my_tree.h
+++ b/include/my_tree.h
@@ -59,7 +59,7 @@ typedef struct st_tree_element {
#define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs))
typedef struct st_tree {
- TREE_ELEMENT *root,null_element;
+ TREE_ELEMENT *root;
TREE_ELEMENT **parents[MAX_TREE_HEIGHT];
uint offset_to_key,elements_in_tree,size_of_element;
size_t memory_limit, allocated;
diff --git a/include/mysql/client_plugin.h b/include/mysql/client_plugin.h
index b2df0019dfedced12a1cdf608bc4ea6665b47eac..84fb3c6798d2bc03fb50bae890024b4c4e7fa051 100644
--- a/include/mysql/client_plugin.h
+++ b/include/mysql/client_plugin.h
@@ -32,17 +32,18 @@
*/
#undef MYSQL_PLUGIN_EXPORT
#if defined(_MSC_VER)
- #ifdef __cplusplus
- #define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
- #else
- #define MYSQL_PLUGIN_EXPORT __declspec(dllexport)
- #endif
+ #define MYSQL_PLUGIN_EXPORT_C __declspec(dllexport)
#else /*_MSC_VER */
- #ifdef __cplusplus
- #define MYSQL_PLUGIN_EXPORT extern "C"
- #else
- #define MYSQL_PLUGIN_EXPORT
- #endif
+ #define MYSQL_PLUGIN_EXPORT_C
+#endif
+#ifdef __cplusplus
+#define MYSQL_PLUGIN_EXPORT extern "C" MYSQL_PLUGIN_EXPORT_C
+#define C_MODE_START extern "C" {
+#define C_MODE_END }
+#else
+#define MYSQL_PLUGIN_EXPORT MYSQL_PLUGIN_EXPORT_C
+#define C_MODE_START
+#define C_MODE_END
#endif
#ifndef MYSQL_ABI_CHECK
@@ -60,11 +61,12 @@
#define MYSQL_CLIENT_MAX_PLUGINS 3
#define mysql_declare_client_plugin(X) \
- MYSQL_PLUGIN_EXPORT struct st_mysql_client_plugin_ ## X \
+ C_MODE_START MYSQL_PLUGIN_EXPORT_C \
+ struct st_mysql_client_plugin_ ## X \
_mysql_client_plugin_declaration_ = { \
MYSQL_CLIENT_ ## X ## _PLUGIN, \
MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
-#define mysql_end_client_plugin }
+#define mysql_end_client_plugin }; C_MODE_END
/* generic plugin header structure */
#define MYSQL_CLIENT_PLUGIN_HEADER \
diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h
index b51f154422f4db8141f59e2c89fd55c5df20e5da..267c8cb4e90683f95dba0276ab320fc4872ec3f4 100644
--- a/include/mysql/service_wsrep.h
+++ b/include/mysql/service_wsrep.h
@@ -107,6 +107,7 @@ extern struct wsrep_service_st {
bool (*wsrep_thd_ignore_table_func)(THD *thd);
long long (*wsrep_thd_trx_seqno_func)(THD *thd);
struct wsrep_ws_handle * (*wsrep_thd_ws_handle_func)(THD *thd);
+ void (*wsrep_thd_auto_increment_variables_func)(THD *thd, unsigned long long *offset, unsigned long long *increment);
int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd);
int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD);
void (*wsrep_unlock_rollback_func)();
@@ -149,6 +150,7 @@ extern struct wsrep_service_st {
#define wsrep_thd_ignore_table(T) wsrep_service->wsrep_thd_ignore_table_func(T)
#define wsrep_thd_trx_seqno(T) wsrep_service->wsrep_thd_trx_seqno_func(T)
#define wsrep_thd_ws_handle(T) wsrep_service->wsrep_thd_ws_handle_func(T)
+#define wsrep_thd_auto_increment_variables(T,O,I) wsrep_service->wsrep_thd_auto_increment_variables_func(T,O,I)
#define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T)
#define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2)
#define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func()
@@ -201,6 +203,7 @@ my_bool wsrep_thd_is_BF(MYSQL_THD thd, my_bool sync);
my_bool wsrep_thd_is_wsrep(MYSQL_THD thd);
struct wsrep *get_wsrep();
struct wsrep_ws_handle *wsrep_thd_ws_handle(THD *thd);
+void wsrep_thd_auto_increment_variables(THD *thd, unsigned long long *offset, unsigned long long *increment);
void wsrep_aborting_thd_enqueue(THD *thd);
void wsrep_lock_rollback();
void wsrep_post_commit(THD* thd, bool all);
diff --git a/include/wsrep.h b/include/wsrep.h
index 14d624aec2650366cd622bfb970887c035d7b540..d9800b7014f315ae23dd3bd9bb917b73a47998e2 100644
--- a/include/wsrep.h
+++ b/include/wsrep.h
@@ -50,9 +50,9 @@
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
-#define WSREP_SYNC_WAIT(thd_, before_) \
- { if (WSREP_CLIENT(thd_) && \
- wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; }
+#define WSREP_SYNC_WAIT(thd_, before_) \
+ do { if (WSREP_CLIENT(thd_) && \
+ wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; } while(0)
#define WSREP_ERROR_LABEL wsrep_error_label
#else
#define IF_WSREP(A,B) B
@@ -64,7 +64,7 @@
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
#define WSREP_TO_ISOLATION_END
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
-#define WSREP_SYNC_WAIT(thd_, before_)
+#define WSREP_SYNC_WAIT(thd_, before_) do { } while(0)
#define WSREP_ERROR_LABEL goto wsrep_error_label; wsrep_error_label
#endif /* WITH_WSREP */
diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1
index 9fb775f2099df737cdbc5f6aad4add4f0900816f..636c59740a55204a797f4669c742e2a20a6b1dad 100644
--- a/man/mysql_install_db.1
+++ b/man/mysql_install_db.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\FBMYSQL_INSTALL_DB\" "1" "14/12/2015" "MariaDB 10\&.1" "MariaDB Database System"
+.TH "\FBMYSQL_INSTALL_DB\FR" "1" "4 April 2019" "MariaDB 10\&.1" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -198,6 +198,21 @@ Must be given as first option\&.
.sp -1
.IP \(bu 2.3
.\}
+.\" mysql_install_db: defaults-group-suffix option
+.\" defaults-group-suffix option: mysql_install_db
+\fB\-\-defaults\-group\-suffix=\fR\fB\fIname\fR\fR
+.sp
+In addition to the given groups, also read groups with this suffix\&.
+.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
@@ -354,7 +369,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., 2010-2015 MariaDB Foundation
+Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2019 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
diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1
index c33f86c04799e3c61a15c2fd3454302d97fc9923..ee9daf5a15c3faf11eafa303e1adacddec84bac3 100644
--- a/man/mysqldumpslow.1
+++ b/man/mysqldumpslow.1
@@ -210,6 +210,30 @@ should be chosen from the following list:
.IP \(bu 2.3
.\}
t,
+aa: Sort by rows affected or average rows affected
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+l,
+ae: Sort by rows examined or aggregate rows examined
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+l,
at: Sort by query time or average query time
.RE
.sp
diff --git a/mysql-test/include/ctype_like_escape.inc b/mysql-test/include/ctype_like_escape.inc
index d4abc33c1783d7315758d9ac84964ce03ebf5d8e..f817bc03e74313413dac6273eeb5452727c81ea8 100644
--- a/mysql-test/include/ctype_like_escape.inc
+++ b/mysql-test/include/ctype_like_escape.inc
@@ -16,3 +16,9 @@ select c1 as c1u from t1 where c1 like 'ab\_def';
# should return ab_def
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
drop table t1;
+
+#
+# MDEV-13335 UTF8 escape wildcard LIKE match has different behavior in different collations
+#
+SELECT @@collation_connection;
+SELECT '\%b' LIKE '%\%';
diff --git a/mysql-test/suite/galera/include/galera_resume.inc b/mysql-test/include/galera_resume.inc
similarity index 80%
rename from mysql-test/suite/galera/include/galera_resume.inc
rename to mysql-test/include/galera_resume.inc
index 232cb46479e05e6fa8aa526df784ec1d9713d0f1..af8f2b956fd93be8301da8a8c0074ad490d0b8d7 100644
--- a/mysql-test/suite/galera/include/galera_resume.inc
+++ b/mysql-test/include/galera_resume.inc
@@ -3,7 +3,7 @@
my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'};
my $mysqld_pid = `cat $pid_filename`;
chomp($mysqld_pid);
- system("kill -18 $mysqld_pid");
+ system("kill -SIGCONT $mysqld_pid");
exit(0);
EOF
diff --git a/mysql-test/suite/galera_3nodes/include/galera_suspend.inc b/mysql-test/include/galera_suspend.inc
similarity index 86%
rename from mysql-test/suite/galera_3nodes/include/galera_suspend.inc
rename to mysql-test/include/galera_suspend.inc
index 3495ad2342b12671e553460e0cce33503e884380..d4037d8958ca19aac805ce7a2c34648e45c8faa0 100644
--- a/mysql-test/suite/galera_3nodes/include/galera_suspend.inc
+++ b/mysql-test/include/galera_suspend.inc
@@ -9,6 +9,6 @@
my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'};
my $mysqld_pid = `cat $pid_filename`;
chomp($mysqld_pid);
- system("kill -19 $mysqld_pid");
+ system("kill -SIGSTOP $mysqld_pid");
exit(0);
EOF
diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc
index 88dd4c319100311f91cb5bd2236760fa94b2eb6f..7880091ac10d277c072e8544291d6a93c9c96ab0 100644
--- a/mysql-test/include/index_merge1.inc
+++ b/mysql-test/include/index_merge1.inc
@@ -37,12 +37,14 @@ insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8);
let $1=7;
set @d=8;
+begin;
while ($1)
{
eval insert into t0 select key1+@d from t0;
eval set @d=@d*2;
dec $1;
}
+commit;
--enable_query_log
alter table t0 add key2 int not null, add index i2(key2);
@@ -360,6 +362,7 @@ INSERT INTO t1 VALUES ('foo','bar', 'ZZ'),('fuz','baz', 'ZZ');
--disable_query_log
let $1=9;
+begin;
while ($1)
{
eval INSERT INTO t1 SELECT * from t1 WHERE cola = 'foo';
@@ -372,6 +375,7 @@ while ($1)
eval INSERT INTO t1 SELECT * from t1 WHERE cola <> 'foo';
dec $1;
}
+commit;
--enable_query_log
diff --git a/mysql-test/include/index_merge2.inc b/mysql-test/include/index_merge2.inc
index 03afa49d323f08bd0c46e92c504ca2dfcdfdec6c..ae9adac882f119899101a06fc2c5a7c1c5b4c1c2 100644
--- a/mysql-test/include/index_merge2.inc
+++ b/mysql-test/include/index_merge2.inc
@@ -34,11 +34,13 @@ create table t1
--disable_query_log
let $1=200;
+begin;
while ($1)
{
eval insert into t1 values (200-$1, $1);
dec $1;
}
+commit;
--enable_query_log
# No primary key
@@ -80,11 +82,13 @@ create table t1 (
show warnings;
--disable_query_log
let $1=30;
+begin;
while ($1)
{
eval insert into t1 (key1, key2, filler) values ($1/4, $1/8, 'filler-data');
dec $1;
}
+commit;
--enable_query_log
explain select pk from t1 where key1 = 1 and key2 = 1;
select pk from t1 where key2 = 1 and key1 = 1;
@@ -331,16 +335,20 @@ insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8);
let $1=7;
set @d=8;
+begin;
while ($1)
{
eval insert into t1 (key1) select key1+@d from t1;
eval set @d=@d*2;
dec $1;
}
+commit;
alter table t1 add index i2(key2);
alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1;
+
+insert into t1 select 10000+key1, 10000+key2,10000+key3 from t1;
analyze table t1;
# to test the bug, the following must use "sort_union":
diff --git a/mysql-test/include/index_merge_2sweeps.inc b/mysql-test/include/index_merge_2sweeps.inc
index 3ae7e5b3c0905f215ff5d72f5e4a18b36b10932c..ef356e12969b8b916644c06275794d7c174a3973 100644
--- a/mysql-test/include/index_merge_2sweeps.inc
+++ b/mysql-test/include/index_merge_2sweeps.inc
@@ -32,12 +32,14 @@ create table t1 (
--disable_query_log
+begin;
let $1=1000;
while ($1)
{
eval insert into t1 values($1, $1, $1, 'filler-data','filler-data-2');
dec $1;
}
+commit;
--enable_query_log
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
diff --git a/mysql-test/include/index_merge_ror.inc b/mysql-test/include/index_merge_ror.inc
index fdb966e6885fec46c7b8a5cae709a6917327af23..3ec6e342994cc209198b4cce902e80b1e980507b 100644
--- a/mysql-test/include/index_merge_ror.inc
+++ b/mysql-test/include/index_merge_ror.inc
@@ -67,18 +67,21 @@ create table t1
create table t0 as select * from t1;
--disable_query_log
--echo # Printing of many insert into t0 values (....) disabled.
+begin;
let $cnt=1000;
while ($cnt)
{
eval insert into t0 values (1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 'data1', 'data2', 'data3', 'data4', 'data5', 'data6');
dec $cnt;
}
+commit;
--enable_query_log
alter table t1 disable keys;
--disable_query_log
--echo # Printing of many insert into t1 select .... from t0 disabled.
let $1=4;
+begin;
while ($1)
{
let $2=4;
@@ -94,6 +97,7 @@ while ($1)
}
dec $1;
}
+commit;
--echo # Printing of many insert into t1 (...) values (....) disabled.
# Row retrieval tests
@@ -101,6 +105,7 @@ while ($1)
# insert enough rows for index intersection to be used for (key1,key2)
insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 100, 100,'key1-key2-key3-key4');
let $cnt=400;
+begin;
while ($cnt)
{
eval insert into t1 (key1, key2, key3, key4, filler1) values (100, -1, 100, -1,'key1-key3');
@@ -112,6 +117,7 @@ while ($cnt)
eval insert into t1 (key1, key2, key3, key4, filler1) values (-1, 100, -1, 100,'key2-key4');
dec $cnt;
}
+commit;
--enable_query_log
alter table t1 enable keys;
select count(*) from t1;
@@ -249,6 +255,7 @@ create table t2 (
--disable_query_log
let $1=8;
+begin;
while ($1)
{
eval insert into t2 values (repeat(char($1+64), 8),repeat(char($1+64), 8),'filler1', 'filler2');
@@ -256,6 +263,7 @@ while ($1)
}
insert into t2 select * from t2;
insert into t2 select * from t2;
+commit;
--enable_query_log
# The table row buffer is reused. Fill it with rows that don't match.
diff --git a/mysql-test/include/index_merge_ror_cpk.inc b/mysql-test/include/index_merge_ror_cpk.inc
index df42745b4fcae3502a84043b123074e57fd410bc..0a307aa4fdb7f9364626e54f663ab315900adc6e 100644
--- a/mysql-test/include/index_merge_ror_cpk.inc
+++ b/mysql-test/include/index_merge_ror_cpk.inc
@@ -56,14 +56,14 @@ create table t1
);
--disable_query_log
-set autocommit=0;
+begin;
let $1=10000;
while ($1)
{
eval insert into t1 values ($1 div 10,$1 mod 100, $1/100,$1/100, $1/100,$1/100,$1/100,$1/100,$1/100, $1 mod 100, $1/1000,'filler-data-$1','filler2');
dec $1;
}
-set autocommit=1;
+commit;
--enable_query_log
# Verify that range scan on CPK is ROR
diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc
index cdc39f8407f2f5360c13c31570e70942fad78501..3b6c91ebbedf64b35157663d2344f9be84acfbc9 100644
--- a/mysql-test/include/mix2.inc
+++ b/mysql-test/include/mix2.inc
@@ -1153,7 +1153,7 @@ checksum table t1, t2, t3, t4, t5, t6, t7 extended;
drop table t1,t2,t3, t4, t5, t6;
#
-# Test problem with refering to different fields in same table in UNION
+# Test problem with referring to different fields in same table in UNION
# (Bug#2552: UNION returns NULL instead of expected value (innoDB only tables))
#
eval create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=$engine_type;
diff --git a/mysql-test/lib/generate-ssl-certs.sh b/mysql-test/lib/generate-ssl-certs.sh
index 8f15ba9d52106b450be3d831aa7b38e8c936d141..4b333854c0816da813c26bd0a4221321f5608cc7 100755
--- a/mysql-test/lib/generate-ssl-certs.sh
+++ b/mysql-test/lib/generate-ssl-certs.sh
@@ -31,7 +31,7 @@ openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_
# with SubjectAltName, only for OpenSSL 1.0.2+
cat > demoCA/sanext.conf < Dump of mysqltest1
@@ -2498,7 +2506,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev1` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10);
SELECT
COLLATION(ÐÅÒÅÍ1) AS c1,
@@ -2526,7 +2534,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev2` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(ÐÅÒÅÍ1) AS c1,
@@ -2565,7 +2573,7 @@ ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(ÐÅÒÅÍ1) AS c1,
@@ -2593,7 +2601,7 @@ ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev4` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev4` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(ÐÅÒÅÍ1) AS c1,
@@ -2635,7 +2643,7 @@ set names koi8r|
SHOW CREATE EVENT ev1|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10);
SELECT
COLLATION(ÐÅÒÅÍ1) AS c1,
@@ -2648,7 +2656,7 @@ END koi8r koi8r_general_ci utf8_unicode_ci
SHOW CREATE EVENT ev2|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev2 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev2 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev2` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(ÐÅÒÅÍ1) AS c1,
@@ -2661,7 +2669,7 @@ END koi8r koi8r_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(ÐÅÒÅÍ1) AS c1,
@@ -2674,7 +2682,7 @@ END koi8r koi8r_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(ÐÅÒÅÍ1) AS c1,
@@ -2688,11 +2696,11 @@ END koi8r koi8r_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev1'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-mysqltest1 ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 koi8r koi8r_general_ci utf8_unicode_ci
+mysqltest1 ev1 root@localhost SYSTEM ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 koi8r koi8r_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev2'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-mysqltest1 ev2 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 koi8r koi8r_general_ci utf8_unicode_ci
+mysqltest1 ev2 root@localhost SYSTEM ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 koi8r koi8r_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev3'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
@@ -2712,7 +2720,7 @@ COLLATION( '
COLLATION( 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev2'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2725,7 +2733,7 @@ COLLATION( '
COLLATION( 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev3'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2738,7 +2746,7 @@ COLLATION( '
COLLATION( 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev4'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2751,7 +2759,7 @@ COLLATION( '
COLLATION( 'ÔÅËÓÔ') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci
-------------------------------------------------------------------
DDL statements within stored routine.
diff --git a/mysql-test/r/ddl_i18n_utf8.result b/mysql-test/r/ddl_i18n_utf8.result
index 5921a7f538d222ae4e94560ca1090570a56ca2a7..7f1bb7f0490c24005c10fbafb9e8abac5f77bf81 100644
--- a/mysql-test/r/ddl_i18n_utf8.result
+++ b/mysql-test/r/ddl_i18n_utf8.result
@@ -2175,7 +2175,7 @@ CREATE DATABASE mysqltest1 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unico
CREATE DATABASE mysqltest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci|
use mysqltest1|
-CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE перем1 CHAR(10);
SELECT
@@ -2186,8 +2186,10 @@ COLLATION(_koi8r '
@@collation_connection AS c5,
@@character_set_client AS c6;
END|
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
-CREATE EVENT ev2 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
@@ -2198,8 +2200,10 @@ COLLATION(_koi8r '
@@collation_connection AS c5,
@@character_set_client AS c6;
END|
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
-CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
@@ -2210,8 +2214,10 @@ COLLATION(_koi8r '
@@collation_connection AS c5,
@@character_set_client AS c6;
END|
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
-CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
@@ -2222,12 +2228,14 @@ COLLATION(_koi8r '
@@collation_connection AS c5,
@@character_set_client AS c6;
END|
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT ev1|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
@@ -2240,7 +2248,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT ev2|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev2 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev2 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev2` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2253,7 +2261,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2266,7 +2274,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2280,11 +2288,11 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev1'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-mysqltest1 ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
+mysqltest1 ev1 root@localhost SYSTEM ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev2'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-mysqltest1 ev2 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
+mysqltest1 ev2 root@localhost SYSTEM ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev3'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
@@ -2304,7 +2312,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev2'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2317,7 +2325,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev3'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2330,7 +2338,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev4'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2343,7 +2351,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
ALTER DATABASE mysqltest1 COLLATE cp866_general_ci|
@@ -2362,7 +2370,7 @@ set names utf8|
SHOW CREATE EVENT ev1|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
@@ -2375,7 +2383,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT ev2|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev2 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev2 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev2` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2388,7 +2396,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2401,7 +2409,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2415,11 +2423,11 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev1'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-mysqltest1 ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
+mysqltest1 ev1 root@localhost SYSTEM ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev2'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-mysqltest1 ev2 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
+mysqltest1 ev2 root@localhost SYSTEM ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev3'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
@@ -2439,7 +2447,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev2'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2452,7 +2460,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev3'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2465,7 +2473,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev4'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2478,7 +2486,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
---> Dump of mysqltest1
@@ -2498,7 +2506,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev1` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
@@ -2526,7 +2534,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev2` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2565,7 +2573,7 @@ ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2593,7 +2601,7 @@ ALTER DATABASE `mysqltest2` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;;
/*!50003 SET sql_mode = '' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev4` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ev4` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2635,7 +2643,7 @@ set names utf8|
SHOW CREATE EVENT ev1|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10);
SELECT
COLLATION(перем1) AS c1,
@@ -2648,7 +2656,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT ev2|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev2 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev2` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev2 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev2` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2661,7 +2669,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2674,7 +2682,7 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW CREATE EVENT mysqltest2.ev3|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO BEGIN
+ev3 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev3` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
SELECT
COLLATION(перем1) AS c1,
@@ -2688,11 +2696,11 @@ END utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev1'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-mysqltest1 ev1 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
+mysqltest1 ev1 root@localhost SYSTEM ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev2'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
-mysqltest1 ev2 root@localhost SYSTEM ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED 1 utf8 utf8_general_ci utf8_unicode_ci
+mysqltest1 ev2 root@localhost SYSTEM ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 utf8 utf8_general_ci utf8_unicode_ci
SHOW EVENTS LIKE 'ev3'|
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
@@ -2712,7 +2720,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev2'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2725,7 +2733,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev3'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2738,7 +2746,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
SELECT * FROM INFORMATION_SCHEMA.EVENTS WHERE event_name = 'ev4'|
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
@@ -2751,7 +2759,7 @@ COLLATION( 'текÑÑ‚') AS c3,
COLLATION( 'текÑÑ‚') AS c4,
@@collation_connection AS c5,
@@character_set_client AS c6;
-END ONE TIME 2030-01-01 00:00:00 NULL NULL NULL NULL ENABLED NOT PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
+END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci
-------------------------------------------------------------------
DDL statements within stored routine.
diff --git a/mysql-test/r/events_1.result b/mysql-test/r/events_1.result
index a105dcd21256713d050eb3912df4feedea169f82..8ea45fa8f2b44e4f9683f31d0358a123d7a6b9c7 100644
--- a/mysql-test/r/events_1.result
+++ b/mysql-test/r/events_1.result
@@ -12,7 +12,11 @@ GRANT EVENT ON db_x.* TO pauline@localhost;
USE db_x;
CREATE TABLE x_table(a int);
CREATE EVENT e_x1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE db_x;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e_x2 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE x_table;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW DATABASES LIKE 'db_x';
Database (db_x)
db_x
@@ -34,6 +38,8 @@ drop event if exists event1;
Warnings:
Note 1305 Event event1 does not exist
create event event1 on schedule every 15 minute starts now() ends date_add(now(), interval 5 hour) DO begin end;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event event1 rename to event2 enable;
alter event event2 disable;
alter event event2 enable;
@@ -42,15 +48,19 @@ alter event event2 on schedule every 1 year on completion preserve rename to eve
alter event event3 rename to event2;
drop event event2;
create event event2 on schedule every 2 second starts now() ends date_add(now(), interval 5 hour) comment "some" DO begin end;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
drop event event2;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT interval_field, interval_value, body FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
interval_field interval_value body
SECOND 10 SELECT 1
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
execute_at IS NULL starts IS NULL ends IS NULL comment
1 0 1
-ALTER EVENT event_starts_test ON SCHEDULE AT '2020-02-02 20:00:02';
+ALTER EVENT event_starts_test ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
execute_at IS NULL starts IS NULL ends IS NULL comment
0 1 1
@@ -63,7 +73,9 @@ SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.even
execute_at IS NULL starts IS NULL ends IS NULL comment
0 1 1
DROP EVENT event_starts_test;
-CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2;
+CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '1970-01-02 00:00:00' ENDS '1970-01-03 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 2;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
execute_at IS NULL starts IS NULL ends IS NULL comment
1 0 0
@@ -78,6 +90,8 @@ execute_at IS NULL starts IS NULL ends IS NULL comment
DROP EVENT event_starts_test;
create table test_nested(a int);
create event e_43 on schedule every 1 second do set @a = 5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event e_43 do alter event e_43 do set @a = 4;
ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present
alter event e_43 do
@@ -106,6 +120,8 @@ alter event non_existant rename to non_existant_too;
ERROR HY000: Unknown event 'non_existant'
set global event_scheduler = off;
create event existant on schedule at now() + interval 1 year do select 12;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event non_existant rename to existant;
ERROR HY000: Event 'existant' already exists
alter event existant rename to events_test.existant;
@@ -116,6 +132,8 @@ drop event if exists event3;
Warnings:
Note 1305 Event event3 does not exist
create event event3 on schedule every 50 + 10 minute starts date_add(curdate(), interval 5 minute) ends date_add(curdate(), interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand());
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select count(*) from t_event3;
count(*)
0
@@ -123,79 +141,117 @@ drop event event3;
drop table t_event3;
set names utf8;
CREATE EVENT root6 ON SCHEDULE EVERY '10:20' MINUTE_SECOND ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root6;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root6 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root6` ON SCHEDULE EVERY '10:20' MINUTE_SECOND STARTS '#' ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root7 on schedule every 2 year do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root7;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root7 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root7` ON SCHEDULE EVERY 2 YEAR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root8 on schedule every '2:5' year_month do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root8;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root8 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root8` ON SCHEDULE EVERY '2-5' YEAR_MONTH STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root8_1 on schedule every '2:15' year_month do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root8_1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root8_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root8_1` ON SCHEDULE EVERY '3-3' YEAR_MONTH STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root9 on schedule every 2 week ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root9;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root9 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root9` ON SCHEDULE EVERY 2 WEEK STARTS '#' ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root10 on schedule every '20:5' day_hour do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root10;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root10 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root10` ON SCHEDULE EVERY '20 5' DAY_HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root11 on schedule every '20:25' day_hour do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root11;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root11 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root11` ON SCHEDULE EVERY '21 1' DAY_HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root12 on schedule every '20:25' hour_minute do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root12;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root12 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root12` ON SCHEDULE EVERY '20:25' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root13 on schedule every '25:25' hour_minute do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root13;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root13 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root13` ON SCHEDULE EVERY '25:25' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root13_1 on schedule every '11:65' hour_minute do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root13_1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root13_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root13_1` ON SCHEDULE EVERY '12:5' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root14 on schedule every '35:35' minute_second do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root14;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root14 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root14` ON SCHEDULE EVERY '35:35' MINUTE_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root15 on schedule every '35:66' minute_second do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root15;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root15 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root15` ON SCHEDULE EVERY '36:6' MINUTE_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root16 on schedule every '35:56' day_minute do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root16;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root16 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root16` ON SCHEDULE EVERY '1 11:56' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root17 on schedule every '35:12:45' day_minute do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root17;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root17 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root17` ON SCHEDULE EVERY '35 12:45' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root17_1 on schedule every '35:25:65' day_minute do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root17_1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root17_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root17_1` ON SCHEDULE EVERY '36 2:5' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root18 on schedule every '35:12:45' hour_second do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root18;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root18 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root18` ON SCHEDULE EVERY '35:12:45' HOUR_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root19 on schedule every '15:59:85' hour_second do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root19;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root19 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root19` ON SCHEDULE EVERY '16:0:25' HOUR_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root20 on schedule every '50:20:12:45' day_second do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root20;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root20 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root20` ON SCHEDULE EVERY '50 20:12:45' DAY_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
set names cp1251;
create event ðóóò21 on schedule every '50:23:59:95' day_second COMMENT 'òîâà å 1251 êîìåíòàð' do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT ðóóò21;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ðóóò21 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `руут21` ON SCHEDULE EVERY '51 0:0:35' DAY_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'това е 1251 коментар' DO select 1 cp1251 cp1251_general_ci latin1_swedish_ci
@@ -255,6 +311,8 @@ set names latin1;
Create a test event. Only event metadata is relevant,
the actual schedule and body are not.
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -301,6 +359,8 @@ SET GLOBAL event_scheduler=OFF;
ALTER TABLE mysql.event DROP dummy;
DROP EVENT intact_check;
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
Now let's add a column to the first position: the server
expects to see event schema name there
@@ -344,6 +404,8 @@ Clean up
ALTER TABLE mysql.event DROP dummy;
DELETE FROM mysql.event;
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
Back up the table, further changes are not reversible
CREATE TABLE event_like LIKE mysql.event;
INSERT INTO event_like SELECT * FROM mysql.event;
@@ -442,6 +504,8 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
#
CREATE EVENT ev1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
ALTER EVENT ev1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
CREATE TABLE event_original LIKE mysql.event;
@@ -475,6 +539,8 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
#
CREATE TABLE t1 (a INT);
CREATE EVENT ev1 ON SCHEDULE EVERY 5 SECOND DO DELETE FROM t1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -484,6 +550,8 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
DROP EVENT ev1;
CREATE EVENT ev1 ON SCHEDULE EVERY 5 SECOND DO DELETE FROM t1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result
index 1589fbddf0cfb8b121321c2dc615eb9bcd78827a..280ca6c8d9888ac2cf187ad892786d783179753a 100644
--- a/mysql-test/r/events_2.result
+++ b/mysql-test/r/events_2.result
@@ -3,6 +3,8 @@ drop database if exists events_test;
create database events_test;
use events_test;
create event e_26 on schedule at '2037-01-01 00:00:00' disable do set @a = 5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion
events_test e_26 set @a = 5 root@localhost 2037-01-01 00:00:00 DROP
@@ -13,6 +15,8 @@ create event e_26 on schedule at 'definitely not a datetime' disable do set @a =
ERROR HY000: Incorrect AT value: 'definitely not a datetime'
set names utf8;
create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
drop event задачка;
"DISABLE the scheduler. Testing that it does not work when the variable is 0"
set global event_scheduler=off;
@@ -22,6 +26,8 @@ select get_lock("test_lock1", 20);
get_lock("test_lock1", 20)
1
create event закачка on schedule every 10 hour do select get_lock("test_lock1", 20);
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
"Should return 1 row"
select definer, name, db from mysql.event;
definer name db
@@ -94,22 +100,30 @@ on schedule every 10 hour
disable
do
select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space';
event_schema event_name definer event_definition
events_test white_space root@localhost select 1
drop event white_space;
create event white_space on schedule every 10 hour disable do
select 2;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space';
event_schema event_name definer event_definition
events_test white_space root@localhost select 2
drop event white_space;
create event white_space on schedule every 10 hour disable do select 3;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space';
event_schema event_name definer event_definition
events_test white_space root@localhost select 3
drop event white_space;
create event e1 on schedule every 1 year do set @a = 5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create table t1 (s1 int);
create trigger t1_ai after insert on t1 for each row show create event e1;
ERROR 0A000: Not allowed to return a result set from a trigger
@@ -126,6 +140,8 @@ LOCK TABLES mode.
create table t1 (a int);
create event e1 on schedule every 10 hour do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
lock table t1 read;
show create event e1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
@@ -229,6 +245,8 @@ Events in sub-statements, events and prelocking
create event e1 on schedule every 10 hour do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create function f1() returns int
begin
show create event e1;
@@ -321,6 +339,8 @@ drop table t1|
drop event e1|
set names utf8;
create event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 on schedule every 2 year do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select EVENT_NAME from information_schema.events
where event_schema='test';
EVENT_NAME
@@ -333,6 +353,8 @@ create event event_35981 on schedule every 6 month on completion preserve
disable
do
select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
The following SELECTs should all give 1
select count(*) from information_schema.events
where event_schema = database() and event_name = 'event_35981' and
@@ -367,6 +389,8 @@ drop event event_35981;
create event event_35981 on schedule every 6 month disable
do
select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select count(*) from information_schema.events
where event_schema = database() and event_name = 'event_35981' and
on_completion = 'NOT PRESERVE';
@@ -377,6 +401,8 @@ create event event_35981 on schedule every 1 hour starts current_timestamp
on completion not preserve
do
select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
ends '1999-01-02 00:00:00';
ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future.
@@ -385,6 +411,8 @@ create event event_35981 on schedule every 1 hour starts current_timestamp
on completion not preserve
do
select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
ends '1999-01-02 00:00:00' on completion preserve;
Warnings:
@@ -394,6 +422,8 @@ create event event_35981 on schedule every 1 hour starts current_timestamp
on completion preserve
do
select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
ends '1999-01-02 00:00:00';
Warnings:
diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result
index bde4f1c785b6830aa1085d2bf2ae65da703a8f1e..a873a28faedcabf10d2641d0fe1ba7707f375583 100644
--- a/mysql-test/r/events_bugs.result
+++ b/mysql-test/r/events_bugs.result
@@ -11,16 +11,22 @@ VARIABLE_NAME VARIABLE_VALUE
EVENT_SCHEDULER ON
SET GLOBAL event_scheduler = 'OFF';
CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2;
ERROR HY000: Event 'Lower_case' already exists
DROP EVENT Lower_case;
SET NAMES cp1251;
CREATE EVENT äîëåí_ðåãèñòúð_1251 ON SCHEDULE EVERY 1 YEAR DO SELECT 100;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT ÄîËåÍ_ðåãèñòúð_1251 ON SCHEDULE EVERY 2 YEAR DO SELECT 200;
ERROR HY000: Event 'ÄîËåÍ_ðåãèñòúð_1251' already exists
DROP EVENT ÄîËåÍ_ðåãèñòúð_1251;
SET NAMES utf8;
CREATE EVENT долен_региÑтър_утф8 ON SCHEDULE EVERY 3 YEAR DO SELECT 300;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT ДОЛЕÐ_региÑтър_утф8 ON SCHEDULE EVERY 4 YEAR DO SELECT 400;
ERROR HY000: Event 'ДОЛЕÐ_региÑтър_утф8' already exists
DROP EVENT ДОЛЕÐ_региÑтър_утф8;
@@ -204,6 +210,8 @@ create user mysqltest_user1@localhost;
create database mysqltest_db1;
grant event on events_test.* to mysqltest_user1@localhost;
create event mysqltest_user1 on schedule every 10 second do select 42;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event mysqltest_user1 rename to mysqltest_db1.mysqltest_user1;
ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db1'
"Let's test now rename when there is no select DB"
@@ -229,6 +237,8 @@ ERROR 42000: CREATE/ALTER EVENT does not support subqueries or stored functions.
drop event if exists e_16;
drop procedure if exists p_16;
create event e_16 on schedule every 1 second do set @a=5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create procedure p_16 () alter event e_16 on schedule every @a second;
set @a = null;
call p_16();
@@ -342,11 +352,15 @@ DROP USER mysqltest_u1@localhost;
CREATE USER mysqltest_u1@localhost;
GRANT EVENT ON events_test.* TO mysqltest_u1@localhost;
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 root@localhost
DROP EVENT e1;
CREATE DEFINER=CURRENT_USER EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 root@localhost
@@ -356,22 +370,30 @@ event_name definer
e1 mysqltest_u1@localhost
DROP EVENT e1;
CREATE DEFINER=CURRENT_USER() EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 root@localhost
DROP EVENT e1;
CREATE DEFINER=mysqltest_u1@localhost EVENT e1 ON SCHEDULE EVERY 1 DAY DO
SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 mysqltest_u1@localhost
DROP EVENT e1;
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 mysqltest_u1@localhost
DROP EVENT e1;
CREATE DEFINER=CURRENT_USER EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 mysqltest_u1@localhost
@@ -382,6 +404,8 @@ event_name definer
e1 mysqltest_u1@localhost
DROP EVENT e1;
CREATE DEFINER=CURRENT_USER() EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer
e1 mysqltest_u1@localhost
@@ -396,6 +420,8 @@ SET @save_time_zone= @@TIME_ZONE;
SET TIME_ZONE= '+00:00';
SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59');
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -425,14 +451,20 @@ DROP EVENT e1;
SET TIME_ZONE='+05:00';
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SET TIMESTAMP= @@TIMESTAMP + 1;
SET TIME_ZONE='-05:00';
CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SET TIMESTAMP= @@TIMESTAMP + 1;
SET TIME_ZONE='+00:00';
CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT * FROM INFORMATION_SCHEMA.EVENTS ORDER BY event_name;
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
def events_test e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -497,26 +529,34 @@ DO
SELECT 1;
Warnings:
Note 1544 Event execution time is in the past. Event has been disabled
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00'
ON COMPLETION PRESERVE
DO
SELECT 1;
Warnings:
Note 1544 Event execution time is in the past. Event has been disabled
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
The following should succeed without warnings.
ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';
ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE;
CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO
SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE
DO
SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00'
ON COMPLETION PRESERVE DISABLE
DO
SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -658,6 +698,8 @@ ERROR HY000: The MariaDB server is running with the --read-only option so it can
#
CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
ALTER EVENT e1 COMMENT 'comment';
@@ -670,7 +712,11 @@ SET GLOBAL READ_ONLY = 0;
#
CREATE EVENT e1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND DO SET @a = 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO SET @a = 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT
event_name,
@@ -730,6 +776,8 @@ drop procedure if exists p;
set @old_mode= @@sql_mode;
set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
create event e1 on schedule every 1 day do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select @@sql_mode into @full_mode;
set @@sql_mode= @old_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
@@ -743,6 +791,8 @@ SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
4294967295
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, originator FROM INFORMATION_SCHEMA.EVENTS;
event_name originator
ev1 4294967295
@@ -751,6 +801,8 @@ SET GLOBAL server_id = @old_server_id;
CREATE DATABASE event_test12;
USE event_test12;
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE DATABASE event_test1;
USE event_test1;
SHOW EVENTS;
@@ -800,6 +852,8 @@ DROP DATABASE IF EXISTS event_test11764334;
CREATE DATABASE event_test11764334;
USE event_test11764334;
CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DISABLE DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
event_test11764334 ev1 root@localhost SYSTEM RECURRING NULL 3 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
diff --git a/mysql-test/r/events_grant.result b/mysql-test/r/events_grant.result
index 0fb589dfba5db3df2ce1ef7667a9f0757f05434f..446ede09b5ac5b75ac2277675eb59f4ba3092f4a 100644
--- a/mysql-test/r/events_grant.result
+++ b/mysql-test/r/events_grant.result
@@ -1,6 +1,8 @@
CREATE DATABASE IF NOT EXISTS events_test;
use events_test;
CREATE EVENT one_event ON SCHEDULE EVERY 10 SECOND DO SELECT 123;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test one_event root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -37,7 +39,11 @@ Let's create some new events from the name of ev_test@localhost
CREATE EVENT one_event ON SCHEDULE EVERY 20 SECOND DO SELECT 123;
ERROR HY000: Event 'one_event' already exists
CREATE EVENT two_event ON SCHEDULE EVERY 20 SECOND ON COMPLETION NOT PRESERVE COMMENT "two event" DO SELECT 123;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT three_event ON SCHEDULE EVERY 20 SECOND ON COMPLETION PRESERVE COMMENT "three event" DO SELECT 123;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
"Now we should see 3 events:";
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
@@ -55,6 +61,8 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
GRANT EVENT ON events_test2.* TO ev_test@localhost;
USE events_test2;
CREATE EVENT four_event ON SCHEDULE EVERY 20 SECOND DO SELECT 42;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
USE events_test;
"We should see 4 events : one_event, two_event, three_event & four_event"
SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME;
@@ -73,6 +81,8 @@ def events_test two_event ev_test@localhost SQL SELECT 123 RECURRING NULL 20 SEC
CREATE DATABASE events_test2;
USE events_test2;
CREATE EVENT five_event ON SCHEDULE EVERY 20 SECOND DO SELECT 42;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
"Should see 4 events - one, two, three & five"
SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME;
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT
diff --git a/mysql-test/r/events_restart.result b/mysql-test/r/events_restart.result
index 0caac907f64223d5f7e8aedf43e28963baf16615..e22cfa011f2f7c2dceacc2693cbe8a8341ca28d6 100644
--- a/mysql-test/r/events_restart.result
+++ b/mysql-test/r/events_restart.result
@@ -6,10 +6,16 @@ use events_test;
create table execution_log(name char(10));
create event abc1 on schedule every 1 second do
insert into execution_log value('abc1');
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create event abc2 on schedule every 1 second do
insert into execution_log value('abc2');
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create event abc3 on schedule every 1 second do
insert into execution_log value('abc3');
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create table event_like like mysql.event;
insert into event_like select * from mysql.event;
alter table mysql.event
@@ -20,25 +26,25 @@ select @@event_scheduler;
@@event_scheduler
OFF
show events;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
select event_name from information_schema.events;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
show create event intact_check;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
drop event no_such_event;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
create event intact_check_1 on schedule every 5 hour do select 5;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
alter event intact_check_1 on schedule every 8 hour do select 8;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
alter event intact_check_1 rename to intact_check_2;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
drop event intact_check_1;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
drop event intact_check_2;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
drop event intact_check;
-ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start
+ERROR HY000: Cannot proceed, because event scheduler is disabled
set global event_scheduler=on;
ERROR HY000: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
set global event_scheduler=off;
diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result
index 873f0441089f83025119a59cedd9e88f71c30b23..a7b268fe2a75340bf34a8a44ad86a256dbcbbb77 100644
--- a/mysql-test/r/events_trans.result
+++ b/mysql-test/r/events_trans.result
@@ -15,6 +15,8 @@ create table t1 (a varchar(255)) engine=innodb;
begin work;
insert into t1 (a) values ("OK: create event");
create event e1 on schedule every 1 day do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
rollback work;
select * from t1;
a
@@ -60,11 +62,14 @@ OK: drop event if exists
delete from t1;
commit work;
create event e1 on schedule every 1 day do select 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
begin work;
insert into t1 (a) values ("OK: create event if not exists");
create event if not exists e1 on schedule every 2 day do select 2;
Warnings:
Note 1537 Event 'e1' already exists
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
rollback work;
select * from t1;
a
@@ -96,6 +101,8 @@ OK: alter event rename: rename to same name
delete from t1;
commit work;
create event e2 on schedule every 3 day do select 3;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
begin work;
insert into t1 (a) values ("OK: alter event rename: destination exists");
alter event e2 rename to e1;
@@ -126,6 +133,8 @@ DROP EVENT IF EXISTS e1;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT);
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
START TRANSACTION;
INSERT INTO t1 VALUES (1);
SAVEPOINT A;
diff --git a/mysql-test/r/flush_read_lock.result b/mysql-test/r/flush_read_lock.result
index 260edf8e51dd1162593c808a1d0497fe4370d228..da53d2f6d2eeb98d669f4ee35778e2853ab4a734 100644
--- a/mysql-test/r/flush_read_lock.result
+++ b/mysql-test/r/flush_read_lock.result
@@ -85,6 +85,8 @@ insert into t1_temp values (1);
return 0;
end|
create event e1 on schedule every 1 minute do begin end;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
#
# Test compatibility of FLUSH TABLES WITH READ LOCK
# with various statements.
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index 9014450bef3718abdeeaf78db622d951236a07aa..2147040ddb541fc7fe5886aa14ed963b357a5efd 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -1,4 +1,3 @@
-drop table if exists t1, t2;
create table t1 (grp int, a bigint unsigned, c char(10) not null, d char(10) not null);
insert into t1 values (1,1,"a","a");
insert into t1 values (2,2,"b","a");
@@ -1200,3 +1199,30 @@ Warning 1260 Row 3 was cut by GROUP_CONCAT()
Warning 1260 Row 5 was cut by GROUP_CONCAT()
DROP TABLE t1;
SET group_concat_max_len= DEFAULT;
+set max_session_mem_used=16*1024*1024;
+SELECT GROUP_CONCAT(concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1) ORDER BY 2,1,3,4,6,5,8,7) AS c
+FROM seq_1_to_200000;
+c
+0.90910.90910.90910.90910.90910.90910.90910.9091,1.81821.81821.81821.81821.81821.81821.81821.8182,10.000010.000010.000010.000010.000010.000010.000010.0000,10.909110.909110.909110.909110.909110.909110.909110.9091,100.0000100.0000100.0000100.0000100.0000100.0000100.0000100.0000,100.9091100.9091100.9091100.9091100.9091100.9091100.9091100.9091,1000.00001000.00001000.00001000.00001000.00001000.00001000.00001000.0000,1000.90911000.90911000.90911000.90911000.90911000.90911000.90911000.9091,10000.000010000.000010000.000010000.000010000.000010000.000010000.000010000.0000,10000.909110000.909110000.909110000.909110000.909110000.909110000.909110000.9091,100000.0000100000.0000100000.0000100000.0000100000.0000100000.0000100000.0000100000.0000,100000.9091100000.9091100000.9091100000.9091100000.9091100000.9091100000.9091100000.9091,100001.8182100001.8182100001.8182100001.8182100001.8182100001.8182100001.8182100001.8182,100002.7273100002.7273100002.7273100002.7273100002.7273100002.7273100002.7273100002.7273,100003.6364100003.
+Warnings:
+Warning 1260 Row 15 was cut by GROUP_CONCAT()
+set max_session_mem_used=default;
+SET group_concat_max_len= 8;
+CREATE TABLE t1 (a INT);
+INSERT t1 VALUES (1),(2);
+CREATE TABLE t2 (b DATE, c INT);
+INSERT t2 VALUES ('2019-12-04',1),('2020-03-28',2);
+CREATE TABLE t3 (d INT);
+INSERT t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14);
+CREATE TABLE t4 (e INT);
+INSERT t4 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15);
+SELECT (SELECT MAX(a) FROM t1 WHERE t2_sq.c > 0) AS f,
+GROUP_CONCAT(t2_sq.b ORDER BY 1) AS gc
+FROM (SELECT t2_a.* FROM t2 AS t2_a, t2 AS t2_b) AS t2_sq, t3, t4
+GROUP BY f;
+f gc
+2 2019-12-
+Warnings:
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+DROP TABLE t1, t2, t3, t4;
+SET group_concat_max_len= default;
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index e0e870d1573c8d730609cc153522cbe6e423154a..b9875faacb6dc704b978654568f8635a82ab6d6b 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1979,8 +1979,8 @@ FROM t2);
MIN(t2.pk)
NULL
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: 'j'
-Warning 1292 Truncated incorrect INTEGER value: 'j'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
EXPLAIN
SELECT MIN(t2.pk)
@@ -1993,8 +1993,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: 'j'
-Warning 1292 Truncated incorrect INTEGER value: 'j'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
+Warning 1292 Truncated incorrect DOUBLE value: 'j'
#
# 2) Test that subquery materialization is setup for query with
diff --git a/mysql-test/r/func_hybrid_type.result b/mysql-test/r/func_hybrid_type.result
index eeaa79e7dcebde6e77fc34061724c84bd0c99c80..dfec8b3210b35506044e46c6cde53f6e08c80fbe 100644
--- a/mysql-test/r/func_hybrid_type.result
+++ b/mysql-test/r/func_hybrid_type.result
@@ -2179,10 +2179,10 @@ def if_______a_b 12 19 19 Y 128 0 63
def if_______b_a 12 19 19 Y 128 0 63
def ifnull___a_b 12 19 19 Y 128 0 63
def ifnull___b_a 12 19 19 Y 128 0 63
-def least____a_b 12 10 19 Y 128 0 63
-def least____b_a 12 10 19 Y 128 0 63
-def greatest_a_b 12 10 19 Y 128 0 63
-def greatest_b_a 12 10 19 Y 128 0 63
+def least____a_b 12 19 19 Y 128 0 63
+def least____b_a 12 19 19 Y 128 0 63
+def greatest_a_b 12 19 19 Y 128 0 63
+def greatest_b_a 12 19 19 Y 128 0 63
case_____a_b 2010-01-01 00:00:00
case_____b_a 2001-01-01 10:20:30
coalesce_a_b 2010-01-01 00:00:00
@@ -3034,7 +3034,7 @@ DROP TABLE t1;
SET timestamp=UNIX_TIMESTAMP('2010-01-01 01:02:03');
SELECT GREATEST(CURRENT_TIME, CURRENT_DATE), COALESCE(CURRENT_TIME, CURRENT_DATE);
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def GREATEST(CURRENT_TIME, CURRENT_DATE) 12 10 19 N 129 0 63
+def GREATEST(CURRENT_TIME, CURRENT_DATE) 12 19 19 N 129 0 63
def COALESCE(CURRENT_TIME, CURRENT_DATE) 12 19 19 N 129 0 63
GREATEST(CURRENT_TIME, CURRENT_DATE) COALESCE(CURRENT_TIME, CURRENT_DATE)
2010-01-01 01:02:03 2010-01-01 01:02:03
@@ -3427,5 +3427,35 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
+# MDEV-11015 Assertion failed: precision > 0 in decimal_bin_size upon SELECT with DISTINCT, CAST and other functions
+#
+CREATE TABLE t1 (b LONGBLOB);
+INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
+SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATETIME ) ) AS f FROM t1;
+f
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: 'foo'
+Warning 1292 Incorrect datetime value: 'bar'
+DROP TABLE t1;
+CREATE TABLE t1 (b LONGBLOB);
+INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
+SELECT DISTINCT - GREATEST( b, CAST( NULL AS TIME) ) AS f FROM t1;
+f
+NULL
+Warnings:
+Warning 1292 Truncated incorrect time value: 'foo'
+Warning 1292 Truncated incorrect time value: 'bar'
+DROP TABLE t1;
+CREATE TABLE t1 (b LONGBLOB);
+INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
+SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATE) ) AS f FROM t1;
+f
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: 'foo'
+Warning 1292 Incorrect datetime value: 'bar'
+DROP TABLE t1;
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index f694d25cb04f217df707c28314232c2a28ee5be1..4215a82e3f07397ac995e964dcb291866d3ab0d2 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -807,3 +807,46 @@ STDDEV_POP(ROUND(0,@A:=2009))
#
# End of 10.0 tests
#
+#
+# Start of 10.1 tests
+#
+#
+# MDEV-17643 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
+#
+CREATE TABLE t1 ( pk int NOT NULL, i1 int NOT NULL, d1 date NOT NULL, t1 time);
+INSERT INTO t1 VALUES (7,9,'2007-08-15','03:55:02'),(8,7,'1993-06-05','04:17:51'),(9,7,'2034-07-01','17:31:12'),(10,0,'1998-08-24','08:09:27');
+SELECT DISTINCT STDDEV_SAMP(EXPORT_SET(t1, -1379790335835635712, (i1 + 'o'), (MD5(d1)))) FROM t1;
+STDDEV_SAMP(EXPORT_SET(t1, -1379790335835635712, (i1 + 'o'), (MD5(d1))))
+NULL
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'o'
+Warning 1292 Truncated incorrect DOUBLE value: '98e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde242'
+Warning 1292 Truncated incorrect DOUBLE value: 'o'
+Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315'
+Warning 1292 Truncated incorrect DOUBLE value: 'o'
+Warning 1292 Truncated incorrect DOUBLE value: '7b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b527974-1379790335835635712b4dd517b6'
+Warning 1292 Truncated incorrect DOUBLE value: 'o'
+Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e1'
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(128));
+INSERT INTO t1 VALUES ('1e310');
+INSERT INTO t1 VALUES ('-1e310');
+INSERT INTO t1 VALUES ('0');
+SELECT STDDEV_SAMP(a) FROM t1;
+STDDEV_SAMP(a)
+NULL
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '1e310'
+Warning 1292 Truncated incorrect DOUBLE value: '-1e310'
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES (1.7e+308);
+INSERT INTO t1 VALUES (-1.7e+308);
+INSERT INTO t1 VALUES (0);
+SELECT STDDEV_SAMP(a) FROM t1;
+STDDEV_SAMP(a)
+NULL
+DROP TABLE t1;
+#
+# End of 10.1 tests
+#
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 3d9c9bc15d97661b86c62f45c35403c03e1dbbf1..fe74336f9a7d5ae9e7850695f47bb3291ea232a3 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -2980,6 +2980,49 @@ select md5(_filename "a"), sha(_filename "a");
md5(_filename "a") sha(_filename "a")
0cc175b9c0f1b6a831c399e269772661 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8
#
+# MDEV-18881 Assertion `0' failed in make_sortkey upon SELECT with GROUP BY after LOAD DATA
+#
+CREATE TABLE t1 (a BIT(22), b CHAR(8) NOT NULL, c CHAR(8));
+INSERT INTO t1 VALUES (0xA4B,'foo','qux');
+INSERT INTO t1 VALUES (0x8F5,'bar','foobar');
+INSERT INTO t1 VALUES (0x0, '', NULL);
+INSERT INTO t1 VALUES (0x4B, 'foo','qux');
+INSERT INTO t1 VALUES (0x8F5, 'bar', 'foobar');
+SET SESSION SQL_MODE= '';
+SELECT GROUP_CONCAT(c) AS f FROM t1 GROUP BY LPAD('foo', 20, b);
+f
+NULL
+foobar,foobar
+qux,qux
+DROP TABLE t1;
+SET SESSION SQL_MODE=DEFAULT;
+CREATE TABLE t1 AS SELECT
+LPAD('a',10,' '),
+RPAD('a',10,' '),
+LPAD('a',10,' '),
+RPAD('a',10,' '),
+LPAD('a',10,NULL),
+RPAD('a',10,NULL),
+LPAD('a',10,''),
+RPAD('a',10,''),
+LPAD('a',10,RAND()),
+RPAD('a',10,RAND());
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `LPAD('a',10,' ')` varchar(10) NOT NULL,
+ `RPAD('a',10,' ')` varchar(10) NOT NULL,
+ `LPAD('a',10,' ')` varchar(10) NOT NULL,
+ `RPAD('a',10,' ')` varchar(10) NOT NULL,
+ `LPAD('a',10,NULL)` varchar(10) DEFAULT NULL,
+ `RPAD('a',10,NULL)` varchar(10) DEFAULT NULL,
+ `LPAD('a',10,'')` varchar(10) DEFAULT NULL,
+ `RPAD('a',10,'')` varchar(10) DEFAULT NULL,
+ `LPAD('a',10,RAND())` varchar(10) DEFAULT NULL,
+ `RPAD('a',10,RAND())` varchar(10) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
# End of 5.5 tests
#
#
@@ -4714,5 +4757,43 @@ YQ== 61
Yq== 62
DROP TABLE t1;
#
+# MDEV-18738 ASAN heap-use-after-free in copy_if_not_alloced / copy_fields
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT REPLACE( CAST( CURDATE() AS BINARY ), CURDATE(), REPEAT('a',32) ) AS f FROM t1 GROUP BY f;
+f
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT REPLACE( LEFT( CURDATE(), 4), LEFT(CURDATE(),4), REPEAT('a',32) ) AS f FROM t1 GROUP BY f;
+f
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT REPLACE(RIGHT(CURDATE(), 4), RIGHT(CURDATE(),4), REPEAT('a',32)) AS f FROM t1 GROUP BY f;
+f
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT REPLACE(SUBSTR(CURDATE(),2,3), SUBSTR(CURDATE(),2,3), REPEAT('a',32)) AS f FROM t1 GROUP BY f;
+f
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+DROP TABLE t1;
+#
+# MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
+#
+CREATE TABLE t1 (a INT, b TIME, c TIME);
+INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42');
+SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
+f
+NULL
+12:51:12:51:422
+NULL
+DROP TABLE t1;
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index f0652236a383c2912e52df690991de788b919b50..25f3484b718b6e8c381100c2e236d3947937017b 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -3420,5 +3420,35 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
#
+# MDEV-14926 AddressSanitizer: heap-use-after-free in make_date_time on weird combination of functions
+#
+DO INET_ATON( FROM_UNIXTIME( @@timestamp, ( TRIM( UNHEX(HEX('%m.%d.%Y') ) ) ) ) );
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('1989-03-10');
+SELECT TIME_FORMAT('23:59:43', BINARY d) AS f FROM t1 GROUP BY 'foo';
+f
+1989-03-10
+DROP TABLE t1;
+CREATE TABLE t1 (d DATE) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('1900-01-01');
+SELECT LENGTH( DATE_FORMAT( d, BINARY DATABASE() ) ) AS f FROM t1 GROUP BY d;
+f
+4
+DROP TABLE t1;
+#
+# MDEV-18667 ASAN heap-use-after-free in make_date_time / Arg_comparator::compare_string / Item_func_nullif::compare
+#
+SELECT NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)));
+NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)))
+foo
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: '2012-12-12 12:12:12'
+#
+# MDEV-18626 ASAN stack-buffer-overflow in int10_to_str / make_date_time upon DATE_FORMAT
+#
+SELECT DATE_FORMAT(100000000000, '%j');
+DATE_FORMAT(100000000000, '%j')
+NULL
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result
index 89e5c2374137151796d1b76289e37ca2754fb6b7..76f72bb81027dbe73b0584bfb64924f067d970ca 100644
--- a/mysql-test/r/gis-precise.result
+++ b/mysql-test/r/gis-precise.result
@@ -505,6 +505,10 @@ GEOMETRYFROMTEXT('POINT(4599 60359)'),
) as relate_res;
relate_res
0
+prepare s from 'do st_convexhull(st_aswkb(multipoint(point(-11702,15179),point(-5031,27960),point(-30557,11158),point(-27804,30314))))';
+execute s;
+execute s;
+deallocate prepare s;
DROP TABLE IF EXISTS p1;
CREATE PROCEDURE p1(dist DOUBLE, geom TEXT)
BEGIN
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index f89cceb3664b061b73d91a4b80597fabb94baa7f..76524311f01f13a76e006e46b7782709f44f3a6a 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1877,3 +1877,17 @@ t2 CREATE TABLE `t2` (
`w2` int(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
+CREATE TABLE t1 (
+id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+point_data POINT NOT NULL,
+PRIMARY KEY (id),
+KEY idx_point_data(point_data)
+) ENGINE=MyISAM;
+INSERT t1 (point_data) VALUES
+(GeomFromText('Point(37.0248492 23.8512726)')),
+(GeomFromText('Point(38.0248492 23.8512726)'));
+SELECT id FROM t1
+WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
+id
+2
+DROP TABLE t1;
diff --git a/mysql-test/r/gis2.result b/mysql-test/r/gis2.result
deleted file mode 100644
index 214431e1d2d1250c240f2b6b14e9cd9012ef3134..0000000000000000000000000000000000000000
--- a/mysql-test/r/gis2.result
+++ /dev/null
@@ -1,14 +0,0 @@
-CREATE TABLE t1 (
-id INT UNSIGNED NOT NULL AUTO_INCREMENT,
-point_data POINT NOT NULL,
-PRIMARY KEY (id),
-KEY idx_point_data(point_data)
-) ENGINE=MyISAM;
-INSERT t1 (point_data) VALUES
-(GeomFromText('Point(37.0248492 23.8512726)')),
-(GeomFromText('Point(38.0248492 23.8512726)'));
-SELECT id FROM t1
-WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
-id
-2
-DROP TABLE t1;
diff --git a/mysql-test/r/gis_notembedded.result b/mysql-test/r/gis_notembedded.result
new file mode 100644
index 0000000000000000000000000000000000000000..eb1e2b9891788ab0ce73264e36094b9b753f0880
--- /dev/null
+++ b/mysql-test/r/gis_notembedded.result
@@ -0,0 +1,42 @@
+show create procedure mysql.AddGeometryColumn;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+AddGeometryColumn CREATE DEFINER=`root`@`localhost` PROCEDURE `AddGeometryColumn`(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64), t_srid int)
+ SQL SECURITY INVOKER
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end latin1 latin1_swedish_ci latin1_swedish_ci
+show create procedure mysql.DropGeometryColumn;
+Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
+DropGeometryColumn CREATE DEFINER=`root`@`localhost` PROCEDURE `DropGeometryColumn`(catalog varchar(64), t_schema varchar(64),
+ t_name varchar(64), geometry_column varchar(64))
+ SQL SECURITY INVOKER
+begin
+ set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end latin1 latin1_swedish_ci latin1_swedish_ci
+create table t1 (a int, b int);
+call mysql.AddGeometryColumn('', 'test', 't1', 'c', 10);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ `c` geometry DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+call mysql.DropGeometryColumn('', 'test', 't1', 'c');
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+call mysql.DropGeometryColumn('', 'test', 't1', 'b');
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+create user foo@localhost;
+grant execute on mysql.* to foo@localhost;
+call mysql.AddGeometryColumn('', 'mysql', 'proc', 'c', 10);
+ERROR 42000: ALTER command denied to user 'foo'@'localhost' for table 'proc'
+drop user foo@localhost;
diff --git a/mysql-test/r/grant4.result b/mysql-test/r/grant4.result
index 5a0032cd338fe0ae9a4a56cb2f35695be16e07ea..88fad6edf49cd0c949d783b4a7c882155e6a5528 100644
--- a/mysql-test/r/grant4.result
+++ b/mysql-test/r/grant4.result
@@ -123,6 +123,26 @@ View Create View character_set_client collation_connection
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t_select_priv`.`a` AS `a`,`t_select_priv`.`b` AS `b` from `t_select_priv` latin1 latin1_swedish_ci
drop database mysqltest_db1;
drop user mysqltest_u1@localhost;
+call mtr.add_suppression("Table 'mysql.user' doesn't exist");
+call mtr.add_suppression("'mysql.user' is not TABLE");
+rename table mysql.user to mysql.user1;
+create view mysql.user as select * from mysql.user1;
+flush privileges;
+ERROR HY000: 'mysql.user' is not TABLE
+drop view mysql.user;
+create temporary table mysql.user select * from mysql.user1 limit 0;
+flush privileges;
+ERROR 42S02: Table 'mysql.user' doesn't exist
+drop temporary table mysql.user;
+rename table mysql.user1 to mysql.user;
+call mtr.add_suppression('mysql.user table is damaged');
+rename table mysql.user to mysql.user1;
+create table mysql.user (Host char(100), User char(100));
+flush privileges;
+ERROR HY000: Unknown error
+drop table mysql.user;
+rename table mysql.user1 to mysql.user;
+End of 5.5 tests
#
# Additional coverage for refactoring which is made as part
# of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege
@@ -215,3 +235,4 @@ ERROR HY000: Password hash should be a 16-digit hexadecimal number
create user foo4 identified via mysql_old_password using '11111111111111111111111111111111111111111';
ERROR HY000: Password hash should be a 16-digit hexadecimal number
set GLOBAL sql_mode=default;
+End of 10.1 tests
diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result
index b30074083681ee2b3ebf5e451a7a46bfb19bc766..7e2a13128bb075a763fb1dfaab502ef6e8e6231a 100644
--- a/mysql-test/r/index_merge_innodb.result
+++ b/mysql-test/r/index_merge_innodb.result
@@ -294,6 +294,7 @@ key3 int not null default 0
);
insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8);
set @d=8;
+begin;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
@@ -308,9 +309,11 @@ insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
+commit;
alter table t1 add index i2(key2);
alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1;
+insert into t1 select 10000+key1, 10000+key2,10000+key3 from t1;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
@@ -672,6 +675,7 @@ a int,
b int,
INDEX idx(a))
ENGINE=INNODB;
+begin;
INSERT INTO t1(a,b) VALUES
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
@@ -691,6 +695,7 @@ INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1 VALUES (1000000, 0, 0);
+commit;
SET SESSION sort_buffer_size = 1024*36;
set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='derived_merge=off,derived_with_keys=off';
diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result
index fb795c6941e49649c1670f8e54da608da16edc9e..c0823d41b14c52fd2acc69f843ed581962e716d9 100644
--- a/mysql-test/r/index_merge_myisam.result
+++ b/mysql-test/r/index_merge_myisam.result
@@ -1129,6 +1129,7 @@ key3 int not null default 0
);
insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8);
set @d=8;
+begin;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
@@ -1143,9 +1144,11 @@ insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
+commit;
alter table t1 add index i2(key2);
alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1;
+insert into t1 select 10000+key1, 10000+key2,10000+key3 from t1;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
diff --git a/mysql-test/r/information_schema_prepare.result b/mysql-test/r/information_schema_prepare.result
new file mode 100644
index 0000000000000000000000000000000000000000..3b5ee16b14b199c683f420a45cdda46cde181816
--- /dev/null
+++ b/mysql-test/r/information_schema_prepare.result
@@ -0,0 +1,4 @@
+PREPARE stmt2 FROM "CREATE VIEW v AS SELECT * FROM INFORMATION_SCHEMA.TABLES";
+FLUSH PRIVILEGES;
+EXECUTE stmt2;
+DROP VIEW v;
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index 42f919d0cfb6e7d8a725388179b81df188b971cd..5238f2e0a2d9fefe1506acbf4d6bb2229b5b3ffe 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -574,3 +574,53 @@ SELECT HEX(a) FROM t1;
HEX(a)
C3A4
DROP TABLE t1;
+#
+# MDEV-15744: Assertion `derived->table' failed in mysql_derived_merge_for_insert
+#
+create table t1 (a int, b int);
+CREATE OR REPLACE VIEW t2 AS SELECT * FROM t1;
+CREATE VIEW v2 AS SELECT * FROM t2;
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE v2
+FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+select * from v2;
+a b
+2 2
+3 3
+4 4
+5 5
+6 6
+select * from t2;
+a b
+2 2
+3 3
+4 4
+5 5
+6 6
+DROP VIEW IF EXISTS v2,t2;
+DROP TABLE IF EXISTS t1;
+#
+# MDEV-15950: LOAD DATA INTO compex_view crashed
+#
+create table t1 (a int, b int);
+create table t0 (x int, y int);
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1,t0;
+CREATE VIEW v2 AS SELECT * FROM v1;
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE v1
+FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+ERROR HY000: Incorrect usage of Multi-table VIEW and LOAD
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE v2
+FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+ERROR HY000: Incorrect usage of Multi-table VIEW and LOAD
+DROP VIEW IF EXISTS v2,v1;
+DROP TABLE IF EXISTS t1,t0;
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE(b));
+INSERT INTO t1 VALUES (1,1);
+CREATE TABLE t2 (c INT);
+CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2;
+SELECT a, b FROM t1 INTO OUTFILE '15645.data';
+LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b);
+ERROR HY000: Incorrect usage of Multi-table VIEW and LOAD
+LOAD DATA INFILE '15645.data' REPLACE INTO TABLE v (a,b);
+ERROR HY000: Incorrect usage of Multi-table VIEW and LOAD
+drop table t1,t2;
+drop view v;
diff --git a/mysql-test/r/lock_sync.result b/mysql-test/r/lock_sync.result
index 8143f3fde38dc93e6b640049d6b6191ed3a6d563..f8f511b3e3d00aeb04704f4ca21254569d209958 100644
--- a/mysql-test/r/lock_sync.result
+++ b/mysql-test/r/lock_sync.result
@@ -725,7 +725,11 @@ DROP TABLE t1, t2;
# Bug#51391 Deadlock involving events during rqg_info_schema test
#
CREATE EVENT e1 ON SCHEDULE EVERY 5 HOUR DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e2 ON SCHEDULE EVERY 5 HOUR DO SELECT 2;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
# Connection con1
SET DEBUG_SYNC="before_lock_tables_takes_lock SIGNAL drop WAIT_FOR query";
# Sending:
diff --git a/mysql-test/r/log_slow.result b/mysql-test/r/log_slow.result
index 02e04cfbb2d1855c057a3cb7b22a3d757abed286..c50130a7b7a68061d0bb621fd554cc110bd86bb5 100644
--- a/mysql-test/r/log_slow.result
+++ b/mysql-test/r/log_slow.result
@@ -76,3 +76,40 @@ set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
set global log_output= default;
truncate mysql.slow_log;
+#
+# MDEV-18333 Slow_queries count doesn't increase when slow_query_log is turned off
+#
+SET SESSION slow_query_log=OFF;
+SET GLOBAL slow_query_log=OFF;
+SET long_query_time=0.1;
+# Although this query is disallowed by slow_query_log, it should still increment Slow_queries
+SELECT VARIABLE_VALUE INTO @global_slow_queries
+FROM INFORMATION_SCHEMA.GLOBAL_STATUS
+WHERE VARIABLE_NAME='SLOW_QUERIES';
+SELECT sleep(0.2) INTO @tmp FROM DUAL;
+SELECT
+CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
+FROM
+INFORMATION_SCHEMA.GLOBAL_STATUS
+WHERE
+VARIABLE_NAME='SLOW_QUERIES';
+Slow_queries_increment
+1
+# Although this query is disallowed by log_slow_filter, it should still increment Slow_queries
+SET log_slow_filter=filesort;
+SELECT sleep(0.2) INTO @tmp FROM DUAL;
+SELECT VARIABLE_VALUE INTO @global_slow_queries
+FROM INFORMATION_SCHEMA.GLOBAL_STATUS
+WHERE VARIABLE_NAME='SLOW_QUERIES';
+SELECT sleep(0.2) INTO @tmp FROM DUAL;
+SELECT
+CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
+FROM
+INFORMATION_SCHEMA.GLOBAL_STATUS
+WHERE
+VARIABLE_NAME='SLOW_QUERIES';
+Slow_queries_increment
+1
+SET log_slow_filter=DEFAULT;
+SET @@long_query_time=default;
+SET GLOBAL slow_query_log= @org_slow_query_log;
diff --git a/mysql-test/r/log_slow_debug.result b/mysql-test/r/log_slow_debug.result
new file mode 100644
index 0000000000000000000000000000000000000000..a823f4c2b98d66b2b33aecc268de6a1a721a6835
--- /dev/null
+++ b/mysql-test/r/log_slow_debug.result
@@ -0,0 +1,137 @@
+SET @org_slow_query_log= @@global.slow_query_log;
+SET @org_log_output= @@global.log_output;
+SET @org_log_slow_admin_statements= @@global.log_slow_admin_statements;
+SET @@GLOBAL.slow_query_log=OFF;
+SET @@GLOBAL.log_output='TABLE';
+FLUSH SLOW LOGS;
+SET @@GLOBAL.slow_query_log=ON;
+SET @@GLOBAL.log_slow_admin_statements=ON;
+SET SESSION debug_dbug="+d,simulate_slow_query";
+CREATE PROCEDURE show_slow_log()
+BEGIN
+SELECT CONCAT('[slow] ', sql_text) AS sql_text
+FROM mysql.slow_log
+WHERE sql_text NOT LIKE '%debug_dbug%';
+END
+$$
+#
+# Expect all admin statements in the slow log (ON,DEFAULT)
+#
+SET @@GLOBAL.log_slow_admin_statements=ON;
+SET log_slow_filter=DEFAULT;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE INDEX t1a ON t1 (a);
+DROP INDEX t1a ON t1;
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+ALTER TABLE t2 RENAME t2;
+RENAME TABLE t2 TO t3;
+DROP TABLE t3;
+CREATE TABLE t4 (a INT);
+PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t4;
+CALL show_slow_log();
+sql_text
+[slow] TRUNCATE TABLE mysql.slow_log
+[slow] CREATE TABLE t1 (a INT)
+[slow] CREATE INDEX t1a ON t1 (a)
+[slow] DROP INDEX t1a ON t1
+[slow] DROP TABLE t1
+[slow] CREATE TABLE t2 (a INT)
+[slow] ALTER TABLE t2 RENAME t2
+[slow] RENAME TABLE t2 TO t3
+[slow] DROP TABLE t3
+[slow] CREATE TABLE t4 (a INT)
+[slow] PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1'
+[slow] ALTER TABLE t4 MODIFY a INT DEFAULT 1
+[slow] DEALLOCATE PREPARE stmt
+[slow] DROP TABLE t4
+#
+# Expect all admin statements in the slow log (ON,admin)
+#
+SET @@GLOBAL.log_slow_admin_statements=ON;
+SET log_slow_filter=admin;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE INDEX t1a ON t1 (a);
+DROP INDEX t1a ON t1;
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+ALTER TABLE t2 RENAME t2;
+RENAME TABLE t2 TO t3;
+DROP TABLE t3;
+CREATE TABLE t4 (a INT);
+PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t4;
+CALL show_slow_log();
+sql_text
+[slow] CREATE INDEX t1a ON t1 (a)
+[slow] DROP INDEX t1a ON t1
+[slow] ALTER TABLE t2 RENAME t2
+[slow] RENAME TABLE t2 TO t3
+[slow] ALTER TABLE t4 MODIFY a INT DEFAULT 1
+#
+# Expect none of admin DDL statements in the slow log (ON,filesort)
+#
+SET @@GLOBAL.log_slow_admin_statements=ON;
+SET log_slow_filter=filesort;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE INDEX t1a ON t1 (a);
+DROP INDEX t1a ON t1;
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+ALTER TABLE t2 RENAME t2;
+RENAME TABLE t2 TO t3;
+DROP TABLE t3;
+CREATE TABLE t4 (a INT);
+PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t4;
+CALL show_slow_log();
+sql_text
+#
+# Expect none of admin statements in the slow log (OFF,DEFAULT)
+#
+SET @@GLOBAL.log_slow_admin_statements=OFF;
+SET log_slow_filter=DEFAULT;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE INDEX t1a ON t1 (a);
+DROP INDEX t1a ON t1;
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+ALTER TABLE t2 RENAME t2;
+RENAME TABLE t2 TO t3;
+DROP TABLE t3;
+CREATE TABLE t4 (a INT);
+PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t4;
+CALL show_slow_log();
+sql_text
+[slow] TRUNCATE TABLE mysql.slow_log
+[slow] CREATE TABLE t1 (a INT)
+[slow] DROP TABLE t1
+[slow] CREATE TABLE t2 (a INT)
+[slow] DROP TABLE t3
+[slow] CREATE TABLE t4 (a INT)
+[slow] PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1'
+[slow] DEALLOCATE PREPARE stmt
+[slow] DROP TABLE t4
+#
+# Clean up
+#
+SET SESSION debug_dbug="-d,simulate_slow_query";
+TRUNCATE mysql.slow_log;
+SET @@global.slow_query_log= @org_slow_query_log;
+SET @@global.log_output= @org_log_output;
+SET @@global.log_slow_admin_statements= @org_log_slow_admin_statements;
+DROP PROCEDURE show_slow_log;
diff --git a/mysql-test/r/mdev_19276.result b/mysql-test/r/mdev_19276.result
new file mode 100644
index 0000000000000000000000000000000000000000..09d51561427eae7a495187d75251b415c86b32a8
--- /dev/null
+++ b/mysql-test/r/mdev_19276.result
@@ -0,0 +1,9 @@
+CREATE DATABASE db1;
+CREATE USER u@localhost IDENTIFIED BY 'pw';
+set global log_warnings=2;
+connect(localhost,u,pw,db1,MASTER_PORT,MASTER_SOCKET);
+ERROR 42000: Access denied for user 'u'@'localhost' to database 'db1'
+FOUND /Access denied for user 'u'@'localhost' to database 'db1'/ in mysqld.1.err
+set global log_warnings=@@log_warnings;
+DROP DATABASE db1;
+DROP USER u@localhost;
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index 5991a5fd25acef811ca8db95e6f96cc83c36e040..f614ea1e497169f07705d58193d979cbe4d55ca8 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -1018,6 +1018,27 @@ execute stmt1;
deallocate prepare stmt1;
drop view v3,v2,v1;
drop table t1,t2,t3;
+create table t1 (id int not null, v1 varchar(10) not null);
+insert into t1 values (1,1),(2,2);
+create table t2 (log varchar(10) not null);
+create trigger t1_after_update after update on t1
+for each row insert into t2 values ('triggered');
+create user foo;
+grant select, insert, update, delete, create, drop, reload, index, alter, show databases, create temporary tables, lock tables, execute, create view, show view, create routine, alter routine, trigger on *.* to 'foo'@'%';
+set global read_only=1;
+create temporary table temp_t1 (id int not null, update_me varchar(10));
+insert into temp_t1 values (1,1),(2,2),(3,3);
+update temp_t1 left join t1 on temp_t1.id = t1.id set temp_t1.update_me = 'hello';
+set global read_only = 0;
+create table t3 (id int not null);
+insert t3 values (2);
+update t1 left join t3 on t1.id = t3.id set t1.v1 = 'hello';
+select * from t2;
+log
+triggered
+triggered
+drop table t1,t2, t3;
+drop user foo;
end of 5.5 tests
# Bug mdev-5970
diff --git a/mysql-test/r/multi_update2.result b/mysql-test/r/multi_update_big.result
similarity index 100%
rename from mysql-test/r/multi_update2.result
rename to mysql-test/r/multi_update_big.result
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result
index 07f49d32b2e75b0ae8decd7f51a650acd1966175..b9ffd25ec0b7a62acec17d566784b0eb3f6769c0 100644
--- a/mysql-test/r/mysql.result
+++ b/mysql-test/r/mysql.result
@@ -626,3 +626,7 @@ count(*)
0
truncate table t1;
drop table t1;
+#
+# MDEV-15538 '-N' Produce html output wrong
+#
+
\ No newline at end of file
diff --git a/mysql-test/r/mysqld--help,win.rdiff b/mysql-test/r/mysqld--help,win.rdiff
index 6e18d16feaf3aed0afdaffff2a99ab5b30c6721b..128155870b860ee82714b3e2436a136b3ab6d8dd 100644
--- a/mysql-test/r/mysqld--help,win.rdiff
+++ b/mysql-test/r/mysqld--help,win.rdiff
@@ -133,6 +133,6 @@
-thread-pool-oversubscribe 3
-thread-pool-stall-limit 500
+thread-pool-min-threads 1
- thread-stack 295936
+ thread-stack 299008
time-format %H:%i:%s
timed-mutexes FALSE
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index fdb4d8c280df3221691858205e681272f11c0173..4ff44dcd251079e3db328ad5d1785a28eb9735d9 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -1449,7 +1449,7 @@ thread-pool-idle-timeout 60
thread-pool-max-threads 1000
thread-pool-oversubscribe 3
thread-pool-stall-limit 500
-thread-stack 295936
+thread-stack 299008
time-format %H:%i:%s
timed-mutexes FALSE
tmp-table-size 16777216
diff --git a/mysql-test/r/mysqldump-compat.result b/mysql-test/r/mysqldump-compat.result
index f15cc7a1d7ae1c413d33cb7e3ff9737c56826f45..9a24ef2a3d1748e30e0e2c87755ef75a6b00af5a 100644
--- a/mysql-test/r/mysqldump-compat.result
+++ b/mysql-test/r/mysqldump-compat.result
@@ -2,3 +2,7 @@ CREATE DATABASE mysqldump_30126;
USE mysqldump_30126;
CREATE TABLE t1 (c1 int);
DROP DATABASE mysqldump_30126;
+use test;
+create table t1 (a int);
+create trigger tr after insert on t1 for each row set @a=1;
+drop table t1;
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 28dfc697f06cb2ca90f884aced762a7c6aac9c95..25c1931d0e070a21a5157a22303bbc5d09fbcfb6 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -4302,6 +4302,8 @@ create database first;
use first;
set time_zone = 'UTC';
create event ee1 on schedule at '2035-12-31 20:01:23' do set @a=5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
show events;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
first ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -4318,7 +4320,11 @@ show create event ee1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ee1 UTC CREATE DEFINER=`root`@`localhost` EVENT `ee1` ON SCHEDULE AT '2035-12-31 20:01:23' ON COMPLETION NOT PRESERVE ENABLE DO set @a=5 latin1 latin1_swedish_ci latin1_swedish_ci
create event ee2 on schedule at '2030-12-31 21:01:22' do set @a=5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create event ee3 on schedule at '2030-12-31 22:01:23' do set @a=5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
show events;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
second ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -4455,6 +4461,8 @@ DROP DATABASE mysqldump_test_db;
TRUNCATE mysql.event;
USE test;
CREATE event e29938 ON SCHEDULE AT '2035-12-31 20:01:23' DO SET @bug29938=29938;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test e29938 root@localhost SYSTEM ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@@ -4541,6 +4549,8 @@ CREATE TABLE t1 (f1 INT);
CREATE TRIGGER tr1 BEFORE UPDATE ON t1 FOR EACH ROW SET @f1 = 1;
CREATE PROCEDURE pr1 () SELECT "Meow";
CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT "Meow";
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
@@ -4731,7 +4741,11 @@ SELECT COUNT(*) INTO param1 FROM t2;
END//
# Events.
CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE BUG52792;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE BUG52792;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
# Functions.
CREATE FUNCTION `hello1` (s CHAR(20))
RETURNS CHAR(50) DETERMINISTIC
@@ -5332,6 +5346,8 @@ one` BEFORE INSERT ON `tab
one` FOR EACH ROW SET NEW.a = 1;
CREATE EVENT `event
one` ON SCHEDULE AT '2030-01-01 00:00:00' DO SET @a=5;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW TABLES FROM bug25717383;
Tables_in_bug25717383
tab
diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result
index 24140583d13e83832752e6a0477cf747f5c9a128..df2d6416648b3eb1c6226d16017207e70f89ac59 100644
--- a/mysql-test/r/olap.result
+++ b/mysql-test/r/olap.result
@@ -786,5 +786,59 @@ t COUNT(*)
12:12:13 1
DROP TABLE t1;
#
+# MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP
+#
+# Note, returning "latin1" in the first row vs "binary" in the second row is wrong here.
+# Both lines should return equal values.
+# The point in this test is to make sure it does not crash.
+# Bad result will be fixed in a later version.
+CREATE TABLE t (d DATE) ENGINE=MyISAM;
+INSERT INTO t VALUES ('2018-12-12');
+SELECT CHARSET(d) AS f FROM t GROUP BY d WITH ROLLUP;
+f
+latin1
+binary
+DROP TABLE t;
+#
+# MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP
+#
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT GET_LOCK( 'foo', 0 );
+GET_LOCK( 'foo', 0 )
+1
+SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 GROUP BY f WITH ROLLUP;
+f
+NULL
+1
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT i FROM t1 GROUP BY i WITH ROLLUP
+UNION ALL
+SELECT ELT( FOUND_ROWS(), 1 ) f FROM t1 GROUP BY f WITH ROLLUP;
+i
+1
+2
+NULL
+NULL
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT a FROM t1 GROUP BY NULLIF( CONVERT('', DATE), '2015-10-15' ) WITH ROLLUP;
+a
+1
+1
+Warnings:
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: ''
+Warning 1292 Incorrect datetime value: ''
+DROP TABLE t1;
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index d2b3d06b2f2e5ef233828303271df88b25b9176b..6cea712e4828c4bad89ccf1e1dcd7864c7d5f9bd 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -1318,7 +1318,7 @@ partition p2 values in (1));
end//
call p()//
drop procedure p//
-drop table t1;
+drop table t1//
create procedure p ()
begin
create table t1 (a int not null,b int not null,c int not null,primary key (a,b))
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index c00a75fed90c01351160e09cd64815eb5c438039..5deab4d84fc60341e347f4f3e626eb4ebb40e483 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -918,3 +918,45 @@ ERROR HY000: CHECK OPTION failed 'test.v'
SET GLOBAL innodb_stats_persistent= @save_isp;
DROP view v;
DROP TABLE t;
+#
+# Bug#28573894 ALTER PARTITIONED TABLE ADD AUTO_INCREMENT DIFF RESULT
+#
+CREATE TABLE t (a VARCHAR(10) NOT NULL,b INT,PRIMARY KEY (b)) ENGINE=INNODB
+PARTITION BY RANGE (b)
+(PARTITION pa VALUES LESS THAN (2),
+PARTITION pb VALUES LESS THAN (20),
+PARTITION pc VALUES LESS THAN (30),
+PARTITION pd VALUES LESS THAN (40));
+INSERT INTO t
+VALUES('A',0),('B',1),('C',2),('D',3),('E',4),('F',5),('G',25),('H',35);
+CREATE TABLE t_copy LIKE t;
+INSERT INTO t_copy SELECT * FROM t;
+ALTER TABLE t ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ADD UNIQUE KEY (r,b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t_copy ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ADD UNIQUE KEY (r,b), ALGORITHM=COPY;
+affected rows: 8
+info: Records: 8 Duplicates: 0 Warnings: 0
+SELECT * FROM t;
+a b r
+A 0 1
+B 1 2
+C 2 3
+D 3 4
+E 4 5
+F 5 6
+G 25 7
+H 35 8
+SELECT * FROM t_copy;
+a b r
+A 0 1
+B 1 2
+C 2 3
+D 3 4
+E 4 5
+F 5 6
+G 25 7
+H 35 8
+DROP TABLE t,t_copy;
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 1b40a7342630ad258774139239f8689e4bab8b5f..0d305b37bd3df463e87124a06c5614ca18afdb45 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -2706,9 +2706,13 @@ create procedure proc_1() alter event xyz comment 'xyz';
call proc_1();
drop event xyz;
create event xyz on schedule every 5 minute disable do select 123;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
call proc_1();
drop event xyz;
create event xyz on schedule every 5 minute disable do select 123;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
call proc_1();
drop event xyz;
drop procedure proc_1;
@@ -2723,6 +2727,8 @@ create event xyz on schedule every 5 minute disable do select 123;
create procedure proc_1() drop event xyz;
call proc_1();
create event xyz on schedule every 5 minute disable do select 123;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
call proc_1();
call proc_1();
ERROR HY000: Unknown event 'xyz'
@@ -4391,5 +4397,22 @@ END;
1
1
#
+# MDEV-14572: Assertion `! is_set()' failed in
+# Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
+#
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+PREPARE stmt FROM 'EXPLAIN UPDATE t1, t2 SET a = 1';
+EXECUTE stmt;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
+1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found
+EXECUTE stmt;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
+1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found
+deallocate prepare stmt;
+DROP TABLE t1, t2;
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 585ab3054204efd4fbd002afb60fbdcda9dba70a..1f5fddce608bc5e7448cbf52fa6b84aadd76b6fa 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -797,6 +797,8 @@ create event e1 on schedule every 1 year starts now()
ends date_add(now(), interval 5 hour) do
begin
end;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
flush status;
show databases;
show tables;
@@ -1429,7 +1431,9 @@ CREATE TABLE t1(c1 CHAR(10));
CREATE TRIGGER t1_bi BEFORE INSERT ON t1
FOR EACH ROW
SET NEW.c1 = 'ÔÅÓÔ';
-CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT 'ÔÅÓÔ' AS test;
+CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 'ÔÅÓÔ' AS test;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
set names utf8;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -1449,7 +1453,7 @@ FOR EACH ROW
SET NEW.c1 = 'теÑÑ‚' koi8r koi8r_general_ci latin1_swedish_ci
SHOW CREATE EVENT ev1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 'теÑÑ‚' AS test koi8r koi8r_general_ci latin1_swedish_ci
+ev1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 'теÑÑ‚' AS test koi8r koi8r_general_ci latin1_swedish_ci
DROP VIEW v1;
DROP PROCEDURE p1;
DROP FUNCTION f1;
diff --git a/mysql-test/r/sp-ucs2.result b/mysql-test/r/sp-ucs2.result
index 3c444ad97de2bb7bee6258d25f42ed8bc04d4b6d..483818193131c329b5bb5b53d2f1f6dd8ed74611 100644
--- a/mysql-test/r/sp-ucs2.result
+++ b/mysql-test/r/sp-ucs2.result
@@ -32,61 +32,55 @@ RETURNS VARCHAR(64) UNICODE BINARY
BEGIN
RETURN '';
END|
-SHOW CREATE FUNCTION f;
-DROP FUNCTION f;
+SHOW CREATE FUNCTION f|
+Function sql_mode Create Function character_set_client collation_connection Database Collation
+f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin
+BEGIN
+RETURN '';
+END latin1 latin1_swedish_ci latin1_swedish_ci
+DROP FUNCTION f|
CREATE FUNCTION f()
RETURNS VARCHAR(64) BINARY UNICODE
BEGIN
RETURN '';
END|
+SHOW CREATE FUNCTION f|
Function sql_mode Create Function character_set_client collation_connection Database Collation
f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin
BEGIN
RETURN '';
END latin1 latin1_swedish_ci latin1_swedish_ci
-SHOW CREATE FUNCTION f;
-DROP FUNCTION f;
-#
-# Testing keywords ASCII + BINARY
-#
+DROP FUNCTION f|
CREATE FUNCTION f()
RETURNS VARCHAR(64) ASCII BINARY
BEGIN
RETURN '';
END|
+SHOW CREATE FUNCTION f|
Function sql_mode Create Function character_set_client collation_connection Database Collation
-f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin
+f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin
BEGIN
RETURN '';
END latin1 latin1_swedish_ci latin1_swedish_ci
-SHOW CREATE FUNCTION f;
-DROP FUNCTION f;
+DROP FUNCTION f|
CREATE FUNCTION f()
RETURNS VARCHAR(64) BINARY ASCII
BEGIN
RETURN '';
END|
+SHOW CREATE FUNCTION f|
Function sql_mode Create Function character_set_client collation_connection Database Collation
f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin
BEGIN
RETURN '';
END latin1 latin1_swedish_ci latin1_swedish_ci
-SHOW CREATE FUNCTION f;
-DROP FUNCTION f;
-#
-# Testing COLLATE in OUT parameter
-#
+DROP FUNCTION f|
CREATE PROCEDURE p1(IN f1 VARCHAR(64) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
OUT f2 VARCHAR(64) CHARACTER SET ucs2 COLLATE ucs2_polish_ci)
BEGIN
SET f2= f1;
SET f2= concat(collation(f1), ' ', collation(f2));
END|
-Function sql_mode Create Function character_set_client collation_connection Database Collation
-f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin
-BEGIN
-RETURN '';
-END latin1 latin1_swedish_ci latin1_swedish_ci
CREATE FUNCTION f1()
RETURNS VARCHAR(64) CHARACTER SET ucs2
BEGIN
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 044d430221aec5180b5e5c33106a090d397f5757..e39754159fb67210da3733c70381dd0d97938d2f 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -6790,7 +6790,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
create table t1 (a integer)$
call p1$
a
-alter table t1 add b integer;
+alter table t1 add b integer$
call p1$
a
drop table t1;
@@ -7635,6 +7635,22 @@ c1 c2 count(c3)
2012-03-01 02:00:00 3 1
DROP PROCEDURE p1;
# End of 5.5 test
+CREATE PROCEDURE sp() ALTER TABLE non_existing_table OPTIMIZE PARTITION p0;
+CALL sp;
+Table Op Msg_type Msg_text
+test.non_existing_table optimize Error Table 'test.non_existing_table' doesn't exist
+test.non_existing_table optimize status Operation failed
+SELECT 1;
+1
+1
+DROP PROCEDURE sp;
+CREATE PROCEDURE sp() SHOW USER_STATISTICS;
+CALL sp;
+User Total_connections Concurrent_connections Connected_time Busy_time Cpu_time Bytes_received Bytes_sent Binlog_bytes_written Rows_read Rows_sent Rows_deleted Rows_inserted Rows_updated Select_commands Update_commands Other_commands Commit_transactions Rollback_transactions Denied_connections Lost_connections Access_denied Empty_queries Total_ssl_connections Max_statement_time_exceeded
+SELECT 1;
+1
+1
+DROP PROCEDURE sp;
#
# Bug#12663165 SP DEAD CODE REMOVAL DOESN'T UNDERSTAND CONTINUE HANDLERS
#
@@ -7918,6 +7934,39 @@ CALL sp;
c a b a b
DROP PROCEDURE sp;
DROP TABLE t1;
+#
+# MDEV-17055: Server crashes in find_order_in_list upon
+# 2nd (3rd) execution of SP with UPDATE
+#
+CREATE TABLE t1 (a INT);
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TABLE t2 (c INT);
+CREATE PROCEDURE sp() UPDATE v1 SET a = 1 ORDER BY a, b LIMIT 1;
+LOCK TABLE t2 READ;
+CALL sp;
+ERROR HY000: Table 'v1' was not locked with LOCK TABLES
+UNLOCK TABLES;
+CALL sp;
+ERROR 42S22: Unknown column 'b' in 'order clause'
+CALL sp;
+ERROR 42S22: Unknown column 'b' in 'order clause'
+CALL sp;
+ERROR 42S22: Unknown column 'b' in 'order clause'
+DROP PROCEDURE sp;
+CREATE PROCEDURE sp() UPDATE v1 SET a = 1 WHERE a=1 and b=2;
+LOCK TABLE t2 READ;
+CALL sp;
+ERROR HY000: Table 'v1' was not locked with LOCK TABLES
+UNLOCK TABLES;
+CALL sp;
+ERROR 42S22: Unknown column 'b' in 'where clause'
+CALL sp;
+ERROR 42S22: Unknown column 'b' in 'where clause'
+CALL sp;
+ERROR 42S22: Unknown column 'b' in 'where clause'
+DROP PROCEDURE sp;
+DROP VIEW v1;
+DROP TABLE t1, t2;
# End of 5.5 test
#
# MDEV-7040: Crash in field_conv, memcpy_field_possible, part#2
diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result
index 712f299014c0de581c7358f467877f8df5c04ad8..1fea050bbfde9b07672511f4042bb56d229fab95 100644
--- a/mysql-test/r/sp_notembedded.result
+++ b/mysql-test/r/sp_notembedded.result
@@ -72,7 +72,7 @@ select res;
end|
create table t3 (a int)|
insert into t3 values (0)|
-create view v1 as select a from t3;
+create view v1 as select a from t3|
create procedure bug10100pt(level int, lim int)
begin
if level < lim then
@@ -268,6 +268,8 @@ USE test;
SET @@SQL_MODE = '';
CREATE EVENT teste_bug11763507 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO SELECT 1 $
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS LIKE 'teste_bug11763507';
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test teste_bug11763507 root@localhost SYSTEM ONE TIME # # # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result
index c76615d644fd3d12fcad820b87c1bc8a25aab84e..87339816bc25cbc5414f28c1fe6c77ece8845fb2 100644
--- a/mysql-test/r/sp_trans.result
+++ b/mysql-test/r/sp_trans.result
@@ -640,7 +640,7 @@ TRUNCATE TABLE t1;
END|
LOCK TABLES t1 WRITE|
CALL p1()|
-FLUSH TABLES;
+FLUSH TABLES|
UNLOCK TABLES|
CALL p1()|
DROP PROCEDURE p1|
diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result
index 05ba7519781f5e4c50125062a10d06a3251036d4..f45202b13abfe5f91218eb4b272ed203644ff00e 100644
--- a/mysql-test/r/ssl.result
+++ b/mysql-test/r/ssl.result
@@ -3,10 +3,10 @@ have_ssl
1
SHOW STATUS LIKE 'Ssl_server_not_before';
Variable_name Value
-Ssl_server_not_before Apr 25 20:52:21 2017 GMT
+Ssl_server_not_before Apr 24 14:29:39 2019 GMT
SHOW STATUS LIKE 'Ssl_server_not_after';
Variable_name Value
-Ssl_server_not_after Apr 20 20:52:21 2037 GMT
+Ssl_server_not_after Apr 19 14:29:39 2039 GMT
drop table if exists t1,t2,t3,t4;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
diff --git a/mysql-test/r/ssl_verify_ip.result b/mysql-test/r/ssl_verify_ip.result
new file mode 100644
index 0000000000000000000000000000000000000000..98fb6a686563963b8f7e552d747158adbc1c2bd6
--- /dev/null
+++ b/mysql-test/r/ssl_verify_ip.result
@@ -0,0 +1,4 @@
+1
+1
+1
+1
diff --git a/mysql-test/r/stat_tables.result b/mysql-test/r/stat_tables.result
index 3ebc3b47833f2129b3ca77140f19357599efcee8..bd3e9ed7a40dedb48bcda456459f52f08ee2ad63 100644
--- a/mysql-test/r/stat_tables.result
+++ b/mysql-test/r/stat_tables.result
@@ -625,3 +625,72 @@ MAX(pk)
NULL
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
+#
+# MDEV-17605: SHOW INDEXES with use_stat_tables='preferably'
+#
+set use_stat_tables='preferably';
+CREATE DATABASE dbt3_s001;
+use dbt3_s001;
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
+select * from mysql.table_stats;
+db_name table_name cardinality
+dbt3_s001 lineitem 6005
+select * from mysql.index_stats;
+db_name table_name index_name prefix_arity avg_frequency
+dbt3_s001 lineitem PRIMARY 1 4.0033
+dbt3_s001 lineitem PRIMARY 2 1.0000
+dbt3_s001 lineitem i_l_shipdate 1 2.6500
+dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
+dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
+dbt3_s001 lineitem i_l_partkey 1 30.0250
+dbt3_s001 lineitem i_l_suppkey 1 600.5000
+dbt3_s001 lineitem i_l_receiptdate 1 2.6477
+dbt3_s001 lineitem i_l_orderkey 1 4.0033
+dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033
+dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404
+dbt3_s001 lineitem i_l_commitdate 1 2.7160
+SHOW INDEXES FROM lineitem;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+lineitem 0 PRIMARY 1 l_orderkey A 1500 NULL NULL BTREE
+lineitem 0 PRIMARY 2 l_linenumber A 6005 NULL NULL BTREE
+lineitem 1 i_l_shipdate 1 l_shipDATE A 2266 NULL NULL YES BTREE
+lineitem 1 i_l_suppkey_partkey 1 l_partkey A 200 NULL NULL YES BTREE
+lineitem 1 i_l_suppkey_partkey 2 l_suppkey A 699 NULL NULL YES BTREE
+lineitem 1 i_l_partkey 1 l_partkey A 200 NULL NULL YES BTREE
+lineitem 1 i_l_suppkey 1 l_suppkey A 10 NULL NULL YES BTREE
+lineitem 1 i_l_receiptdate 1 l_receiptDATE A 2268 NULL NULL YES BTREE
+lineitem 1 i_l_orderkey 1 l_orderkey A 1500 NULL NULL BTREE
+lineitem 1 i_l_orderkey_quantity 1 l_orderkey A 1500 NULL NULL BTREE
+lineitem 1 i_l_orderkey_quantity 2 l_quantity A 5771 NULL NULL YES BTREE
+lineitem 1 i_l_commitdate 1 l_commitDATE A 2210 NULL NULL YES BTREE
+SELECT * FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name='lineitem';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
+def dbt3_s001 lineitem 0 dbt3_s001 PRIMARY 1 l_orderkey A 1500 NULL NULL BTREE
+def dbt3_s001 lineitem 0 dbt3_s001 PRIMARY 2 l_linenumber A 6005 NULL NULL BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_shipdate 1 l_shipDATE A 2266 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_suppkey_partkey 1 l_partkey A 200 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_suppkey_partkey 2 l_suppkey A 699 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_partkey 1 l_partkey A 200 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_suppkey 1 l_suppkey A 10 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_receiptdate 1 l_receiptDATE A 2268 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_orderkey 1 l_orderkey A 1500 NULL NULL BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_orderkey_quantity 1 l_orderkey A 1500 NULL NULL BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_orderkey_quantity 2 l_quantity A 5771 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_commitdate 1 l_commitDATE A 2210 NULL NULL YES BTREE
+SELECT
+COUNT(DISTINCT l_orderkey), COUNT(DISTINCT l_orderkey,l_linenumber),
+COUNT(DISTINCT l_shipDATE),
+COUNT(DISTINCT l_partkey), COUNT(DISTINCT l_partkey,l_suppkey),
+COUNT(DISTINCT l_suppkey), COUNT(DISTINCT l_receiptDATE),
+COUNT(DISTINCT l_orderkey, l_quantity), COUNT(DISTINCT l_commitDATE)
+FROM lineitem;
+COUNT(DISTINCT l_orderkey) COUNT(DISTINCT l_orderkey,l_linenumber) COUNT(DISTINCT l_shipDATE) COUNT(DISTINCT l_partkey) COUNT(DISTINCT l_partkey,l_suppkey) COUNT(DISTINCT l_suppkey) COUNT(DISTINCT l_receiptDATE) COUNT(DISTINCT l_orderkey, l_quantity) COUNT(DISTINCT l_commitDATE)
+1500 6005 2266 200 700 10 2268 5772 2211
+set optimizer_switch=@save_optimizer_switch;
+DROP DATABASE dbt3_s001;
+delete from mysql.table_stats;
+delete from mysql.column_stats;
+delete from mysql.index_stats;
+set @save_optimizer_switch=@@optimizer_switch;
+set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/r/stat_tables_innodb.result b/mysql-test/r/stat_tables_innodb.result
index b0f794c6cee2a87be2278aa52ea054a53a34c899..579d19462e7da279cb7a0afefbaf62b7dbc4630d 100644
--- a/mysql-test/r/stat_tables_innodb.result
+++ b/mysql-test/r/stat_tables_innodb.result
@@ -652,5 +652,74 @@ MAX(pk)
NULL
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
+#
+# MDEV-17605: SHOW INDEXES with use_stat_tables='preferably'
+#
+set use_stat_tables='preferably';
+CREATE DATABASE dbt3_s001;
+use dbt3_s001;
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
+select * from mysql.table_stats;
+db_name table_name cardinality
+dbt3_s001 lineitem 6005
+select * from mysql.index_stats;
+db_name table_name index_name prefix_arity avg_frequency
+dbt3_s001 lineitem PRIMARY 1 4.0033
+dbt3_s001 lineitem PRIMARY 2 1.0000
+dbt3_s001 lineitem i_l_shipdate 1 2.6500
+dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
+dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
+dbt3_s001 lineitem i_l_partkey 1 30.0250
+dbt3_s001 lineitem i_l_suppkey 1 600.5000
+dbt3_s001 lineitem i_l_receiptdate 1 2.6477
+dbt3_s001 lineitem i_l_orderkey 1 4.0033
+dbt3_s001 lineitem i_l_orderkey_quantity 1 4.0033
+dbt3_s001 lineitem i_l_orderkey_quantity 2 1.0404
+dbt3_s001 lineitem i_l_commitdate 1 2.7160
+SHOW INDEXES FROM lineitem;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
+lineitem 0 PRIMARY 1 l_orderkey A 1500 NULL NULL BTREE
+lineitem 0 PRIMARY 2 l_linenumber A 6005 NULL NULL BTREE
+lineitem 1 i_l_shipdate 1 l_shipDATE A 2266 NULL NULL YES BTREE
+lineitem 1 i_l_suppkey_partkey 1 l_partkey A 200 NULL NULL YES BTREE
+lineitem 1 i_l_suppkey_partkey 2 l_suppkey A 699 NULL NULL YES BTREE
+lineitem 1 i_l_partkey 1 l_partkey A 200 NULL NULL YES BTREE
+lineitem 1 i_l_suppkey 1 l_suppkey A 10 NULL NULL YES BTREE
+lineitem 1 i_l_receiptdate 1 l_receiptDATE A 2268 NULL NULL YES BTREE
+lineitem 1 i_l_orderkey 1 l_orderkey A 1500 NULL NULL BTREE
+lineitem 1 i_l_orderkey_quantity 1 l_orderkey A 1500 NULL NULL BTREE
+lineitem 1 i_l_orderkey_quantity 2 l_quantity A 5771 NULL NULL YES BTREE
+lineitem 1 i_l_commitdate 1 l_commitDATE A 2210 NULL NULL YES BTREE
+SELECT * FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name='lineitem';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT
+def dbt3_s001 lineitem 0 dbt3_s001 PRIMARY 1 l_orderkey A 1500 NULL NULL BTREE
+def dbt3_s001 lineitem 0 dbt3_s001 PRIMARY 2 l_linenumber A 6005 NULL NULL BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_shipdate 1 l_shipDATE A 2266 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_suppkey_partkey 1 l_partkey A 200 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_suppkey_partkey 2 l_suppkey A 699 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_partkey 1 l_partkey A 200 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_suppkey 1 l_suppkey A 10 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_receiptdate 1 l_receiptDATE A 2268 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_orderkey 1 l_orderkey A 1500 NULL NULL BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_orderkey_quantity 1 l_orderkey A 1500 NULL NULL BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_orderkey_quantity 2 l_quantity A 5771 NULL NULL YES BTREE
+def dbt3_s001 lineitem 1 dbt3_s001 i_l_commitdate 1 l_commitDATE A 2210 NULL NULL YES BTREE
+SELECT
+COUNT(DISTINCT l_orderkey), COUNT(DISTINCT l_orderkey,l_linenumber),
+COUNT(DISTINCT l_shipDATE),
+COUNT(DISTINCT l_partkey), COUNT(DISTINCT l_partkey,l_suppkey),
+COUNT(DISTINCT l_suppkey), COUNT(DISTINCT l_receiptDATE),
+COUNT(DISTINCT l_orderkey, l_quantity), COUNT(DISTINCT l_commitDATE)
+FROM lineitem;
+COUNT(DISTINCT l_orderkey) COUNT(DISTINCT l_orderkey,l_linenumber) COUNT(DISTINCT l_shipDATE) COUNT(DISTINCT l_partkey) COUNT(DISTINCT l_partkey,l_suppkey) COUNT(DISTINCT l_suppkey) COUNT(DISTINCT l_receiptDATE) COUNT(DISTINCT l_orderkey, l_quantity) COUNT(DISTINCT l_commitDATE)
+1500 6005 2266 200 700 10 2268 5772 2211
+set optimizer_switch=@save_optimizer_switch;
+DROP DATABASE dbt3_s001;
+delete from mysql.table_stats;
+delete from mysql.column_stats;
+delete from mysql.index_stats;
+set @save_optimizer_switch=@@optimizer_switch;
+set use_stat_tables=@save_use_stat_tables;
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/r/statistics.result b/mysql-test/r/statistics.result
index 295a9b34e49581719e421cc718c39560f63cc57d..135a0806bc3d11e431e4d841677afd6b90dffc89 100644
--- a/mysql-test/r/statistics.result
+++ b/mysql-test/r/statistics.result
@@ -1735,4 +1735,18 @@ rename table t1 to t2, t3 to t4;
ERROR 42S02: Table 'test.t3' doesn't exist
drop table t1, mysql.table_stats;
rename table test.table_stats to mysql.table_stats;
+#
+# MDEV-19334: bool is_eits_usable(Field*): Assertion `field->table->stats_is_read' failed.
+#
+create temporary table t1(a int);
+insert into t1 values (1),(2),(3);
+set use_stat_tables=preferably;
+set @optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=4;
+select * from t1 where a >= 2;
+a
+2
+3
+drop table t1;
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/r/status2.result b/mysql-test/r/status2.result
index 146fb2adbaf4e77b7735714bb880b9078b52f8fb..ce4da5e4c43713a2a29b1c80c3fed4284676d6d7 100644
--- a/mysql-test/r/status2.result
+++ b/mysql-test/r/status2.result
@@ -15,10 +15,10 @@ BEGIN
SELECT 1;
END $$
DROP TABLE IF EXISTS t1,t2;
-CREATE TABLE t1 (c1 INT);
-CREATE TABLE t2 (c1 INT);
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
DO INSERT INTO t1 VALUES(1);
+CREATE TABLE t1 (c1 INT);
+CREATE TABLE t2 (c1 INT);
Assert Questions == 7
SHOW STATUS LIKE 'Questions';
Variable_name Value
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index 77dea34e2ab1ebb841f0d15639bef03710d35163..6d36950eaa80d5b2411f3677ac1fd7b14be7c137 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -3186,5 +3186,12 @@ EXECUTE stmt;
a
drop view v3;
drop table t1,t2,t3;
+#
+# MDEV-18896: IN subquery in WHERE of a table-less query used for INSERT
+#
+create table t1 (a1 varchar(25));
+create table t2 (a2 varchar(25)) ;
+insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
+drop table t1,t2;
# End of 5.5 test
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index 0741eb236ea8d60269bda50e866751f1cac31f53..a9c849370edad15bb373947b5f3447f9233977f8 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -3200,6 +3200,13 @@ EXECUTE stmt;
a
drop view v3;
drop table t1,t2,t3;
+#
+# MDEV-18896: IN subquery in WHERE of a table-less query used for INSERT
+#
+create table t1 (a1 varchar(25));
+create table t2 (a2 varchar(25)) ;
+insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
+drop table t1,t2;
# End of 5.5 test
set optimizer_switch=@subselect_sj_tmp;
#
diff --git a/mysql-test/r/timezone2.result b/mysql-test/r/timezone2.result
index 096e996bffb1a43cdb6a35d3faf29927dc49b405..c4d13f6c6783ec07a9ae2fe465a3d083d3643b83 100644
--- a/mysql-test/r/timezone2.result
+++ b/mysql-test/r/timezone2.result
@@ -332,3 +332,36 @@ NULL
#
# End of 5.3 tests
#
+#
+# Start of 10.1 tests
+#
+#
+# MDEV-11895 NO_ZERO_DATE affects timestamp values without any warnings
+#
+SET sql_mode = '';
+CREATE TABLE t1 (a TIMESTAMP NULL) ENGINE = MyISAM;
+CREATE TABLE t2 (a TIMESTAMP NULL) ENGINE = MyISAM;
+CREATE TABLE t3 (a TIMESTAMP NULL) ENGINE = MyISAM;
+SET @@session.time_zone = 'UTC';
+INSERT INTO t1 VALUES ('2011-10-29 23:00:00');
+INSERT INTO t1 VALUES ('2011-10-29 23:00:01');
+INSERT INTO t1 VALUES ('2011-10-29 23:59:59');
+SET @@session.time_zone = 'Europe/Moscow';
+SET sql_mode='NO_ZERO_DATE';
+INSERT INTO t2 SELECT * FROM t1;
+SET sql_mode='';
+INSERT INTO t3 SELECT * FROM t1;
+SELECT UNIX_TIMESTAMP(a), a FROM t2;
+UNIX_TIMESTAMP(a) a
+1319929200 2011-10-30 02:00:00
+1319929201 2011-10-30 02:00:01
+1319932799 2011-10-30 02:59:59
+SELECT UNIX_TIMESTAMP(a), a FROM t3;
+UNIX_TIMESTAMP(a) a
+1319929200 2011-10-30 02:00:00
+1319929201 2011-10-30 02:00:01
+1319932799 2011-10-30 02:59:59
+DROP TABLE t1, t2, t3;
+#
+# End of 10.1 tests
+#
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index 4136eb4dff76fe898d20aa09dd7e98358a48dd29..f460d05e2a9433f2d749fcd7d291cb6ab2aab626 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -830,3 +830,10 @@ def COALESCE(val, 1) 246 2 1 Y 32896 0 63
COALESCE(val, 1)
0
DROP TABLE t1;
+#
+# MDEV-18452 ASAN unknown-crash in Field::set_default upon SET bit_column = DEFAULT
+#
+CREATE TABLE t1 (b BIT(20)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (0);
+UPDATE t1 SET b = DEFAULT;
+DROP TABLE t1;
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index 661dcabbcfeaa7c953be5e49cc2567685850115d..e2c3b7f3b28de2a3cb9ff1ca7df63911c2770153 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -854,5 +854,30 @@ d COUNT(*)
NULL 2
DROP TABLE t1;
#
+# MDEV-17299 Assertion `maybe_null' failed in make_sortkey
+#
+CREATE TABLE t1 (pk int NOT NULL, d1 date, d2 date NOT NULL);
+INSERT INTO t1 values (1,'2018-06-22','2018-06-22'),(2,'2018-07-11','2018-07-11');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT group_concat(d1/(CASE 'b' WHEN 'j' THEN 'c' END))
+FROM v1 GROUP BY greatest(pk, 0, d2);
+group_concat(d1/(CASE 'b' WHEN 'j' THEN 'c' END))
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '1' for column 'pk' at row 1
+Warning 1292 Incorrect datetime value: '2' for column 'pk' at row 1
+Warning 1292 Incorrect datetime value: '1' for column 'pk' at row 1
+Warning 1292 Incorrect datetime value: '1' for column 'pk' at row 1
+Warning 1292 Incorrect datetime value: '2' for column 'pk' at row 2
+CREATE TABLE t2 AS SELECT greatest(pk, 0, d2) AS c1 FROM t1 LIMIT 0;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` date DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP VIEW v1;
+DROP TABLE t1;
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index e515326e851f3de1774bf40e7fe1ddfb357f2c61..c9adf6a4f88ee77af6e4cb562e6d692017b6ef47 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -1019,3 +1019,23 @@ cast('-0.0' as decimal(5,1)) < 0
#
# End of 5.5 tests
#
+#
+# Start of 10.1 tests
+#
+#
+# MDEV-18968 Both (WHERE 0.1) and (WHERE NOT 0.1) return empty set
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (10);
+SELECT CASE WHEN 0.1 THEN 'TRUE' ELSE 'FALSE' END FROM t1;
+CASE WHEN 0.1 THEN 'TRUE' ELSE 'FALSE' END
+TRUE
+SELECT * FROM t1 WHERE 0.1;
+a
+10
+SELECT * FROM t1 WHERE NOT 0.1;
+a
+DROP TABLE t1;
+#
+# End of 10.1 tests
+#
diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result
index c3498eabdceda0c556aad8ae7d16e6a1c8c11917..459b90a9093aa6c94d6d86c2e27ef13d99693e07 100644
--- a/mysql-test/r/type_year.result
+++ b/mysql-test/r/type_year.result
@@ -444,5 +444,14 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 2010)
DROP TABLE t1;
#
+# MDEV-16958 Assertion `field_length < 5' failed in Field_year::val_str or data corruption upon SELECT with UNION and aggregate functions
+#
+CREATE TABLE t1 (f YEAR);
+INSERT IGNORE INTO t1 VALUES (1971),(1972);
+SELECT MAX( NULLIF( f, '1900' ) ) AS f FROM t1 UNION SELECT MAX( NULLIF( f, '1900' ) ) AS f FROM t1;
+f
+1972
+DROP TABLE t1;
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/update_innodb.result b/mysql-test/r/update_innodb.result
index 0a85c6dab3e93e6902e928984bfa00a6bbaf98e5..695561122f0561344f7765b13d6d1537a2daac96 100644
--- a/mysql-test/r/update_innodb.result
+++ b/mysql-test/r/update_innodb.result
@@ -65,3 +65,27 @@ SELECT * FROM t1;
a_id b_id c_id
1 NULL NULL
drop table t1,t2;
+#
+# MDEV-18300: ASAN error in Field_blob::get_key_image upon UPDATE with subquery
+#
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set @save_use_stat_tables= @@use_stat_tables;
+set use_stat_tables=preferably;
+set optimizer_use_condition_selectivity=4;
+CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=InnoDB;
+insert into t1 values (1,'foo'),(2, 'abc');
+CREATE TABLE t2 (c CHAR(8), d BLOB) ENGINE=InnoDB;
+insert into t2 values ('abc', 'foo'),('edf', 'food');
+ANALYZE TABLE t1,t2;
+UPDATE t1 SET a = 1 WHERE b = ( SELECT c FROM t2 WHERE d = 'foo' );
+SELECT * FROM t1;
+a b
+1 foo
+1 abc
+DROP TABLE t1, t2;
+create table t1 (a int not null, b int, c int) engine=InnoDB;
+create table t2 (d int, e int) engine=InnoDB;
+update t1, t2 set a=NULL, b=2, c=NULL where b=d and e=200;
+drop table t1,t2;
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set @@use_stat_tables= @save_use_stat_tables;
diff --git a/mysql-test/r/userstat.result b/mysql-test/r/userstat.result
index 66bb4516c85827ff55321543911798c1c81de759..f6f7e0fdcf84e5f01497b60e9f23bb87d83124d3 100644
--- a/mysql-test/r/userstat.result
+++ b/mysql-test/r/userstat.result
@@ -142,7 +142,7 @@ show table_statistics;
Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes
show index_statistics;
Table_schema Table_name Index_name Rows_read
-select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;;
+select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;;
TOTAL_CONNECTIONS 2
TOTAL_SSL_CONNECTIONS 1
CONCURRENT_CONNECTIONS 0
@@ -153,14 +153,13 @@ ROWS_INSERTED 7
ROWS_UPDATED 5
SELECT_COMMANDS 4
UPDATE_COMMANDS 11
-OTHER_COMMANDS 7
COMMIT_TRANSACTIONS 19
ROLLBACK_TRANSACTIONS 2
DENIED_CONNECTIONS 0
LOST_CONNECTIONS 0
ACCESS_DENIED 0
EMPTY_QUERIES 1
-select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;;
+select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;;
TOTAL_CONNECTIONS 2
TOTAL_SSL_CONNECTIONS 1
CONCURRENT_CONNECTIONS 0
@@ -171,13 +170,18 @@ ROWS_INSERTED 7
ROWS_UPDATED 5
SELECT_COMMANDS 4
UPDATE_COMMANDS 11
-OTHER_COMMANDS 7
COMMIT_TRANSACTIONS 19
ROLLBACK_TRANSACTIONS 2
DENIED_CONNECTIONS 0
LOST_CONNECTIONS 0
ACCESS_DENIED 0
EMPTY_QUERIES 1
+select OTHER_COMMANDS IN (7,8) from information_schema.client_statistics;
+OTHER_COMMANDS IN (7,8)
+1
+select OTHER_COMMANDS IN (7,8) from information_schema.user_statistics;
+OTHER_COMMANDS IN (7,8)
+1
flush table_statistics;
flush index_statistics;
select * from information_schema.index_statistics;
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index 525f9fbb5e1fb14c97292c49922a9ec76cf34972..a1eb6e8bdb6d6059db6f26a4291e0f95bc5e8f43 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -177,12 +177,15 @@ create table mysqltest.t1 (a int, b int, primary key(a));
insert into mysqltest.t1 values (10,2), (20,3), (30,4), (40,5), (50,10);
create table mysqltest.t2 (x int);
insert into mysqltest.t2 values (3), (4), (5), (6);
+create table mysqltest.t3 (x int);
+insert into mysqltest.t3 values (3), (4), (5), (6);
create view mysqltest.v1 (a,c) as select a, b+1 from mysqltest.t1;
create view mysqltest.v2 (a,c) as select a, b from mysqltest.t1;
create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1;
create user mysqltest_1@localhost;
grant update (a) on mysqltest.v2 to mysqltest_1@localhost;
grant update on mysqltest.v1 to mysqltest_1@localhost;
+grant update on mysqltest.t3 to mysqltest_1@localhost;
grant select on mysqltest.* to mysqltest_1@localhost;
use mysqltest;
update t2,v1 set v1.a=v1.a+v1.c where t2.x=v1.c;
@@ -217,6 +220,7 @@ a b
48 4
62 5
71 10
+update t3,v3 set t3.x=t3.x+v3.c where t3.x=v3.c;
update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c;
ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2'
update v2 set c=a+c;
diff --git a/mysql-test/std_data/cacert.pem b/mysql-test/std_data/cacert.pem
index cc5d9100e303852bab3a6059cb35147b80bf80f9..a8fc32424af613337c2e06ad9def7e129cfa2232 100644
--- a/mysql-test/std_data/cacert.pem
+++ b/mysql-test/std_data/cacert.pem
@@ -2,78 +2,78 @@ Certificate:
Data:
Version: 3 (0x2)
Serial Number:
- e5:b1:e3:71:e9:6f:a9:e1
+ c8:ae:a5:b8:5b:90:50:49
Signature Algorithm: sha256WithRSAEncryption
- Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
+ Issuer: CN = cacert, C = FI, ST = Helsinki, L = Helsinki, O = MariaDB
Validity
- Not Before: Apr 25 20:52:21 2017 GMT
- Not After : Apr 20 20:52:21 2037 GMT
- Subject: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
+ Not Before: Apr 24 14:29:39 2019 GMT
+ Not After : Apr 19 14:29:39 2039 GMT
+ Subject: CN = cacert, C = FI, ST = Helsinki, L = Helsinki, O = MariaDB
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
- 00:a0:ad:d5:b1:ec:45:6f:d6:33:fc:5a:03:29:14:
- f1:8e:78:d5:27:53:79:e0:92:7c:10:3b:79:a0:d7:
- b6:9d:a8:5c:4d:fa:68:11:b3:03:9e:ee:5e:20:79:
- 23:d8:9c:49:34:9c:1d:c4:6e:53:1f:9a:92:1f:08:
- c1:15:e2:ad:cf:59:cd:1e:55:84:79:f9:09:ca:36:
- 8a:50:83:c6:38:48:c6:d3:fa:f6:f2:2a:4f:bd:5d:
- 60:9d:eb:21:c4:8c:f2:dd:2d:49:10:63:46:47:de:
- 2d:59:a0:4a:e0:58:e6:c0:ae:d8:d4:5e:9a:f8:f5:
- 68:1d:ea:80:8a:d6:01:b0:d5:5f:30:4d:88:5a:c5:
- 1f:81:92:c1:40:54:c8:bb:a6:a1:43:de:81:3c:4b:
- 79:95:82:bb:52:da:a3:a4:a0:69:ff:7e:00:8c:86:
- 85:ec:af:03:68:a8:83:48:a0:e4:1d:31:a9:5c:47:
- 99:9d:3a:3f:b5:3e:12:7c:4d:47:15:72:f1:11:5c:
- 4a:ef:08:1c:7b:8f:e6:03:06:07:4f:94:21:b0:5e:
- 27:fa:93:8c:b4:cc:56:34:3b:6d:c4:4a:14:57:b2:
- 21:1a:3e:2f:c5:9e:47:1a:59:05:22:0e:56:b1:a7:
- e8:80:9b:82:c3:54:57:12:05:94:79:a2:03:d9:64:
- 3c:63
+ 00:d6:d4:5c:62:a3:d7:9a:8e:f3:60:a5:f2:07:64:
+ bd:f8:2e:16:73:44:1e:4c:5a:96:07:08:88:84:d0:
+ 4d:15:83:0c:af:65:4c:55:42:96:14:82:f8:00:66:
+ 5b:2c:b5:7b:e7:44:a5:aa:4e:63:e1:d9:88:05:2a:
+ 80:c2:f2:4d:70:eb:63:24:7f:f9:d9:70:13:53:cb:
+ 45:12:0c:3c:1e:d2:ce:08:f9:b9:e0:bf:8d:6b:0c:
+ b9:29:99:31:96:f9:b6:b0:fd:e5:14:d9:e7:3b:77:
+ 26:5c:c1:e3:54:c7:63:e0:a3:30:de:86:06:19:0f:
+ 7e:04:d2:d2:d3:f0:78:23:21:79:3c:9a:42:41:6e:
+ 53:36:de:dc:0f:c7:98:8a:85:79:0a:d4:ef:90:02:
+ 1b:12:3a:60:32:6c:54:c5:8a:7f:74:24:0e:d3:08:
+ 5b:d2:e6:ae:de:17:47:8f:4d:ae:13:00:67:45:e6:
+ bc:0e:ee:1b:0d:44:b2:0c:25:6d:b8:38:5c:87:c1:
+ d3:98:27:a1:56:21:5c:42:15:b3:f4:b7:ec:ae:bd:
+ ae:af:e4:50:0d:34:7c:3c:e1:b1:64:f6:e4:07:53:
+ 9d:96:44:8a:41:e0:3c:df:f2:fc:6d:de:f7:5d:8c:
+ 04:ca:e1:4f:cc:a5:c5:0c:ce:a8:f7:49:b5:63:6b:
+ 02:53
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
- 1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ F3:1D:A0:5F:69:33:8A:A4:B4:76:97:A2:6E:AB:FD:A0:BF:F3:2C:CE
X509v3 Authority Key Identifier:
- keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ keyid:F3:1D:A0:5F:69:33:8A:A4:B4:76:97:A2:6E:AB:FD:A0:BF:F3:2C:CE
- X509v3 Basic Constraints:
+ X509v3 Basic Constraints: critical
CA:TRUE
Signature Algorithm: sha256WithRSAEncryption
- 0d:4b:21:52:fa:49:34:56:14:db:83:ae:1c:3d:a7:4d:3e:ea:
- 55:7e:1a:37:7a:65:89:ee:19:05:94:9d:3a:ad:59:c4:38:16:
- b2:bd:02:ee:5a:a6:7e:e2:b1:21:a3:ad:af:8c:ae:c3:30:71:
- ad:d7:d2:24:0f:c4:d9:47:80:c5:95:05:1d:7c:8a:49:0a:7d:
- 8b:61:ca:b5:68:3d:3e:4e:f1:c7:45:62:c8:cc:a9:2f:f3:12:
- f1:3f:92:34:7f:07:ab:d3:ac:ab:af:2d:c9:69:63:8a:b2:e5:
- 35:ea:7d:b8:17:38:72:82:5f:96:3d:dc:8d:e5:11:bb:ae:f3:
- 02:2d:20:77:5c:64:59:18:a6:e7:fa:c7:89:e8:30:12:14:04:
- 40:5b:e9:b1:8f:86:81:b9:0d:6c:b6:fc:98:f9:b7:52:ab:8f:
- 7e:53:c8:a0:05:e4:cd:0d:6b:d2:74:9f:17:7a:a1:c3:76:5e:
- f3:29:1c:c6:be:56:ab:02:f7:5d:e1:c9:21:27:6d:66:7a:41:
- 29:49:a3:f8:f5:2a:e7:03:2a:7c:52:4b:f5:46:58:45:be:a4:
- 4c:a0:65:37:1d:d8:ac:f8:1f:81:ca:9c:79:f0:ff:22:8c:1d:
- ce:2b:d0:1e:ce:99:f2:db:fa:66:84:e6:86:6f:19:3b:10:f1:
- 92:ac:57:b2
+ 0c:1b:af:48:e0:29:ff:d5:23:27:4f:0b:f6:4d:d3:c6:73:13:
+ ee:fa:ba:84:9e:22:c6:c4:35:11:d3:aa:42:11:a5:4f:97:39:
+ 72:d5:eb:6e:3e:d1:75:dc:51:bc:bc:ab:2a:0d:28:aa:3a:2e:
+ f1:7f:ae:a0:16:27:07:2e:a3:f1:06:ed:33:9b:8f:b5:3a:ca:
+ 8c:a7:e8:fe:b9:a4:b3:4e:c1:27:7d:7b:23:33:10:fe:27:4b:
+ a2:b1:6a:32:09:30:84:24:d2:1d:02:9d:41:3b:ba:4e:51:ff:
+ ce:98:c3:c9:9a:22:b8:ac:21:5b:c3:89:28:8e:3b:6a:9c:d3:
+ 5f:ef:99:6d:ac:f5:56:81:09:97:22:31:96:49:b8:75:1d:71:
+ 5c:76:7d:64:87:77:18:30:4e:43:f7:c3:1a:f9:d5:cf:97:29:
+ 28:cf:40:84:da:35:29:bc:f6:9a:9e:e9:ce:f8:cc:57:02:41:
+ 13:d1:60:18:41:60:b7:17:c6:b6:6d:71:d8:20:50:56:13:3c:
+ 6c:23:0e:91:1b:2f:8d:31:e8:82:da:71:5f:6c:1c:3f:f6:7f:
+ 2c:30:47:eb:89:c6:28:9b:61:62:43:e2:3a:91:48:0b:1e:2a:
+ c0:d9:a0:59:69:4f:13:58:cc:4a:8a:37:2e:c6:c1:a1:7b:03:
+ 4a:e5:cb:98
-----BEGIN CERTIFICATE-----
-MIIDfzCCAmegAwIBAgIJAOWx43Hpb6nhMA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV
+MIIDgjCCAmqgAwIBAgIJAMiupbhbkFBJMA0GCSqGSIb3DQEBCwUAMFYxDzANBgNV
BAMMBmNhY2VydDELMAkGA1UEBhMCRkkxETAPBgNVBAgMCEhlbHNpbmtpMREwDwYD
-VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xNzA0MjUyMDUyMjFa
-Fw0zNzA0MjAyMDUyMjFaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx
+VQQHDAhIZWxzaW5raTEQMA4GA1UECgwHTWFyaWFEQjAeFw0xOTA0MjQxNDI5Mzla
+Fw0zOTA0MTkxNDI5MzlaMFYxDzANBgNVBAMMBmNhY2VydDELMAkGA1UEBhMCRkkx
ETAPBgNVBAgMCEhlbHNpbmtpMREwDwYDVQQHDAhIZWxzaW5raTEQMA4GA1UECgwH
-TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKCt1bHsRW/W
-M/xaAykU8Y541SdTeeCSfBA7eaDXtp2oXE36aBGzA57uXiB5I9icSTScHcRuUx+a
-kh8IwRXirc9ZzR5VhHn5Cco2ilCDxjhIxtP69vIqT71dYJ3rIcSM8t0tSRBjRkfe
-LVmgSuBY5sCu2NRemvj1aB3qgIrWAbDVXzBNiFrFH4GSwUBUyLumoUPegTxLeZWC
-u1Lao6Sgaf9+AIyGheyvA2iog0ig5B0xqVxHmZ06P7U+EnxNRxVy8RFcSu8IHHuP
-5gMGB0+UIbBeJ/qTjLTMVjQ7bcRKFFeyIRo+L8WeRxpZBSIOVrGn6ICbgsNUVxIF
-lHmiA9lkPGMCAwEAAaNQME4wHQYDVR0OBBYEFBzHK6obsbsumvQPsYZgVzjCQQUS
-MB8GA1UdIwQYMBaAFBzHK6obsbsumvQPsYZgVzjCQQUSMAwGA1UdEwQFMAMBAf8w
-DQYJKoZIhvcNAQELBQADggEBAA1LIVL6STRWFNuDrhw9p00+6lV+Gjd6ZYnuGQWU
-nTqtWcQ4FrK9Au5apn7isSGjra+MrsMwca3X0iQPxNlHgMWVBR18ikkKfYthyrVo
-PT5O8cdFYsjMqS/zEvE/kjR/B6vTrKuvLclpY4qy5TXqfbgXOHKCX5Y93I3lEbuu
-8wItIHdcZFkYpuf6x4noMBIUBEBb6bGPhoG5DWy2/Jj5t1Krj35TyKAF5M0Na9J0
-nxd6ocN2XvMpHMa+VqsC913hySEnbWZ6QSlJo/j1KucDKnxSS/VGWEW+pEygZTcd
-2Kz4H4HKnHnw/yKMHc4r0B7OmfLb+maE5oZvGTsQ8ZKsV7I=
+TWFyaWFEQjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANbUXGKj15qO
+82Cl8gdkvfguFnNEHkxalgcIiITQTRWDDK9lTFVClhSC+ABmWyy1e+dEpapOY+HZ
+iAUqgMLyTXDrYyR/+dlwE1PLRRIMPB7Szgj5ueC/jWsMuSmZMZb5trD95RTZ5zt3
+JlzB41THY+CjMN6GBhkPfgTS0tPweCMheTyaQkFuUzbe3A/HmIqFeQrU75ACGxI6
+YDJsVMWKf3QkDtMIW9Lmrt4XR49NrhMAZ0XmvA7uGw1Esgwlbbg4XIfB05gnoVYh
+XEIVs/S37K69rq/kUA00fDzhsWT25AdTnZZEikHgPN/y/G3e912MBMrhT8ylxQzO
+qPdJtWNrAlMCAwEAAaNTMFEwHQYDVR0OBBYEFPMdoF9pM4qktHaXom6r/aC/8yzO
+MB8GA1UdIwQYMBaAFPMdoF9pM4qktHaXom6r/aC/8yzOMA8GA1UdEwEB/wQFMAMB
+Af8wDQYJKoZIhvcNAQELBQADggEBAAwbr0jgKf/VIydPC/ZN08ZzE+76uoSeIsbE
+NRHTqkIRpU+XOXLV624+0XXcUby8qyoNKKo6LvF/rqAWJwcuo/EG7TObj7U6yoyn
+6P65pLNOwSd9eyMzEP4nS6KxajIJMIQk0h0CnUE7uk5R/86Yw8maIrisIVvDiSiO
+O2qc01/vmW2s9VaBCZciMZZJuHUdcVx2fWSHdxgwTkP3wxr51c+XKSjPQITaNSm8
+9pqe6c74zFcCQRPRYBhBYLcXxrZtcdggUFYTPGwjDpEbL40x6ILacV9sHD/2fyww
+R+uJxiibYWJD4jqRSAseKsDZoFlpTxNYzEqKNy7GwaF7A0rly5g=
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/cakey.pem b/mysql-test/std_data/cakey.pem
index 88e251f00e2f094c3ec0dd6c121fa8c1e5cfea50..56c25057f4303d7c37ba778bddff21b46a0c96c9 100644
--- a/mysql-test/std_data/cakey.pem
+++ b/mysql-test/std_data/cakey.pem
@@ -1,28 +1,28 @@
-----BEGIN PRIVATE KEY-----
-MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCgrdWx7EVv1jP8
-WgMpFPGOeNUnU3ngknwQO3mg17adqFxN+mgRswOe7l4geSPYnEk0nB3EblMfmpIf
-CMEV4q3PWc0eVYR5+QnKNopQg8Y4SMbT+vbyKk+9XWCd6yHEjPLdLUkQY0ZH3i1Z
-oErgWObArtjUXpr49Wgd6oCK1gGw1V8wTYhaxR+BksFAVMi7pqFD3oE8S3mVgrtS
-2qOkoGn/fgCMhoXsrwNoqINIoOQdMalcR5mdOj+1PhJ8TUcVcvERXErvCBx7j+YD
-BgdPlCGwXif6k4y0zFY0O23EShRXsiEaPi/FnkcaWQUiDlaxp+iAm4LDVFcSBZR5
-ogPZZDxjAgMBAAECggEAWmy6AGFpSmEP7IpzkOEaeAWEX5dY1YtaioAOGPiM6vje
-yXuMqblG5mBbVIcYJ0T85cCd9/fmi7ifVxvEHh7tle2Bw/p4jXQbkFNVT655FR/P
-1Wg9JVeufHFaeETlQgnYe6SKo9BaswNUHkZZHRyq7/D2Ub3UFRt2tq9MG9YIKY1m
-rP9s7E+EDuH9UhYmaWdQfNm8muIXWK8WjicI5+PX0CQ1NtUy6vS7qBzcBzvT0chC
-Jtja29S6Nvg12A96nHsRmQyUaQjRlqosSwiagpc5mZmNeCEUoY+3deIdYIUMSQnf
-judZOKVPq0GOW5Y1U068LGODWaifPkinGBj+04VH0QKBgQDOp/jVCOUdEeqFJ/8m
-wEsfsRIrXvtGJHgbDXcVJ69FwlX+yaKGEuC+4f21uyxPn6GoFw+NKAyTmGKH7VAX
-OFQLrMQ/DMlNbZrCAAFcXMqrnLaVwqMeIIoVNfKAa8u15K40qc+B0it61Nlay5wq
-wvXoSZrdqXSgsI29pav20+8pTQKBgQDHC3l1+gMZ1rCar+5KdVBN1Wq4Xh7cwZw6
-FxEvyrDCJePEU2L7FpH1pFuB4WpXdBu3CPo70ZgwfqBXn4qLOOI3gTtDHActyiUm
-+WRG62O+5Ye7aLB4xy0MfnKNA2g/yHj1ozwM8kA5JRptAzDnzWfVE0k47/pVAVzt
-E2bZuSykbwKBgQCL6SkMgjMr1T9j20phn/q8gBN/DZUtTe+K0Tj4N5/wqLuz/its
-fkdutG4ipZBAcCDwPnym4qBxJNBAmqiIr/gm11ceILgBFd2azoodUC1etoDfL6Fj
-+j/CUH3X+CM5CJPwz67Pg80wIf7t+7/FK611ELAqtllhmWa9KPcd6yqWWQKBgHh5
-Xnvk5kmWY3BNOgrBNOjXWu/asA1n9lpGqfVmVlQ8wL6MxiU5xQCMCYL0X/ws37WK
-boMUWmxHyF8gxqd7t5hm1OrKpSG274PGgUZXpRjfLqdlNyLzUzXztvvY6xloCqaK
-tYcUfYDZD0SaINi8v7L9KF2ZCsi2uXsZOjBf30BrAoGAXPPotkw/CkcPQBS13cha
-ZWeeH5NDKBADWXfLfcRUs108c9xw4BYr5yGilSPscN2ZP0/iWONKp/c6/STS54t5
-lkOKKUbkAFbQu8UKa1J7zrnHZv+Mr4I/iBBy6VkN8Spp2vBI3Ng6jhPIJg3Gum9p
-943wWtAnIhe/UqCRT3a/GZg=
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDW1Fxio9eajvNg
+pfIHZL34LhZzRB5MWpYHCIiE0E0VgwyvZUxVQpYUgvgAZlsstXvnRKWqTmPh2YgF
+KoDC8k1w62Mkf/nZcBNTy0USDDwe0s4I+bngv41rDLkpmTGW+baw/eUU2ec7dyZc
+weNUx2PgozDehgYZD34E0tLT8HgjIXk8mkJBblM23twPx5iKhXkK1O+QAhsSOmAy
+bFTFin90JA7TCFvS5q7eF0ePTa4TAGdF5rwO7hsNRLIMJW24OFyHwdOYJ6FWIVxC
+FbP0t+yuva6v5FANNHw84bFk9uQHU52WRIpB4Dzf8vxt3vddjATK4U/MpcUMzqj3
+SbVjawJTAgMBAAECggEAZFozBcjvcD2SpvUdyCJhM0ukJRgO5y/xoTt1OkVrnL7o
+8A3ryHAgV1iOrPEjahEk3fWNRa70rY3GIlOmbmptjnAGkghOGCpofN4ZV8LrWqKy
+qDKvh7MzRmxdGnd7WMExfCA+IK1hfL+95dqUbQfvOgJBU9Fbi91Wyr4IygQsuouP
+Nog3FLz4jejr578qx310Nm0ppNWDa9vWWoiu4bW9u7mqYXhrOiLBxPp/EP2sg5+S
+yocjtHSfcrMDBOdiluFWlNyX69uKXWDyge/F9H5whuW5H4JRHv3i3sUcaXK/PF8D
+RwJCDiX4E7M7JVG1EgCz4kC0GyTNGihwSTB66DJxcQKBgQDyM+M71wiMQxseCCZa
+sBbRfNm100agUNRUBWGrmOLXj6eThkwNknndAZh4nUpuGOYO0CZrnfO4rUBAjpTx
+7++0OGJEf7CEX26da5Ge+ywkgxpOaVbhliuDeFZ3Lqy/1UcUVPvxPy27Sc6i6SYt
+gKaej3KpyJW0nUi2Fmca1mHp7QKBgQDjEUhYrMJrXLbmR6AELp7sbTTw1fFp2jUC
+iiM3lEYfuiUprOCXe6m2yWkd0mF2YyGZt7Z2LMX4jIRe06h4c7WSMuHAbb9Tvro9
+Kp7Xgq6+edKSdIQG8mb/UXauEuhqRyt2Y8Xr18yPlmpViI+xiAWT9x/9otpkxMVu
+RiUVEWoVPwKBgQDb2AtXgr0Ii9TucplV0eY0aq4247qExDmmtmfMWW72GTgTqWAZ
+Ja6l08/xE1y/CKyyH2/wWSQjqmba8lDyNkcO/+r6oCi6TuFZ1I0OkJCl57aWG/m3
+tBZ1NGLPtbcqPU5Sfz1c4msBSGJe72AvB0q2PCDpSd/RXL7mQPl/m76ulQKBgALx
+7HBJ/VOLJkwiTa8AM8t5NyCQhcsLq3hW9lH4OFic/3Jk7ZzJW9AlGJnsapswefUW
+buVle0PX/reEI0E8rvQweMEYK00Ywi2c6eZ9qWqLBfIkVLoKVs+k7NchI6aNOcEV
+VjHS4LJUDxkA5mw1CW173QxbGl4IN09Q1ZZKXYfdAoGATv50WfkAxn+wA3R8edUk
+ZIqqxoeh3isSN7XSQCypFIKGP0Cmo4cjcvgyXVGYX3b9a2LiNRags/q4S2ZGLz9C
+Ksv9uiyKA8THhcdx4RVUQuWEjyGzivwkk9UHTZhwOM+ED0HyE5/gnMs2RJVMMd7W
+0tocCTiUvCxfBB3W77Nm48g=
-----END PRIVATE KEY-----
diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem
index 9f6f0cfde7c75990bb5f2c25c599362272f36278..432784a543f5a7b9902108df028dbc013fb729b4 100644
--- a/mysql-test/std_data/client-cert.pem
+++ b/mysql-test/std_data/client-cert.pem
@@ -5,22 +5,22 @@ Certificate:
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:33 2017 GMT
- Not After : Apr 20 20:52:33 2037 GMT
+ Not Before: Apr 24 14:29:50 2019 GMT
+ Not After : Apr 19 14:29:50 2039 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=client
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:a1:10:ea:cc:8e:2c:73:6b:33:1a:5e:26:19:b6:
- 4b:4c:bc:04:b8:c2:e2:33:eb:67:a2:7a:27:af:3f:
- f7:ef:49:5f:c1:d2:b9:d9:71:fe:17:a0:93:da:dc:
- f1:47:de:fa:1f:c3:c1:d1:a5:2a:06:cb:b3:e8:9a:
- c1:bd:78:77:68:45:c1:55:cd:b1:c1:d3:df:8c:12:
- 4f:c2:3a:0d:b7:58:dc:ca:13:08:b9:fb:12:24:90:
- aa:b7:4e:04:eb:43:0d:45:be:1c:17:d6:a8:b1:af:
- 10:3c:39:d6:08:45:ed:a9:7e:3a:69:ae:70:22:86:
- 7e:71:1f:f1:0e:d0:0d:32:c3
+ 00:ab:9b:08:e8:ee:c3:21:9e:b5:dc:3e:03:b2:4e:
+ d5:45:58:7f:dd:95:a1:d9:b1:86:c5:1b:c5:d6:66:
+ 52:73:2c:d4:eb:53:80:0c:02:1d:8b:40:43:b1:e9:
+ db:a1:87:d7:61:f2:35:b0:4f:bf:1b:20:87:60:6f:
+ 4f:0a:df:8e:1b:32:fb:69:d3:be:24:20:77:be:cf:
+ f6:4f:23:fc:2c:f4:12:a1:b9:54:7e:74:e2:21:7f:
+ 03:e5:03:a3:17:a6:eb:c5:1b:38:3f:35:9d:b9:67:
+ 73:d3:80:c5:61:f4:8d:48:2e:cf:f0:aa:59:36:7c:
+ 4f:f6:37:f4:b7:7d:fe:1d:87
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -28,42 +28,42 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- 0C:20:76:A1:80:9C:2F:30:3D:F7:AB:8D:31:19:AD:E2:F7:E2:8D:12
+ 53:3C:D1:92:1E:19:3C:32:DA:BF:5E:2E:11:E8:17:A8:1C:77:27:DE
X509v3 Authority Key Identifier:
- keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ keyid:F3:1D:A0:5F:69:33:8A:A4:B4:76:97:A2:6E:AB:FD:A0:BF:F3:2C:CE
Signature Algorithm: sha256WithRSAEncryption
- 39:c0:90:13:19:85:47:9d:c6:ab:8c:c6:c9:0f:33:11:19:f7:
- 01:2c:1b:08:f6:81:98:11:ab:48:05:d9:b2:29:56:32:9c:ba:
- e5:40:df:85:5e:6d:fd:6e:36:9a:14:eb:90:50:57:de:2f:ed:
- 2d:89:a6:8a:40:1c:41:84:9b:da:e1:6d:e6:7c:46:b2:e0:90:
- 93:02:1c:52:2e:af:b4:d4:a1:d8:9d:19:cf:0a:67:bf:c3:3e:
- 2e:02:f4:3e:bc:2e:59:57:30:85:8a:32:ab:22:88:72:37:6e:
- ee:ed:f8:53:72:c9:28:87:50:47:81:1b:80:4c:f8:80:ce:2f:
- 47:ca:78:ce:38:51:70:ec:df:ee:fc:ea:5a:40:1e:4d:1c:fd:
- 4e:f6:74:d0:22:a4:7e:57:df:16:1a:a0:8d:be:fe:ee:f2:07:
- 2e:39:a1:97:40:19:f9:3b:b8:e7:c4:98:6e:1d:1a:27:d3:19:
- 4c:5c:c9:c3:31:98:c1:3c:27:0e:6a:de:cf:88:72:cf:e4:65:
- c9:0d:33:32:f1:ea:f7:dd:5b:9d:42:6d:ee:c7:a8:b7:85:d2:
- 41:e0:84:38:ce:86:81:ba:6e:7d:d5:ad:7a:00:58:d7:c5:83:
- 9e:5c:1d:38:32:72:49:f5:42:4b:e7:c6:5c:12:6d:e1:5d:51:
- 2c:f5:52:f0
+ 8d:f9:38:ab:6e:7b:b5:91:80:f0:51:8f:0c:67:b9:39:64:c1:
+ 5e:e6:da:2b:f6:7c:8d:37:13:d4:47:a3:2f:be:04:53:da:b0:
+ dc:d1:35:88:ee:3f:52:be:17:ea:ae:ec:2b:cd:e3:cd:6b:8f:
+ 09:e5:c2:aa:9b:50:aa:ea:63:ea:74:97:b5:ab:c9:27:6c:1d:
+ 8a:80:a0:49:7b:0f:6e:77:92:6c:db:0c:a8:c0:5d:c3:6a:54:
+ 24:52:6d:87:22:49:67:68:89:16:35:bc:eb:94:59:f7:2a:55:
+ dd:50:ca:ee:c8:72:4d:03:92:e3:10:46:d5:20:80:09:cd:db:
+ fd:c8:b2:de:4f:1f:c9:96:8f:d1:cf:81:99:d2:ab:b9:c5:27:
+ e0:40:e8:76:e9:a4:4d:c9:03:0b:be:d5:f1:f4:42:ce:2c:83:
+ 6e:3e:80:bd:cb:59:36:4d:34:47:08:91:a8:e1:23:f5:e0:af:
+ 89:ae:1a:74:3e:ea:82:19:07:ef:3c:d6:3f:cf:5c:75:5e:57:
+ c7:32:17:b1:16:36:7c:7b:a7:45:aa:de:e1:b8:c1:a2:05:1a:
+ e4:30:51:a3:af:9e:ac:a0:8a:fc:fd:9d:b3:a9:ae:25:62:91:
+ cb:ee:e7:bc:fc:9c:3c:e9:15:ee:a2:6f:f5:f1:fd:6e:59:a9:
+ 41:0b:c6:7d
-----BEGIN CERTIFICATE-----
MIIDHjCCAgagAwIBAgIBAzANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
-MjA1MjMzWjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwNDI0MTQyOTUwWhcNMzkwNDE5
+MTQyOTUwWjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZjbGllbnQw
-gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKEQ6syOLHNrMxpeJhm2S0y8BLjC
-4jPrZ6J6J68/9+9JX8HSudlx/hegk9rc8Ufe+h/DwdGlKgbLs+iawb14d2hFwVXN
-scHT34wST8I6DbdY3MoTCLn7EiSQqrdOBOtDDUW+HBfWqLGvEDw51ghF7al+Ommu
-cCKGfnEf8Q7QDTLDAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8W
-HU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBQMIHahgJwv
-MD33q40xGa3i9+KNEjAfBgNVHSMEGDAWgBQcxyuqG7G7Lpr0D7GGYFc4wkEFEjAN
-BgkqhkiG9w0BAQsFAAOCAQEAOcCQExmFR53Gq4zGyQ8zERn3ASwbCPaBmBGrSAXZ
-silWMpy65UDfhV5t/W42mhTrkFBX3i/tLYmmikAcQYSb2uFt5nxGsuCQkwIcUi6v
-tNSh2J0Zzwpnv8M+LgL0PrwuWVcwhYoyqyKIcjdu7u34U3LJKIdQR4EbgEz4gM4v
-R8p4zjhRcOzf7vzqWkAeTRz9TvZ00CKkflffFhqgjb7+7vIHLjmhl0AZ+Tu458SY
-bh0aJ9MZTFzJwzGYwTwnDmrez4hyz+RlyQ0zMvHq991bnUJt7seot4XSQeCEOM6G
-gbpufdWtegBY18WDnlwdODJySfVCS+fGXBJt4V1RLPVS8A==
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKubCOjuwyGetdw+A7JO1UVYf92V
+odmxhsUbxdZmUnMs1OtTgAwCHYtAQ7Hp26GH12HyNbBPvxsgh2BvTwrfjhsy+2nT
+viQgd77P9k8j/Cz0EqG5VH504iF/A+UDoxem68UbOD81nblnc9OAxWH0jUguz/Cq
+WTZ8T/Y39Ld9/h2HAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8W
+HU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBRTPNGSHhk8
+Mtq/Xi4R6BeoHHcn3jAfBgNVHSMEGDAWgBTzHaBfaTOKpLR2l6Juq/2gv/MszjAN
+BgkqhkiG9w0BAQsFAAOCAQEAjfk4q257tZGA8FGPDGe5OWTBXubaK/Z8jTcT1Eej
+L74EU9qw3NE1iO4/Ur4X6q7sK83jzWuPCeXCqptQqupj6nSXtavJJ2wdioCgSXsP
+bneSbNsMqMBdw2pUJFJthyJJZ2iJFjW865RZ9ypV3VDK7shyTQOS4xBG1SCACc3b
+/ciy3k8fyZaP0c+BmdKrucUn4EDodumkTckDC77V8fRCziyDbj6AvctZNk00RwiR
+qOEj9eCvia4adD7qghkH7zzWP89cdV5XxzIXsRY2fHunRare4bjBogUa5DBRo6+e
+rKCK/P2ds6muJWKRy+7nvPycPOkV7qJv9fH9blmpQQvGfQ==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem
index b6b5507cd154d364a2213f985d41d3ba40bd8963..e5fcc82acb3c8c7be5e8778e73e850f55f287b7e 100644
--- a/mysql-test/std_data/client-key.pem
+++ b/mysql-test/std_data/client-key.pem
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQChEOrMjixzazMaXiYZtktMvAS4wuIz62eieievP/fvSV/B0rnZ
-cf4XoJPa3PFH3vofw8HRpSoGy7PomsG9eHdoRcFVzbHB09+MEk/COg23WNzKEwi5
-+xIkkKq3TgTrQw1FvhwX1qixrxA8OdYIRe2pfjpprnAihn5xH/EO0A0ywwIDAQAB
-AoGAaJMqT+vTcpDcmjcct78DPuwoiKmH4rvqCrUTRRbcbJGQSbD/F+6KUl7hAM5J
-Hifo8GzST8LT+ZuS0OiB9/naVGJjcLzpV+us+keMctB/cjmsPAAsRdeA8Xk0jTWv
-v+5a5ZWSSbRXycuUtywtoESY1RLEyB0k3Dcxvk6SD3LnNMkCQQDTyDJfP+eirhgC
-mKiNvHJjLtlRT11IMLMVTELEntsyKqzVgficZCWGkFRoF9iEO1OyCJaug7RZsuxs
-Z3lk/gq1AkEAwrHwzVPU+dTqsZ8tYHlq+d0xy+6eTtYy7e/5qH3AUz10us6BG/LY
-XVTwRFAOKQOciKZ/zPQa4oYeAc0oozSalwJBAIuMbyS0Rz262bdcQDSk5/rS8//P
-+/eFn3t5NMW6p1T3KcvGSLtEgjWZBQVSMSlwrkWxwxhbUIuKip8jz6nse8ECQDgm
-g5FkLRdEfc9uXfLl8aFQVu0+y29nPVb8D9+1LMOVBNZfekLqPdZlCcpZ4EuZ3ApZ
-IqCkgiB0l7DjT2YKZM8CQQCp8z1JvoNRwhIuojh7JajY5QBkXtvHootXr+vDUHNf
-SgR5BRmqZb0F5/BK4/7JbumiHI11QUULxhOnNtlS7DDt
+MIICXQIBAAKBgQCrmwjo7sMhnrXcPgOyTtVFWH/dlaHZsYbFG8XWZlJzLNTrU4AM
+Ah2LQEOx6duhh9dh8jWwT78bIIdgb08K344bMvtp074kIHe+z/ZPI/ws9BKhuVR+
+dOIhfwPlA6MXpuvFGzg/NZ25Z3PTgMVh9I1ILs/wqlk2fE/2N/S3ff4dhwIDAQAB
+AoGAdDsE9OhLKGlcGjmyvUHh+B8yM/5WaqFwe+8Mt+QEMliKOn4K+5cvNZMohsez
+6BufCYtJTAsnkJMevnWF3wJ+N9ceuFmYP0iiliKaC6pfrytSSO7XBcluGawHTJl6
+xwG2BonBgAUGClAQY6yeA3QAkos9Cwl2yBOSsOBFp0BCTxkCQQDjHpEb+TRPNeS9
+9dtrl+00n8XV8E8BZrcPdb7bCllhPrxmLD9T3ZgDiya5ZelzRCpySRQfqVV4sVO1
+UnAn0w29AkEAwW1S15bXHgCFutLlOlAc09PK39JbtLijxEaIwAMdyR8i8v9zkB8M
+/bjARB/6sY6Pwr8ISewnkWVdLWLNSTTCkwJATAbFaGnJOuK9iWEtbBzVSJJbNTxW
+Fg/+I2y00LnsJYNMqZ8SK863vifsdI9K0Ez3MH6J//c9J0Ok08Oey5X4uQJBAKhE
+JnEN841R/wQLOwaDctCDylTzdnu8tBqnEYeYLm0r/QdPWoThvjdqZTfeagPUdROB
+hABqw/EkMO6uqM8qaqkCQQCPQ2Nz10wnsMY2wNs6gnHkqQX+ociiOVWrp6lwWx+K
+NTZg1FIkLEWFfH+meTguOSso/IXt+HlWb6sHth00OeJi
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem
index b874f129ce3de5196a1c541e57c28ca69d24a3a6..9f735d99e36264377fc573b91ea1c5e6a37b9738 100644
--- a/mysql-test/std_data/server-cert.pem
+++ b/mysql-test/std_data/server-cert.pem
@@ -5,22 +5,22 @@ Certificate:
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:21 2017 GMT
- Not After : Apr 20 20:52:21 2037 GMT
+ Not Before: Apr 24 14:29:39 2019 GMT
+ Not After : Apr 19 14:29:39 2039 GMT
Subject: C=FI, ST=state or province within country, in other certificates in this file it is the same as L, L=location, usually an address but often ambiguously used, O=organization name, typically a company name, OU=organizational unit name, a division name within an organization, CN=localhost
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:c9:fe:83:3f:0b:38:89:1d:43:15:93:5c:26:b9:
- 80:65:41:bd:2f:63:66:5e:db:fa:33:20:d9:c7:e1:
- 35:f3:14:3c:c8:b4:f7:09:d8:f5:b5:44:8f:6b:7e:
- a0:a4:3b:45:5f:e6:f4:0f:08:67:f8:5a:4c:49:e4:
- e5:39:31:69:8c:cf:25:78:93:a6:7f:58:e9:90:9c:
- 61:cb:2e:14:b1:57:b2:15:9c:ea:8d:6f:96:20:fe:
- 29:ed:2c:71:b8:4f:1f:e0:05:6c:04:b1:7e:e0:bc:
- 42:8e:bf:95:5e:a9:5e:c9:c9:a4:64:c2:1f:59:94:
- 14:c2:06:44:79:bc:d2:65:2d
+ 00:b6:42:a0:5e:1e:05:5e:7f:15:bf:7c:a4:d6:c7:
+ a8:cd:cc:db:f4:c4:e5:6d:f3:53:47:90:7b:d2:d6:
+ d9:0d:45:7c:62:aa:81:64:3d:b8:db:29:1f:0c:af:
+ 35:69:d3:82:7a:66:86:7b:97:ce:0f:54:a1:7c:ae:
+ 97:0c:0b:7a:1e:cc:60:bb:c5:bb:a1:47:d3:c8:22:
+ a0:79:11:2c:09:85:f2:2d:be:24:5a:73:88:d8:45:
+ bc:6d:d2:9e:7b:8d:9d:55:f2:c1:1e:e6:cd:20:a0:
+ 8b:b4:3b:85:0c:4b:06:b3:d5:1e:51:1f:a5:ea:fc:
+ 81:74:c6:bd:59:f8:81:35:05
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -28,47 +28,47 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- CB:22:3B:E6:DA:B8:3D:7E:39:61:18:38:50:C8:4D:B4:C8:9A:3E:2B
+ 2E:E9:8D:DA:55:FE:77:34:F0:0F:F0:07:02:31:7C:7D:DE:D4:0C:D5
X509v3 Authority Key Identifier:
- keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ keyid:F3:1D:A0:5F:69:33:8A:A4:B4:76:97:A2:6E:AB:FD:A0:BF:F3:2C:CE
Signature Algorithm: sha256WithRSAEncryption
- 8e:b7:3d:cc:2b:e5:27:49:49:5a:d4:3c:83:9b:2f:7d:11:de:
- 6b:0f:b4:51:02:e4:37:d0:c4:b5:7b:4b:e3:42:93:75:32:d1:
- eb:41:a2:27:fe:4d:91:ae:2b:a0:8b:3b:7f:e9:1b:47:85:73:
- 9f:b7:05:74:34:eb:62:12:d8:f2:24:6a:b4:24:58:7a:6a:55:
- 3e:ba:54:f9:51:de:54:0e:19:06:f6:01:23:32:0a:6c:81:e2:
- 57:8a:9e:71:c5:ba:ca:c3:0f:18:d4:ef:54:4b:e1:ee:7c:3a:
- f3:4d:c3:a3:44:21:9f:c8:ef:85:01:ab:fe:a9:7b:36:05:10:
- 25:5e:61:b8:1d:7c:40:8a:5d:5b:c1:bb:7c:79:45:6e:84:63:
- b5:3f:51:e9:9c:57:01:de:2d:1e:85:cb:83:f0:16:6d:78:bb:
- 12:01:a5:e5:a2:a7:80:fa:54:8f:9a:5c:de:1c:52:a2:bd:00:
- 49:e4:04:65:30:f9:b9:fc:4f:94:e2:d8:39:89:b6:a5:a5:2d:
- db:25:a3:0d:5b:f9:e1:2a:13:19:5e:d7:1a:33:89:5b:ac:bd:
- 29:26:da:1a:90:7e:08:19:dd:59:4b:50:fd:46:c3:0b:91:33:
- 8b:c6:70:d1:22:18:37:a3:8b:d3:8f:f8:68:cf:38:8e:e1:ef:
- ac:17:88:ca
+ 8e:80:73:98:21:69:44:9a:75:e9:08:ec:53:fa:48:84:6b:36:
+ 66:d6:84:0d:1c:d0:89:c8:9e:59:0b:33:64:2d:92:ee:a3:f1:
+ c9:a4:5f:52:5f:b3:39:d9:36:9a:0d:9b:44:79:72:27:81:06:
+ 8b:bb:b7:ec:f2:d4:23:ca:03:0b:19:44:c5:64:9a:0e:e9:b5:
+ 4a:db:bb:7a:47:65:5f:be:00:25:0b:67:42:ad:3a:89:ba:e7:
+ 97:c1:88:dd:22:49:57:21:3d:fe:c3:e8:ab:70:6c:d1:a3:7d:
+ 3e:ac:8f:d5:a7:df:4e:5a:de:7b:71:60:16:a8:5c:c8:3b:9a:
+ f9:86:92:27:ae:9b:73:fb:0f:f0:09:d0:9d:f0:2a:df:54:86:
+ 44:b5:29:af:93:d3:03:fa:48:72:44:69:85:d3:9f:d5:7f:5c:
+ 4c:30:af:e7:37:0b:db:29:74:fe:d2:49:ce:90:fb:af:a5:39:
+ a6:98:83:c6:51:63:e3:3e:bf:b1:9b:8b:26:bd:34:69:cc:d4:
+ 2c:6e:6c:2d:90:01:9b:3c:4c:9d:cc:4f:f4:86:2a:44:92:2e:
+ ab:ac:eb:e0:55:6d:50:cf:0d:52:ac:d5:3f:3e:36:4e:21:61:
+ ee:2f:40:a2:52:be:42:f6:81:aa:c3:9f:4a:6c:68:02:1c:8b:
+ 63:e1:ec:8e
-----BEGIN CERTIFICATE-----
MIIEETCCAvmgAwIBAgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjIxWhcNMzcwNDIw
-MjA1MjIxWjCCAUcxCzAJBgNVBAYTAkZJMWEwXwYDVQQIDFhzdGF0ZSBvciBwcm92
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwNDI0MTQyOTM5WhcNMzkwNDE5
+MTQyOTM5WjCCAUcxCzAJBgNVBAYTAkZJMWEwXwYDVQQIDFhzdGF0ZSBvciBwcm92
aW5jZSB3aXRoaW4gY291bnRyeSwgaW4gb3RoZXIgY2VydGlmaWNhdGVzIGluIHRo
aXMgZmlsZSBpdCBpcyB0aGUgc2FtZSBhcyBMMUAwPgYDVQQHDDdsb2NhdGlvbiwg
dXN1YWxseSBhbiBhZGRyZXNzIGJ1dCBvZnRlbiBhbWJpZ3VvdXNseSB1c2VkMTQw
MgYDVQQKDCtvcmdhbml6YXRpb24gbmFtZSwgdHlwaWNhbGx5IGEgY29tcGFueSBu
YW1lMUkwRwYDVQQLDEBvcmdhbml6YXRpb25hbCB1bml0IG5hbWUsIGEgZGl2aXNp
b24gbmFtZSB3aXRoaW4gYW4gb3JnYW5pemF0aW9uMRIwEAYDVQQDDAlsb2NhbGhv
-c3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMn+gz8LOIkdQxWTXCa5gGVB
-vS9jZl7b+jMg2cfhNfMUPMi09wnY9bVEj2t+oKQ7RV/m9A8IZ/haTEnk5TkxaYzP
-JXiTpn9Y6ZCcYcsuFLFXshWc6o1vliD+Ke0scbhPH+AFbASxfuC8Qo6/lV6pXsnJ
-pGTCH1mUFMIGRHm80mUtAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgEN
-BB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBTLIjvm
-2rg9fjlhGDhQyE20yJo+KzAfBgNVHSMEGDAWgBQcxyuqG7G7Lpr0D7GGYFc4wkEF
-EjANBgkqhkiG9w0BAQsFAAOCAQEAjrc9zCvlJ0lJWtQ8g5svfRHeaw+0UQLkN9DE
-tXtL40KTdTLR60GiJ/5Nka4roIs7f+kbR4Vzn7cFdDTrYhLY8iRqtCRYempVPrpU
-+VHeVA4ZBvYBIzIKbIHiV4qeccW6ysMPGNTvVEvh7nw6803Do0Qhn8jvhQGr/ql7
-NgUQJV5huB18QIpdW8G7fHlFboRjtT9R6ZxXAd4tHoXLg/AWbXi7EgGl5aKngPpU
-j5pc3hxSor0ASeQEZTD5ufxPlOLYOYm2paUt2yWjDVv54SoTGV7XGjOJW6y9KSba
-GpB+CBndWUtQ/UbDC5Ezi8Zw0SIYN6OL04/4aM84juHvrBeIyg==
+c3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALZCoF4eBV5/Fb98pNbHqM3M
+2/TE5W3zU0eQe9LW2Q1FfGKqgWQ9uNspHwyvNWnTgnpmhnuXzg9UoXyulwwLeh7M
+YLvFu6FH08gioHkRLAmF8i2+JFpziNhFvG3SnnuNnVXywR7mzSCgi7Q7hQxLBrPV
+HlEfper8gXTGvVn4gTUFAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgEN
+BB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBQu6Y3a
+Vf53NPAP8AcCMXx93tQM1TAfBgNVHSMEGDAWgBTzHaBfaTOKpLR2l6Juq/2gv/Ms
+zjANBgkqhkiG9w0BAQsFAAOCAQEAjoBzmCFpRJp16QjsU/pIhGs2ZtaEDRzQicie
+WQszZC2S7qPxyaRfUl+zOdk2mg2bRHlyJ4EGi7u37PLUI8oDCxlExWSaDum1Stu7
+ekdlX74AJQtnQq06ibrnl8GI3SJJVyE9/sPoq3Bs0aN9PqyP1affTlree3FgFqhc
+yDua+YaSJ66bc/sP8AnQnfAq31SGRLUpr5PTA/pIckRphdOf1X9cTDCv5zcL2yl0
+/tJJzpD7r6U5ppiDxlFj4z6/sZuLJr00aczULG5sLZABmzxMncxP9IYqRJIuq6zr
+4FVtUM8NUqzVPz42TiFh7i9AolK+QvaBqsOfSmxoAhyLY+Hsjg==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem
index feb7fbaf535dafbe137641125408fc674bf03687..26d171dcde4f27243aa2801d03faae9840124849 100644
--- a/mysql-test/std_data/server-key.pem
+++ b/mysql-test/std_data/server-key.pem
@@ -1,15 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
-MIICXQIBAAKBgQDJ/oM/CziJHUMVk1wmuYBlQb0vY2Ze2/ozINnH4TXzFDzItPcJ
-2PW1RI9rfqCkO0Vf5vQPCGf4WkxJ5OU5MWmMzyV4k6Z/WOmQnGHLLhSxV7IVnOqN
-b5Yg/intLHG4Tx/gBWwEsX7gvEKOv5VeqV7JyaRkwh9ZlBTCBkR5vNJlLQIDAQAB
-AoGAZzoeMJW3arr9kYUhTtj1+MlDuXf+1PNuRbrAERnSzErHVXrF1M5/owdKlBC+
-X6+6oGwSxavyFkVvP0QusK/D1DxSs60Mk1p3Ax5nVpNYiBdeBULcYiXCSUbKItYL
-vzyECIc02t+auWf/wp3Wy3g6sU6FoT2QCPSsy0qRC48VBzECQQD79P9w0XjJGk8y
-3zPc4JOr3a1UUu4VLjFdFDR2eZZRE02NcXfLHE0+Idk3TYnNDRLoWDJjdfZ0thZZ
-KuJ58wIDAkEAzTxGYmT/aieDC3G8sHMqLUvjN30TfTocv7mWlpxWo7zbRbQm7jsB
-S5weRKtu3yVmdb6rW+5IZSCazc/j4T5tDwJAUgDRSpTCrSFE+Zevt4nYRi2mBjXf
-i0E3i8XRtWWpSMXxjcGKba7ObRRzMA6qdPR2XOynqbtw9Vd2Ops8jthKpQJBAJJm
-8tZxsXlqIiLhyXYdUPLq9XS5tlNYRvXFT9S0RWGb8NbyQesjEDN9dGIL4JUxurs3
-fkmf2ui4r3UtXSNqQqUCQQDjatAhBdibh5UawO5VpI87OJMzATCkY/mX3R+TnbOm
-MkdydjF022P0M4N24DiM+2nBTDp+F45LwtQLa4vmB2No
+MIICWwIBAAKBgQC2QqBeHgVefxW/fKTWx6jNzNv0xOVt81NHkHvS1tkNRXxiqoFk
+PbjbKR8MrzVp04J6ZoZ7l84PVKF8rpcMC3oezGC7xbuhR9PIIqB5ESwJhfItviRa
+c4jYRbxt0p57jZ1V8sEe5s0goIu0O4UMSwaz1R5RH6Xq/IF0xr1Z+IE1BQIDAQAB
+AoGAdQJNJl8rn0EDW03QHbtMmeL9CyUlDfN68aTGedNIwYZsloNUUmB1vu2la2VI
+a0pIqAAOMmaA+cKhcgQ8IJV1rh11BgiRhwJZJNRY1EYik5rEgJCYivlQo3PiDUhR
+6l3t4xEmSswXyOj9WCo8kKJdjalERNDavLhXHa/SnQnSpzkCQQDtreVj+DIzRcJp
+IaZvIlnVeDb+ZB3903DzXJLT4cqwmi2TuVBT6RkE4lnYAAIfQxedMfayLKzHTvse
+aP4vvvRfAkEAxE8m27MngLZUyje9WwnbtXDUOALBNnGz3KE+qD6UN+a8qCJAJSJ5
+oJBpZU3ZDRKZaiIUOtQsMOonjB6wFrDxGwJANRnu8CDZhl8Filt8RcQU8f6Dut4/
+XSBKUfTS0QfXMxGfMSvr6HNhpZe0nu+Ric6BjhtFlJUqnPTmYervL1eoXQJAChm4
+eh1hrvGysyTjDUgYkeFYSfl6T37SLkvtmWJ+5dFta4k3m7GGaIiFo7y5qj6Gvjs6
+pzw7edjSaBc8IC7CeQJADBoy86mlLSUi7OzNz7xp3f2E1HUmjARFP72PW3FAosoU
+GCsVCFeBZDSREZoQHB4CQZhjLFYkbBeVwFVOW/Jxjg==
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem
index df27c77e8e06ac49650cf51cf15be0f2b2c1f863..187ea9a1b28b01da494c916fbdd20cb1d0f995df 100644
--- a/mysql-test/std_data/server8k-cert.pem
+++ b/mysql-test/std_data/server8k-cert.pem
@@ -5,82 +5,82 @@ Certificate:
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:33 2017 GMT
- Not After : Apr 20 20:52:33 2037 GMT
+ Not Before: Apr 24 14:29:50 2019 GMT
+ Not After : Apr 19 14:29:50 2039 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server8k
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (8192 bit)
Modulus:
- 00:b3:a7:81:cf:a3:9b:3c:57:2a:8e:de:13:08:a6:
- 15:6a:68:08:ce:a1:a0:ef:fc:32:95:5a:9a:b5:cc:
- 84:bb:a3:15:a0:fc:29:bb:71:0e:f3:40:20:97:35:
- 92:92:89:36:6a:5f:be:a5:24:5a:c8:0e:f7:53:a8:
- e0:74:05:90:38:21:a5:25:72:2b:56:70:74:aa:d6:
- 30:25:e0:95:dd:3d:4a:48:4b:25:a7:a8:c4:eb:e5:
- d6:10:4f:95:42:91:b0:cb:68:2f:bf:96:0f:0a:9b:
- 2b:01:0d:03:ae:3f:b7:7e:f6:1e:c1:14:42:04:7f:
- 09:21:e8:3e:87:c0:b3:d7:dd:4f:7e:95:b6:83:33:
- 8f:cc:f4:bb:11:8e:66:5f:b4:32:22:8b:8e:34:93:
- 82:0f:02:d1:6f:85:b2:a7:7e:36:0c:f3:0d:91:46:
- f9:a5:91:dc:60:4a:0d:eb:e5:37:e3:76:d8:13:bb:
- 55:33:23:4c:b3:90:df:6a:b6:80:3d:f6:bd:9d:bd:
- ef:d3:8d:7a:9a:61:ac:02:3d:10:b5:c2:53:d2:7e:
- ee:1c:90:a5:b0:e8:db:71:8f:d3:53:e4:80:b0:b6:
- cc:b0:f2:eb:46:c3:d9:3c:48:01:1d:3a:5c:d0:f2:
- 17:9c:9a:8e:fc:2a:36:e7:1c:59:41:66:ad:e1:d3:
- 82:d8:95:ee:ae:dc:ab:72:94:cb:0b:8a:df:ef:70:
- f7:f9:e2:77:76:64:67:2d:02:dc:1a:db:02:e9:5e:
- 63:3f:3e:07:e9:65:e4:02:78:62:55:e1:52:18:5a:
- a3:9c:56:dd:cd:d3:f7:f2:55:45:62:20:ce:fd:41:
- 93:b9:c2:20:90:23:a4:41:4f:30:5c:5e:a0:97:6f:
- a4:1f:87:6a:97:87:70:f9:d5:56:b7:6a:cc:f1:28:
- d2:26:34:57:65:9c:2d:41:43:8b:6c:bd:15:6f:ec:
- ce:3e:9f:4d:2f:a6:21:d8:f7:4d:d1:63:4f:f0:9e:
- 04:c3:82:33:58:34:20:4b:81:0d:42:0d:44:62:48:
- 1b:4c:cf:e0:69:e4:c8:f8:9c:98:1f:74:37:3a:3f:
- 23:40:3a:88:80:c2:9c:9b:ba:6a:b9:2c:3a:67:a6:
- b6:5c:83:fd:93:3f:6e:53:19:48:e3:3d:fa:f5:8e:
- 03:40:8f:e6:af:c5:de:aa:f8:70:77:36:2b:6e:3a:
- df:bc:d7:f6:c7:4f:02:7f:a1:ad:2f:3c:e9:08:45:
- 2f:57:1a:f1:5b:9c:27:07:3a:44:43:3e:05:b1:4a:
- 1b:42:a4:90:ab:ce:4b:f7:c1:9b:d7:dd:6f:05:11:
- f9:e8:a3:a1:99:6c:2e:27:3d:b1:54:6f:eb:b2:e8:
- f8:e6:12:6f:8a:69:05:cc:c6:f6:c4:2d:b0:06:b6:
- 21:50:28:50:dc:8c:b2:8c:65:ce:d9:2b:51:b8:62:
- 56:70:b4:46:4d:e4:4c:a1:86:31:3d:e3:07:7f:73:
- e3:09:6e:ee:a7:29:2a:80:23:8a:b6:0c:22:9e:43:
- 1c:a9:8c:47:2c:02:6d:13:ef:88:a7:d7:d1:60:d9:
- 6b:28:80:97:8a:b7:ff:62:6b:28:54:0d:ab:63:3a:
- ac:57:9e:2f:95:2b:f4:a0:3d:a1:60:a0:57:1a:09:
- 23:ee:fc:4d:9b:45:83:f2:0a:1f:b3:77:0e:98:20:
- b3:16:fc:97:03:30:fc:ab:3e:7e:fc:3e:76:64:cb:
- 4b:4d:c9:6c:8f:aa:70:ec:03:c5:81:31:43:11:9a:
- fc:2d:ba:25:94:0b:73:7e:c1:39:01:ca:68:70:1a:
- ef:a4:ba:dc:13:d6:37:17:09:0d:ca:aa:21:94:bb:
- 3e:43:fd:8c:80:e6:58:fd:75:23:5a:ca:1f:0b:2e:
- 35:c2:cd:77:0c:73:b3:2f:9a:e4:03:68:58:c8:3f:
- f3:76:8d:05:53:d2:34:db:09:af:70:ed:67:0b:ff:
- 2f:64:35:2d:71:22:7a:f2:f2:2b:7d:6d:be:80:bd:
- 18:38:37:01:67:a4:5f:48:29:52:78:9f:b5:b8:80:
- 70:ca:10:6a:e1:27:3b:c0:61:4e:96:f8:e8:0f:42:
- b1:fa:bc:05:ef:31:91:38:ab:0f:a7:ef:2c:86:c1:
- ab:85:36:7c:10:9d:c7:0a:6b:e6:2b:11:dd:fa:45:
- e7:d2:c3:3a:c1:cd:60:27:68:26:d7:87:49:5f:e3:
- 7f:26:20:1f:99:a8:f9:00:a6:0d:d5:13:81:6e:fc:
- 27:8a:03:58:6b:0e:3a:c7:20:a1:5c:24:d1:08:a6:
- 5a:1e:e7:81:3d:21:05:2e:4b:5d:18:14:f1:4f:ab:
- 5c:e5:81:da:c1:2c:f6:12:ff:25:09:97:1e:9d:51:
- 6d:1f:63:2e:9c:ed:7d:86:45:b0:35:73:f6:9f:82:
- 65:bc:7f:46:88:e1:a1:60:a1:37:50:26:9c:d7:76:
- f3:dc:94:89:6d:d7:be:a6:17:a1:2b:71:14:37:17:
- 5f:ed:5a:39:99:fc:69:af:bb:63:55:c6:60:7b:64:
- d8:bb:b7:4a:9f:b9:aa:89:4b:30:1f:9c:ef:23:7a:
- af:7e:31:dd:fb:dd:0a:d5:04:0a:8c:57:6f:64:80:
- eb:f3:ee:6c:33:d2:72:c2:24:68:a2:4e:99:88:1c:
- f7:3b:5d:10:cc:4e:ea:a5:cb:00:40:8a:a9:63:2e:
- 18:92:eb:b1:28:05:fe:19:ea:7b:32:fb:63:56:2c:
- 0b:20:01:92:a3
+ 00:cd:66:a2:70:48:a6:7b:2e:ef:40:10:f0:09:9f:
+ 0e:e8:f3:3b:43:07:2d:39:b7:54:55:aa:d9:16:12:
+ 81:18:8c:12:9a:ce:f1:5c:9a:f5:5d:96:09:3a:13:
+ ee:b4:e5:a9:88:10:99:d9:7a:d7:c6:d6:6a:7e:26:
+ c5:1f:63:83:bc:09:1a:1c:eb:f1:0b:9e:dd:cd:34:
+ 86:06:4c:83:aa:c9:45:5a:bd:2d:a2:ae:95:c7:4f:
+ 97:99:f4:80:bf:7e:38:67:9d:cf:94:12:e4:e9:6b:
+ 00:62:3d:b0:c3:c4:c3:94:62:e8:c5:7e:54:4e:8e:
+ a0:d9:ad:8f:18:66:43:93:aa:66:c7:f3:cb:4b:47:
+ 2c:a0:94:99:18:40:ed:82:53:15:aa:cb:66:56:27:
+ ed:78:8c:ed:f3:05:88:6b:dc:2e:d1:19:f7:ae:4a:
+ d4:8d:55:81:99:ec:46:c2:2c:db:9a:20:a1:3d:fa:
+ 54:a8:a5:fb:66:dd:a4:09:ee:d2:5a:d2:f9:5d:07:
+ 4b:2f:7b:2f:e8:ad:97:db:52:59:41:28:a5:90:a8:
+ d2:63:e9:ba:e6:a2:98:d7:7a:04:b2:63:1d:3c:09:
+ e9:4c:af:b9:1c:c0:3c:4c:4a:55:87:9e:a7:16:8a:
+ 0c:6b:56:86:0f:d4:32:6e:41:05:89:12:55:45:33:
+ 57:de:49:38:4e:36:3f:dc:db:95:b0:13:da:4b:96:
+ a1:d3:15:eb:80:99:5f:e9:d4:9f:2f:ba:82:ff:1e:
+ 9e:00:a8:5b:63:a7:12:49:ff:25:d5:b0:76:32:e2:
+ 04:01:21:5d:c8:2a:13:0f:f2:82:8f:f0:cd:ca:4f:
+ 01:5a:a1:9f:87:21:b3:33:ac:0d:0e:83:d8:3f:f7:
+ db:9f:9d:f6:ba:c1:54:38:fe:c9:ac:59:47:93:51:
+ bd:a8:3d:35:3f:e5:85:4e:f1:8b:06:72:94:3a:ae:
+ ad:bf:32:cc:19:e3:c6:d7:3a:76:1e:5a:2d:10:cb:
+ 67:f0:bc:86:fc:0c:89:5c:7d:c4:2b:61:79:8c:82:
+ ea:a9:84:55:a2:fd:1f:ab:11:a0:fa:b3:24:eb:b1:
+ 2d:f6:30:54:19:f5:71:a1:34:c6:37:20:29:32:56:
+ 97:29:40:63:5c:a7:fc:8e:67:98:8f:92:ec:49:06:
+ 06:fb:68:9d:d6:1c:9e:20:da:9d:74:21:8c:e7:0b:
+ 81:7a:ac:2e:fd:a0:8c:77:e9:6a:b2:20:7d:78:b8:
+ ce:7a:bb:4c:8c:74:14:07:1f:5d:e8:91:6f:26:c4:
+ 56:ce:fc:9f:03:59:85:b9:5e:93:b9:1b:35:ab:ca:
+ 3d:c2:06:b6:ad:69:e3:5e:38:86:66:cc:e6:9e:64:
+ f5:11:77:bc:7d:7f:9c:0e:fe:01:a5:dd:86:b2:84:
+ ae:f6:6c:ce:3d:21:1a:9a:8b:a4:fe:91:ab:ea:18:
+ 4e:e0:fa:f8:8a:53:a5:b0:45:30:b0:c2:60:ce:e0:
+ 3e:f5:6f:17:15:df:a6:15:04:4d:34:92:e0:88:6d:
+ ee:a2:f4:c3:7c:fd:a4:79:35:d3:44:c5:a4:98:14:
+ a5:a4:2e:5f:64:e0:b7:4f:da:b1:22:6a:2e:6b:40:
+ 96:8d:4f:92:ad:55:36:a0:fe:bc:79:26:25:5c:65:
+ 27:36:5b:40:ef:b0:e8:ab:62:1f:9f:7e:a7:47:ee:
+ 32:37:fc:00:7e:9c:03:76:82:fd:7b:76:98:58:d1:
+ a8:ed:b1:a1:99:09:92:0c:97:d8:92:7e:75:bf:3b:
+ d5:c3:04:0f:b5:3e:86:64:bf:5a:51:9a:58:09:ae:
+ 77:bf:e9:66:2b:89:f6:aa:72:af:d6:ce:31:b3:20:
+ 6b:96:32:35:d0:0e:bf:a9:94:c6:b1:c4:3e:fa:24:
+ ed:19:17:47:75:23:df:7d:02:a0:e9:93:99:37:1c:
+ bc:9f:d9:b9:61:99:dd:c6:bf:74:2f:a3:48:61:89:
+ 8c:36:ab:bb:7a:3c:5e:95:a1:83:55:f9:6c:72:d9:
+ 69:7a:4b:c2:66:95:de:28:45:c8:26:f1:1e:59:3a:
+ 0d:af:da:f0:eb:fd:c4:e1:e8:68:c7:62:8d:16:f3:
+ 73:41:7b:65:97:b6:b2:de:ae:07:f5:e2:98:f6:75:
+ 01:b3:98:28:fa:08:11:22:df:cb:c4:2c:c3:3c:09:
+ 93:6f:4a:d9:6e:cd:42:23:a7:96:04:d8:40:73:fd:
+ 9d:09:33:6b:38:45:9e:fb:c3:f8:9b:54:1b:f9:f8:
+ 76:63:0a:47:d9:54:20:97:c2:3a:65:5f:a6:f5:36:
+ 1e:3a:f6:ff:6a:5b:e1:44:b0:17:9b:3f:49:5a:3b:
+ c7:87:26:37:fa:0e:66:50:b8:c0:39:8b:b2:88:3e:
+ 8b:3e:c6:11:8a:c9:09:96:66:f6:b0:d8:d0:71:35:
+ 19:c3:61:7c:7e:2b:a5:d0:2d:0d:0e:ea:04:dc:94:
+ f0:f0:6f:0b:ff:00:99:f7:fc:46:27:38:40:b7:26:
+ 75:ff:ba:fd:d0:f5:83:52:bb:9a:64:77:7f:5f:1e:
+ 15:8e:86:89:14:c6:ab:dc:a8:1b:f9:1e:dc:55:11:
+ cc:28:6a:1c:ef:92:42:3b:38:c2:55:19:da:db:46:
+ 70:d7:17:6a:66:7e:ba:44:3d:38:4f:9c:9d:fa:87:
+ 20:a1:cb:86:87:62:ce:c5:3d:ac:d7:78:b1:93:38:
+ ee:a4:be:04:61:ca:ae:01:91:8f:c8:14:3c:79:61:
+ d6:81:f3:e6:47
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
@@ -88,61 +88,61 @@ Certificate:
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
- 43:3B:26:15:A5:60:62:3F:07:2A:8C:8C:DA:F8:74:BE:36:B2:33:E4
+ B9:0C:F0:60:22:D4:C5:BA:28:88:C5:5F:31:E0:A6:29:CC:E0:15:E6
X509v3 Authority Key Identifier:
- keyid:1C:C7:2B:AA:1B:B1:BB:2E:9A:F4:0F:B1:86:60:57:38:C2:41:05:12
+ keyid:F3:1D:A0:5F:69:33:8A:A4:B4:76:97:A2:6E:AB:FD:A0:BF:F3:2C:CE
Signature Algorithm: sha256WithRSAEncryption
- 5c:c7:4e:56:eb:21:1b:f3:5d:c4:56:fa:bf:6d:e1:0d:fa:cc:
- b0:7c:13:58:b9:d4:47:b3:de:b4:ae:f2:45:02:88:65:43:89:
- cf:ea:9c:d0:ea:45:42:35:d2:ec:bc:b4:73:03:db:85:7b:c7:
- f0:68:d7:dc:2b:70:71:63:ed:33:68:9f:29:ff:67:0a:69:3b:
- c4:65:7c:25:00:cf:7f:ee:aa:fe:44:19:70:f2:74:db:da:9f:
- 52:92:1a:03:e6:0a:49:85:2e:2a:02:c1:81:d4:6d:cf:98:d1:
- e9:6a:2f:bb:fa:a6:d5:4b:55:38:c2:aa:8c:f5:d3:f9:e6:74:
- db:00:d6:29:f9:d1:9c:7a:0e:98:c5:e5:8c:16:49:d8:cf:ee:
- a0:cb:c2:2c:31:cf:62:2c:b1:7f:6d:60:b0:ce:d5:07:45:e8:
- 44:17:7c:c4:12:fb:00:57:24:57:e8:17:78:3b:1e:0d:91:aa:
- 67:98:d0:e5:9a:86:4b:88:4a:2f:55:5d:2e:13:ec:f5:4a:7d:
- e7:13:a7:57:03:41:2f:f6:6c:08:8e:58:ef:b0:7a:79:32:e3:
- bb:4b:eb:4d:42:cd:42:96:2d:67:f6:4c:c1:f6:62:fb:c0:3e:
- 09:69:8f:36:7e:fa:c8:cd:ff:72:3e:df:92:f7:8f:44:cf:77:
- fe:6e:74:de
+ 3d:c1:30:c0:a6:91:10:7b:3a:d6:d9:2e:e2:9c:23:03:48:88:
+ 72:3a:9e:02:4d:cd:fe:b6:f7:14:77:1f:0f:98:94:3f:ed:90:
+ 7e:64:0d:2d:d4:4d:78:dd:8f:10:8b:15:d0:65:5e:18:68:ea:
+ 7c:be:f5:3a:84:e5:23:aa:e1:d0:15:61:20:3c:5c:06:0a:33:
+ e2:39:a6:11:15:cf:66:74:10:80:9d:86:de:8c:3d:9b:78:0a:
+ cb:87:dd:fb:87:e6:1b:74:f9:81:57:ae:92:c8:d0:62:78:63:
+ 11:6d:34:2d:3f:f3:8b:82:e0:66:8f:0f:94:11:2e:62:06:6b:
+ 1d:5e:7f:49:90:c6:9b:c3:22:ab:f3:62:3d:90:61:aa:3c:96:
+ 28:55:b2:96:ec:ed:2a:f2:88:94:78:b9:12:ad:42:71:0e:ad:
+ d1:82:db:82:37:0b:e3:ed:f5:59:50:87:84:e6:1d:67:25:b5:
+ 79:c3:90:00:6d:59:5f:ee:72:92:e8:9e:4a:e5:07:2a:0a:19:
+ 8e:13:bd:2f:1f:9b:a4:c1:ca:e2:5d:1f:31:db:80:d2:52:55:
+ 67:b8:a6:53:19:18:63:23:5b:49:3d:d6:06:7f:57:e3:43:de:
+ 17:18:32:85:97:20:d5:dd:8a:7e:7c:3b:d0:cc:85:96:d5:96:
+ 3c:29:76:85
-----BEGIN CERTIFICATE-----
MIIGpDCCBYygAwIBAgIBAjANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
-MjA1MjMzWjBYMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwNDI0MTQyOTUwWhcNMzkwNDE5
+MTQyOTUwWjBYMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMREwDwYDVQQDDAhzZXJ2ZXI4
-azCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBALOngc+jmzxXKo7eEwim
-FWpoCM6hoO/8MpVamrXMhLujFaD8KbtxDvNAIJc1kpKJNmpfvqUkWsgO91Oo4HQF
-kDghpSVyK1ZwdKrWMCXgld09SkhLJaeoxOvl1hBPlUKRsMtoL7+WDwqbKwENA64/
-t372HsEUQgR/CSHoPofAs9fdT36VtoMzj8z0uxGOZl+0MiKLjjSTgg8C0W+Fsqd+
-NgzzDZFG+aWR3GBKDevlN+N22BO7VTMjTLOQ32q2gD32vZ2979ONepphrAI9ELXC
-U9J+7hyQpbDo23GP01PkgLC2zLDy60bD2TxIAR06XNDyF5yajvwqNuccWUFmreHT
-gtiV7q7cq3KUywuK3+9w9/nid3ZkZy0C3BrbAuleYz8+B+ll5AJ4YlXhUhhao5xW
-3c3T9/JVRWIgzv1Bk7nCIJAjpEFPMFxeoJdvpB+HapeHcPnVVrdqzPEo0iY0V2Wc
-LUFDi2y9FW/szj6fTS+mIdj3TdFjT/CeBMOCM1g0IEuBDUINRGJIG0zP4GnkyPic
-mB90Nzo/I0A6iIDCnJu6arksOmemtlyD/ZM/blMZSOM9+vWOA0CP5q/F3qr4cHc2
-K24637zX9sdPAn+hrS886QhFL1ca8VucJwc6REM+BbFKG0KkkKvOS/fBm9fdbwUR
-+eijoZlsLic9sVRv67Lo+OYSb4ppBczG9sQtsAa2IVAoUNyMsoxlztkrUbhiVnC0
-Rk3kTKGGMT3jB39z4wlu7qcpKoAjirYMIp5DHKmMRywCbRPviKfX0WDZayiAl4q3
-/2JrKFQNq2M6rFeeL5Ur9KA9oWCgVxoJI+78TZtFg/IKH7N3Dpggsxb8lwMw/Ks+
-fvw+dmTLS03JbI+qcOwDxYExQxGa/C26JZQLc37BOQHKaHAa76S63BPWNxcJDcqq
-IZS7PkP9jIDmWP11I1rKHwsuNcLNdwxzsy+a5ANoWMg/83aNBVPSNNsJr3DtZwv/
-L2Q1LXEievLyK31tvoC9GDg3AWekX0gpUniftbiAcMoQauEnO8BhTpb46A9Csfq8
-Be8xkTirD6fvLIbBq4U2fBCdxwpr5isR3fpF59LDOsHNYCdoJteHSV/jfyYgH5mo
-+QCmDdUTgW78J4oDWGsOOscgoVwk0QimWh7ngT0hBS5LXRgU8U+rXOWB2sEs9hL/
-JQmXHp1RbR9jLpztfYZFsDVz9p+CZbx/RojhoWChN1AmnNd289yUiW3XvqYXoStx
-FDcXX+1aOZn8aa+7Y1XGYHtk2Lu3Sp+5qolLMB+c7yN6r34x3fvdCtUECoxXb2SA
-6/PubDPScsIkaKJOmYgc9ztdEMxO6qXLAECKqWMuGJLrsSgF/hnqezL7Y1YsCyAB
-kqMCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBH
-ZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFEM7JhWlYGI/ByqMjNr4dL42
-sjPkMB8GA1UdIwQYMBaAFBzHK6obsbsumvQPsYZgVzjCQQUSMA0GCSqGSIb3DQEB
-CwUAA4IBAQBcx05W6yEb813EVvq/beEN+sywfBNYudRHs960rvJFAohlQ4nP6pzQ
-6kVCNdLsvLRzA9uFe8fwaNfcK3BxY+0zaJ8p/2cKaTvEZXwlAM9/7qr+RBlw8nTb
-2p9SkhoD5gpJhS4qAsGB1G3PmNHpai+7+qbVS1U4wqqM9dP55nTbANYp+dGceg6Y
-xeWMFknYz+6gy8IsMc9iLLF/bWCwztUHRehEF3zEEvsAVyRX6Bd4Ox4NkapnmNDl
-moZLiEovVV0uE+z1Sn3nE6dXA0Ev9mwIjljvsHp5MuO7S+tNQs1Cli1n9kzB9mL7
-wD4JaY82fvrIzf9yPt+S949Ez3f+bnTe
+azCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBAM1monBIpnsu70AQ8Amf
+DujzO0MHLTm3VFWq2RYSgRiMEprO8Vya9V2WCToT7rTlqYgQmdl618bWan4mxR9j
+g7wJGhzr8Que3c00hgZMg6rJRVq9LaKulcdPl5n0gL9+OGedz5QS5OlrAGI9sMPE
+w5Ri6MV+VE6OoNmtjxhmQ5OqZsfzy0tHLKCUmRhA7YJTFarLZlYn7XiM7fMFiGvc
+LtEZ965K1I1VgZnsRsIs25ogoT36VKil+2bdpAnu0lrS+V0HSy97L+itl9tSWUEo
+pZCo0mPpuuaimNd6BLJjHTwJ6UyvuRzAPExKVYeepxaKDGtWhg/UMm5BBYkSVUUz
+V95JOE42P9zblbAT2kuWodMV64CZX+nUny+6gv8engCoW2OnEkn/JdWwdjLiBAEh
+XcgqEw/ygo/wzcpPAVqhn4chszOsDQ6D2D/325+d9rrBVDj+yaxZR5NRvag9NT/l
+hU7xiwZylDqurb8yzBnjxtc6dh5aLRDLZ/C8hvwMiVx9xCtheYyC6qmEVaL9H6sR
+oPqzJOuxLfYwVBn1caE0xjcgKTJWlylAY1yn/I5nmI+S7EkGBvtondYcniDanXQh
+jOcLgXqsLv2gjHfparIgfXi4znq7TIx0FAcfXeiRbybEVs78nwNZhblek7kbNavK
+PcIGtq1p4144hmbM5p5k9RF3vH1/nA7+AaXdhrKErvZszj0hGpqLpP6Rq+oYTuD6
++IpTpbBFMLDCYM7gPvVvFxXfphUETTSS4Iht7qL0w3z9pHk100TFpJgUpaQuX2Tg
+t0/asSJqLmtAlo1Pkq1VNqD+vHkmJVxlJzZbQO+w6KtiH59+p0fuMjf8AH6cA3aC
+/Xt2mFjRqO2xoZkJkgyX2JJ+db871cMED7U+hmS/WlGaWAmud7/pZiuJ9qpyr9bO
+MbMga5YyNdAOv6mUxrHEPvok7RkXR3Uj330CoOmTmTccvJ/ZuWGZ3ca/dC+jSGGJ
+jDaru3o8XpWhg1X5bHLZaXpLwmaV3ihFyCbxHlk6Da/a8Ov9xOHoaMdijRbzc0F7
+ZZe2st6uB/XimPZ1AbOYKPoIESLfy8QswzwJk29K2W7NQiOnlgTYQHP9nQkzazhF
+nvvD+JtUG/n4dmMKR9lUIJfCOmVfpvU2Hjr2/2pb4USwF5s/SVo7x4cmN/oOZlC4
+wDmLsog+iz7GEYrJCZZm9rDY0HE1GcNhfH4rpdAtDQ7qBNyU8PBvC/8Amff8Ric4
+QLcmdf+6/dD1g1K7mmR3f18eFY6GiRTGq9yoG/ke3FURzChqHO+SQjs4wlUZ2ttG
+cNcXamZ+ukQ9OE+cnfqHIKHLhodizsU9rNd4sZM47qS+BGHKrgGRj8gUPHlh1oHz
+5kcCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBH
+ZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFLkM8GAi1MW6KIjFXzHgpinM
+4BXmMB8GA1UdIwQYMBaAFPMdoF9pM4qktHaXom6r/aC/8yzOMA0GCSqGSIb3DQEB
+CwUAA4IBAQA9wTDAppEQezrW2S7inCMDSIhyOp4CTc3+tvcUdx8PmJQ/7ZB+ZA0t
+1E143Y8QixXQZV4YaOp8vvU6hOUjquHQFWEgPFwGCjPiOaYRFc9mdBCAnYbejD2b
+eArLh937h+YbdPmBV66SyNBieGMRbTQtP/OLguBmjw+UES5iBmsdXn9JkMabwyKr
+82I9kGGqPJYoVbKW7O0q8oiUeLkSrUJxDq3RgtuCNwvj7fVZUIeE5h1nJbV5w5AA
+bVlf7nKS6J5K5QcqChmOE70vH5ukwcriXR8x24DSUlVnuKZTGRhjI1tJPdYGf1fj
+Q94XGDKFlyDV3Yp+fDvQzIWW1ZY8KXaF
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem
index a383b35927573c5f5e13236cf2c345816d577b8c..701539f7ace080dc82dea823deafcdb821361750 100644
--- a/mysql-test/std_data/server8k-key.pem
+++ b/mysql-test/std_data/server8k-key.pem
@@ -1,99 +1,99 @@
-----BEGIN RSA PRIVATE KEY-----
-MIISKAIBAAKCBAEAs6eBz6ObPFcqjt4TCKYVamgIzqGg7/wylVqatcyEu6MVoPwp
-u3EO80AglzWSkok2al++pSRayA73U6jgdAWQOCGlJXIrVnB0qtYwJeCV3T1KSEsl
-p6jE6+XWEE+VQpGwy2gvv5YPCpsrAQ0Drj+3fvYewRRCBH8JIeg+h8Cz191PfpW2
-gzOPzPS7EY5mX7QyIouONJOCDwLRb4Wyp342DPMNkUb5pZHcYEoN6+U343bYE7tV
-MyNMs5DfaraAPfa9nb3v0416mmGsAj0QtcJT0n7uHJClsOjbcY/TU+SAsLbMsPLr
-RsPZPEgBHTpc0PIXnJqO/Co25xxZQWat4dOC2JXurtyrcpTLC4rf73D3+eJ3dmRn
-LQLcGtsC6V5jPz4H6WXkAnhiVeFSGFqjnFbdzdP38lVFYiDO/UGTucIgkCOkQU8w
-XF6gl2+kH4dql4dw+dVWt2rM8SjSJjRXZZwtQUOLbL0Vb+zOPp9NL6Yh2PdN0WNP
-8J4Ew4IzWDQgS4ENQg1EYkgbTM/gaeTI+JyYH3Q3Oj8jQDqIgMKcm7pquSw6Z6a2
-XIP9kz9uUxlI4z369Y4DQI/mr8XeqvhwdzYrbjrfvNf2x08Cf6GtLzzpCEUvVxrx
-W5wnBzpEQz4FsUobQqSQq85L98Gb191vBRH56KOhmWwuJz2xVG/rsuj45hJvimkF
-zMb2xC2wBrYhUChQ3IyyjGXO2StRuGJWcLRGTeRMoYYxPeMHf3PjCW7upykqgCOK
-tgwinkMcqYxHLAJtE++Ip9fRYNlrKICXirf/YmsoVA2rYzqsV54vlSv0oD2hYKBX
-Ggkj7vxNm0WD8gofs3cOmCCzFvyXAzD8qz5+/D52ZMtLTclsj6pw7APFgTFDEZr8
-LbollAtzfsE5AcpocBrvpLrcE9Y3FwkNyqohlLs+Q/2MgOZY/XUjWsofCy41ws13
-DHOzL5rkA2hYyD/zdo0FU9I02wmvcO1nC/8vZDUtcSJ68vIrfW2+gL0YODcBZ6Rf
-SClSeJ+1uIBwyhBq4Sc7wGFOlvjoD0Kx+rwF7zGROKsPp+8shsGrhTZ8EJ3HCmvm
-KxHd+kXn0sM6wc1gJ2gm14dJX+N/JiAfmaj5AKYN1ROBbvwnigNYaw46xyChXCTR
-CKZaHueBPSEFLktdGBTxT6tc5YHawSz2Ev8lCZcenVFtH2MunO19hkWwNXP2n4Jl
-vH9GiOGhYKE3UCac13bz3JSJbde+phehK3EUNxdf7Vo5mfxpr7tjVcZge2TYu7dK
-n7mqiUswH5zvI3qvfjHd+90K1QQKjFdvZIDr8+5sM9JywiRook6ZiBz3O10QzE7q
-pcsAQIqpYy4YkuuxKAX+Gep7MvtjViwLIAGSowIDAQABAoIEAG18dDwatQx9As62
-wFrQ/NQwOs3S6sXWqO0knoyU639+0Duf8b7uE/Ji7nm4iG8NeEAzwXfbRAgQNuKh
-VMjgaxgKSR8dCRRQzIkgp48t46dFJvQP+A7JZ9lr5J1kIs7DAz+zawYTaW9JSVgG
-mmujIS0ayXtZ4THkSaiEZTdOVUwE7+FxVB15WvXJYAg/BFzm8HblHfEkxGppiUGx
-9ULmRAJ4TZhv7Mzeq7Ny7jEJLJpPXzgHPtE/fgshC0d5mYYpzT1I99OxsTpMtAtZ
-M8nReEwcVvjJnnDGOJZo1J2X8GXBwdVE9eXWjZmTODqbytz77S/fcaxz/amzOSIG
-dYne4SsllKS0jzfxPhz2saq26ik7vxpD7i0cRQ+I0alvgISWRTQUiHSI8UTtYJ6+
-/l7VAa/isoTZOsOmwv7M7D6U9EtjrUKwBAUHFk+0Fg2w9WELhep7/bEiQWvnOMtX
-sruWBm5zv5CxW1MuujKn2t5jHNWhQaeOIrW9V6Hew3PJsLTTHUVX2Ikc8KZLObTP
-XTtGE993cADrYYxPH8l40QCHB2t6bM2maBTRy8PlMFMsYaM7rqnftlOuXyRYLm97
-oO7F8InpD1mDND4bBKbL3UOgl1QW9dbb8KOn8pERDXD9Z3K4ewyORiyuONXxBAz2
-QiaQ4gDJWD6sEySPEHcpDjemi6mKJFtDw935JxS2brso/NHoJSVdcNxisd2irA8P
-U8jyFTrTm7cO0nKFx9vv9r5dsbkqyQnJ9V0q4/DoWvnkPElKuvTeJMw6CvTjfvc1
-xIf8m3MQJTN8pqPpIOSj8DIhQIJBEVxtcajg+vlMuefR8hTCdLzQV2QEdLGjNGph
-OhFuHrHw1b3I4nCyi9MOLzpdUDgZkaw4hPg38u71RJ6bUF6pE89Yj04/svB7SZgA
-sE8+/pZcASZl1Y0T29OM3qFJvukBWwsNij5P5SLmTXDev+DXbzUvmVLCk8nJkJ5m
-n1peGst0ApHnEzxVhU+9d5FWBdIgN7fp7V2AlFt1r0TRWUYndBn9/B6xiyfd5iyK
-LpcbRjLpQ/9b3SYQZL9t65Hc40rP35rY0luQTzVd6E/D041E0NWdpAZai4GrpMKp
-NUBXBbmwnCZEzExLi78We6aF5tG9Vh+uxyYUXlrABR98jONgYIvnWaATaw6oLgam
-B84RhWUa1f+K70wrTorUO8QNvYO2n4jpwJikn4H9pFvvzzoOB7RaA+EF4HjaVmQr
-Jm6S18c7sksYFGIJYsPrXMtgOMQVYiQ3s8LDgsWKoEQYgvgxE24AoXGlXXbALrpo
-4WvRN7qLAm3n2OQYFUK0SGoELOADQFQhbNL91i0k4wzQ56ofQCb8aTmm3q76TnbK
-4gmIUIECggIBAOm3PhMqIKb3ZEZOWYMKByb7v8seuVh6mwXmgITcZIiA2f8rTfyH
-OZanYK72FsuGZEbf1ELwNUX0JobwklA1Uq9NajaJUdfe4wDpghf282APHK1nD3m3
-FX7Rsoof/dW9+bV/IIbQDwy+1ctB20m6dejt3kWyHSXly2y2L3bk1flee8oi+VCO
-ROp4u23KJcglIYlL+cL1z76lX41v8JW3deCTL/JStmK6zuvFhY5fTlOGxsLhAY3X
-VTZ0MNUpezlBaXTixi7ilgbh7rJSpCmeno5my1hdl/5Q5U/u5F5E7ZxKxlhuVWdA
-cf9qbtolSsgJ2w8axPD3dLnQ6wsNnl4yL77TdNr8OlbwIADXHH9VzZbfEgOhP4r9
-Cwz4hIUbylJ9QGZVsEVZhvqR3M6OgqlYOmC72nLPXVYbL/Rr7cTx8t+WJ4wJRP3l
-pi6AgDZXKbMKyMIhM1IscSR2swtAFyl6g6rcAjFyG+p1IKMOQ3YOqdVVUf5UYSpo
-NBTpJ+ho3CyQJK25yT2Maex5Q91M6Rk9vmXaIs+K40t/zu8cnCIH9j3In0BrpSi7
-WUyLgzXW+7ZrW7cugC93VVgjGNbgBiDimZ5duViI+xY+3OlrsUxzSHN+YY+8H2G2
-TfzT+Mgo8lJXH9tseFBLvRKhoPbbCyCwnOJ6k2k8/iqZ2eE7vQodyW/zAoICAQDE
-yK5Mlu0k3oTVasgYRNDYKJ9uyarVLaRcN6UjzNUSta2hABzQe/LG895EucK9yVa0
-4jT7EXILYQpHnQkaYtyHtN/deYWLRObT6RMws7te2MhwzQkaNavgi449dHP38TPS
-qy3Vh6v4nMhRjkhLqNiiJoDWThtkB216t+71GxdF2l9trrcvlC6q0Z65PR4LK3B/
-3m8KmlyGN940Ovb/4kEh2EZmNwbMq+3SaXiS4R7ZvKoboyNmwvCh4t5ne+NXz3Vm
-7srej0cnOM54dTuNVdXm6pajYjELNVJGsK0vo6CAZiAOyasFkwMFMr5w/ehBaZIo
-9ewWjvgDdvQ0+JBMVZJot7e5D4tUgVTaIMpQryzAp/u3r5KC1bkcC1Zie+44CaPr
-V2FspEyYQDPJHC2tRj33lbaCWDdfdhYhv6uzlcM9ExPj+RQA0xlCuxh1pxK43H4t
-PdWvcIeIKtFRWq9gsH1/wDBaIsB5Kykq4xyvMOj3dyV+dyIO1D3GG2+ZoBt8gklk
-ieDIzCMKsXbomgm64/Ewlx9tf1fbTouSWP1+Gh0Wne3sCEtCY72ebYgjtaA0w8Xr
-HGTsEdw/rSer46uULYWXYC6VYZwlyTbPh4NSD7ATrQo6HnaKugtuya9NPfYD9S9w
-PoXPXpNKvwSq9SA/XsodHet9uU+IlKnYI41hVGaukQKCAgEAu7dAFmh5vWFqmsWH
-Q6akQ/1j+KL+v0AKj1yp0Qyreq/zZ+3CP5fk+0oIb76cZG/Wzs4sUG9aeos0/qDv
-A5kwhjipnJACul38+diTcugYZgj9QZFLbrlMfIW03xf+6tQhYlNvLpih3dzRHuYQ
-WVF4LtQO+O+sVaoSD4js6pO2AQqQZrRchwUd+S1rbS0112FrZDkvrBV+/GMbMiC8
-naOy++N8WSdx8i6Uz+3f7ZBC+vd/YTsT4ncXrBr6tdsRa9VL/GPARhwb3/9LltKl
-pAAQ3dNWc+0IjW0wIVmA9u5p4mR0lsZXtgyfA0TbMD9PpwezeJhJojk++ZgBkOkp
-UAMDMkPo0ZJQ0U8ghUxBSU0DSbB1aZDz1pCTdaGN3tOJV2Pee9NLNwhHT64kKYtx
-Cs8gZF29gQVotCY2CB0/5jVmm4qgzOsNDNiM90CiugKcLX/162Z7L/8eCOmFuP2L
-HPeYFX2MDWbXYSMeSZjFOmdgpUZYCux+9m6nljwGn7bJUMmdjCNyrQrAcPydM3v4
-pRtgd7ISz5uAID3RWWAjT3oRn2Ip9rX++44ulTpg8rdviP8FtUWWE4nHdHkMFFnu
-0i7ur7Ibki7DbQSkrp6e0watJIZXmfjBQ9wHG5CteybYKqZrofOnVubeP76t6Ffa
-wjDYcVd+WsJwaosT4sH2fc+a4V0CggIAX703N+ISHGb6f47FLTGF3jTdZJxPNgpP
-teIIwUMtwz2K7RLN8gzr0Cnj0NID0iw7uCN6HVCeiLS8uJzJSgIhQxEX/XvbIify
-mdUC1iYLmhikZGUM8ah9J/Ed0f5vUYkTaoKH+SRZ4cn9l9g+ijjqtPFAq4Myxlbq
-x9LnOm7kwsJ8vTNMwqQ4lDkKHRuEG3EV+dAxfBofu9lAjW7GrzXX9Gxxy9cnwro/
-KajQ1b0bMloc9PdJCPz87/YduIFI2XcAqoSxRNi2iHmV0ntO7vN87yzg/zqNm+Nk
-VSouCEh2lSGapTcusraUuJm4l+agcfq39p+3Lj5+ocjlBUSNh+X2JmaDx1Ctu/50
-Vu+vHtQrVMwlpneQM4Fh3ygQ7jdXbgIasyw/JQlGjqhlyYmhG3VaPrOjKQVcY2Bj
-YiYLloLdi0BV5AtR1RjfaFz4iH0xmakE5mP4K7P27KPQVOFnBAa5+EZ7/856kDkU
-fV4jnYSRQ5y/LCkv88EFEPZWNIr19Hy60mRWbbsLrW8r5/zRkRDHTpmn27EiAHvV
-Ye1T3187Gb7ae4SJgRJftc2ad60s9Z7uEvYsj8Icwwoui+1nk98V6NENuPXVb3jW
-5t8KYAlr5BbDLAWYLORZHZyYYl8r6z8FxnlUxtA/nxUSY06BUvN+J+5fnTpkXJHf
-lF2vslPK5VECggIANpTlrc5Zp9c0jPOiBQT/92LdtMR9mB76WB8fX9xn1Tm7V/cI
-MatRrFzaTvi5HqHxPWJJ5cgMYKQw8kHHk1q9U7jeexZGCICFOUjk3N2Z0aXIWrx+
-hiS1i5DzRaZNI682s436cdaS4GpZIhqjIOR4/JS15Nfu+DVqyHOevWnd0D/tGoJB
-JpiePYl2k7b8sirM3bHnRDtBiMHrHyHxzpdTLImDLHXr7C5DTeQAzzo+YMu45mNm
-utKq3SRlO2wizj0qpONgJ6cHI7pypAPalliA+hPRRJqaHmTr7LpkP3+g73hf26wK
-PoF6CLkdaN945F4Z48/3zEOP3XRIQocMA46ayA+8TsOpx9rm8L1LrF1pgmJi5Ml9
-3yV93ZZ/w4Jy0pqZ28nn3gcX6JP7qtfgioLLeyuuBphpOQXl7Ys3w1d0EEErpATU
-tRG+BS16o+FhM1iXAN8c8HrqOtyJzCpYnuoWiNc+G8BIn6ox3xmihwK4hiR6s/OM
-Mxaa6T4FF/IWIzuCezYPGgybWMXj3nRHsD7eNP170irBLwS3GdD1HWM2BpmLdJa0
-m/7QQkONhCnNFtjIalfPWMX51z/8GOKRKWH5A8PY6CxVHRg1ZfHT4TlfbdRPIG8d
-6JrWt2s4eLv9VRdM+oMifHR4qvLDgg7R8pBr2FSsVXM9U2+j+drIeAhkjHI=
+MIISKAIBAAKCBAEAzWaicEimey7vQBDwCZ8O6PM7QwctObdUVarZFhKBGIwSms7x
+XJr1XZYJOhPutOWpiBCZ2XrXxtZqfibFH2ODvAkaHOvxC57dzTSGBkyDqslFWr0t
+oq6Vx0+XmfSAv344Z53PlBLk6WsAYj2ww8TDlGLoxX5UTo6g2a2PGGZDk6pmx/PL
+S0csoJSZGEDtglMVqstmVifteIzt8wWIa9wu0Rn3rkrUjVWBmexGwizbmiChPfpU
+qKX7Zt2kCe7SWtL5XQdLL3sv6K2X21JZQSilkKjSY+m65qKY13oEsmMdPAnpTK+5
+HMA8TEpVh56nFooMa1aGD9QybkEFiRJVRTNX3kk4TjY/3NuVsBPaS5ah0xXrgJlf
+6dSfL7qC/x6eAKhbY6cSSf8l1bB2MuIEASFdyCoTD/KCj/DNyk8BWqGfhyGzM6wN
+DoPYP/fbn532usFUOP7JrFlHk1G9qD01P+WFTvGLBnKUOq6tvzLMGePG1zp2Hlot
+EMtn8LyG/AyJXH3EK2F5jILqqYRVov0fqxGg+rMk67Et9jBUGfVxoTTGNyApMlaX
+KUBjXKf8jmeYj5LsSQYG+2id1hyeINqddCGM5wuBeqwu/aCMd+lqsiB9eLjOertM
+jHQUBx9d6JFvJsRWzvyfA1mFuV6TuRs1q8o9wga2rWnjXjiGZszmnmT1EXe8fX+c
+Dv4Bpd2GsoSu9mzOPSEamouk/pGr6hhO4Pr4ilOlsEUwsMJgzuA+9W8XFd+mFQRN
+NJLgiG3uovTDfP2keTXTRMWkmBSlpC5fZOC3T9qxImoua0CWjU+SrVU2oP68eSYl
+XGUnNltA77Doq2Ifn36nR+4yN/wAfpwDdoL9e3aYWNGo7bGhmQmSDJfYkn51vzvV
+wwQPtT6GZL9aUZpYCa53v+lmK4n2qnKv1s4xsyBrljI10A6/qZTGscQ++iTtGRdH
+dSPffQKg6ZOZNxy8n9m5YZndxr90L6NIYYmMNqu7ejxelaGDVflsctlpekvCZpXe
+KEXIJvEeWToNr9rw6/3E4ehox2KNFvNzQXtll7ay3q4H9eKY9nUBs5go+ggRIt/L
+xCzDPAmTb0rZbs1CI6eWBNhAc/2dCTNrOEWe+8P4m1Qb+fh2YwpH2VQgl8I6ZV+m
+9TYeOvb/alvhRLAXmz9JWjvHhyY3+g5mULjAOYuyiD6LPsYRiskJlmb2sNjQcTUZ
+w2F8fiul0C0NDuoE3JTw8G8L/wCZ9/xGJzhAtyZ1/7r90PWDUruaZHd/Xx4VjoaJ
+FMar3Kgb+R7cVRHMKGoc75JCOzjCVRna20Zw1xdqZn66RD04T5yd+ocgocuGh2LO
+xT2s13ixkzjupL4EYcquAZGPyBQ8eWHWgfPmRwIDAQABAoIEAQCAOFSowUFj3l2t
+4aTmbKtzEftpkT5TLDVyMO/JTo3WFAK9LvgOthD7deCWp8C4njFhZfOUhpHSZyEd
+VPhy6r1ekVQCv+q+NVMCeYo8vmDnKTOpPDUTu+Z2ACKEEdSZNaLiU+oz5kONzqTz
+rsz8uITayY/DUWQxkempWSXdtmDy+kmlAnRirrCWIY0cTdO2KkV5U/WzTMN6IIed
+0FNj+ZQkJhCudboP7FO2EX/uUPBZW4ssVGuqx8qTYUK4jKQ13EOcJiRyJHU4y7zj
+RZnACi6oiiqkAlERDmlZAauS7Dpgs1M28u8cmohJm5Ge0pQ9hrnP+7g+g1lj6CUb
+dx1R0IZGlfCXKlhdd5oOy6XWz9Z/Hczgf14XawpgUg7aUXOSt4YtRCsvlB47Mifn
+BZ44UmrnvBQgPWPxlQHyC7WtrP0X7xqd5AZWjElfTUuFbaeK14rK9YpRk34R4dIC
+BwuJsq6wJCqEQNx1cXu2wnAUrVMAIleABQzi0gc1iYq+JtlMqpnd9sBYzZTNc3W+
+BENTl/Kk7VXb58PoTi0B820WlAo0eVgeO12re61LNvZ6swLShYYI48FSCfGVqlGv
+8qidyR/bTxxpxriizSlC5awcPBn3VW5XwTo8521lMNh/iOIZEjGajqp4/dZzbC3N
+PMYZUmuRBn3c7R/pPmHwJHLGaAFv/+6riEJGesYOBMwaN1JdW5dLwG1obpiBgcSj
+Vx3IivRURHzPJiJKQBrmb9C+dzei5h7J2CuKyti3kvtQMAxOyQc+jbN78NWD1CRW
+FyEGya95dIMCDnbNxMP0Kzsai/7uuwWjEPySPHyw3UNKkctgrvOGhsxflmO+Len9
+bmKUqD5qrUKKijDnVrVjLfS7407rrRtMkBBtoC75FLKk/0c+EPaD+dCPF14X4oaj
+T1szKKjFhUqVSeP9/xgdcd7PpeKYYJkUII0n/eqB16V059z2VsMliWD+6Rf/dKHG
+RmIAHEEzX87RVIE9sNHqUpPCSbpUIRIs/oQ9cPhV1bLkNQvKOvPMhcblV7d0kYTE
+z3yTiLAw1tI2KklAswuzVa3HEo3JZL6+Y3WgXsSOSDLmEfFokCvKSuvZ4RoP5FY8
+ki6ModqTxeQF9EoGqWNJki6GysOupku6pRmLQIkROZr9x05riDAdquqiNwhZf3K3
+KDu1E8flBZ+IYjZojQ/6xho/FQ4j2kMqOSahyO+Xdzas++rd9Jj1bXryHeZ+pqF1
+YGl2AusiiTxrthT5vNboFl9PzyBP47G/frG2ljexGGNWOKFashBNwniANGSFgjag
+m+MPKM+fTA8s08+98sAwtoRY2Mor7jJbZvZahbHvKQ7oiYwAblWSp8AGZh2tOBXk
+2D6AP76JAoICAQD4f1Od5cu7Tf49JX/Y9HLaiFso7WFjQ090/rvTRumcVZ+CT1NG
+IayCg9fSbQEzmouOXXChJtPvRSoVjKb1K6zQDHYbXQgWyJ2zpaElI5RJejoh2IeW
+Y673m2cQAwE+n2mhY52InCNEcI0lSlv3aP4DMh20/LiuM7YUijUXNzUCOoQPk13u
++XIbTbjf0jSDsnAVCtCq1JUCPjBfdyGF5/KpY1bFOTn5Jl83TJyHyO0w6Y1zUuwI
+lfvqzSiK7CkJ5k3XPStKTGW7OE0wFrmXUdnaCSTkoVy496rNa9lhY59K0jfd8Ljz
+Z31oHznx5o40CJgvYqAAPjUp7eerTb+PHO6kA/2cPIVgtnawRtVz/MrpYbogAQug
+77L0ioYbCxvNM8aqKpVWdBcRco2trBkbwStGm2dQAz2N0462cj9u58GAowlx6oIz
+7jBGI/nNyVXcPGROWc/JMmFiWGi2I8smdrvFqNMnevzBmbtiZ7lhn8YmozHuLBDY
+7gtp4Wh6yCmACdizCwNuYywxG7KF9I8crgR/dHhyDLWFVO0Rtg+Ds+ptDiDt3vBq
+KzaviREYsZ54tBs62s32aVv9HiV2bC6giYyoR5tKUELzOC21aix5vwbkUsQ9om4l
+egbgK3nHsQVKUZowepMbzzygnF/raKxJZ88QbjDxdRjbadtDLsyhrfrc8wKCAgEA
+05o1fi2ewE8oDgrF3phRqlKNGzbpPFFvxKNjomTkse6aKbN2enQjYjD1sbUqDPFw
+p105qxJOHeUPetRd1aI5EealIud7XZxxeA2is9hEuXSPp8VGBrRKZ/rHu2QOSeZM
+0sJxXjZZKGqSPdzhBD3W/azL2ZfTwlmnBJ6acmhS0wTAne90N8uKE/bhfRv4WTfP
+m+vh+O4EWKDZ4PV59dgkY+km1E36+kM39cbDGWb3tkDcM1LVYjwWgpv4hLmEyp+e
+YiohVQrJpv669tY1uWUifLCfIHPCYPVsL5qlDN2GU+RPzvzWOGyvKaFVu6IKsLLg
+fq86z3QajmyCwjvhauYOLAhfjTDJivvCOR8PXV5GTCGeUR5SN2YGHXbLOFnm9j8/
+NHo2uNg9KTEsC2sYnTeuiGkNlKbO94ck6u06ibqFiaVi2pEntY3/Z6NLOLJqvmtJ
+O4DKcP9b8ZT72nwFbJ/e1YfANlbnZv1+ez9NRbxe6s3wXMrZmOSFkCc9XzKQgVQE
+dRngMQ4M0zA4cjlTScFFfiKk60WPvBZa5FYcv86d+/lwxDziYDywjMjWm12eOUQU
+7AProF8p1z2cpNIj4Rc4dGTy2goZyKh0iDQq/IIqKx5S2LW0NGN5StKD6Lgrgj7l
+DKCRPQXpCoxpsG+96EMYTWidDhOZ3M1E9mHNsmAIVl0CggIAZ5AhGBA6LTCfAXrM
+Ym3WJA9p9o+f48+coMS9IJtQJvBkTtmiefr0u1wZKUB2nLwO52E33GGjN/faRyrc
+NhdiqT5YRqUqBtzLJKClnSXL2iePbKWiNGIM/HKOrFSkQyYKztEGSXXRGOfTWzQ3
+SdA+9LQBP3mHukog20SSRb+jXu9mNFuVbVAWZxyoLNedPTmzjoF4X4nDJDEo1dB/
+byAwuLmG4yErcRO14QUTw19Qwu7DHcn0RsvDNqMT/3nWzKJn1IlQrmFSkIkxWhZO
+eKsLINxovMQnMYs+auhEq1rqezNLRzrYydBaqndBHfiZUUQ3sJ/o0NEcNQJKZ9E6
+QXmsVzy2iFOMvraslmCe+vzi0AsDl+z3nLXpHhNROpoRlx658BdZL7OoHYRhWXz8
+5d1GnOGNWAJRt/bwZkcM+rqpoWPRPuGeK+hbxA+gP0xmdSfSIfk6KL7PaT4xPZ+D
+Pd+D+CeZAL438rOQLb3Ou8nruhSPbZR93PqwVQs1EN60tQDliBDR+EJqm3jQmRVI
+Q4qeo0O2Isn7KLsxJg17P8dOru6ReLFN/uFNpDB6qJD125YsNwYTilt0k/PpZwZF
+FHDe5w8YwArdLCJAonfCW2bqh2ObF5jHUOUfUnOsCDZVXxjNKuEayB9BRCqHq0Nv
+chRKbq2NxkOn/WGLmN87NzKb91MCggIAb8n1Xr69Mr3e3GRGms1/v2qzT2BYIdyo
+HotvNLj2tSXn3gYInrLCirpw4rxiBcp8CH9Q2xblnBeKcQrGs/lrCxD9xw3h99eR
+fqo9faPQ0uVIi4rF7v7KnFo5sL8waUw449ODzxEJUzfSIMqTOgltjkD+xOrYHcH9
+YYxk7fI9Z2wIUqfRjzSBswBnqg/fyUqZ7LbWgAtG0ofP82/cScwxlXL0Z472+8YN
+R1QFeGMUlP15F8g4IRi7j67UwVG9XMqtAxFc4K+9TvMeVQ9f/Jz4dkVdG+jsFQsz
+Z4bckYpqz+E7ZI/goJiShXzNbT4zRZyKy4LJoBWnffzHq9O0yCPX8t1NlarjnwBY
+YJMPK/WFT+0m1ZYeO1Q0ANbkj9W3Ffrd6lxykn7y+NMYgMPIki57j2donFLv3odQ
+Mqi3l1GqAMkWC4BKKTlmaBs1vzNK/2RwoPXufXn62gsqbwe8WeGv+MEqA8svnxJn
+AreznBbjUksQJAWqpYJ9KWYBn0x4WUrIvBC6h0/z6JJ+D6JHZRytGPE2jXEHeYeZ
+5y2zLIX8osTqFVJRCiSl5QqpjhUMZRaZswJzNhtwYF0VZ2H5QI5i7eLzBcv2STLt
+tZNR7mrZ2kO/4utD07WFu8ixlX3OxpVxrpUZhdKchk0d/O9btdvUd/i/mFM0oxjy
+yPNsl0LyxKUCggIAXbIY5kkinU5HJeUb94lUemRsncjRT43lnfiuT5FImesSNDjI
+01clPU84KuUaT1R7OcUQ1jbIbOOFXLEwOcVZicrc5YYI7i0pzLETs4FDLYbM/iVe
+uuBADWDykaRAO5A8c5LL/k7Fx00bzI8Y5ea5aeFN9UD+Fzsq30EpJYbI38m/PObd
+PZ6Nm4vylKsNekBZgwD23cURQWf+YpjoY/a6SIvZcLR1Sa6ghcEPHOFyegmO0meE
+ffvTfOQMuehYboBqWDGUppWBcjrQ6L8+HIdvGF8t4yg5739puw+g3dcN71LLY5aj
+ixBCtEuKDsrMYyJrmbXAZ+PjM+u2yrCDWB49mh0WheNU3pmLJhrmndN7tf731R9m
+6rMkBflrxbFKpuEC5z/vm7U8oFgMNO1BYwvEnUIWskWiYLaqb3yYemKuw2GpyO2L
+ZymGmer57PukQlpNqcclJkUkm0eQe6VSdrPrQnRln+E9aZoOSPHghZkaW590zHb8
+B6ITN4Zp/PpfLiLhbngAs9VyQhabBjwey2QO3Q9fhgIplExu2Lhu9ZIi0vGLFrJS
+KAdS+6wCl4kVKJeFHWQLFoiQZ15tupHSfan0LfnDUIs8ai4oQYBs05s145vd2Ydd
+pPPSOjJ/JXy4rmj2dX6lgFKhkbc8E3EulnywIkjNP7J7mMLId0zWEbB//kc=
-----END RSA PRIVATE KEY-----
diff --git a/mysql-test/std_data/serversan-cert.pem b/mysql-test/std_data/serversan-cert.pem
index e47779f420dc07c2d0bd147e3f030b2cb9ef0c0a..b6494c29b003386313a6bec8240e043d9b69ac48 100644
--- a/mysql-test/std_data/serversan-cert.pem
+++ b/mysql-test/std_data/serversan-cert.pem
@@ -5,56 +5,56 @@ Certificate:
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity
- Not Before: Apr 25 20:52:33 2017 GMT
- Not After : Apr 20 20:52:33 2037 GMT
+ Not Before: Apr 24 14:29:50 2019 GMT
+ Not After : Apr 19 14:29:50 2039 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
- 00:a7:74:d4:2b:80:cb:96:08:2a:b9:c2:87:18:0d:
- 69:2b:da:cf:ef:21:cb:05:d4:80:2c:f3:85:bc:78:
- b2:42:d9:9f:f1:dc:47:68:c5:af:5a:c9:01:f0:dd:
- 91:cb:3a:b9:38:b2:36:6b:a3:66:ef:cd:44:0f:8f:
- 39:57:60:ad:3b:44:33:51:c2:7f:cb:5c:8d:55:b8:
- 1e:e8:80:e0:ed:9d:8d:10:7a:42:68:73:06:63:83:
- ce:db:05:5b:e1:7b:f9:0e:87:20:38:b8:11:6a:b7:
- 59:3d:4a:ca:cb:60:e6:e1:73:d9:a2:24:4a:70:93:
- 5e:cf:d5:04:d5:ad:ac:96:a5
+ 00:c4:ca:f5:53:66:e9:f7:48:39:dc:8c:d7:06:f4:
+ 03:3b:87:11:8e:8f:4d:a1:2b:b7:2a:38:37:6c:a2:
+ 34:2f:d4:9d:84:78:99:7f:6b:ec:c3:63:ea:e8:9c:
+ 57:af:a4:78:cf:59:5f:79:6b:29:11:2c:be:16:56:
+ 8f:7b:76:57:c9:36:d5:7f:58:10:f3:d1:c2:dc:09:
+ 17:f2:7b:fa:2d:71:c2:50:15:92:af:a0:58:32:f0:
+ 64:60:d3:9a:c6:3c:8a:31:e0:b6:b2:9f:29:7d:97:
+ 87:3c:62:bf:e6:8e:e7:2f:4a:ac:f7:fe:93:38:bc:
+ 86:d4:87:91:38:2d:ed:e2:0d
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Alternative Name:
- DNS:localhost
+ IP Address:127.0.0.1, DNS:localhost
Signature Algorithm: sha256WithRSAEncryption
- 4b:78:d9:09:4c:25:cc:fb:17:8f:31:13:ac:d7:36:2d:5f:d4:
- ce:94:84:d2:a7:fa:e2:1e:ae:b6:72:1f:01:56:0f:89:80:c0:
- 01:ba:ad:d7:cb:24:c5:25:ec:f8:35:ac:52:1b:4f:af:7c:26:
- 8d:d4:d4:91:05:21:b7:ba:3f:6b:1b:8d:1d:a5:6b:7e:7d:be:
- 2f:6a:09:83:c2:c3:6c:2f:8a:31:fa:7b:36:3f:6d:e1:62:ca:
- a0:3c:43:b8:53:5a:4a:b3:4d:7a:cb:9c:6e:db:a4:ce:a1:95:
- 5e:26:d8:22:39:8c:34:0e:92:bd:87:a2:b1:7a:68:25:57:17:
- b2:d8:43:3b:98:e4:80:6b:7d:3e:ab:32:82:6d:b8:80:45:83:
- d6:55:f8:cd:31:74:17:8c:42:75:09:71:66:b9:e0:94:16:ca:
- 1d:db:1e:89:12:a1:9f:00:cb:83:99:5d:5d:28:7a:df:2a:87:
- b5:8d:f1:9c:b9:89:2a:0d:6c:af:61:00:41:cb:03:df:99:4a:
- fe:93:81:88:ff:47:4e:2a:b5:2b:bf:85:0f:9a:21:7b:20:58:
- 7a:1c:67:b5:8b:da:db:03:69:25:db:76:0e:f9:23:57:8d:8a:
- 47:dc:15:16:7c:2d:66:8f:6a:10:f3:b2:ea:2e:31:c6:d4:2c:
- 90:15:56:f4
+ c5:83:b2:bb:a3:3b:a9:42:df:de:30:db:09:90:e1:3e:7a:19:
+ 09:4b:82:a3:1d:e8:23:3f:61:46:b7:98:b3:2e:90:61:7f:c5:
+ a1:36:a6:3e:b0:5b:3f:a1:23:70:7d:0f:71:5b:13:0f:be:73:
+ 1b:31:1a:b3:ce:f7:59:aa:b4:18:8d:37:e1:8c:07:af:10:18:
+ 4e:37:16:b2:67:73:5b:79:c6:30:16:ab:62:c5:c2:3e:72:06:
+ fd:b2:2a:f5:92:99:32:7e:ed:65:7e:bd:b2:74:9d:38:d4:d5:
+ 35:f8:06:dd:ac:85:75:e7:c2:6b:16:e8:2f:0f:c4:d3:b7:e7:
+ be:b6:cd:61:7b:29:e6:3a:c2:7c:38:46:fb:2c:a3:da:fe:84:
+ 5f:79:99:2f:80:3e:ec:09:88:f4:31:cd:5c:d1:32:a1:9f:1f:
+ 55:f2:9b:c6:4e:b2:26:04:9b:ee:04:42:d2:40:88:0e:c8:cf:
+ e0:6e:06:a1:6a:c8:1a:62:d0:7a:a4:19:4d:9c:e4:b6:57:e2:
+ 1d:19:57:54:58:1b:cc:bf:b8:29:e2:15:1e:f1:96:be:30:9e:
+ 4c:05:f9:90:e3:a1:7b:d7:e0:63:a6:d1:25:b1:80:81:f3:1b:
+ 55:4f:c1:64:9f:a1:06:01:8c:9a:15:64:b9:12:96:a8:22:4b:
+ 4a:d9:e3:04
-----BEGIN CERTIFICATE-----
-MIICuzCCAaOgAwIBAgIBBDANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
+MIICwTCCAamgAwIBAgIBBDANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
-c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTcwNDI1MjA1MjMzWhcNMzcwNDIw
-MjA1MjMzWjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
+c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwNDI0MTQyOTUwWhcNMzkwNDE5
+MTQyOTUwWjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZzZXJ2ZXIw
-gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKd01CuAy5YIKrnChxgNaSvaz+8h
-ywXUgCzzhbx4skLZn/HcR2jFr1rJAfDdkcs6uTiyNmujZu/NRA+POVdgrTtEM1HC
-f8tcjVW4HuiA4O2djRB6QmhzBmODztsFW+F7+Q6HIDi4EWq3WT1Kystg5uFz2aIk
-SnCTXs/VBNWtrJalAgMBAAGjGDAWMBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkq
-hkiG9w0BAQsFAAOCAQEAS3jZCUwlzPsXjzETrNc2LV/UzpSE0qf64h6utnIfAVYP
-iYDAAbqt18skxSXs+DWsUhtPr3wmjdTUkQUht7o/axuNHaVrfn2+L2oJg8LDbC+K
-Mfp7Nj9t4WLKoDxDuFNaSrNNesucbtukzqGVXibYIjmMNA6SvYeisXpoJVcXsthD
-O5jkgGt9Pqsygm24gEWD1lX4zTF0F4xCdQlxZrnglBbKHdseiRKhnwDLg5ldXSh6
-3yqHtY3xnLmJKg1sr2EAQcsD35lK/pOBiP9HTiq1K7+FD5oheyBYehxntYva2wNp
-Jdt2DvkjV42KR9wVFnwtZo9qEPOy6i4xxtQskBVW9A==
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMTK9VNm6fdIOdyM1wb0AzuHEY6P
+TaErtyo4N2yiNC/UnYR4mX9r7MNj6uicV6+keM9ZX3lrKREsvhZWj3t2V8k21X9Y
+EPPRwtwJF/J7+i1xwlAVkq+gWDLwZGDTmsY8ijHgtrKfKX2Xhzxiv+aO5y9KrPf+
+kzi8htSHkTgt7eINAgMBAAGjHjAcMBoGA1UdEQQTMBGHBH8AAAGCCWxvY2FsaG9z
+dDANBgkqhkiG9w0BAQsFAAOCAQEAxYOyu6M7qULf3jDbCZDhPnoZCUuCox3oIz9h
+RreYsy6QYX/FoTamPrBbP6EjcH0PcVsTD75zGzEas873Waq0GI034YwHrxAYTjcW
+smdzW3nGMBarYsXCPnIG/bIq9ZKZMn7tZX69snSdONTVNfgG3ayFdefCaxboLw/E
+07fnvrbNYXsp5jrCfDhG+yyj2v6EX3mZL4A+7AmI9DHNXNEyoZ8fVfKbxk6yJgSb
+7gRC0kCIDsjP4G4GoWrIGmLQeqQZTZzktlfiHRlXVFgbzL+4KeIVHvGWvjCeTAX5
+kOOhe9fgY6bRJbGAgfMbVU/BZJ+hBgGMmhVkuRKWqCJLStnjBA==
-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/serversan-key.pem b/mysql-test/std_data/serversan-key.pem
index 393c0bc9c1ad68a1a03768d7b9364b419833b4a9..0fcb42b4f63dfab86231dceb48c829c9dab874a9 100644
--- a/mysql-test/std_data/serversan-key.pem
+++ b/mysql-test/std_data/serversan-key.pem
@@ -1,16 +1,16 @@
-----BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKd01CuAy5YIKrnC
-hxgNaSvaz+8hywXUgCzzhbx4skLZn/HcR2jFr1rJAfDdkcs6uTiyNmujZu/NRA+P
-OVdgrTtEM1HCf8tcjVW4HuiA4O2djRB6QmhzBmODztsFW+F7+Q6HIDi4EWq3WT1K
-ystg5uFz2aIkSnCTXs/VBNWtrJalAgMBAAECgYBReSgZmmpzLroK8zhjXXMEIUv1
-3w02YvOR61HwJxEkMVn+hNxBf50XoKDPHh5nMMUZbqvHpxLYLZilsVuGxcTCPVzw
-YxTooPcJY8x61oUclI2Ls5czu/OfzoJhA9ESaFn6e4xReUFmNi8ygTMuPReZZ90T
-ZvDikonKtCCk99MSaQJBANrmlPtfY57KJ18f1TqLvqy73I1vQjffSOrK3deYbvvB
-jUJ79G9Wzj8Hje2y+XkkK+OIPcND1DnoTCTuqVazn+cCQQDD1jy8zrVg/JEPhQkS
-BM7nvm4PIb0cgTPrOhsHDIF4hbaAZnA0N4ZEJ2q7YitXfOeR98x+aH/WJOrzzhmE
-VXOTAkBQ4lK6b4zH57qUk5aeg3R5LxFX0XyOWJsA5uUB/PlFXUdtAZBYc6LR92Ci
-LDeyY4M0F+t6c12/5+3615UKzGSRAkA+SGV6utcOqGTOJcZTt7nCFFtWbqmBZkoH
-1qv/2udWWFhJj8rBoKMQC+UzAS69nVjcoI2l6kA17/nVXkfZQYAHAkEAmOHCZCVQ
-9CCYTJICvoZR2euUYdnatLN8d2/ARWjzcRDTdS82P2oscATwAsvJxsphDmbOmVWP
-Hfy1t8OOCHKYAQ==
+MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAMTK9VNm6fdIOdyM
+1wb0AzuHEY6PTaErtyo4N2yiNC/UnYR4mX9r7MNj6uicV6+keM9ZX3lrKREsvhZW
+j3t2V8k21X9YEPPRwtwJF/J7+i1xwlAVkq+gWDLwZGDTmsY8ijHgtrKfKX2Xhzxi
+v+aO5y9KrPf+kzi8htSHkTgt7eINAgMBAAECgYAKFt29COm1494TkKT1lk0UIDim
+NnKkcLlTUM6Go0pJqXzp7cTw43egDN9eTaWxO512A/8BGp1gZAra2lVA3zBg6Yqb
+QYJwT2s/DsCwFU0msw1sUr5ynJ4A/jQCwR6RzaP2xoJTPaczpoE+RiOmgvQ14GF4
+sJEfAIJCw5OglICTgQJBAOK3yeiMSF6ic8OORkOHy8LdQAFGOsKwliQltxzvRXYZ
+dWlHHAX+9l6rVC+o0rbooO4QEfJHn9ojjROr5+iIn2cCQQDeNbljgN+6K36r9Qmh
+fuBy2Ot+wRO30T4ASFelgJ0aHYEngSGSRneMmbbgDFx7v7Y9k6yY9RPiSqYX+vCQ
+425rAkAjfkpp0axyxFQDRX7Si6vmseSXTntch3C57/2e1ga12n57INrORYAkigYA
+ABoc8IZhPrrQh04LRI2Nitgfm2P5AkBmqEFGk/JIKvHxdVoGrvv4cviQ7ZgzcsqH
+DOTZBAsQVpMlcgXVcxKl9RnEdlF/pjkGR6QUYhzWjZAgQgFDnp6TAkBqIXYMvyp7
+JRfbnhze+UBgjeCoE/wTv/DiXL1yi4uVVVm8luToFv9DPAyvms/guJ7Ade5HDHye
+M/LZbE37/NYP
-----END PRIVATE KEY-----
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 959329d1641ff8202c344e796b3061bccab62387..f90679e6f1f6921b0813b1a97a930a4a7e3d229c 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -72,10 +72,15 @@ sub skip_combinations {
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.1d";
+
$skip{'t/ssl_7937.combinations'} = [ 'x509v3' ]
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.2";
+ $skip{'t/ssl_verify_ip.test'} = 'x509v3 support required'
+ unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
+ and $1 ge "1.0.2";
+
%skip;
}
diff --git a/mysql-test/suite/archive/archive_eits.result b/mysql-test/suite/archive/archive_eits.result
new file mode 100644
index 0000000000000000000000000000000000000000..e077c2e495417a1b2f49152385d2bce96e25f308
--- /dev/null
+++ b/mysql-test/suite/archive/archive_eits.result
@@ -0,0 +1,24 @@
+drop table if exists t1;
+#
+# MDEV-17297: stats.records=0 for a table of Archive engine when it has rows, when we run ANALYZE command
+#
+CREATE TABLE t1 (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT)engine=archive;
+INSERT INTO t1 VALUES
+(101, PointFromText('POINT(10 10)')),
+(102, PointFromText('POINT(20 10)')),
+(103, PointFromText('POINT(20 20)')),
+(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
+set @tmp1= @@optimizer_use_condition_selectivity;
+set @tmp2= @@use_stat_tables;
+set optimizer_use_condition_selectivity=4;
+set use_stat_tables=PREFERABLY;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze note The storage engine for the table doesn't support analyze
+select * from mysql.table_stats where table_name='t1' and db_name=database();
+db_name table_name cardinality
+test t1 4
+drop table t1;
+set optimizer_use_condition_selectivity=@tmp1;
+set use_stat_tables=@tmp2;
diff --git a/mysql-test/suite/archive/archive_eits.test b/mysql-test/suite/archive/archive_eits.test
new file mode 100644
index 0000000000000000000000000000000000000000..04c4ccdb709fe2eda6b7c17c8012f6772fd0a35e
--- /dev/null
+++ b/mysql-test/suite/archive/archive_eits.test
@@ -0,0 +1,32 @@
+-- source include/have_archive.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+--echo #
+--echo # MDEV-17297: stats.records=0 for a table of Archive engine when it has rows, when we run ANALYZE command
+--echo #
+
+CREATE TABLE t1 (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT)engine=archive;
+INSERT INTO t1 VALUES
+(101, PointFromText('POINT(10 10)')),
+(102, PointFromText('POINT(20 10)')),
+(103, PointFromText('POINT(20 20)')),
+(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
+
+set @tmp1= @@optimizer_use_condition_selectivity;
+set @tmp2= @@use_stat_tables;
+
+set optimizer_use_condition_selectivity=4;
+set use_stat_tables=PREFERABLY;
+ANALYZE TABLE t1;
+
+select * from mysql.table_stats where table_name='t1' and db_name=database();
+
+drop table t1;
+
+set optimizer_use_condition_selectivity=@tmp1;
+set use_stat_tables=@tmp2;
+
+
diff --git a/mysql-test/suite/binlog/r/binlog_innodb_stm.result b/mysql-test/suite/binlog/r/binlog_innodb_stm.result
new file mode 100644
index 0000000000000000000000000000000000000000..829ed7d3c61c43d2488dfa8282bf285cde861f6f
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_innodb_stm.result
@@ -0,0 +1,17 @@
+create table categories(
+cat_id int not null primary key,
+cat_name varchar(255) not null,
+cat_description text
+) engine=innodb;
+create table products(
+prd_id int not null auto_increment primary key,
+prd_name varchar(355) not null,
+prd_price decimal,
+cat_id int not null,
+foreign key fk_cat(cat_id)
+references categories(cat_id)
+on update cascade
+) engine=innodb;
+insert into categories values (1, 'drinks', 'drinks');
+update categories set cat_description=2 where cat_id=1;
+drop table products, categories;
diff --git a/mysql-test/suite/binlog/r/binlog_mdev717.result b/mysql-test/suite/binlog/r/binlog_mdev717.result
index 82f8e5a6e3f9f6c2396850c03bb41a289fbc9fc3..594032e7dd4582a33908cd9dabd4135f5776ade3 100644
--- a/mysql-test/suite/binlog/r/binlog_mdev717.result
+++ b/mysql-test/suite/binlog/r/binlog_mdev717.result
@@ -15,6 +15,8 @@ CREATE EVENT mysqltest.e1 ON SCHEDULE EVERY 15 MINUTE DO BEGIN END;
ERROR 42000: Unknown database 'mysqltest'
CREATE DATABASE mysqltest;
CREATE EVENT mysqltest.e1 ON SCHEDULE EVERY 15 MINUTE DO BEGIN END;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SET DEBUG_SYNC= "after_wait_locked_schema_name SIGNAL locked WAIT_FOR release";
DROP DATABASE mysqltest;;
SET DEBUG_SYNC= "now WAIT_FOR locked";
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
index 2719091f4dd2e5d2394c8bbf4d5a72f69498a8ee..08c6651d6e39379e0be7742cb18df85d2163b98c 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
@@ -1,8 +1,8 @@
set sql_mode="";
drop table if exists t1;
-reset master;
-set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22");
+set @a=UNIX_TIMESTAMP("1970-01-21 15:32:22");
set timestamp=@a;
+reset master;
create table t1 (a int auto_increment not null primary key, b char(3));
insert into t1 values(null, "a");
insert into t1 values(null, "b");
@@ -22,7 +22,7 @@ insert into t1 values(null, "f");
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -36,46 +36,46 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -94,7 +94,7 @@ BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -105,43 +105,43 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -160,7 +160,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -171,25 +171,25 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -205,7 +205,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -219,19 +219,19 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -250,7 +250,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -277,7 +277,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -288,25 +288,25 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -322,7 +322,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -336,19 +336,19 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -365,7 +365,7 @@ flush logs;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -379,46 +379,46 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -427,7 +427,7 @@ BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -438,7 +438,7 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -457,7 +457,7 @@ BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -468,43 +468,43 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -513,7 +513,7 @@ BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -524,7 +524,7 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -543,7 +543,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -554,25 +554,25 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -581,7 +581,7 @@ BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -592,7 +592,7 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -608,7 +608,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -622,46 +622,46 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -684,7 +684,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -695,25 +695,25 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -722,7 +722,7 @@ BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -733,7 +733,7 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -749,7 +749,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -763,19 +763,19 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -791,7 +791,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -805,46 +805,46 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -863,7 +863,7 @@ BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -874,43 +874,43 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -928,7 +928,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -939,25 +939,25 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -973,7 +973,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -987,19 +987,19 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1017,7 +1017,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1044,7 +1044,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1055,25 +1055,25 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1089,7 +1089,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1103,19 +1103,19 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1131,7 +1131,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1145,46 +1145,46 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1193,7 +1193,7 @@ BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1204,7 +1204,7 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1223,7 +1223,7 @@ BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1234,43 +1234,43 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1279,7 +1279,7 @@ BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1290,7 +1290,7 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1308,7 +1308,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1319,25 +1319,25 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1346,7 +1346,7 @@ BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1357,7 +1357,7 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1373,7 +1373,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1387,46 +1387,46 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1447,7 +1447,7 @@ BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1458,25 +1458,25 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1485,7 +1485,7 @@ BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1496,7 +1496,7 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1512,7 +1512,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1526,19 +1526,19 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
DELIMITER ;
@@ -1554,7 +1554,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1568,55 +1568,55 @@ create table t1 (a int auto_increment not null primary key, b char(3))
BEGIN
/*!*/;
SET INSERT_ID=1/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "a")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=2/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
insert into t1 values(null, "b")
/*!*/;
-SET TIMESTAMP=1579609942/*!*/;
+SET TIMESTAMP=1773142/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=3/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
insert into t1 values(null, "c")
/*!*/;
-SET TIMESTAMP=1579609944/*!*/;
+SET TIMESTAMP=1773144/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=4/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "d")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=5/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
insert into t1 values(null, "e")
/*!*/;
-SET TIMESTAMP=1579609946/*!*/;
+SET TIMESTAMP=1773146/*!*/;
COMMIT
/*!*/;
BEGIN
/*!*/;
SET INSERT_ID=6/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
insert into t1 values(null, "f")
/*!*/;
-SET TIMESTAMP=1579609943/*!*/;
+SET TIMESTAMP=1773143/*!*/;
COMMIT
/*!*/;
DELIMITER ;
diff --git a/mysql-test/suite/binlog/r/binlog_sql_mode.result b/mysql-test/suite/binlog/r/binlog_sql_mode.result
index 1aea77c4a4bd937bc60b8bd64858efdd49295254..27ba30b5e4f4bb295814b241b2808af4fc94f9e0 100644
--- a/mysql-test/suite/binlog/r/binlog_sql_mode.result
+++ b/mysql-test/suite/binlog/r/binlog_sql_mode.result
@@ -21,6 +21,8 @@ DO
BEGIN
UPDATE t1 SET id = id +1;
END;|
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
Check Result
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug39526.binlog"))
diff --git a/mysql-test/suite/binlog/t/binlog_innodb_stm.test b/mysql-test/suite/binlog/t/binlog_innodb_stm.test
new file mode 100644
index 0000000000000000000000000000000000000000..4dfa7a765841a34087c8b73c858a1c615aff999c
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_innodb_stm.test
@@ -0,0 +1,26 @@
+source include/have_innodb.inc;
+source include/have_binlog_format_statement.inc;
+
+#
+# MDEV-18466 Unsafe to log updates on tables referenced by foreign keys with triggers in statement format
+#
+
+create table categories(
+ cat_id int not null primary key,
+ cat_name varchar(255) not null,
+ cat_description text
+) engine=innodb;
+
+create table products(
+ prd_id int not null auto_increment primary key,
+ prd_name varchar(355) not null,
+ prd_price decimal,
+ cat_id int not null,
+ foreign key fk_cat(cat_id)
+ references categories(cat_id)
+ on update cascade
+) engine=innodb;
+
+insert into categories values (1, 'drinks', 'drinks');
+update categories set cat_description=2 where cat_id=1;
+drop table products, categories;
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
index 76d6abf4d185bc8ba36fdc0d2dcc454e95f123d0..66197c530ecfdc9b752c8e880bcb705c5729dbc4 100644
--- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
@@ -9,15 +9,15 @@ set sql_mode="";
--disable_warnings
drop table if exists t1;
--enable_warnings
-reset master;
# We need this for getting fixed timestamps inside of this test.
-# I use a date in the future to keep a growing timestamp along the
+# I use a date in the past to keep a growing timestamp along the
# binlog (including the Start_log_event). This test will work
# unchanged everywhere, because mysql-test-run has fixed TZ, which it
# exports (so mysqlbinlog has same fixed TZ).
-set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22");
+set @a=UNIX_TIMESTAMP("1970-01-21 15:32:22");
set timestamp=@a;
+reset master;
create table t1 (a int auto_increment not null primary key, b char(3));
insert into t1 values(null, "a");
insert into t1 values(null, "b");
@@ -71,11 +71,11 @@ let $stop_pos= `select @binlog_start_pos + 857`;
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001
+--exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- stop-datetime --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001
+--exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001
--disable_query_log
select "--- Local with 2 binlogs on command line --" as "";
@@ -103,11 +103,11 @@ let $stop_pos= `select @binlog_start_pos + 134`;
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
+--exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log
select "--- stop-datetime --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
+--exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log
select "--- Remote --" as "";
@@ -138,11 +138,11 @@ let $stop_pos= `select @binlog_start_pos + 812`;
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
+--exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- stop-datetime --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
+--exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log
select "--- Remote with 2 binlogs on command line --" as "";
@@ -167,11 +167,11 @@ let $stop_pos= `select @binlog_start_pos + 109`;
--disable_query_log
select "--- start-datetime --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form "--start-datetime=20200121153224" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
+--exec $MYSQL_BINLOG --short-form "--start-datetime=19700121153224" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- stop-datetime --" as "";
--enable_query_log
---exec $MYSQL_BINLOG --short-form "--stop-datetime=2020/01/21 15@32@24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
+--exec $MYSQL_BINLOG --short-form "--stop-datetime=1970/01/21 15@32@24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log
select "--- to-last-log --" as "";
diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff
index cd66df7440b74f7032e0208f8ed08b2ddaadd779..d963cde132ad44074fc94b6606e8ac54231677ca 100644
--- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff
+++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff
@@ -1,5 +1,5 @@
--- suite/encryption/r/innodb-checksum-algorithm.result
-+++ suite/encryption/r/innodb-checksum-algorithm,32k.reject
++++ suite/encryption/r/innodb-checksum-algorithm.result
@@ -13,9 +13,9 @@
SET GLOBAL innodb_default_encryption_key_id=4;
SET GLOBAL innodb_checksum_algorithm=crc32;
@@ -9,10 +9,10 @@
create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
+ Warnings:
+ Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_crc32(a serial, b blob, index(b(10))) engine=innodb
- encrypted=yes;
- create table t_crc32(a serial, b blob, index(b(10))) engine=innodb
-@@ -222,9 +222,9 @@
+@@ -153,9 +153,9 @@
t_crc32, tpe_crc32, tp_crc32;
SET GLOBAL innodb_checksum_algorithm=innodb;
create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb
@@ -21,10 +21,10 @@
create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
+ Warnings:
+ Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_innodb(a serial, b blob, index(b(10))) engine=innodb
- encrypted=yes;
- create table t_innodb(a serial, b blob, index(b(10))) engine=innodb
-@@ -431,9 +431,9 @@
+@@ -293,9 +293,9 @@
t_innodb, tpe_innodb, tp_innodb;
SET GLOBAL innodb_checksum_algorithm=none;
create table tce_none(a serial, b blob, index(b(10))) engine=innodb
@@ -33,6 +33,6 @@
create table tc_none(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
+ Warnings:
+ Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_none(a serial, b blob, index(b(10))) engine=innodb
- encrypted=yes;
- create table t_none(a serial, b blob, index(b(10))) engine=innodb
diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff
index 523074297da27fecd32cf827adda9ccc899fa9d6..d963cde132ad44074fc94b6606e8ac54231677ca 100644
--- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff
+++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff
@@ -1,5 +1,5 @@
--- suite/encryption/r/innodb-checksum-algorithm.result
-+++ suite/encryption/r/innodb-checksum-algorithm,64k.reject
++++ suite/encryption/r/innodb-checksum-algorithm.result
@@ -13,9 +13,9 @@
SET GLOBAL innodb_default_encryption_key_id=4;
SET GLOBAL innodb_checksum_algorithm=crc32;
@@ -9,10 +9,10 @@
create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
+ Warnings:
+ Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_crc32(a serial, b blob, index(b(10))) engine=innodb
- encrypted=yes;
- create table t_crc32(a serial, b blob, index(b(10))) engine=innodb
-@@ -222,9 +222,9 @@
+@@ -153,9 +153,9 @@
t_crc32, tpe_crc32, tp_crc32;
SET GLOBAL innodb_checksum_algorithm=innodb;
create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb
@@ -21,10 +21,10 @@
create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
+ Warnings:
+ Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_innodb(a serial, b blob, index(b(10))) engine=innodb
- encrypted=yes;
- create table t_innodb(a serial, b blob, index(b(10))) engine=innodb
-@@ -431,9 +431,9 @@
+@@ -293,9 +293,9 @@
t_innodb, tpe_innodb, tp_innodb;
SET GLOBAL innodb_checksum_algorithm=none;
create table tce_none(a serial, b blob, index(b(10))) engine=innodb
@@ -33,6 +33,6 @@
create table tc_none(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
+ Warnings:
+ Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_none(a serial, b blob, index(b(10))) engine=innodb
- encrypted=yes;
- create table t_none(a serial, b blob, index(b(10))) engine=innodb
diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
index 7fdea4b67b5c75428208fdada721c7cd88817128..6fa2e7c594f99c1fe8fdf3ee75c8ce8beb82548d 100644
--- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
+++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
@@ -16,14 +16,20 @@ create table tce_crc32(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=yes;
create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_crc32(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_crc32(a serial, b blob, index(b(10))) engine=innodb
encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table tpe_crc32(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=yes;
create table tp_crc32(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
begin;
insert into tce_crc32(b) values (repeat('secret',20));
insert into tc_crc32(b) values (repeat('secret',20));
@@ -150,14 +156,20 @@ create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=yes;
create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_innodb(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_innodb(a serial, b blob, index(b(10))) engine=innodb
encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table tpe_innodb(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=yes;
create table tp_innodb(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
begin;
insert into tce_innodb(b) values (repeat('secret',20));
insert into tc_innodb(b) values (repeat('secret',20));
@@ -284,14 +296,20 @@ create table tce_none(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=yes;
create table tc_none(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table te_none(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_none(a serial, b blob, index(b(10))) engine=innodb
encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
create table tpe_none(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=yes;
create table tp_none(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
begin;
insert into tce_none(b) values (repeat('secret',20));
insert into tc_none(b) values (repeat('secret',20));
diff --git a/mysql-test/suite/encryption/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
index ce73b80820fbd2f092025260ef5e2045568738f2..4187877be49694bee15fa96947743066bd63d28a 100644
--- a/mysql-test/suite/encryption/r/innodb-compressed-blob.result
+++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
@@ -7,6 +7,8 @@ set GLOBAL innodb_default_encryption_key_id=4;
create table t1(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed;
create table t2(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
create table t3(a int not null primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=no;
+Warnings:
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
insert into t1 values (1, repeat('secret',6000));
insert into t2 values (1, repeat('secret',6000));
insert into t3 values (1, repeat('secret',6000));
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
index 5245d1da7d0e0db5d2f5cb0ef4216394a0fe1abb..b2f33b2b24d4aef5f31d8e64b7978e0a1fdf6225 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
@@ -4,9 +4,16 @@ SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=4;
Warnings:
-Warning 140 InnoDB: Ignored ENCRYPTION_KEY_ID 4 when encryption is disabled
+Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1
DROP TABLE t1;
+set @save_global = @@GLOBAL.innodb_default_encryption_key_id;
set innodb_default_encryption_key_id = 99;
+Warnings:
+Warning 1210 innodb_default_encryption_key=99 is not available
+set global innodb_default_encryption_key_id = 99;
+Warnings:
+Warning 1210 innodb_default_encryption_key=99 is not available
+set global innodb_default_encryption_key_id = @save_global;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
@@ -40,8 +47,6 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`pk`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTION_KEY_ID`=4
CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=1;
-Warnings:
-Warning 140 InnoDB: Ignored ENCRYPTION_KEY_ID 1 when encryption is disabled
ALTER TABLE t1 ENCRYPTION_KEY_ID=99;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
SHOW WARNINGS;
@@ -53,37 +58,29 @@ drop table t1,t2;
SET GLOBAL innodb_encrypt_tables=OFF;
CREATE TABLE t1 (a int not null primary key) engine=innodb;
ALTER TABLE t1 ENCRYPTION_KEY_ID=4;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
-SHOW WARNINGS;
-Level Code Message
-Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTION_KEY_ID`=4
DROP TABLE t1;
CREATE TABLE t2 (a int not null primary key) engine=innodb;
ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 `ENCRYPTION_KEY_ID`=4
DROP TABLE t2;
CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4;
-ERROR HY000: Can't create table `test`.`t3` (errno: 140 "Wrong create options")
+DROP TABLE t3;
+SET GLOBAL innodb_encrypt_tables='FORCE';
+CREATE TABLE t1 (a int primary key) engine=innodb encrypted=no;
+ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
-Error 1005 Can't create table `test`.`t3` (errno: 140 "Wrong create options")
+Warning 140 InnoDB: ENCRYPTED=NO cannot be used with innodb_encrypt_tables=FORCE
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
index 9465226dd967b05dc63528d87a5833066585b18b..711beeef1e1457d7bb4ca348bb0c71dad7b7936e 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
@@ -19,7 +19,10 @@ SET GLOBAL innodb_encryption_threads = 4;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=4;
DROP TABLE t1;
+set @save_global = @@GLOBAL.innodb_default_encryption_key_id;
set innodb_default_encryption_key_id = 99;
+set global innodb_default_encryption_key_id = 99;
+set global innodb_default_encryption_key_id = @save_global;
--error 1005
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB;
SHOW WARNINGS;
@@ -90,25 +93,26 @@ drop table t1,t2;
#
# MDEV-17230: encryption_key_id from alter is ignored by encryption threads
#
+--enable_warnings
SET GLOBAL innodb_encrypt_tables=OFF;
CREATE TABLE t1 (a int not null primary key) engine=innodb;
---error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ENCRYPTION_KEY_ID=4;
-SHOW WARNINGS;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE TABLE t2 (a int not null primary key) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
---error ER_CANT_CREATE_TABLE
ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-SHOW WARNINGS;
SHOW CREATE TABLE t2;
DROP TABLE t2;
---error ER_CANT_CREATE_TABLE
CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4;
+DROP TABLE t3;
+
+SET GLOBAL innodb_encrypt_tables='FORCE';
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE t1 (a int primary key) engine=innodb encrypted=no;
SHOW WARNINGS;
# reset system
diff --git a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc
index cd060e7a370a500ee38c9bc6984344d3a9397fe0..a2e701cc5fa774f01cbf9105a71a55a2c5482bfc 100644
--- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc
+++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc
@@ -156,6 +156,7 @@ WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1
--source include/wait_condition.inc
--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE $table;
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SHOW $table;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -176,6 +177,7 @@ connection con100;
# but "ddicttestuser1" must not see anything of the root session.
--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE $table;
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
eval SHOW $table;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -202,6 +204,7 @@ GRANT PROCESS ON *.* TO ddicttestuser1@'localhost' IDENTIFIED BY 'ddictpass';
--echo ####################################################################################
connection con100;
SHOW GRANTS;
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -214,6 +217,7 @@ SELECT * FROM information_schema.processlist;
--echo ####################################################################################
connect (con101,localhost,ddicttestuser1,ddictpass,information_schema);
SHOW GRANTS;
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -237,6 +241,7 @@ GRANT PROCESS ON *.* TO ''@'localhost';
--echo ####################################################################################
connect (anonymous1,localhost,"''",,information_schema);
SHOW GRANTS;
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -259,6 +264,7 @@ connect (con102,localhost,ddicttestuser1,ddictpass,information_schema);
--echo ddicttestuser1 are visible.
--echo ####################################################################################
SHOW GRANTS;
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -284,6 +290,7 @@ SHOW GRANTS FOR ''@'localhost';
if ($fixed_bug_30395)
{
# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
}
@@ -306,6 +313,7 @@ connect (con103,localhost,ddicttestuser1,ddictpass,information_schema);
--echo Only the processes of ddicttestuser1 user are visible.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -328,6 +336,7 @@ connect (con104,localhost,ddicttestuser1,ddictpass,information_schema);
--echo Only the processes of ddicttestuser1 are visible.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -375,6 +384,7 @@ connect (con200,localhost,ddicttestuser2,ddictpass,information_schema);
--echo ddicttestuser2 has now the PROCESS privilege and sees all connections
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -396,6 +406,7 @@ connect (con201,localhost,ddicttestuser2,ddictpass,information_schema);
--echo ddicttestuser2 has no more the PROCESS privilege and can only see own connects
--echo ####################################################################################
SHOW GRANTS;
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -419,6 +430,7 @@ connect (con107,localhost,ddicttestuser1,ddictpass,information_schema);
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
--error ER_ACCESS_DENIED_ERROR
GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
@@ -443,6 +455,7 @@ connect (con108,localhost,ddicttestuser1,ddictpass,information_schema);
--echo Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST.
--echo ####################################################################################
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
+--replace_result Execute Query
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
SHOW processlist;
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
diff --git a/mysql-test/suite/funcs_1/datadict/processlist_val.inc b/mysql-test/suite/funcs_1/datadict/processlist_val.inc
index 6e76cedde2e9ee6c3e6eca191087598575968a55..cdc070aff743df4b73e05e37b3b6f4a579091f9b 100644
--- a/mysql-test/suite/funcs_1/datadict/processlist_val.inc
+++ b/mysql-test/suite/funcs_1/datadict/processlist_val.inc
@@ -94,6 +94,7 @@ echo
# 1. Just dump what we get
--replace_column 1 3 6 9 13 14 15 17
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
--replace_column 1 3 6 9 13 14
SHOW FULL PROCESSLIST;
#
@@ -167,6 +168,7 @@ let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
# 1. Just dump what we get
--replace_column 1 3 6 7 9 13 14 15 17
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
--replace_column 1 3 6
SHOW FULL PROCESSLIST;
#
@@ -212,6 +214,7 @@ echo
connection con1;
--replace_column 1 3 6 9 13 14 15 17
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
--replace_column 1 3 6
SHOW FULL PROCESSLIST;
@@ -246,6 +249,7 @@ connection con2;
# Just dump what we get
--replace_column 1 3 6 9 13 14 15 17
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
--replace_column 1 3 6
SHOW FULL PROCESSLIST;
#
@@ -306,6 +310,7 @@ WHERE ID = @test_user_con2_id AND Command IN('Query','Execute')
# 1. Just dump what we get
--replace_column 1 3 6 9 13 14 15 17
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
--replace_column 1 3 6
SHOW FULL PROCESSLIST;
#
@@ -436,8 +441,10 @@ echo
;
--replace_column 1 3 5 6 7 9 13 14 15 17
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+--replace_result Execute Query
--replace_column 1 3 5 6 7
SHOW FULL PROCESSLIST;
+--replace_result Execute Query
--replace_column 1 3 5 6 7
SHOW PROCESSLIST;
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 1d8f8ad594999bc9d416998e5bd9957ab80047cf..2c0ef3f8e20c25aaf19fe3319b828aea6831426b 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -10,23 +10,35 @@
#
##############################################################################
-galera_flush : MariaDB does not have global.thread_statistics
+GAL-419 : MDEV-13549 Galera test failures
+MW-328A : MDEV-17847 Galera test failure on MW-328[A|B|C]
+MW-328B : MDEV-17847 Galera test failure on MW-328[A|B|C]
+MW-328C : MDEV-17847 Galera test failure on MW-328[A|B|C]
+MW-329 : wsrep_local_replays not stable
+MW-336 : MDEV-13549 Timeout in wait_condition.inc for PROCESSLIST
+MW-416 : MDEV-13549 Galera test failures
+MW-44 : MDEV-15809 Test failure on galera.MW-44
galera_account_management : MariaDB 10.0 does not support ALTER USER
-galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
-galera_migrate : MariaDB does not support START SLAVE USER
galera_as_master_gtid : Requires MySQL GTID
galera_as_master_gtid_change_master : Requires MySQL GTID
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
-GAL-419 : MDEV-13549 Galera test failures
-galera_var_notify_cmd : MDEV-13549 Galera test failures
-galera_as_slave_replication_bundle : MDEV-13549 Galera test failures
+galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
+galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
+galera_binlog_stmt_autoinc : MDEV-13549 auto_increment mismatch
+galera_flush : MariaDB does not have global.thread_statistics
+galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
+galera_gcs_fc_limit : MDEV-17061 Timeout in wait_condition.inc for PROCESSLIST
+galera_ist_mariabackup : MDEV-18829 test leaves port open
+galera_ist_progress: MDEV-15236 fails when trying to read transfer status
+galera_kill_applier : race condition at the start of the test
+galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl
+galera_migrate : MariaDB does not support START SLAVE USER
+galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb
galera_ssl_upgrade : MDEV-13549 Galera test failures
-galera.MW-329 : wsrep_local_replays not stable
-MW-416 : MDEV-13549 Galera test failures
-MW-388 : MDEV-13549 Galera test failures
galera_sst_mysqldump_with_key : MDEV-16890 Galera test failure
-galera_binlog_stmt_autoinc: MDEV-17106 Test failure on galera.galera_binlog_stmt_autoinc
-galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit
-galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion
+galera_var_node_address : MDEV-17151 Galera test failure
+galera_var_notify_cmd : MDEV-13549 Galera test failures
galera_wan : MDEV-17259: Test failure on galera.galera_wan
-galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb
+partition : MDEV-13549 regularly showing auto_increment mismatch
+pxc-421: Lock timeout exceeded
+query_cache : MDEV-18137: Galera test failure on query_cache
diff --git a/mysql-test/suite/galera/r/MW-388.result b/mysql-test/suite/galera/r/MW-388.result
index 59d4d4a2bf3e9466971fabb279a383fa899f8765..141189e45c674abbde0653a9c5993e0f8b6a8ec8 100644
--- a/mysql-test/suite/galera/r/MW-388.result
+++ b/mysql-test/suite/galera/r/MW-388.result
@@ -9,18 +9,14 @@ INSERT INTO t1 VALUES (1, 'node 1'),(2, 'node 1');
INSERT INTO t1 VALUES (3, 'node 1');
END|
SET GLOBAL wsrep_slave_threads = 2;
-SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
INSERT INTO t1 VALUES (1, 'node 2');;
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
SET SESSION wsrep_sync_wait = 0;
SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue';
CALL insert_proc ();;
SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached";
-SET GLOBAL DEBUG = "";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
SELECT @errno = 1213;
@@ -37,9 +33,7 @@ f1 f2
SET GLOBAL wsrep_slave_threads = DEFAULT;
DROP TABLE t1;
DROP PROCEDURE insert_proc;
-SET GLOBAL debug = NULL;
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "";
SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
diff --git a/mysql-test/suite/galera/r/MW-86-wait1.result b/mysql-test/suite/galera/r/MW-86-wait1.result
index a38255eff8f841f90d40c4bd78632f986a9b6f38..88b6ca30884ae5c55e1ad351358495ade78f3a3e 100644
--- a/mysql-test/suite/galera/r/MW-86-wait1.result
+++ b/mysql-test/suite/galera/r/MW-86-wait1.result
@@ -2,9 +2,7 @@ SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
SET SESSION wsrep_sync_wait = 1;
-SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait1 VALUES (1);
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
@@ -33,15 +31,10 @@ SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
SHOW WARNINGS;
-SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "";
SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
SET SESSION wsrep_sync_wait = default;
DROP TABLE t_wait1;
-SET GLOBAL debug = NULL;
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
diff --git a/mysql-test/suite/galera/r/MW-86-wait8.result b/mysql-test/suite/galera/r/MW-86-wait8.result
index 04c93e9a9f26c55d7fbfcca76bc294149702f2a5..d5aa5037676090a2f68c8856685a7dd2db21cd3a 100644
--- a/mysql-test/suite/galera/r/MW-86-wait8.result
+++ b/mysql-test/suite/galera/r/MW-86-wait8.result
@@ -2,9 +2,7 @@ SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
SET SESSION wsrep_sync_wait = 8;
-SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait8 VALUES (1);
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
@@ -35,15 +33,10 @@ SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
SHOW WARNINGS;
-SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
SET SESSION wsrep_sync_wait = default;
DROP TABLE t_wait8;
-SET GLOBAL debug = NULL;
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
diff --git a/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result b/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
index 8e8b79b168f9c0ea5610527b83c60aacde9a5755..542bd1568166361c4b6ec79bfcd829b1b7dd67ea 100644
--- a/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
+++ b/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result
@@ -8,20 +8,20 @@ PRIMARY KEY (i)
insert into t1(i) values(null);
select * from t1;
i c
-3 dummy_text
+1 dummy_text
insert into t1(i) values(null), (null), (null);
select * from t1;
i c
+1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
-9 dummy_text
select * from t1;
i c
+1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
-9 dummy_text
SET GLOBAL wsrep_forced_binlog_format='none';
SET GLOBAL wsrep_forced_binlog_format='none';
drop table t1;
@@ -40,20 +40,20 @@ PRIMARY KEY (i)
insert into t1(i) values(null);
select * from t1;
i c
-4 dummy_text
+1 dummy_text
insert into t1(i) values(null), (null), (null);
select * from t1;
i c
+1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
-13 dummy_text
select * from t1;
i c
+1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
-13 dummy_text
SET GLOBAL wsrep_auto_increment_control='ON';
SET SESSION binlog_format='ROW';
show variables like 'binlog_format';
@@ -67,7 +67,7 @@ wsrep_auto_increment_control ON
SET GLOBAL wsrep_auto_increment_control='OFF';
show variables like '%auto_increment%';
Variable_name Value
-auto_increment_increment 2
+auto_increment_increment 3
auto_increment_offset 1
wsrep_auto_increment_control OFF
SET GLOBAL wsrep_auto_increment_control='ON';
@@ -82,20 +82,20 @@ PRIMARY KEY (i)
insert into t1(i) values(null);
select * from t1;
i c
-3 dummy_text
+1 dummy_text
insert into t1(i) values(null), (null), (null);
select * from t1;
i c
+1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
-9 dummy_text
select * from t1;
i c
+1 dummy_text
3 dummy_text
5 dummy_text
7 dummy_text
-9 dummy_text
SET GLOBAL wsrep_forced_binlog_format='none';
SET GLOBAL wsrep_forced_binlog_format='none';
drop table t1;
@@ -114,20 +114,20 @@ PRIMARY KEY (i)
insert into t1(i) values(null);
select * from t1;
i c
-4 dummy_text
+1 dummy_text
insert into t1(i) values(null), (null), (null);
select * from t1;
i c
+1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
-13 dummy_text
select * from t1;
i c
+1 dummy_text
4 dummy_text
7 dummy_text
10 dummy_text
-13 dummy_text
SET GLOBAL wsrep_auto_increment_control='ON';
show variables like 'binlog_format';
Variable_name Value
@@ -140,7 +140,7 @@ wsrep_auto_increment_control ON
SET GLOBAL wsrep_auto_increment_control='OFF';
show variables like '%auto_increment%';
Variable_name Value
-auto_increment_increment 2
+auto_increment_increment 3
auto_increment_offset 1
wsrep_auto_increment_control OFF
SET GLOBAL wsrep_auto_increment_control='ON';
diff --git a/mysql-test/suite/galera/r/galera_events.result b/mysql-test/suite/galera/r/galera_events.result
index 09d8406d5d0497c52c0bcf95001406a20682a891..80631442e08f347a4ee7d24ec89786009367d173 100644
--- a/mysql-test/suite/galera/r/galera_events.result
+++ b/mysql-test/suite/galera/r/galera_events.result
@@ -1,4 +1,6 @@
CREATE EVENT event1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT DEFINER= 'root@localhost', ORIGINATOR = 1, STATUS = 'SLAVESIDE_DISABLED', EVENT_TYPE = 'ONE TIME', ON_COMPLETION = 'NOT PRESERVE' FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME = 'event1';
DEFINER= 'root@localhost' ORIGINATOR = 1 STATUS = 'SLAVESIDE_DISABLED' EVENT_TYPE = 'ONE TIME' ON_COMPLETION = 'NOT PRESERVE'
1 1 1 1 1
diff --git a/mysql-test/suite/galera/r/galera_kill_largechanges.result b/mysql-test/suite/galera/r/galera_kill_largechanges.result
index 4eb5271fadff29d8912851d414bdaacb8ec8e194..a4144e8487452d43d943beb21270054299240231 100644
--- a/mysql-test/suite/galera/r/galera_kill_largechanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_largechanges.result
@@ -1,15 +1,14 @@
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
-CREATE TABLE ten (f1 INTEGER);
-INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
Killing server ...
INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
-SELECT COUNT(*) = 1000000 FROM t1;
-COUNT(*) = 1000000
-1
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-VARIABLE_VALUE = 2
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1771561
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE
+2
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_kill_nochanges.result b/mysql-test/suite/galera/r/galera_kill_nochanges.result
index cdcebdb4eeea281d8b29cd986490f46d3e782ca5..4b37a3e64e2fd02b799448bad5886f7b99b6a296 100644
--- a/mysql-test/suite/galera/r/galera_kill_nochanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_nochanges.result
@@ -3,10 +3,10 @@ INSERT INTO t1 VALUES (1);
Killing server ...
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = DEFAULT;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
-1
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
-VARIABLE_VALUE = 2
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE
+2
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_kill_smallchanges.result b/mysql-test/suite/galera/r/galera_kill_smallchanges.result
index 863b49dd51b14ed3aff50c70edbf60dded90b808..199a530241edf0bc545bb6dc894487e5e80aab48 100644
--- a/mysql-test/suite/galera/r/galera_kill_smallchanges.result
+++ b/mysql-test/suite/galera/r/galera_kill_smallchanges.result
@@ -1,10 +1,9 @@
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
Killing server ...
INSERT INTO t1 VALUES (1);
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
diff --git a/mysql-test/suite/galera/r/galera_many_rows.result b/mysql-test/suite/galera/r/galera_many_rows.result
index e650dd6f5defa44f8d1e0c0b97c0fa46d6511664..6f441d9b401c39cfdc9ee9d7d5fd02fe076ff2a6 100644
--- a/mysql-test/suite/galera/r/galera_many_rows.result
+++ b/mysql-test/suite/galera/r/galera_many_rows.result
@@ -1,27 +1,27 @@
SET SESSION innodb_lock_wait_timeout=600;
SET SESSION lock_wait_timeout=600;
-CREATE TABLE ten (f1 INTEGER);
+CREATE TABLE ten (f1 INTEGER) engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = 15;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
-SELECT COUNT(*) = 100000 FROM t1;
-COUNT(*) = 100000
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+100000
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
-SELECT COUNT(*) = 200000 FROM t1;
-COUNT(*) = 200000
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+200000
UPDATE t1 SET f2 = 1;
-SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
-COUNT(*) = 200000
-1
+SELECT COUNT(*) FROM t1 WHERE f2 = 1;
+COUNT(*)
+200000
START TRANSACTION;
-SELECT COUNT(*) = 200000 FROM t1;
-COUNT(*) = 200000
-1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+200000
UPDATE t1 SET f2 = 3;
START TRANSACTION;
UPDATE t1 SET f2 = 4;
diff --git a/mysql-test/suite/galera/r/galera_mdl_race.result b/mysql-test/suite/galera/r/galera_mdl_race.result
index 535f20de7f1cc572283fe14a6d72287a73dc1af7..b48900669cf5832b13b0163e39c424407e7248d1 100644
--- a/mysql-test/suite/galera/r/galera_mdl_race.result
+++ b/mysql-test/suite/galera/r/galera_mdl_race.result
@@ -1,22 +1,16 @@
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
-CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (2, 'a');
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
LOCK TABLE t2 WRITE;
-SET GLOBAL DEBUG = "d,sync.wsrep_before_mdl_wait";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET @@debug_dbug = "d,sync.wsrep_before_mdl_wait";
SELECT * FROM t2;;
-SET GLOBAL DEBUG = "d,sync.wsrep_after_BF_victim_lock";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET @@debug_dbug = "d,sync.wsrep_after_BF_victim_lock";
UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
-SET GLOBAL DEBUG = "";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET @@debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
index 5fe382048fbf1b1b483ded753ceb20b1cebae722..b1cceebb010dce66dccb733715373bfecdb2a511 100644
--- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
+++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
@@ -1,30 +1,22 @@
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
-SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
SELECT MAX(id) FROM t1;
MAX(id)
1
INSERT INTO t1 VALUES (2);
SELECT MAX(id) FROM t1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-SET GLOBAL DEBUG = "";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
FLUSH QUERY CACHE;
-SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
SET DEBUG_SYNC = "RESET";
INSERT INTO t1 VALUES (3);
SELECT MAX(id) FROM t1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-SET GLOBAL DEBUG = "";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
INSERT INTO t1 VALUES (4);
SELECT MAX(id) FROM t1;
@@ -37,14 +29,10 @@ MAX(id)
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
VARIABLE_VALUE = 1
1
-SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
INSERT INTO t1 VALUES (5);
SELECT MAX(id) FROM t1 ;
-SET GLOBAL DEBUG = "";
-Warnings:
-Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
MAX(id)
5
diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result
index c7c6af2098f5fee1d3bf7f7ebcad2b6b09bb2838..5a78d84c24ecbe49996aaa562ab04162616a96b2 100644
--- a/mysql-test/suite/galera/r/galera_var_slave_threads.result
+++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result
@@ -10,27 +10,30 @@ Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
SELECT @@wsrep_slave_threads = 1;
@@wsrep_slave_threads = 1
1
+# wsrep_slave_threads = 1
SET GLOBAL wsrep_slave_threads = 1;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
-COUNT(*) = 2
-1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+COUNT(*)
+2
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 64;
INSERT INTO t1 VALUES (1);
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+# wsrep_slave_threads = 64
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 1;
-SELECT COUNT(*) = 64 FROM t2;
-COUNT(*) = 64
-1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+66
+# wsrep_slave_threads = 1
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
@@ -44,10 +47,13 @@ SET GLOBAL wsrep_slave_threads = 1;
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
DROP TABLE t1;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
NAME
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*) = 1
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+COUNT(*)
1
# End of tests
diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm
index 8b7b7034facc437b7d9b2d86d0c78278231b636d..6e53e6e2e313538715ec4bb19a363c997731be81 100644
--- a/mysql-test/suite/galera/suite.pm
+++ b/mysql-test/suite/galera/suite.pm
@@ -75,6 +75,7 @@ push @::global_suppressions,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(JOINED\). Message ignored.|,
qr|WSREP: Unsupported protocol downgrade: incremental data collection disabled. Expect abort.|,
qr(WSREP: Action message in non-primary configuration from member [0-9]*),
+ qr(WSREP: Last Applied Action message in non-primary configuration from member [0-9]*),
qr(WSREP: discarding established .*),
qr|WSREP: .*core_handle_uuid_msg.*|,
qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
diff --git a/mysql-test/suite/galera/t/MW-388.test b/mysql-test/suite/galera/t/MW-388.test
index 209695dca80f8e50b655effb0aa24e3e3f482a4f..fafdde092bf0289ac54299a60b7054dea0fd78c7 100644
--- a/mysql-test/suite/galera/t/MW-388.test
+++ b/mysql-test/suite/galera/t/MW-388.test
@@ -1,6 +1,4 @@
--source include/galera_cluster.inc
---source include/have_innodb.inc
---source include/have_debug.inc
--source include/have_debug_sync.inc
--connection node_1
@@ -29,8 +27,9 @@ DELIMITER ;|
# that of the INSERT. Because there is only one slave thread,
# commit cut is not processed and therefore does not advance
# local monitor, and our INSERT remains stuck there.
+
SET GLOBAL wsrep_slave_threads = 2;
-SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
--connection node_2
--send INSERT INTO t1 VALUES (1, 'node 2');
@@ -47,8 +46,7 @@ SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication
--connection node_1a
SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached";
-
-SET GLOBAL DEBUG = "";
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
@@ -69,7 +67,7 @@ SET GLOBAL wsrep_slave_threads = DEFAULT;
DROP TABLE t1;
DROP PROCEDURE insert_proc;
-SET GLOBAL debug = NULL;
+SET GLOBAL debug_dbug = "";
SET debug_sync='RESET';
# Make sure no pending signals are leftover to surprise subsequent tests.
diff --git a/mysql-test/suite/galera/t/MW-86-wait1.test b/mysql-test/suite/galera/t/MW-86-wait1.test
index 6c0982ad8b31630a9dd0eb133957cd275253291c..40a7882829b807d782f7ce59f91818b22dbe668c 100644
--- a/mysql-test/suite/galera/t/MW-86-wait1.test
+++ b/mysql-test/suite/galera/t/MW-86-wait1.test
@@ -12,7 +12,7 @@
SELECT @@debug_sync;
SET SESSION wsrep_sync_wait = 1;
-SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
--connection node_1
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
@@ -90,7 +90,7 @@ SHOW WARNINGS;
--enable_result_log
# Unblock the background INSERT and remove the sync point.
-SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "";
SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
SET SESSION wsrep_sync_wait = default;
@@ -99,7 +99,6 @@ SET SESSION wsrep_sync_wait = default;
# from the test.
DROP TABLE t_wait1;
-SET GLOBAL debug = NULL;
SET debug_sync='RESET';
# Make sure no pending signals are leftover to surprise subsequent tests.
diff --git a/mysql-test/suite/galera/t/MW-86-wait8.test b/mysql-test/suite/galera/t/MW-86-wait8.test
index 65e612c5c8ea37dd0f4041233385160f3c30d77c..551b0f67b7c51a2c52a50c09e1bbda095d2a749f 100644
--- a/mysql-test/suite/galera/t/MW-86-wait8.test
+++ b/mysql-test/suite/galera/t/MW-86-wait8.test
@@ -10,7 +10,7 @@
SELECT @@debug_sync;
SET SESSION wsrep_sync_wait = 8;
-SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
--connection node_1
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
@@ -112,7 +112,7 @@ SHOW WARNINGS;
--enable_query_log
# Unblock the background INSERT and remove the sync point.
-SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
SET SESSION wsrep_sync_wait = default;
@@ -121,7 +121,6 @@ SET SESSION wsrep_sync_wait = default;
# from the test.
DROP TABLE t_wait8;
-SET GLOBAL debug = NULL;
SET debug_sync='RESET';
# Make sure no pending signals are leftover to surprise subsequent tests.
diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
index 731059dc584117a586be3011650e90b780782540..20f2fb9dea0d74338172720fba0cd7c56a1a24a6 100644
--- a/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
+++ b/mysql-test/suite/galera/t/galera_autoinc_sst_mariabackup.test
@@ -5,7 +5,6 @@
--source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
--source include/have_mariabackup.inc
--connection node_1
@@ -29,11 +28,11 @@ END|
DELIMITER ;|
--send CALL p1();
---sleep 2
+--sleep 1
--connection node_2
--send CALL p1();
---sleep 2
+--sleep 1
# Kill and restart node #2
@@ -41,10 +40,7 @@ DELIMITER ;|
--connection node_2a
--source include/kill_galera.inc
---sleep 10
--source include/start_mysqld.inc
---sleep 25
---source include/wait_until_connected_again.inc
INSERT INTO t1 VALUES (DEFAULT);
@@ -68,8 +64,6 @@ INSERT INTO t1 VALUES (DEFAULT);
--error 2013,2006
--reap
---sleep 10
-
# Confirm that the count is correct and that the cluster is intact
--connection node_1a
diff --git a/mysql-test/suite/galera/t/galera_kill_largechanges.test b/mysql-test/suite/galera/t/galera_kill_largechanges.test
index 2803a43d85aed17a32ce7ec2bbe17cdc36f273fc..c671764fa9e393f83ede08c0dd29855e5b8447f2 100644
--- a/mysql-test/suite/galera/t/galera_kill_largechanges.test
+++ b/mysql-test/suite/galera/t/galera_kill_largechanges.test
@@ -4,9 +4,11 @@
--source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
# Enable the master to continue running during the split-brain situation that
@@ -14,8 +16,8 @@ call mtr.add_suppression("WSREP: Last Applied Action message in non-primary conf
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
-CREATE TABLE ten (f1 INTEGER);
-INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
--connection node_2
@@ -33,13 +35,16 @@ INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten
--source include/galera_connect.inc
--connection node_2a
-SELECT COUNT(*) = 1000000 FROM t1;
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT COUNT(*) FROM t1;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1
--disable_query_log
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
--enable_query_log
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
+
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/galera_kill_nochanges.test b/mysql-test/suite/galera/t/galera_kill_nochanges.test
index 4106378885fa60fbe5980130b0e2d4c4c7202a56..aa1648ca3aef6e0c8495d2f261e371456fbd7562 100644
--- a/mysql-test/suite/galera/t/galera_kill_nochanges.test
+++ b/mysql-test/suite/galera/t/galera_kill_nochanges.test
@@ -3,7 +3,11 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
@@ -16,6 +20,7 @@ INSERT INTO t1 VALUES (1);
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'
--source include/wait_condition.inc
+
SET SESSION wsrep_sync_wait = DEFAULT;
--connection node_2
@@ -26,7 +31,10 @@ SET SESSION wsrep_sync_wait = DEFAULT;
--source include/galera_connect.inc
--connection node_2a
-SELECT COUNT(*) = 1 FROM t1;
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+SELECT COUNT(*) FROM t1;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_kill_smallchanges.test b/mysql-test/suite/galera/t/galera_kill_smallchanges.test
index 148c3dbc1328c438761d2c9ec8a1302313dc6054..15e1727de034d3387fd611d8ccb54c6c7ead1b3f 100644
--- a/mysql-test/suite/galera/t/galera_kill_smallchanges.test
+++ b/mysql-test/suite/galera/t/galera_kill_smallchanges.test
@@ -3,9 +3,11 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
@@ -30,7 +32,7 @@ INSERT INTO t1 VALUES (1);
--source include/galera_connect.inc
--connection node_2a
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) FROM t1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1
@@ -38,4 +40,7 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
--enable_query_log
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
+
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_many_rows.cnf b/mysql-test/suite/galera/t/galera_many_rows.cnf
new file mode 100644
index 0000000000000000000000000000000000000000..4e1022cf67fff52dc47c4594e2c5e5aaf0ed5d50
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_many_rows.cnf
@@ -0,0 +1,5 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+innodb-status-output=ON
+innodb-status-output-locks=ON
diff --git a/mysql-test/suite/galera/t/galera_many_rows.test b/mysql-test/suite/galera/t/galera_many_rows.test
index 58ba85e1b9e7dcc6d66d2ce3468de60514c724b6..bc9e99db8daa675291874024124351d897409d96 100644
--- a/mysql-test/suite/galera/t/galera_many_rows.test
+++ b/mysql-test/suite/galera/t/galera_many_rows.test
@@ -1,13 +1,16 @@
-
--source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
SET SESSION innodb_lock_wait_timeout=600;
SET SESSION lock_wait_timeout=600;
-CREATE TABLE ten (f1 INTEGER);
+CREATE TABLE ten (f1 INTEGER) engine=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
@@ -20,19 +23,19 @@ SET SESSION wsrep_sync_wait = 15;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
-SELECT COUNT(*) = 100000 FROM t1;
+SELECT COUNT(*) FROM t1;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
--connection node_1
-SELECT COUNT(*) = 200000 FROM t1;
+SELECT COUNT(*) FROM t1;
UPDATE t1 SET f2 = 1;
--connection node_2
-SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
+SELECT COUNT(*) FROM t1 WHERE f2 = 1;
--connection node_1
START TRANSACTION;
-SELECT COUNT(*) = 200000 FROM t1;
+SELECT COUNT(*) FROM t1;
UPDATE t1 SET f2 = 3;
--connection node_2
@@ -50,5 +53,7 @@ COMMIT;
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node2';
--enable_query_log
+--source include/auto_increment_offset_restore.inc
+
DROP TABLE t1;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/galera_mdl_race.test b/mysql-test/suite/galera/t/galera_mdl_race.test
index 508b85add4bc3d284ded1eecdefb65696c4a5a78..ad6770f99918c05da21bf58ccce8dad2c79f05ac 100644
--- a/mysql-test/suite/galera/t/galera_mdl_race.test
+++ b/mysql-test/suite/galera/t/galera_mdl_race.test
@@ -3,11 +3,10 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
--source include/have_debug_sync.inc
-CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
-CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (2, 'a');
@@ -24,7 +23,7 @@ LOCK TABLE t2 WRITE;
# Block before MLD lock wait
--connection node_1
- SET GLOBAL DEBUG = "d,sync.wsrep_before_mdl_wait";
+ SET @@debug_dbug = "d,sync.wsrep_before_mdl_wait";
--send SELECT * FROM t2;
# Wait for SELECT to be blocked
@@ -35,27 +34,21 @@ LOCK TABLE t2 WRITE;
#--source include/wait_condition.inc
# block applier to wait after BF victim is locked
-SET GLOBAL DEBUG = "d,sync.wsrep_after_BF_victim_lock";
+SET @@debug_dbug = "d,sync.wsrep_after_BF_victim_lock";
# Issue a conflicting update on node #2
--connection node_2
UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
---sleep 3
-
# Unblock the SELECT, to enter wsrep_thd_is_BF
--connection node_1a
-SET GLOBAL DEBUG = "";
+SET @@debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
---sleep 3
-
# unblock applier to try to BF the SELECT
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
-
# table lock is not needed anymore
---sleep 3
UNLOCK TABLES;
# SELECT succeeds
diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
index 87afc2d7bb22e18a285aeef04143b7651ac04218..e13e7f1f748f1ca6c8c691507e92a958ddf710a2 100644
--- a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
+++ b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
@@ -1,5 +1,4 @@
--source include/galera_cluster.inc
---source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/have_query_cache.inc
@@ -9,7 +8,7 @@ INSERT INTO t1 VALUES (1);
--connection node_2
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
-SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
SELECT MAX(id) FROM t1; # first lookup miss
#
@@ -22,11 +21,11 @@ INSERT INTO t1 VALUES (2);
--connection node_2
--error ER_LOCK_WAIT_TIMEOUT
SELECT MAX(id) FROM t1;
-SET GLOBAL DEBUG = "";
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
FLUSH QUERY CACHE;
-SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
SET DEBUG_SYNC = "RESET";
#
@@ -39,7 +38,7 @@ INSERT INTO t1 VALUES (3);
--connection node_2
--error ER_LOCK_WAIT_TIMEOUT
SELECT MAX(id) FROM t1;
-SET GLOBAL DEBUG = "";
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
#
@@ -59,7 +58,7 @@ SELECT MAX(id) FROM t1;
FLUSH STATUS;
SELECT MAX(id) FROM t1;
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
-SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
+SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
#
# Query cache invalidated
@@ -73,7 +72,7 @@ INSERT INTO t1 VALUES (5);
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
-SET GLOBAL DEBUG = "";
+SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
--connection node_2
diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
index 1f01c4aac07232476d169c8a1d5dc3e6b3d557ab..3e2108868afdd31de7640692fb6d13eef73cc73a 100644
--- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test
+++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
@@ -11,11 +11,6 @@
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
-# Save original auto_increment_offset values.
---let $node_1=node_1
---let $node_2=node_2
---source include/auto_increment_offset_save.inc
-
--connection node_2
--let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address`
diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test
index 1cee845b6abd867ad207290aabec42a941dd91d8..95cd2aac16382e95df2e898629426f900a44b0b6 100644
--- a/mysql-test/suite/galera/t/galera_var_slave_threads.test
+++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test
@@ -19,10 +19,12 @@ SET GLOBAL wsrep_slave_threads = 0;
SHOW WARNINGS;
SELECT @@wsrep_slave_threads = 1;
+--echo # wsrep_slave_threads = 1
SET GLOBAL wsrep_slave_threads = 1;
+
# There is a separate wsrep_aborter thread at all times
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
#
# Increase the number of slave threads. The change takes effect immediately
@@ -38,11 +40,13 @@ INSERT INTO t1 VALUES (1);
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM t1;
+SELECT COUNT(*) FROM t1;
+--echo # wsrep_slave_threads = 64
--let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
#
# Reduce the number of slave threads. The change is not immediate -- a thread will only exit after a replication event
@@ -54,8 +58,8 @@ SET GLOBAL wsrep_slave_threads = 1;
--disable_result_log
--disable_query_log
-# Generate 64 replication events
---let $count = 64
+# Generate 66 replication events
+--let $count = 66
while ($count)
{
INSERT INTO t2 VALUES (DEFAULT);
@@ -65,15 +69,16 @@ while ($count)
--enable_result_log
--connection node_2
---let $wait_condition = SELECT COUNT(*) = 64 FROM t2;
+--let $wait_condition = SELECT COUNT(*) = 66 FROM t2;
--source include/wait_condition.inc
-SELECT COUNT(*) = 64 FROM t2;
+SELECT COUNT(*) FROM t2;
+--echo # wsrep_slave_threads = 1
--let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
@@ -98,6 +103,9 @@ SET GLOBAL wsrep_slave_threads = 1;
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
DROP TABLE t1;
--connection node_2
@@ -113,6 +121,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
#
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'
--source include/wait_condition.inc
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
+
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
--echo # End of tests
diff --git a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
index df51920c13c8a3d76feaeb9199a3a83a4c29309a..477789175fbf1bd200ec6b5c62355158eb9155bb 100644
--- a/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
+++ b/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf
@@ -9,6 +9,7 @@ innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep_gtid_mode=1
gtid_ignore_duplicates
+auto_increment_increment=3
wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
index 7b68d36c04a9ffb02cde1f112a5332f2b3005820..e5aa81b8742cf7d6db4fb58d1a49bedb0c37b08b 100644
--- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
+++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
@@ -5,6 +5,7 @@
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
+auto_increment_increment=3
wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
new file mode 100644
index 0000000000000000000000000000000000000000..53e35939a79804ca9f32d0f16ce44a2c30dc5269
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
@@ -0,0 +1,18 @@
+SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
+VARIABLE_VALUE LIKE '%[::1]%'
+1
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 3
+1
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
+include/assert_grep.inc [Streaming the backup to joiner at \[::1\]]
+include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:]
+include/assert_grep.inc [IST receiver addr using tcp://\[::1\]]
+include/assert_grep.inc [Prepared IST receiver, listening at: tcp://\[::1\]]
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result
new file mode 100644
index 0000000000000000000000000000000000000000..a2bf5f4d98c17e7155888ae7fbf27a0fb7f9dabc
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync_section.result
@@ -0,0 +1,14 @@
+SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
+VARIABLE_VALUE LIKE '%[::1]%'
+1
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 3
+1
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
index 9f845ffe776283e2fdabd63fc3e2ff6deeb8e229..572982b76be80e989e6fa507bfd57485489b4bd4 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
@@ -1,8 +1,10 @@
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 5
+1
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET SESSION wsrep_sync_wait=0;
SET SESSION wsrep_on=OFF;
@@ -12,6 +14,7 @@ Variable_name Value
wsrep_cluster_size 2
SHOW STATUS LIKE 'wsrep_cluster_weight';
Variable_name Value
+wsrep_cluster_weight 0
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
@@ -35,6 +38,7 @@ Variable_name Value
wsrep_cluster_size 2
SHOW STATUS LIKE 'wsrep_cluster_weight';
Variable_name Value
+wsrep_cluster_weight 0
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
@@ -52,6 +56,7 @@ Variable_name Value
wsrep_local_state_comment Initialized
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@@ -70,12 +75,14 @@ VARIABLE_VALUE = 'Synced'
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 1
+1
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@@ -96,6 +103,7 @@ VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@@ -116,6 +124,7 @@ VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
+1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
diff --git a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result
index 21f747d280b31059afb8290f2e8033ae7fa457d3..b346a2d6eb615fdd74fa39d42fd016ab461e2997 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result
@@ -16,7 +16,17 @@ Killing server ...
safe_to_bootstrap: 1
safe_to_bootstrap: 0
safe_to_bootstrap: 0
+CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible");
+CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
+CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible");
+CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/galera_3nodes/suite.pm b/mysql-test/suite/galera_3nodes/suite.pm
index 66502c00c6b292deecdff9efe79025c4c7563cc4..a7c1bf79c06001632cc99ae11163672ea9da5961 100644
--- a/mysql-test/suite/galera_3nodes/suite.pm
+++ b/mysql-test/suite/galera_3nodes/suite.pm
@@ -81,11 +81,11 @@ sub skip_combinations {
my %skip = ();
$skip{'include/have_filekeymanagement.inc'} = 'needs file_key_management plugin'
unless $ENV{FILE_KEY_MANAGEMENT_SO};
- $skip{'include/have_mariabackup.inc'} = 'Need mariabackup'
+ $skip{'suite/galera/include/have_mariabackup.inc'} = 'Need mariabackup'
unless which(mariabackup);
- $skip{'include/have_mariabackup.inc'} = 'Need ss'
+ $skip{'suite/galera/include/have_mariabackup.inc'} = 'Need ss'
unless which(ss);
- $skip{'include/have_mariabackup.inc'} = 'Need socat or nc'
+ $skip{'suite/galera/include/have_mariabackup.inc'} = 'Need socat or nc'
unless $ENV{MTR_GALERA_TFMT};
%skip;
}
diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd.test b/mysql-test/suite/galera_3nodes/t/galera_garbd.test
index a68ba8ce15bb4408747fb569b89353b808dc91e2..2d03e8897b9aaf10aef0dcde715898ad77712613 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_garbd.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_garbd.test
@@ -7,10 +7,20 @@
--source include/have_innodb.inc
--source include/big_test.inc
---echo Killing node #3 to free ports for garbd ...
--let $galera_connection_name = node_3
--let $galera_server_number = 3
--source include/galera_connect.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--echo Killing node #3 to free ports for garbd ...
+--connection node_3
+--let $gp3 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
+--let $galera_port_3 = `SELECT SUBSTR('$gp3', 1, LOCATE(';', '$gp3') - 1)`
--source include/shutdown_mysqld.inc
--connection node_1
@@ -18,7 +28,9 @@
--source include/wait_condition.inc
--echo Starting garbd ...
---exec `dirname $WSREP_PROVIDER`/garb/garbd --address "gcomm://127.0.0.1:$NODE_GALERAPORT_1" --group my_wsrep_cluster --options 'base_port=$NODE_GALERAPORT_3' > $MYSQL_TMP_DIR/garbd.log 2>&1 &
+--let $gp1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
+--let $galera_port_1 = `SELECT SUBSTR('$gp1', 1, LOCATE(';', '$gp1') - 1)`
+--exec `dirname $WSREP_PROVIDER`/../../bin/garb/garbd --address "gcomm://127.0.0.1:$galera_port_1" --group my_wsrep_cluster --options 'base_port=$galera_port_3' > $MYSQL_TMP_DIR/garbd.log 2>&1 &
--sleep 5
@@ -32,7 +44,7 @@ INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
--echo Killing garbd ...
---exec pkill --oldest --full garbd.*$NODE_GALERAPORT_3
+--exec pkill --oldest --full garbd.*$galera_port_3
--sleep 5
@@ -51,6 +63,8 @@ DROP TABLE t1;
--connection node_3
--source include/start_mysqld.inc
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
# Workaround for galera#101
diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
index 8dfb4660f3e1ddcd5df0c4bbadb6713c64fa85c6..cd5c020ae384ac971a51435512eb6ee16026c600 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
@@ -4,7 +4,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---source include/have_mariabackup.inc
+--source suite/galera/include/have_mariabackup.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test
index 8cbd8cf24544e97359cc6f509873878dc0acac43..84c33251c98bf61c407a660c3eb69107a2de4618 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup.test
@@ -1,6 +1,6 @@
--source include/galera_cluster.inc
--source include/check_ipv6.inc
---source include/have_mariabackup.inc
+--source suite/galera/include/have_mariabackup.inc
# Confirm that initial handshake happened over ipv6
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.cnf
new file mode 100644
index 0000000000000000000000000000000000000000..dc29485405664fb9b66b9950894dbe2f860bf5cc
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.cnf
@@ -0,0 +1,39 @@
+!include ../galera_3nodes.cnf
+
+# decoy value - should not be read by mysqld or sst scripts
+[mysqld]
+innodb-data-home-dir=/tmp
+
+[galera]
+innodb-data-home-dir=
+wsrep_sst_method=mariabackup
+wsrep_sst_auth="root:"
+wsrep_node_address=::1
+
+[galera.1]
+wsrep-cluster-address=gcomm://
+wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
+wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
+wsrep_node_incoming_address='[::1]:@mysqld.1.port'
+wsrep_node_name=node_1
+
+[galera.2]
+wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
+wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
+wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
+wsrep_node_incoming_address='[::1]:@mysqld.2.port'
+wsrep_node_name=node_2
+wsrep_sst_donor=node_1
+
+[galera.3]
+wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
+wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
+wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
+wsrep_node_incoming_address='[::1]:@mysqld.3.port'
+wsrep_node_name=node_3
+wsrep_sst_donor=node_1
+
+[SST]
+transferfmt=@ENV.MTR_GALERA_TFMT
+streamfmt=xbstream
+sockopt=",pf=ip6"
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.opt b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.opt
new file mode 100644
index 0000000000000000000000000000000000000000..c2bb4d156af07138650803a18813eb2367aae3f4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.opt
@@ -0,0 +1 @@
+--bind-address=::
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
new file mode 100644
index 0000000000000000000000000000000000000000..95cd1a5bea5936d7ece07fa7a1c7c2de3985d519
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
@@ -0,0 +1,69 @@
+--source include/galera_cluster.inc
+--source include/check_ipv6.inc
+--source suite/galera/include/have_mariabackup.inc
+
+# Confirm that initial handshake happened over ipv6
+
+SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+# Force IST
+
+--connection node_2
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 1 FROM t1;
+
+DROP TABLE t1;
+
+# Confirm that key messages around SST and IST reference IPv6
+
+--connection node_1
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let $assert_only_after = CURRENT_TEST
+
+# The SSTs happen when nodes are started first time
+--let $assert_count= 2
+--let $assert_text = Streaming the backup to joiner at \[::1\]
+--let $assert_select = Streaming the backup to joiner at \[::1\]
+--source include/assert_grep.inc
+
+# There will be 1 ISTs donated from node_1 in Galera 3.
+# Two first happen at the initial startup to populate the certification
+# index. The third one is from the IST which happens during the actual test.
+--let $assert_count= 1
+--let $assert_text = async IST sender starting to serve tcp://\[::1\]:
+--let $assert_select = async IST sender starting to serve tcp://\[::1\]:
+--source include/assert_grep.inc
+
+--connection node_2
+--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_only_after = CURRENT_TEST
+
+# There is one ISTs on joiner at Galera 3.
+--let $assert_count= 1
+--let $assert_text = IST receiver addr using tcp://\[::1\]
+--let $assert_select = IST receiver addr using tcp://\[::1\]
+--source include/assert_grep.inc
+
+# There will be only one Prepared IST and in Galera 3 segnos are not printed
+--let $assert_count= 1
+--let $assert_text = Prepared IST receiver, listening at: tcp://\[::1\]
+--let $assert_select = Prepared IST receiver, listening at: tcp://\[::1\]
+--source include/assert_grep.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.opt b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.opt
new file mode 100644
index 0000000000000000000000000000000000000000..c2bb4d156af07138650803a18813eb2367aae3f4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.opt
@@ -0,0 +1 @@
+--bind-address=::
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.opt b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.opt
new file mode 100644
index 0000000000000000000000000000000000000000..c2bb4d156af07138650803a18813eb2367aae3f4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.opt
@@ -0,0 +1 @@
+--bind-address=::
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.cnf
new file mode 100644
index 0000000000000000000000000000000000000000..7cac8e1451e9059841863197c06ad3d983575d6d
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.cnf
@@ -0,0 +1,31 @@
+!include ../galera_3nodes.cnf
+
+# decoy value - should not be read by mysqld or sst scripts
+[mysqld]
+innodb-data-home-dir=/tmp
+
+[mariadb]
+innodb-data-home-dir=
+wsrep_sst_method=rsync
+wsrep_node_address=::1
+
+[mariadb.1]
+wsrep-cluster-address=gcomm://
+wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
+wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
+wsrep_node_incoming_address='[::1]:@mysqld.1.port'
+
+[mariadb.2]
+wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
+wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
+wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
+wsrep_node_incoming_address='[::1]:@mysqld.2.port'
+
+[mariadb.3]
+wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
+wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
+wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
+wsrep_node_incoming_address='[::1]:@mysqld.3.port'
+
+[SST]
+sockopt=",pf=ip6"
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.opt b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.opt
new file mode 100644
index 0000000000000000000000000000000000000000..c2bb4d156af07138650803a18813eb2367aae3f4
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.opt
@@ -0,0 +1 @@
+--bind-address=::
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.test
new file mode 100644
index 0000000000000000000000000000000000000000..1937eb43e1396b6817f43cc115e5df36a6f4c79a
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync_section.test
@@ -0,0 +1,32 @@
+--source include/galera_cluster.inc
+--source include/check_ipv6.inc
+
+# Confirm that initial handshake happened over ipv6
+
+SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
+SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+# Force IST
+
+--connection node_2
+SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
+
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+--connection node_2
+SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 1 FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf
index 821175220ace6b4aaec54a1162b6db5ead951d97..303087dffbbcda13dd5d40c2d19d54cd101c3963 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf
+++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf
@@ -1,11 +1,11 @@
!include ../galera_3nodes.cnf
[mysqld.1]
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true;gcache.size=1M'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.ignore_sb=true;gcache.size=1M'
[mysqld.2]
-wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true;gcache.size=1M'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.ignore_sb=true;gcache.size=1M'
[mysqld.3]
-wsrep_provider_options='base_port=@mysqld.3.#galera_port;pc.ignore_sb=true;gcache.size=1M'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.ignore_sb=true;gcache.size=1M'
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
index 8575d99f066d3c9ba3be9a12f59166bdf2bf05c5..ebc756d60b10279a5ca1fbebf0ae7cda972700a3 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
@@ -17,6 +17,13 @@
--let $galera_server_number = 3
--source include/galera_connect.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES (01), (02), (03), (04), (05);
@@ -99,3 +106,9 @@ SELECT LENGTH(f1) = 512 * 1024 FROM t2;
CALL mtr.add_suppression("WSREP: Unsupported protocol downgrade: incremental data collection disabled");
DROP TABLE t1, t2;
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
+
+--let $galera_cluster_size=3
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
index 88d0cfba4f4753e2f08b37aef312e32a86223d35..b7b6c66e5adbc397dcd880ca1db955ea41c01c37 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test
@@ -1,8 +1,19 @@
#
# Test the safe_to_bootstrap in grastate.dat
#
-
--source include/galera_cluster.inc
+
+--let $galera_connection_name = node_3
+--let $galera_server_number = 3
+--source include/galera_connect.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
#
@@ -47,8 +58,6 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
#
# Shut down one more node
#
-
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
--source include/shutdown_mysqld.inc
@@ -129,9 +138,9 @@ SET SESSION wsrep_on = OFF;
#
--error 1
---exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-new-cluster | grep 'This node is not safe to bootstrap the cluster'
+--exec $MYSQLD --defaults-group-suffix=.2 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-new-cluster --wsrep-cluster-address='gcomm://' | grep 'This node is not safe to bootstrap the cluster'
--error 1
---exec $MYSQLD --defaults-group-suffix=.3 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-new-cluster | grep 'This node is not safe to bootstrap the cluster'
+--exec $MYSQLD --defaults-group-suffix=.3 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --wsrep-new-cluster --wsrep-cluster-address='gcomm://' | grep 'This node is not safe to bootstrap the cluster'
#
# Attempt to bootstrap starting from node #1, should succeed
@@ -154,10 +163,23 @@ SET SESSION wsrep_on = OFF;
--source include/wait_condition.inc
--connection node_2
+CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible");
+CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
--connection node_3
+CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible");
+CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node");
+CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
+CALL mtr.add_suppression("Aborting");
+CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
SHOW CREATE TABLE t1;
DROP TABLE t1;
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
index 129ba2e1f38c24abe794afeee7784873e50c5085..e3f94a012b81449f2ac366ffeee34328690c7e45 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
@@ -5,6 +5,17 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--let $galera_connection_name = node_3
+--let $galera_server_number = 3
+--source include/galera_connect.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
@@ -110,3 +121,6 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
--source include/wait_condition.inc
DROP TABLE t1;
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/handler/ps.test b/mysql-test/suite/handler/ps.test
index 68091190c85948fa940cffe004733b95b51c3255..783d862435ebabe84d7d1090f12e49e2551a0a32 100644
--- a/mysql-test/suite/handler/ps.test
+++ b/mysql-test/suite/handler/ps.test
@@ -7,5 +7,7 @@ flush status;
handler handler_a read first;
# handler...read must be prepared in --ps-protocol mode
--replace_result $PS_PROTOCOL OK
+--disable_ps_protocol
show status like 'Com_stmt_prepare%';
+--enable_ps_protocol
drop table t1;
diff --git a/mysql-test/suite/innodb/r/alter_crash.result b/mysql-test/suite/innodb/r/alter_crash.result
new file mode 100644
index 0000000000000000000000000000000000000000..4b49a788cd41430ba98d5496820191060e66c44f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/alter_crash.result
@@ -0,0 +1,152 @@
+#
+# Bug#20015132 ALTER TABLE FAILS TO CHECK IF TABLE IS CORRUPTED
+#
+CREATE TABLE t1(c1 INT PRIMARY KEY, c2 CHAR(1), c3 INT UNSIGNED) ENGINE=InnoDB;
+SET @saved_debug_dbug = @@SESSION.debug_dbug;
+SET DEBUG_DBUG='+d,create_index_metadata_fail';
+ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
+ERROR HY000: The table 't1' is full
+SET DEBUG_DBUG='+d,ib_create_table_fail_too_many_trx';
+ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
+ERROR HY000: Too many active concurrent transactions
+SET DEBUG_DBUG=@saved_debug_dbug;
+ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
+SET DEBUG_DBUG='+d,dict_set_index_corrupted';
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check Warning InnoDB: Index "c2" is marked as corrupted
+test.t1 check Warning InnoDB: Index "c3" is marked as corrupted
+test.t1 check error Corrupt
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check Warning InnoDB: Index "c2" is marked as corrupted
+test.t1 check Warning InnoDB: Index "c3" is marked as corrupted
+test.t1 check error Corrupt
+ALTER TABLE t1 DROP INDEX c2;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check Warning InnoDB: Index "c3" is marked as corrupted
+test.t1 check error Corrupt
+ALTER TABLE t1 ADD INDEX (c2,c3);
+ERROR HY000: Index "c3" is corrupted
+ALTER TABLE t1 CHANGE c3 c3 INT NOT NULL;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+ALTER TABLE t1 ADD INDEX (c2,c3);
+DROP TABLE t1;
+#
+# Bug #14669848 CRASH DURING ALTER MAKES ORIGINAL TABLE INACCESSIBLE
+#
+# -- Scenario 1:
+# Crash the server in ha_innobase::commit_inplace_alter_table()
+# just after committing the dictionary changes.
+CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
+INSERT INTO t1 VALUES (1,2),(3,4);
+SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
+ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
+ERROR HY000: Lost connection to MySQL server during query
+# Restart mysqld after the crash and reconnect.
+# Manual *.frm recovery begin.
+# Manual recovery end
+FLUSH TABLES;
+# Drop the orphaned original table.
+# Files in datadir after manual recovery.
+t1.frm
+t1.ibd
+SHOW TABLES;
+Tables_in_test
+t1
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` int(11) NOT NULL,
+ PRIMARY KEY (`f2`,`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+INSERT INTO t1 VALUES (5,6),(7,8);
+SELECT * FROM t1;
+f1 f2
+1 2
+3 4
+5 6
+7 8
+DROP TABLE t1;
+CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
+ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
+DROP TABLE t1;
+# -- Scenario 2:
+# Crash the server in ha_innobase::commit_inplace_alter_table()
+# just before committing the dictionary changes, but after
+# writing the MLOG_FILE_RENAME records. As the mini-transaction
+# is not committed, the renames will not be replayed.
+CREATE TABLE t2 (f1 int not null, f2 int not null) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,2),(3,4);
+SET DEBUG_DBUG='+d,innodb_alter_commit_crash_before_commit';
+ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
+ERROR HY000: Lost connection to MySQL server during query
+# Startup the server after the crash
+# Read and remember the temporary table name
+# Manual *.frm recovery begin. The dictionary was not updated
+# and the files were not renamed. The rebuilt table
+# was left behind on purpose, to faciliate data recovery.
+# Manual recovery end
+# Drop the orphaned rebuilt table.
+SHOW TABLES;
+Tables_in_test
+t2
+INSERT INTO t2 VALUES (5,6),(7,8);
+SELECT * from t2;
+f1 f2
+1 2
+3 4
+5 6
+7 8
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `f1` int(11) NOT NULL,
+ `f2` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t2;
+CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
+ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
+DROP TABLE t2;
+# -------------------------
+# End of Testing Scenario 2
+# -------------------------
+#
+# Bug#19330255 WL#7142 - CRASH DURING ALTER TABLE LEADS TO
+# DATA DICTIONARY INCONSISTENCY
+#
+CREATE TABLE t1(a int PRIMARY KEY, b varchar(255), c int NOT NULL)
+ENGINE=InnoDB;
+INSERT INTO t1 SET a=1,c=2;
+SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
+ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart mysqld after the crash and reconnect.
+# Manual *.frm recovery begin.
+# Manual recovery end
+FLUSH TABLES;
+# Drop the orphaned original table.
+# Files in datadir after manual recovery.
+t1.frm
+t1.ibd
+SHOW TABLES;
+Tables_in_test
+t1
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL,
+ `b` varchar(255) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ KEY `b` (`b`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+UPDATE t1 SET d=NULL;
+SELECT * FROM t1;
+a b d
+1 NULL NULL
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result
index 66fc00e34d08b3e3fcef6b1b10d237ce1c82cf09..68528521fb6ff600012e4910f97ad5c87919b226 100644
--- a/mysql-test/suite/innodb/r/foreign-keys.result
+++ b/mysql-test/suite/innodb/r/foreign-keys.result
@@ -87,3 +87,16 @@ drop table t3;
drop table t2;
drop table t1;
set debug_sync='reset';
+#
+# MDEV-17595 - Server crashes in copy_data_between_tables or
+# Assertion `thd->transaction.stmt.is_empty() ||
+# (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)'
+# fails in close_tables_for_reopen upon concurrent
+# ALTER TABLE and FLUSH
+#
+CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1),(2);
+CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES(2);
+ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE;
+DROP TABLE t2, t1;
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index 4e253261f2e48626b41125bf93518e46df0ac9d1..e56e5308909db046abc7bb32703b14de20bbf118 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -82,3 +82,34 @@ ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
Warnings:
Warning 1088 failed to load FOREIGN KEY constraints
DROP TABLE t1;
+CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
+ENGINE=InnoDB;
+SET SESSION FOREIGN_KEY_CHECKS = OFF;
+ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
+SET SESSION FOREIGN_KEY_CHECKS = ON;
+ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
+Warnings:
+Warning 1088 failed to load FOREIGN KEY constraints
+ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
+DROP TABLE t1;
+#
+# MDEV-18630 Conditional jump or move depends on uninitialised value
+# in ib_push_warning / dict_create_foreign_constraints_low
+#
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+ALTER IGNORE TABLE t1 ADD FOREIGN KEY (a) REFERENCES t2 (b);
+ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
+SHOW WARNINGS;
+Level Code Message
+Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t2` not found in the data dictionary near 'FOREIGN KEY (a) REFERENCES t2 (b)'.
+Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
+Warning 1215 Cannot add foreign key constraint
+DROP TABLE t1;
+#
+# MDEV-18139 ALTER IGNORE ... ADD FOREIGN KEY causes bogus error
+#
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT, KEY(f1)) ENGINE=InnoDB;
+CREATE TABLE t2 (f INT, KEY(f)) ENGINE=InnoDB;
+ALTER TABLE t1 ADD FOREIGN KEY (f2) REFERENCES t2 (f);
+ALTER IGNORE TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f1);
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-nullable.result b/mysql-test/suite/innodb/r/innodb-alter-nullable.result
index 2769bfdf1f56045783143ce742601250a3308a60..3b96bac7a718f44fc9f8d18abd3fc9f7060b504c 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-nullable.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-nullable.result
@@ -55,3 +55,37 @@ CREATE TABLE t1(c1 INT) ENGINE=InnoDB;
ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1(c1);
ALTER TABLE t1 CHANGE c1 c1 INT NOT NULL,ADD KEY(c1);
DROP TABLE t1;
+#
+# MDEV-18732 InnoDB: ALTER IGNORE returns error for NULL
+#
+SET @mode = @@sql_mode;
+SET sql_mode = STRICT_TRANS_TABLES;
+CREATE TABLE t1(c INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL);
+ALTER IGNORE TABLE t1 MODIFY c INT NOT NULL;
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 1
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+INSERT INTO t1 VALUES (NULL);
+ERROR 23000: Column 'c' cannot be null
+SELECT * FROM t1;
+c
+0
+DROP TABLE t1;
+CREATE TABLE t1(c INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL),(1),(1);
+ALTER IGNORE TABLE t1 ADD UNIQUE(c);
+affected rows: 3
+info: Records: 3 Duplicates: 1 Warnings: 0
+ALTER IGNORE TABLE t1 ADD PRIMARY KEY(c);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 1
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+SELECT * FROM t1;
+c
+0
+1
+DROP TABLE t1;
+SET sql_mode = @mode;
diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result
index 52344e1e4719d1cc63694baf8983f178fa197e94..64c5586173e0bc536ef6876afa4af56afc8562c3 100644
--- a/mysql-test/suite/innodb/r/innodb-index.result
+++ b/mysql-test/suite/innodb/r/innodb-index.result
@@ -1213,3 +1213,30 @@ test.t1 check status OK
DROP TABLE t1;
SET GLOBAL innodb_file_format=@save_format;
SET GLOBAL innodb_large_prefix=@save_prefix;
+#
+# Bug#19811005 ALTER TABLE ADD INDEX DOES NOT UPDATE INDEX_LENGTH
+# IN I_S TABLES
+#
+CREATE TABLE t1(a INT, b INT) ENGINE=INNODB, STATS_PERSISTENT=1;
+SELECT cast(DATA_LENGTH/@@innodb_page_size as int) D,
+cast(INDEX_LENGTH/@@innodb_page_size as int) I
+FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test';
+D I
+1 0
+ALTER TABLE t1 ADD INDEX (a);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SELECT cast(DATA_LENGTH/@@innodb_page_size as int) D,
+cast(INDEX_LENGTH/@@innodb_page_size as int) I
+FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test';
+D I
+1 1
+ALTER TABLE t1 ADD INDEX (b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SELECT cast(DATA_LENGTH/@@innodb_page_size as int) D,
+cast(INDEX_LENGTH/@@innodb_page_size as int) I
+FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test';
+D I
+1 2
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-truncate.result b/mysql-test/suite/innodb/r/innodb-truncate.result
index f63e9272850738d1505305b1dc02f5c8a54db581..37ed19fa3fcee4714282fa8e43530fd400fd4596 100644
--- a/mysql-test/suite/innodb/r/innodb-truncate.result
+++ b/mysql-test/suite/innodb/r/innodb-truncate.result
@@ -66,3 +66,16 @@ a
1
2
DROP TABLE t1;
+call mtr.add_suppression('InnoDB: Error: in RENAME TABLE table `test`.`t3`');
+SET FOREIGN_KEY_CHECKS= OFF;
+CREATE TABLE t1 (f2 INT, f4 INT, KEY(f2), FOREIGN KEY (f4) REFERENCES t3 (f4)) ENGINE=InnoDB;
+SET FOREIGN_KEY_CHECKS= ON;
+CREATE TABLE t2 (f2 INT, FOREIGN KEY(f2) REFERENCES t1 (f2)) ENGINE=InnoDB;
+CREATE TABLE t3 (a INT) ENGINE=InnoDB;
+ERROR HY000: Can't create table `test`.`t3` (errno: 150 "Foreign key constraint is incorrectly formed")
+ALTER TABLE t1 RENAME TO t3;
+ERROR HY000: Error on rename of './test/t1' to './test/t3' (errno: 150 "Foreign key constraint is incorrectly formed")
+ALTER TABLE t1 FORCE;
+TRUNCATE TABLE t1;
+ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `test`.`t3` (`f2`))
+DROP TABLE t2, t1;
diff --git a/mysql-test/suite/innodb/r/xa_debug.result b/mysql-test/suite/innodb/r/xa_debug.result
new file mode 100644
index 0000000000000000000000000000000000000000..f1fd3f14220bfe546fb25ae92a7bc3ac40238873
--- /dev/null
+++ b/mysql-test/suite/innodb/r/xa_debug.result
@@ -0,0 +1,311 @@
+call mtr.add_suppression("Found 50 prepared XA transactions");
+create table t1 (a int) engine=innodb;
+insert into t1 values(1);
+xa start 'test50';
+insert into t1 values(1);
+xa end 'test50';
+xa prepare 'test50';
+xa start 'test49';
+insert into t1 values(1);
+xa end 'test49';
+xa prepare 'test49';
+xa start 'test48';
+insert into t1 values(1);
+xa end 'test48';
+xa prepare 'test48';
+xa start 'test47';
+insert into t1 values(1);
+xa end 'test47';
+xa prepare 'test47';
+xa start 'test46';
+insert into t1 values(1);
+xa end 'test46';
+xa prepare 'test46';
+xa start 'test45';
+insert into t1 values(1);
+xa end 'test45';
+xa prepare 'test45';
+xa start 'test44';
+insert into t1 values(1);
+xa end 'test44';
+xa prepare 'test44';
+xa start 'test43';
+insert into t1 values(1);
+xa end 'test43';
+xa prepare 'test43';
+xa start 'test42';
+insert into t1 values(1);
+xa end 'test42';
+xa prepare 'test42';
+xa start 'test41';
+insert into t1 values(1);
+xa end 'test41';
+xa prepare 'test41';
+xa start 'test40';
+insert into t1 values(1);
+xa end 'test40';
+xa prepare 'test40';
+xa start 'test39';
+insert into t1 values(1);
+xa end 'test39';
+xa prepare 'test39';
+xa start 'test38';
+insert into t1 values(1);
+xa end 'test38';
+xa prepare 'test38';
+xa start 'test37';
+insert into t1 values(1);
+xa end 'test37';
+xa prepare 'test37';
+xa start 'test36';
+insert into t1 values(1);
+xa end 'test36';
+xa prepare 'test36';
+xa start 'test35';
+insert into t1 values(1);
+xa end 'test35';
+xa prepare 'test35';
+xa start 'test34';
+insert into t1 values(1);
+xa end 'test34';
+xa prepare 'test34';
+xa start 'test33';
+insert into t1 values(1);
+xa end 'test33';
+xa prepare 'test33';
+xa start 'test32';
+insert into t1 values(1);
+xa end 'test32';
+xa prepare 'test32';
+xa start 'test31';
+insert into t1 values(1);
+xa end 'test31';
+xa prepare 'test31';
+xa start 'test30';
+insert into t1 values(1);
+xa end 'test30';
+xa prepare 'test30';
+xa start 'test29';
+insert into t1 values(1);
+xa end 'test29';
+xa prepare 'test29';
+xa start 'test28';
+insert into t1 values(1);
+xa end 'test28';
+xa prepare 'test28';
+xa start 'test27';
+insert into t1 values(1);
+xa end 'test27';
+xa prepare 'test27';
+xa start 'test26';
+insert into t1 values(1);
+xa end 'test26';
+xa prepare 'test26';
+xa start 'test25';
+insert into t1 values(1);
+xa end 'test25';
+xa prepare 'test25';
+xa start 'test24';
+insert into t1 values(1);
+xa end 'test24';
+xa prepare 'test24';
+xa start 'test23';
+insert into t1 values(1);
+xa end 'test23';
+xa prepare 'test23';
+xa start 'test22';
+insert into t1 values(1);
+xa end 'test22';
+xa prepare 'test22';
+xa start 'test21';
+insert into t1 values(1);
+xa end 'test21';
+xa prepare 'test21';
+xa start 'test20';
+insert into t1 values(1);
+xa end 'test20';
+xa prepare 'test20';
+xa start 'test19';
+insert into t1 values(1);
+xa end 'test19';
+xa prepare 'test19';
+xa start 'test18';
+insert into t1 values(1);
+xa end 'test18';
+xa prepare 'test18';
+xa start 'test17';
+insert into t1 values(1);
+xa end 'test17';
+xa prepare 'test17';
+xa start 'test16';
+insert into t1 values(1);
+xa end 'test16';
+xa prepare 'test16';
+xa start 'test15';
+insert into t1 values(1);
+xa end 'test15';
+xa prepare 'test15';
+xa start 'test14';
+insert into t1 values(1);
+xa end 'test14';
+xa prepare 'test14';
+xa start 'test13';
+insert into t1 values(1);
+xa end 'test13';
+xa prepare 'test13';
+xa start 'test12';
+insert into t1 values(1);
+xa end 'test12';
+xa prepare 'test12';
+xa start 'test11';
+insert into t1 values(1);
+xa end 'test11';
+xa prepare 'test11';
+xa start 'test10';
+insert into t1 values(1);
+xa end 'test10';
+xa prepare 'test10';
+xa start 'test9';
+insert into t1 values(1);
+xa end 'test9';
+xa prepare 'test9';
+xa start 'test8';
+insert into t1 values(1);
+xa end 'test8';
+xa prepare 'test8';
+xa start 'test7';
+insert into t1 values(1);
+xa end 'test7';
+xa prepare 'test7';
+xa start 'test6';
+insert into t1 values(1);
+xa end 'test6';
+xa prepare 'test6';
+xa start 'test5';
+insert into t1 values(1);
+xa end 'test5';
+xa prepare 'test5';
+xa start 'test4';
+insert into t1 values(1);
+xa end 'test4';
+xa prepare 'test4';
+xa start 'test3';
+insert into t1 values(1);
+xa end 'test3';
+xa prepare 'test3';
+xa start 'test2';
+insert into t1 values(1);
+xa end 'test2';
+xa prepare 'test2';
+xa start 'test1';
+insert into t1 values(1);
+xa end 'test1';
+xa prepare 'test1';
+FLUSH TABLES;
+xa recover;
+formatID gtrid_length bqual_length data
+1 5 0 test1
+1 5 0 test2
+1 5 0 test3
+1 5 0 test4
+1 5 0 test5
+1 5 0 test6
+1 5 0 test7
+1 5 0 test8
+1 5 0 test9
+1 6 0 test10
+1 6 0 test11
+1 6 0 test12
+1 6 0 test13
+1 6 0 test14
+1 6 0 test15
+1 6 0 test16
+1 6 0 test17
+1 6 0 test18
+1 6 0 test19
+1 6 0 test20
+1 6 0 test21
+1 6 0 test22
+1 6 0 test23
+1 6 0 test24
+1 6 0 test25
+1 6 0 test26
+1 6 0 test27
+1 6 0 test28
+1 6 0 test29
+1 6 0 test30
+1 6 0 test31
+1 6 0 test32
+1 6 0 test33
+1 6 0 test34
+1 6 0 test35
+1 6 0 test36
+1 6 0 test37
+1 6 0 test38
+1 6 0 test39
+1 6 0 test40
+1 6 0 test41
+1 6 0 test42
+1 6 0 test43
+1 6 0 test44
+1 6 0 test45
+1 6 0 test46
+1 6 0 test47
+1 6 0 test48
+1 6 0 test49
+1 6 0 test50
+xa recover;
+formatID gtrid_length bqual_length data
+1 5 0 test1
+1 5 0 test2
+1 5 0 test3
+1 5 0 test4
+1 5 0 test5
+1 5 0 test6
+1 5 0 test7
+1 5 0 test8
+1 5 0 test9
+1 6 0 test10
+1 6 0 test11
+1 6 0 test12
+1 6 0 test13
+1 6 0 test14
+1 6 0 test15
+1 6 0 test16
+1 6 0 test17
+1 6 0 test18
+1 6 0 test19
+1 6 0 test20
+1 6 0 test21
+1 6 0 test22
+1 6 0 test23
+1 6 0 test24
+1 6 0 test25
+1 6 0 test26
+1 6 0 test27
+1 6 0 test28
+1 6 0 test29
+1 6 0 test30
+1 6 0 test31
+1 6 0 test32
+1 6 0 test33
+1 6 0 test34
+1 6 0 test35
+1 6 0 test36
+1 6 0 test37
+1 6 0 test38
+1 6 0 test39
+1 6 0 test40
+1 6 0 test41
+1 6 0 test42
+1 6 0 test43
+1 6 0 test44
+1 6 0 test45
+1 6 0 test46
+1 6 0 test47
+1 6 0 test48
+1 6 0 test49
+1 6 0 test50
+xa recover;
+formatID gtrid_length bqual_length data
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/alter_crash.test b/mysql-test/suite/innodb/t/alter_crash.test
new file mode 100644
index 0000000000000000000000000000000000000000..b417b441723a056d8141fffaa026062be37d3ef0
--- /dev/null
+++ b/mysql-test/suite/innodb/t/alter_crash.test
@@ -0,0 +1,229 @@
+# Crash-safe InnoDB ALTER operations
+
+--source include/not_valgrind.inc
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/not_crashrep.inc
+
+--disable_query_log
+call mtr.add_suppression('InnoDB: Flagged corruption of c[23]');
+--enable_query_log
+
+--echo #
+--echo # Bug#20015132 ALTER TABLE FAILS TO CHECK IF TABLE IS CORRUPTED
+--echo #
+
+CREATE TABLE t1(c1 INT PRIMARY KEY, c2 CHAR(1), c3 INT UNSIGNED) ENGINE=InnoDB;
+SET @saved_debug_dbug = @@SESSION.debug_dbug;
+SET DEBUG_DBUG='+d,create_index_metadata_fail';
+--error ER_RECORD_FILE_FULL
+ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
+
+SET DEBUG_DBUG='+d,ib_create_table_fail_too_many_trx';
+--error ER_TOO_MANY_CONCURRENT_TRXS
+ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
+
+SET DEBUG_DBUG=@saved_debug_dbug;
+ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
+# Flag the secondary indexes corrupted.
+SET DEBUG_DBUG='+d,dict_set_index_corrupted';
+CHECK TABLE t1;
+
+# Ensure that the corruption is permanent.
+--source include/restart_mysqld.inc
+CHECK TABLE t1;
+ALTER TABLE t1 DROP INDEX c2;
+CHECK TABLE t1;
+# We refuse an ALTER TABLE that would modify the InnoDB data dictionary
+# while leaving some of the table corrupted.
+--error ER_INDEX_CORRUPT
+ALTER TABLE t1 ADD INDEX (c2,c3);
+# This will rebuild the table, uncorrupting all secondary indexes.
+ALTER TABLE t1 CHANGE c3 c3 INT NOT NULL;
+CHECK TABLE t1;
+ALTER TABLE t1 ADD INDEX (c2,c3);
+DROP TABLE t1;
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+let datadir= `select @@datadir`;
+
+# These are from include/shutdown_mysqld.inc and allow to call start_mysqld.inc
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+
+--echo #
+--echo # Bug #14669848 CRASH DURING ALTER MAKES ORIGINAL TABLE INACCESSIBLE
+--echo #
+--echo # -- Scenario 1:
+--echo # Crash the server in ha_innobase::commit_inplace_alter_table()
+--echo # just after committing the dictionary changes.
+
+CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
+INSERT INTO t1 VALUES (1,2),(3,4);
+SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
+
+let $orig_table_id = `SELECT table_id
+ FROM information_schema.innodb_sys_tables
+ WHERE name = 'test/t1'`;
+
+# Write file to make mysql-test-run.pl expect crash
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+
+--error 2013
+ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
+
+--echo # Restart mysqld after the crash and reconnect.
+--source include/start_mysqld.inc
+
+let $temp_table_name = `SELECT SUBSTR(name, 6)
+ FROM information_schema.innodb_sys_tables
+ WHERE table_id = $orig_table_id`;
+
+--echo # Manual *.frm recovery begin.
+
+--move_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/$temp_table_name.frm
+
+perl;
+my @frm_file = glob "$ENV{'datadir'}/test/#sql-*.frm";
+my $t1_frm = "$ENV{'datadir'}/test/t1.frm";
+rename($frm_file[0], $t1_frm);
+EOF
+
+--echo # Manual recovery end
+
+FLUSH TABLES;
+
+--echo # Drop the orphaned original table.
+--disable_query_log
+eval DROP TABLE `#mysql50#$temp_table_name`;
+--enable_query_log
+
+--echo # Files in datadir after manual recovery.
+--list_files $MYSQLD_DATADIR/test
+
+SHOW TABLES;
+SHOW CREATE TABLE t1;
+INSERT INTO t1 VALUES (5,6),(7,8);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
+ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
+DROP TABLE t1;
+
+--echo # -- Scenario 2:
+--echo # Crash the server in ha_innobase::commit_inplace_alter_table()
+--echo # just before committing the dictionary changes, but after
+--echo # writing the MLOG_FILE_RENAME records. As the mini-transaction
+--echo # is not committed, the renames will not be replayed.
+
+CREATE TABLE t2 (f1 int not null, f2 int not null) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,2),(3,4);
+SET DEBUG_DBUG='+d,innodb_alter_commit_crash_before_commit';
+
+let $orig_table_id = `SELECT table_id
+ FROM information_schema.innodb_sys_tables
+ WHERE name = 'test/t2'`;
+
+# Write file to make mysql-test-run.pl expect crash
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+
+--error 2013
+ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
+
+--echo # Startup the server after the crash
+--source include/start_mysqld.inc
+
+--echo # Read and remember the temporary table name
+let $temp_table_name = `SELECT SUBSTRING(name,6)
+ FROM information_schema.innodb_sys_tables
+ WHERE name LIKE "test/#sql-ib$orig_table_id%"`;
+# This second copy is an environment variable for the perl script below.
+let temp_table_name = $temp_table_name;
+
+--echo # Manual *.frm recovery begin. The dictionary was not updated
+--echo # and the files were not renamed. The rebuilt table
+--echo # was left behind on purpose, to faciliate data recovery.
+
+perl;
+my @frm_file = glob "$ENV{'datadir'}/test/#sql-*.frm";
+my $target_frm = "$ENV{'datadir'}/test/$ENV{'temp_table_name'}.frm";
+rename($frm_file[0], $target_frm);
+EOF
+
+--echo # Manual recovery end
+
+--echo # Drop the orphaned rebuilt table.
+--disable_query_log
+eval DROP TABLE `#mysql50#$temp_table_name`;
+--enable_query_log
+
+SHOW TABLES;
+INSERT INTO t2 VALUES (5,6),(7,8);
+SELECT * from t2;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
+ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
+DROP TABLE t2;
+--list_files $MYSQLD_DATADIR/test
+
+--echo # -------------------------
+--echo # End of Testing Scenario 2
+--echo # -------------------------
+
+--echo #
+--echo # Bug#19330255 WL#7142 - CRASH DURING ALTER TABLE LEADS TO
+--echo # DATA DICTIONARY INCONSISTENCY
+--echo #
+
+CREATE TABLE t1(a int PRIMARY KEY, b varchar(255), c int NOT NULL)
+ENGINE=InnoDB;
+INSERT INTO t1 SET a=1,c=2;
+SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
+
+let $orig_table_id = `select table_id from
+ information_schema.innodb_sys_tables where name = 'test/t1'`;
+
+# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
+# Write file to make mysql-test-run.pl expect crash
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+#
+--error 2013
+ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
+
+--echo # Restart mysqld after the crash and reconnect.
+--source include/start_mysqld.inc
+
+let $temp_table_name = `SELECT SUBSTR(name, 6)
+ FROM information_schema.innodb_sys_tables
+ WHERE table_id = $orig_table_id`;
+
+--echo # Manual *.frm recovery begin.
+--move_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/$temp_table_name.frm
+
+perl;
+my @frm_file = glob "$ENV{'datadir'}/test/#sql-*.frm";
+my $t1_frm = "$ENV{'datadir'}/test/t1.frm";
+rename($frm_file[0], $t1_frm);
+EOF
+
+--echo # Manual recovery end
+
+FLUSH TABLES;
+
+--echo # Drop the orphaned original table.
+--disable_query_log
+eval DROP TABLE `#mysql50#$temp_table_name`;
+--enable_query_log
+
+--echo # Files in datadir after manual recovery.
+--list_files $MYSQLD_DATADIR/test
+
+SHOW TABLES;
+SHOW CREATE TABLE t1;
+UPDATE t1 SET d=NULL;
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test
index 7ef440b260b9aad052b4af324d055d004247118a..ced44a89d7c540ce53a4c55a68f4b402b657c810 100644
--- a/mysql-test/suite/innodb/t/foreign-keys.test
+++ b/mysql-test/suite/innodb/t/foreign-keys.test
@@ -111,3 +111,18 @@ drop table t3;
drop table t2;
drop table t1;
set debug_sync='reset';
+
+
+--echo #
+--echo # MDEV-17595 - Server crashes in copy_data_between_tables or
+--echo # Assertion `thd->transaction.stmt.is_empty() ||
+--echo # (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)'
+--echo # fails in close_tables_for_reopen upon concurrent
+--echo # ALTER TABLE and FLUSH
+--echo #
+CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1),(2);
+CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES(2);
+ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE;
+DROP TABLE t2, t1;
diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test
index b4e2ee1bbe74c8ff176b832e3167f868052f081b..08fe44911b5e278fb9bc3ae0cea44439d492ac98 100644
--- a/mysql-test/suite/innodb/t/foreign_key.test
+++ b/mysql-test/suite/innodb/t/foreign_key.test
@@ -104,3 +104,33 @@ SET SESSION FOREIGN_KEY_CHECKS = ON;
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
DROP TABLE t1;
+
+CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
+ENGINE=InnoDB;
+SET SESSION FOREIGN_KEY_CHECKS = OFF;
+ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
+SET SESSION FOREIGN_KEY_CHECKS = ON;
+ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
+ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18630 Conditional jump or move depends on uninitialised value
+--echo # in ib_push_warning / dict_create_foreign_constraints_low
+--echo #
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+--replace_regex /#sql-[0-9_a-f-]*/#sql-temporary/
+--error ER_CANT_CREATE_TABLE
+ALTER IGNORE TABLE t1 ADD FOREIGN KEY (a) REFERENCES t2 (b);
+--replace_regex /#sql-[0-9_a-f-]*/#sql-temporary/
+SHOW WARNINGS;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18139 ALTER IGNORE ... ADD FOREIGN KEY causes bogus error
+--echo #
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT, KEY(f1)) ENGINE=InnoDB;
+CREATE TABLE t2 (f INT, KEY(f)) ENGINE=InnoDB;
+ALTER TABLE t1 ADD FOREIGN KEY (f2) REFERENCES t2 (f);
+ALTER IGNORE TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f1);
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-nullable.test b/mysql-test/suite/innodb/t/innodb-alter-nullable.test
index d039459f91f0d195a3b07a2a707b48717ba5bcbd..81e464eddace63a9c564058fd2174c8bc50f4bed 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-nullable.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-nullable.test
@@ -76,6 +76,32 @@ ALTER TABLE t1 ADD CONSTRAINT UNIQUE KEY i1(c1);
ALTER TABLE t1 CHANGE c1 c1 INT NOT NULL,ADD KEY(c1);
DROP TABLE t1;
+--echo #
+--echo # MDEV-18732 InnoDB: ALTER IGNORE returns error for NULL
+--echo #
+
+SET @mode = @@sql_mode;
+SET sql_mode = STRICT_TRANS_TABLES;
+CREATE TABLE t1(c INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL);
+--enable_info
+ALTER IGNORE TABLE t1 MODIFY c INT NOT NULL;
+--disable_info
+--error ER_BAD_NULL_ERROR
+INSERT INTO t1 VALUES (NULL);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1(c INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (NULL),(1),(1);
+--enable_info
+ALTER IGNORE TABLE t1 ADD UNIQUE(c);
+ALTER IGNORE TABLE t1 ADD PRIMARY KEY(c);
+--disable_info
+SELECT * FROM t1;
+DROP TABLE t1;
+SET sql_mode = @mode;
+
# 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/mysql-test/suite/innodb/t/innodb-corrupted-table.test b/mysql-test/suite/innodb/t/innodb-corrupted-table.test
index 94c5454429f565f979a7eaf7f4dfaa363ae8a3a7..c8e17e5b7aa5e357070e15ca1178d95b55f4c081 100644
--- a/mysql-test/suite/innodb/t/innodb-corrupted-table.test
+++ b/mysql-test/suite/innodb/t/innodb-corrupted-table.test
@@ -34,6 +34,7 @@ alter table t1 add primary key (pk);
--enable_reconnect
--source include/wait_until_connected_again.inc
+--enable_prepare_warnings
show create table t1;
select * from t1;
alter table t1 add j int;
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index d28930de8152b1382297c1d90c62e510c2389653..86ac1a8123e100db50cc17bf499f5ea1611466d2 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -593,3 +593,23 @@ CHECK TABLE t1;
DROP TABLE t1;
SET GLOBAL innodb_file_format=@save_format;
SET GLOBAL innodb_large_prefix=@save_prefix;
+
+--echo #
+--echo # Bug#19811005 ALTER TABLE ADD INDEX DOES NOT UPDATE INDEX_LENGTH
+--echo # IN I_S TABLES
+--echo #
+let $i_s_query=SELECT cast(DATA_LENGTH/@@innodb_page_size as int) D,
+cast(INDEX_LENGTH/@@innodb_page_size as int) I
+FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test';
+
+CREATE TABLE t1(a INT, b INT) ENGINE=INNODB, STATS_PERSISTENT=1;
+eval $i_s_query;
+--enable_info
+ALTER TABLE t1 ADD INDEX (a);
+--disable_info
+eval $i_s_query;
+--enable_info
+ALTER TABLE t1 ADD INDEX (b);
+--disable_info
+eval $i_s_query;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-truncate.test b/mysql-test/suite/innodb/t/innodb-truncate.test
index ae25aabd323f0ad2a5d325184645fd5a20eee0a6..a5b500a4ea528a4c43edb199815990f0808dac99 100644
--- a/mysql-test/suite/innodb/t/innodb-truncate.test
+++ b/mysql-test/suite/innodb/t/innodb-truncate.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+let $datadir=`select @@datadir`;
--echo #
--echo # TRUNCATE TABLE
--echo #
@@ -62,3 +63,20 @@ INSERT INTO t1 VALUES (NULL), (NULL);
SELECT * FROM t1 ORDER BY a;
DROP TABLE t1;
+#
+# MDEV-18923 Assertion `!lex_string_cmp(system_charset_info, fk_info->referenced_table, &table->s->table_name)' failed in fk_truncate_illegal_if_parent
+#
+call mtr.add_suppression('InnoDB: Error: in RENAME TABLE table `test`.`t3`');
+SET FOREIGN_KEY_CHECKS= OFF;
+CREATE TABLE t1 (f2 INT, f4 INT, KEY(f2), FOREIGN KEY (f4) REFERENCES t3 (f4)) ENGINE=InnoDB;
+SET FOREIGN_KEY_CHECKS= ON;
+CREATE TABLE t2 (f2 INT, FOREIGN KEY(f2) REFERENCES t1 (f2)) ENGINE=InnoDB;
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE t3 (a INT) ENGINE=InnoDB;
+--replace_result $datadir ./
+--error ER_ERROR_ON_RENAME
+ALTER TABLE t1 RENAME TO t3;
+ALTER TABLE t1 FORCE;
+--error ER_TRUNCATE_ILLEGAL_FK
+TRUNCATE TABLE t1;
+DROP TABLE t2, t1;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index 087d0c6a7dc6f7b8500ee0dc9bc944ee85e3899f..8d1004e679f25b8115116b38b6bbbd3bcb6d33a9 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -1119,7 +1119,7 @@ checksum table t1, t2, t3, t4 extended;
drop table t1,t2,t3;
#
-# Test problem with refering to different fields in same table in UNION
+# Test problem with referring to different fields in same table in UNION
# (Bug #2552)
#
create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb;
diff --git a/mysql-test/suite/innodb/t/xa_debug.test b/mysql-test/suite/innodb/t/xa_debug.test
new file mode 100644
index 0000000000000000000000000000000000000000..5e38ba1124bafd2087f5bba959caeb4fe288e924
--- /dev/null
+++ b/mysql-test/suite/innodb/t/xa_debug.test
@@ -0,0 +1,46 @@
+-- source include/have_innodb.inc
+-- source include/have_debug.inc
+-- source include/not_embedded.inc
+
+call mtr.add_suppression("Found 50 prepared XA transactions");
+create table t1 (a int) engine=innodb;
+insert into t1 values(1);
+
+let $trial = 50;
+while ($trial)
+{
+--connect (con$trial, localhost, root,,)
+let $st_pre = `select concat('test', $trial)`;
+eval xa start '$st_pre';
+insert into t1 values(1);
+eval xa end '$st_pre';
+eval xa prepare '$st_pre';
+dec $trial;
+}
+
+connection default;
+# Kill and restart the server.
+FLUSH TABLES;
+-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+-- shutdown_server 0
+-- source include/wait_until_disconnected.inc
+
+-- exec echo "restart:--debug_dbug=+d,min_xa_len" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+-- enable_reconnect
+-- source include/wait_until_connected_again.inc
+-- disable_reconnect
+--sorted_result
+xa recover;
+--sorted_result
+xa recover;
+--disable_query_log
+let $trial = 50;
+while ($trial)
+{
+let $st_pre = `select concat('test', $trial)`;
+eval xa commit '$st_pre';
+dec $trial;
+}
+--enable_query_log
+xa recover;
+drop table t1;
diff --git a/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt b/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt
index 52b6b743ac81073c6c9ef25950f304995f918ed9..28848b9b086ac513699f75c555ec5b791f64026f 100644
--- a/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt
+++ b/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt
@@ -1 +1 @@
---innodb --innodb-data-home-dir= --innodb-data-file-path=$MYSQLTEST_VARDIR/tmp/absolute_path_ibdata1:3M;ibdata_second:1M:autoextend
\ No newline at end of file
+--innodb --innodb-data-home-dir= --innodb-data-file-path=$MYSQLTEST_VARDIR/tmp/absolute_path_ibdata1:6M;ibdata_second:1M:autoextend
diff --git a/mysql-test/suite/mariabackup/absolute_ibdata_paths.test b/mysql-test/suite/mariabackup/absolute_ibdata_paths.test
index 6717f16d1999f701ce411c59e5f7094c941b0689..fa304f0bc5563bfe94f0960d2a3df1d7ce5ba3a7 100644
--- a/mysql-test/suite/mariabackup/absolute_ibdata_paths.test
+++ b/mysql-test/suite/mariabackup/absolute_ibdata_paths.test
@@ -2,12 +2,32 @@
# Innodb system tablespace is specified with absolute path in the .opt file
CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1);
+
+let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
+let MYSQLD_DATADIR= `SELECT @@datadir`;
+--source include/shutdown_mysqld.inc
+perl;
+my $file= "$ENV{MYSQLD_DATADIR}/ibdata_second";
+open(FILE, "+<", $file) or die "Unable to open $file\n";
+binmode FILE;
+my $ps= $ENV{INNODB_PAGE_SIZE};
+my $page;
+my $pos = $ps * 0;
+sysseek(FILE, $pos, 0) || die "Unable to seek $file\n";
+die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
+substr($page,26,8) = pack("NN", 1, 1);
+sysseek(FILE, $pos, 0) || die "Unable to rewind $file\n";
+syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
+close(FILE) || die "Unable to close $file\n";
+EOF
+
+--source include/start_mysqld.inc
+
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $_innodb_data_file_path=`select @@innodb_data_file_path`;
let $_innodb_data_home_dir=`select @@innodb_data_home_dir`;
-let $_datadir= `SELECT @@datadir`;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
@@ -16,11 +36,11 @@ exec $XTRABACKUP --prepare --target-dir=$targetdir;
--source include/shutdown_mysqld.inc
echo # remove datadir;
-rmdir $_datadir;
+rmdir $MYSQLD_DATADIR;
#remove out-of-datadir ibdata1
remove_file $MYSQLTEST_VARDIR/tmp/absolute_path_ibdata1;
echo # xtrabackup copy back;
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir --target-dir=$targetdir "--innodb_data_file_path=$_innodb_data_file_path" --innodb_data_home_dir=$_innodb_data_home_dir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$MYSQLD_DATADIR --target-dir=$targetdir "--innodb_data_file_path=$_innodb_data_file_path" --innodb_data_home_dir=$_innodb_data_home_dir;
echo # restart server;
--source include/start_mysqld.inc
--enable_result_log
diff --git a/mysql-test/suite/mariabackup/page_compression_level.result b/mysql-test/suite/mariabackup/page_compression_level.result
new file mode 100644
index 0000000000000000000000000000000000000000..6273d79f56a94faf7e4cc9a29da946cdcf85cb20
--- /dev/null
+++ b/mysql-test/suite/mariabackup/page_compression_level.result
@@ -0,0 +1,14 @@
+set global innodb_compression_level = 3;
+CREATE TABLE t1(c1 INT, b CHAR(20)) ENGINE=INNODB PAGE_COMPRESSED=1;
+INSERT INTO t1 VALUES(1, 'mariadb');
+# xtrabackup backup
+# xtrabackup prepare
+FOUND /innodb_compression_level=3/ in backup-my.cnf
+DELETE FROM t1;
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1 IMPORT TABLESPACE;
+SELECT * FROM t1;
+c1 b
+1 mariadb
+DROP TABLE t1;
+set global innodb_compression_level = default;
diff --git a/mysql-test/suite/mariabackup/page_compression_level.test b/mysql-test/suite/mariabackup/page_compression_level.test
new file mode 100644
index 0000000000000000000000000000000000000000..e80c956e6210af59f5c827e858f7e5b12a5d444c
--- /dev/null
+++ b/mysql-test/suite/mariabackup/page_compression_level.test
@@ -0,0 +1,31 @@
+#--source include/innodb_page_size.inc
+
+set global innodb_compression_level = 3;
+CREATE TABLE t1(c1 INT, b CHAR(20)) ENGINE=INNODB PAGE_COMPRESSED=1;
+INSERT INTO t1 VALUES(1, 'mariadb');
+
+echo # xtrabackup backup;
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+echo # xtrabackup prepare;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.1 --prepare --export --target-dir=$targetdir;
+--enable_result_log
+
+--let SEARCH_PATTERN=innodb_compression_level=3
+--let SEARCH_FILE=$targetdir/backup-my.cnf
+--source include/search_pattern_in_file.inc
+
+DELETE FROM t1;
+ALTER TABLE t1 DISCARD TABLESPACE;
+let $MYSQLD_DATADIR= `select @@datadir`;
+copy_file $targetdir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd;
+copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg;
+ALTER TABLE t1 IMPORT TABLESPACE;
+
+SELECT * FROM t1;
+
+DROP TABLE t1;
+set global innodb_compression_level = default;
+rmdir $targetdir;
diff --git a/mysql-test/suite/parts/r/partition_auto_increment_max.result b/mysql-test/suite/parts/r/partition_auto_increment_max.result
new file mode 100644
index 0000000000000000000000000000000000000000..65a3900e8e6ae66fb1fb92e828509441209a27f2
--- /dev/null
+++ b/mysql-test/suite/parts/r/partition_auto_increment_max.result
@@ -0,0 +1,7 @@
+CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) PARTITION BY KEY (pk) PARTITIONS 2;
+INSERT INTO t1 VALUES (NULL),(NULL);
+UPDATE t1 SET pk = 2147483647;
+ERROR 23000: Duplicate entry '2147483647' for key 'PRIMARY'
+REPLACE INTO t1 VALUES (NULL);
+ERROR 22003: Out of range value for column 'pk' at row 1
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/t/partition_auto_increment_max.test b/mysql-test/suite/parts/t/partition_auto_increment_max.test
new file mode 100644
index 0000000000000000000000000000000000000000..74e6139131dab92ffa38e4d2896d3563390e09a1
--- /dev/null
+++ b/mysql-test/suite/parts/t/partition_auto_increment_max.test
@@ -0,0 +1,12 @@
+--source include/have_partition.inc
+--source include/have_log_bin.inc
+
+CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) PARTITION BY KEY (pk) PARTITIONS 2;
+INSERT INTO t1 VALUES (NULL),(NULL);
+
+--error ER_DUP_ENTRY
+UPDATE t1 SET pk = 2147483647;
+--error HA_ERR_AUTOINC_ERANGE
+REPLACE INTO t1 VALUES (NULL);
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
index 2bcebe06e968858def653450d0b8e6fb170e2b9b..cbaeec201e03b8319ebeb0de33cc4e1d0469c8a1 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
@@ -1,6 +1,8 @@
"Testing mysql_upgrade with EVENT performance_schema.user_event"
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
update mysql.event set db='performance_schema' where name='user_event';
select name from mysql.event where db='performance_schema';
name
diff --git a/mysql-test/suite/plugins/r/pam.result b/mysql-test/suite/plugins/r/pam.result
index 86303206b3b1c3f3297cfe797fa5096d5e9a43ab..46f1223d7b3fe201693308d0883fde12ca4fa093 100644
--- a/mysql-test/suite/plugins/r/pam.result
+++ b/mysql-test/suite/plugins/r/pam.result
@@ -22,4 +22,24 @@ Now, the magic number!
PIN: ****
drop user test_pam;
drop user pam_test;
+create user PAM_TEST identified via pam using 'mariadb_mtr';
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: not very secret challenge
+Now, the magic number!
+PIN: ****
+set global pam_winbind_workaround=1;
+#
+# athentication is successful
+#
+Challenge input first.
+Enter: not very secret challenge
+Now, the magic number!
+PIN: ****
+select user(), current_user(), database();
+user() current_user() database()
+PAM_TEST@localhost PAM_TEST@% test
+drop user PAM_TEST;
uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/t/pam.test b/mysql-test/suite/plugins/t/pam.test
index 8a95d6baed2f101f8f81f71afafaec4b8066654c..8441b83c5c3d1e0de9c7c933bdabc87d9b13c555 100644
--- a/mysql-test/suite/plugins/t/pam.test
+++ b/mysql-test/suite/plugins/t/pam.test
@@ -17,18 +17,34 @@ EOF
--echo # athentication is successful, challenge/pin are ok
--echo # note that current_user() differs from user()
--echo #
---exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_good.txt
--echo #
--echo # athentication is unsuccessful
--echo #
--error 1
---exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+--exec $MYSQL_TEST -u test_pam < $MYSQLTEST_VARDIR/tmp/pam_bad.txt
---remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
---remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
drop user test_pam;
drop user pam_test;
+create user PAM_TEST identified via pam using 'mariadb_mtr';
+
+--echo #
+--echo # athentication is unsuccessful
+--echo #
+--error 1
+--exec $MYSQL_TEST -u PAM_TEST < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+
+set global pam_winbind_workaround=1;
+--echo #
+--echo # athentication is successful
+--echo #
+--exec $MYSQL_TEST -u PAM_TEST < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
+drop user PAM_TEST;
+
let $count_sessions= 1;
--source include/wait_until_count_sessions.inc
uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/t/thread_pool_server_audit.test b/mysql-test/suite/plugins/t/thread_pool_server_audit.test
index 724000c97891a6dd9a5944c5d430ca8b0533e90d..7347d8f99ffde70bc8f4971ee8bd88cd739b821d 100644
--- a/mysql-test/suite/plugins/t/thread_pool_server_audit.test
+++ b/mysql-test/suite/plugins/t/thread_pool_server_audit.test
@@ -42,8 +42,10 @@ select 1,
3;
insert into t2 values (1), (2);
select * from t2;
+--disable_ps_protocol
--error ER_NO_SUCH_TABLE
select * from t_doesnt_exist;
+--enable_ps_protocol
--error 1064
syntax_error_query;
drop table renamed_t1, t2;
diff --git a/mysql-test/suite/roles/flush_roles-17898.result b/mysql-test/suite/roles/flush_roles-17898.result
index c09fa166dc08c17696e450d2457e54231f21631c..71ae28dd4ff5ecfe7983255358eac65bcc5a1800 100644
--- a/mysql-test/suite/roles/flush_roles-17898.result
+++ b/mysql-test/suite/roles/flush_roles-17898.result
@@ -11,3 +11,30 @@ flush privileges;
drop role dwr_foo;
drop role dwr_bar;
drop role dwr_qux_dev;
+use test;
+create table db_copy as select * from mysql.db;
+delete from mysql.db;
+flush privileges;
+create user u1@localhost;
+create role r1;
+create role r2;
+grant r1 to u1@localhost;
+grant select on test.* to r2;
+grant select on m_.* to r2;
+grant r2 to r1;
+show grants for u1@localhost;
+Grants for u1@localhost
+GRANT r1 TO 'u1'@'localhost'
+GRANT USAGE ON *.* TO 'u1'@'localhost'
+show grants for r1;
+Grants for r1
+GRANT r2 TO 'r1'
+GRANT USAGE ON *.* TO 'r1'
+GRANT USAGE ON *.* TO 'r2'
+GRANT SELECT ON `test`.* TO 'r2'
+GRANT SELECT ON `m_`.* TO 'r2'
+drop user u1@localhost;
+drop role r1, r2;
+insert mysql.db select * from db_copy;
+flush privileges;
+drop table db_copy;
diff --git a/mysql-test/suite/roles/flush_roles-17898.test b/mysql-test/suite/roles/flush_roles-17898.test
index e94efc44dd07cd9e89e81c8313e5fb34b6c4a16c..6800efd5b3f61397fdc7610e763f1b80ad004ddd 100644
--- a/mysql-test/suite/roles/flush_roles-17898.test
+++ b/mysql-test/suite/roles/flush_roles-17898.test
@@ -1,3 +1,4 @@
+source include/not_embedded.inc;
#
# MDEV-17898 FLUSH PRIVILEGES crashes server with segfault
#
@@ -9,3 +10,27 @@ flush privileges;
drop role dwr_foo;
drop role dwr_bar;
drop role dwr_qux_dev;
+use test;
+
+#
+# MDEV-18298 Crashes server with segfault during role grants
+#
+create table db_copy as select * from mysql.db;
+delete from mysql.db;
+flush privileges;
+
+create user u1@localhost;
+create role r1;
+create role r2;
+grant r1 to u1@localhost;
+grant select on test.* to r2;
+grant select on m_.* to r2;
+grant r2 to r1;
+show grants for u1@localhost;
+show grants for r1;
+drop user u1@localhost;
+drop role r1, r2;
+
+insert mysql.db select * from db_copy;
+flush privileges;
+drop table db_copy;
diff --git a/mysql-test/suite/rpl/r/kill_race_condition.result b/mysql-test/suite/rpl/r/kill_race_condition.result
new file mode 100644
index 0000000000000000000000000000000000000000..e4e347dc7865225b7fcbb790fee8ca8c68f04c66
--- /dev/null
+++ b/mysql-test/suite/rpl/r/kill_race_condition.result
@@ -0,0 +1,13 @@
+include/master-slave.inc
+[connection master]
+set global debug_dbug='d,rows_log_event_before_open_table';
+set debug_sync='now WAIT_FOR before_open_table';
+create table t1 (a int);
+insert t1 values (1),(2),(3);
+kill slave_sql_thread;
+set debug_sync='now SIGNAL go_ahead_sql';
+set global debug_dbug='';
+set debug_sync='RESET';
+drop table t1;
+start slave;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_event.result b/mysql-test/suite/rpl/r/rpl_create_drop_event.result
index 2f477b1976e1a2c9fbcc80e6d890d243b41366f4..2b09732902da6db93932bfa2dacb9aa883fe5742 100644
--- a/mysql-test/suite/rpl/r/rpl_create_drop_event.result
+++ b/mysql-test/suite/rpl/r/rpl_create_drop_event.result
@@ -3,9 +3,13 @@ include/master-slave.inc
SET GLOBAL event_scheduler=off;
CREATE TABLE t1 (a INT);
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (10);
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (11);
ERROR HY000: Event 'ev1' already exists
CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (11);
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME,STATUS,EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME STATUS EVENT_DEFINITION
ev1 ENABLED INSERT INTO t1 VALUES (11)
diff --git a/mysql-test/suite/rpl/r/rpl_current_user.result b/mysql-test/suite/rpl/r/rpl_current_user.result
index 3391af5de9c7b95e9fd25f022c94f93dfa9550be..3e8d6883c0beb1123a182f5fd5ee35a910d68d15 100644
--- a/mysql-test/suite/rpl/r/rpl_current_user.result
+++ b/mysql-test/suite/rpl/r/rpl_current_user.result
@@ -83,6 +83,8 @@ include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user]
# Verify 'ALTER EVENT...' statement
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
# Explicitly assign CURRENT_USER() to definer
ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE;
include/rpl_sync.inc
diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result
index 23dcfab57f0459d7479beacc08c3504cd126474a..502fb832baea1ac5c817179a386dcf1debff60db 100644
--- a/mysql-test/suite/rpl/r/rpl_events.result
+++ b/mysql-test/suite/rpl/r/rpl_events.result
@@ -32,6 +32,8 @@ test justonce SLAVESIDE_DISABLED 1
DROP EVENT IF EXISTS test.slave_once;
CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once');
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
"Checking event status on the slave for originator value = slave's server_id"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
db name status originator
@@ -73,6 +75,8 @@ db name status originator
"Creating event test.slave_terminate on the slave"
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO
INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate');
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
"Checking event status on the slave"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
db name status originator
@@ -82,6 +86,8 @@ DROP EVENT test.slave_terminate;
"Creating event test.slave_terminate with DISABLE ON SLAVE on the slave"
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DISABLE ON SLAVE DO
INSERT IGNORE INTO t1(c) VALUES (7, 'from slave_terminate');
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
"Checking event status on the slave"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
db name status originator
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
index 0cb1aed9905d3ea6d4db8abc73bd0b133bbace43..d7638942f853031d1d5b6f74ad5590c13bb1e7fd 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
@@ -216,6 +216,8 @@ DO
BEGIN
UPDATE test.t1 SET a = a + 1 WHERE a < 10;
END|
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
RESET SLAVE;
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_CONNECT_RETRY=20, MASTER_HEARTBEAT_PERIOD=5;
include/start_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
index 5871e858d27aa144afe2efce231fd84c1d8e373f..3726760f49897e8ab8a59db8775b4afa0512a376 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
@@ -678,6 +678,8 @@ DROP TRIGGER tr1;
GRANT EVENT ON *.* TO 'root'@'localhost';
INSERT INTO t1 VALUES(1, 'test1');
CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
==========MASTER==========
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
diff --git a/mysql-test/suite/rpl/r/rpl_invoked_features.result b/mysql-test/suite/rpl/r/rpl_invoked_features.result
index 514483e7995a3aa6b5a7f4db9429473b8bc99950..146a058355975c08b0ee05f39d248d784d639cbc 100644
--- a/mysql-test/suite/rpl/r/rpl_invoked_features.result
+++ b/mysql-test/suite/rpl/r/rpl_invoked_features.result
@@ -50,11 +50,15 @@ BEGIN
ALTER EVENT e1 DISABLE;
CALL p1(10, '');
END|
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND DISABLE DO
BEGIN
ALTER EVENT e11 DISABLE;
CALL p11(10, '');
END|
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64)
BEGIN
IF x > 5 THEN
diff --git a/mysql-test/suite/rpl/r/rpl_killed_ddl.result b/mysql-test/suite/rpl/r/rpl_killed_ddl.result
index ed8745ca2c14b9e13787ee8057f9ace4b461664c..a0520783168589bcca6ef0b058fdeaa79d10d1b7 100644
--- a/mysql-test/suite/rpl/r/rpl_killed_ddl.result
+++ b/mysql-test/suite/rpl/r/rpl_killed_ddl.result
@@ -32,6 +32,8 @@ CREATE DATABASE d1;
CREATE EVENT e1
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY
DO INSERT INTO test.t1 VALUES (1);
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE FUNCTION f1 () RETURNS INT DETERMINISTIC
RETURN 1;
CREATE PROCEDURE p1 (OUT rows INT)
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
index 7efb1f7162bd2f43c19a21a790aa463ee8499b6f..bb668a4e6cb00c0e3450cb41ce5972dcd9f5e5ae 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
@@ -60,6 +60,8 @@ INSERT INTO tt_1(ddl_case) VALUES (28);
DROP USER 'user_new'@'localhost';
INSERT INTO tt_1(ddl_case) VALUES (27);
CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
INSERT INTO tt_1(ddl_case) VALUES (26);
ALTER EVENT evt COMMENT 'evt';
INSERT INTO tt_1(ddl_case) VALUES (25);
diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
index 57754183483de5a8a5b02e81fb4b2ded4be2e0dc..21e214f44394996d651db364f1388ca9f8180817 100644
--- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result
+++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
@@ -1,19 +1,36 @@
include/master-slave.inc
[connection master]
+set sql_log_bin=0;
+create database y;
+set sql_log_bin=1;
drop database if exists mysqltest1;
+drop database if exists x;
create database mysqltest1;
+set sql_log_bin=0;
+create database x;
+set sql_log_bin=1;
use mysqltest1;
create table t1 (a int);
insert into t1 values(9);
+use x;
+create table t1 (a int);
+insert into t1 values(9);
select * from mysqltest1.t1;
a
9
+select * from x.t1;
+a
+9
show databases like 'mysqltest1';
Database (mysqltest1)
mysqltest1
select * from test.t1;
a
9
+select * from y.t1;
+a
+9
+use mysqltest1;
drop table t1;
drop database mysqltest1;
drop database if exists rewrite;
@@ -221,10 +238,12 @@ SET sql_log_bin= 0;
DROP DATABASE database_master_temp_01;
DROP DATABASE database_master_temp_02;
DROP DATABASE database_master_temp_03;
+DROP DATABASE x;
SET sql_log_bin= 1;
SET sql_log_bin= 0;
DROP DATABASE database_slave_temp_01;
DROP DATABASE database_slave_temp_02;
DROP DATABASE database_slave_temp_03;
+DROP DATABASE y;
SET sql_log_bin= 1;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
index 1618ee3185e129033a1874dc97e6ea968a9e708e..b5b8b8955ffa2ea19012498c02753bbf3b51a552 100644
--- a/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
@@ -60,6 +60,8 @@ INSERT INTO tt_1(ddl_case) VALUES (28);
DROP USER 'user_new'@'localhost';
INSERT INTO tt_1(ddl_case) VALUES (27);
CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
INSERT INTO tt_1(ddl_case) VALUES (26);
ALTER EVENT evt COMMENT 'evt';
INSERT INTO tt_1(ddl_case) VALUES (25);
diff --git a/mysql-test/suite/rpl/r/rpl_slave_invalid_external_user.result b/mysql-test/suite/rpl/r/rpl_slave_invalid_external_user.result
new file mode 100644
index 0000000000000000000000000000000000000000..29b815420ba0fb59e2f2c16923dcbca37c2993ed
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_slave_invalid_external_user.result
@@ -0,0 +1,15 @@
+include/master-slave.inc
+[connection master]
+CREATE USER test_user@localhost;
+SET PASSWORD FOR test_user@localhost = password('PWD');
+GRANT ALL ON *.* TO test_user@localhost WITH GRANT OPTION;
+connect conn_test,localhost,test_user,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
+connection conn_test;
+CREATE TABLE t1 (f1 INT);
+CREATE TABLE t2 (f2 VARCHAR(64));
+CREATE TRIGGER tr_before BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES;
+CREATE DEFINER='root'@'localhost' TRIGGER tr_after AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES;
+INSERT INTO t1 VALUES (1);
+DROP USER 'test_user'@'localhost';
+DROP TABLE t1, t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
index 7efb1f7162bd2f43c19a21a790aa463ee8499b6f..bb668a4e6cb00c0e3450cb41ce5972dcd9f5e5ae 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
@@ -60,6 +60,8 @@ INSERT INTO tt_1(ddl_case) VALUES (28);
DROP USER 'user_new'@'localhost';
INSERT INTO tt_1(ddl_case) VALUES (27);
CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
INSERT INTO tt_1(ddl_case) VALUES (26);
ALTER EVENT evt COMMENT 'evt';
INSERT INTO tt_1(ddl_case) VALUES (25);
diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
index 0264c9421fc79a584893cb07617b71aaa0d4f7ba..d6675d38d42f261ef1cf5735789c286a5bda2d7f 100644
--- a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
+++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result
@@ -4,6 +4,8 @@ CREATE TEMPORARY TABLE t1 (a INT);
CREATE TABLE t2 (a INT, b INT) ENGINE= MyISAM;
INSERT INTO t1 VALUES (1);
CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
INSERT INTO t1 VALUES (1);
ALTER EVENT e1 ON SCHEDULE EVERY 20 HOUR DO SELECT 1;
INSERT INTO t1 VALUES (1);
@@ -123,6 +125,8 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
INSERT INTO t2 VALUES ("CREATE EVENT e1 with table locked");
UNLOCK TABLE;
CREATE EVENT e2 ON SCHEDULE EVERY 10 HOUR DO SELECT 1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
LOCK TABLE t1 WRITE;
ALTER EVENT e2 ON SCHEDULE EVERY 20 HOUR DO SELECT 1;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
diff --git a/mysql-test/suite/rpl/t/kill_race_condition.test b/mysql-test/suite/rpl/t/kill_race_condition.test
new file mode 100644
index 0000000000000000000000000000000000000000..4268c12cdbf40b5f7e522cd69197ee8873a3ebfb
--- /dev/null
+++ b/mysql-test/suite/rpl/t/kill_race_condition.test
@@ -0,0 +1,28 @@
+source include/have_debug_sync.inc;
+source include/have_binlog_format_row.inc;
+source include/master-slave.inc;
+
+connection slave;
+set global debug_dbug='d,rows_log_event_before_open_table';
+send set debug_sync='now WAIT_FOR before_open_table';
+
+connection master;
+create table t1 (a int);
+insert t1 values (1),(2),(3);
+
+connection slave;
+reap;
+let $a=`select id from information_schema.processlist where state='debug sync point: now'`;
+replace_result $a slave_sql_thread;
+eval kill $a;
+set debug_sync='now SIGNAL go_ahead_sql';
+set global debug_dbug='';
+set debug_sync='RESET';
+
+connection master;
+drop table t1;
+
+connection slave;
+start slave;
+
+source include/rpl_end.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt b/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt
index 290b92e0a3e9bbe016b9e27d93a39c2a60c27888..84059110136cc20c10868bf1f14f8a0fd5ab37fb 100644
--- a/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt
+++ b/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt
@@ -1 +1 @@
-"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" "--replicate-rewrite-db=database_master_temp_01->database_slave_temp_01" "--replicate-rewrite-db=database_master_temp_02->database_slave_temp_02" "--replicate-rewrite-db=database_master_temp_03->database_slave_temp_03"
+"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1 -> test" "--replicate-rewrite-db=x -> y" "--replicate-rewrite-db=database_master_temp_01->database_slave_temp_01" "--replicate-rewrite-db=database_master_temp_02->database_slave_temp_02" "--replicate-rewrite-db=database_master_temp_03->database_slave_temp_03"
diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db.test b/mysql-test/suite/rpl/t/rpl_rewrt_db.test
index 996ad0a10c72e3935d1ba52e51bd65b59159fbb4..bd0749bc2de012946cb10caeb505ea0ab4c9dc42 100644
--- a/mysql-test/suite/rpl/t/rpl_rewrt_db.test
+++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test
@@ -2,20 +2,37 @@
-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/master-slave.inc
+--connection slave
+set sql_log_bin=0;
+create database y;
+set sql_log_bin=1;
+
+--connection master
--disable_warnings
drop database if exists mysqltest1;
+drop database if exists x;
--enable_warnings
create database mysqltest1;
+set sql_log_bin=0;
+create database x;
+set sql_log_bin=1;
use mysqltest1;
create table t1 (a int);
insert into t1 values(9);
+use x;
+create table t1 (a int);
+insert into t1 values(9);
select * from mysqltest1.t1;
+select * from x.t1;
sync_slave_with_master;
+#TODO no it is no empty
show databases like 'mysqltest1'; # should be empty
select * from test.t1;
+select * from y.t1;
# cleanup
connection master;
+use mysqltest1;
drop table t1;
drop database mysqltest1;
sync_slave_with_master;
@@ -224,6 +241,7 @@ SET sql_log_bin= 0;
DROP DATABASE database_master_temp_01;
DROP DATABASE database_master_temp_02;
DROP DATABASE database_master_temp_03;
+DROP DATABASE x;
SET sql_log_bin= 1;
connection slave;
@@ -231,6 +249,7 @@ SET sql_log_bin= 0;
DROP DATABASE database_slave_temp_01;
DROP DATABASE database_slave_temp_02;
DROP DATABASE database_slave_temp_03;
+DROP DATABASE y;
SET sql_log_bin= 1;
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_slave_invalid_external_user.test b/mysql-test/suite/rpl/t/rpl_slave_invalid_external_user.test
new file mode 100644
index 0000000000000000000000000000000000000000..5099d7ee49ef61dbfa8c2830d670b5874ee57920
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_slave_invalid_external_user.test
@@ -0,0 +1,42 @@
+# ==== Purpose ====
+#
+# Test verifies that when applier thread tries to access 'variable_name' of
+# INFORMATION_SCHEMA.SESSION_VARIABLES table through triggers it successfully
+# retrieves all the session variables.
+#
+# ==== Implementation ====
+#
+# Steps:
+# 0 - Create two tables t1 and t2.
+# 1 - Create a trigger such that it reads the names of all session variables
+# from INFORMATION_SCHEMA.SESSION_VARIABLES table and populates one of the
+# tables.
+# 2 - Do a DML on master and wait for it to be replicated and ensure that
+# slave is in sync with master and it is up and running.
+#
+# ==== References ====
+#
+# MDEV-14784: Slave crashes in show_status_array upon running a trigger with
+# select from I_S
+
+--source include/master-slave.inc
+--source include/have_binlog_format_mixed.inc
+--enable_connect_log
+CREATE USER test_user@localhost;
+SET PASSWORD FOR test_user@localhost = password('PWD');
+GRANT ALL ON *.* TO test_user@localhost WITH GRANT OPTION;
+connect(conn_test,localhost,test_user,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+--connection conn_test
+CREATE TABLE t1 (f1 INT);
+CREATE TABLE t2 (f2 VARCHAR(64));
+CREATE TRIGGER tr_before BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES;
+CREATE DEFINER='root'@'localhost' TRIGGER tr_after AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES;
+
+INSERT INTO t1 VALUES (1);
+--disable_connect_log
+# Cleanup
+--connection master
+DROP USER 'test_user'@'localhost';
+DROP TABLE t1, t2;
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/storage_engine/vcol.result b/mysql-test/suite/storage_engine/vcol.result
index d51ab0385760363c980041cfe19730506c1b3c4e..24b54928dfc2120d84f3357596738989214b0112 100644
--- a/mysql-test/suite/storage_engine/vcol.result
+++ b/mysql-test/suite/storage_engine/vcol.result
@@ -7,8 +7,8 @@ b int(11) # # VIRTUAL
INSERT INTO t1 (a) VALUES (1),(2);
INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
SELECT a,b FROM t1;
a b
1 2
@@ -24,8 +24,8 @@ b int(11) # # PERSISTENT
INSERT INTO t1 (a) VALUES (1),(2);
INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
SELECT a,b FROM t1;
a b
1 2
@@ -41,8 +41,8 @@ b int(11) # # VIRTUAL
INSERT INTO t1 (a) VALUES (1),(2);
INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
SELECT a,b FROM t1;
a b
1 2
@@ -58,8 +58,8 @@ b int(11) # # PERSISTENT
INSERT INTO t1 (a) VALUES (1),(2);
INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
SELECT a,b FROM t1;
a b
1 2
diff --git a/mysql-test/suite/sys_vars/inc/sysvars_server.inc b/mysql-test/suite/sys_vars/inc/sysvars_server.inc
index cb06b40f8c97b2d687761397479d2033ceef011c..cffc7e7fa620e104a3b3d6543ab108248cd61ef6 100644
--- a/mysql-test/suite/sys_vars/inc/sysvars_server.inc
+++ b/mysql-test/suite/sys_vars/inc/sysvars_server.inc
@@ -12,7 +12,7 @@ set sql_mode=ansi_quotes;
set global div_precision_increment=5;
--replace_regex /^\/\S+/PATH/
---replace_result $MASTER_MYPORT MASTER_MYPORT
+--replace_result $MASTER_MYPORT MASTER_MYPORT 372736 299008
select * from information_schema.system_variables
where variable_name not like 'aria%' and
variable_name not like 'debug%' and
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 2019c4dc616cbbaa18b4d9100979b9d84f8ff81c..794e93a108bd499c7ce382127124ba89adf20cb5 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
@@ -1214,8 +1214,8 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
--GLOBAL_VALUE 5.6.43
-+GLOBAL_VALUE 5.6.42-84.2
+-GLOBAL_VALUE 5.6.44
++GLOBAL_VALUE 5.6.43-84.3
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 998d95e523f759d87a64fe2591ff58fe84fc9f5e..195eda13c52d437c090537f39045e49a1251e324 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff
@@ -684,8 +684,8 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
--GLOBAL_VALUE 5.6.43
-+GLOBAL_VALUE 5.6.42-84.2
+-GLOBAL_VALUE 5.6.44
++GLOBAL_VALUE 5.6.43-84.3
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 f747a493b7931f0e1271cbfcfc71a8d2b4aa767b..7d18ab15085965ff2ab4b0c45b0795e7b700960a 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -2401,7 +2401,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
-GLOBAL_VALUE 5.6.43
+GLOBAL_VALUE 5.6.44
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 4da76bdaec1a55562561b349a5144856fc041706..9ca6995d7ef066e1ad8b4dd7cc7f5cbfc6e881a1 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -3917,9 +3917,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_STACK
SESSION_VALUE NULL
-GLOBAL_VALUE 295936
+GLOBAL_VALUE 299008
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 295936
+DEFAULT_VALUE 299008
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The stack size for each thread
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 3e34bfce8f92faf8f3fd923e6f0e0db60f383062..9288912eb57948790b0a2eef1ca2a485f9c43926 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -4687,9 +4687,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_STACK
SESSION_VALUE NULL
-GLOBAL_VALUE 295936
+GLOBAL_VALUE 299008
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 295936
+DEFAULT_VALUE 299008
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The stack size for each thread
diff --git a/mysql-test/suite/sys_vars/r/thread_stack_basic.result b/mysql-test/suite/sys_vars/r/thread_stack_basic.result
index d5a30bbaf6e02382873cced57fd209d051fefc17..5be5db5626cf1af41598d52d21ae117f88f13a4d 100644
--- a/mysql-test/suite/sys_vars/r/thread_stack_basic.result
+++ b/mysql-test/suite/sys_vars/r/thread_stack_basic.result
@@ -1,20 +1,20 @@
select @@global.thread_stack;
@@global.thread_stack
-295936
+299008
select @@session.thread_stack;
ERROR HY000: Variable 'thread_stack' is a GLOBAL variable
show global variables like 'thread_stack';
Variable_name Value
-thread_stack 295936
+thread_stack 299008
show session variables like 'thread_stack';
Variable_name Value
-thread_stack 295936
+thread_stack 299008
select * from information_schema.global_variables where variable_name='thread_stack';
VARIABLE_NAME VARIABLE_VALUE
-THREAD_STACK 295936
+THREAD_STACK 299008
select * from information_schema.session_variables where variable_name='thread_stack';
VARIABLE_NAME VARIABLE_VALUE
-THREAD_STACK 295936
+THREAD_STACK 299008
set global thread_stack=1;
ERROR HY000: Variable 'thread_stack' is a read only variable
set session thread_stack=1;
diff --git a/mysql-test/suite/sys_vars/t/max_prepared_stmt_count_func.test b/mysql-test/suite/sys_vars/t/max_prepared_stmt_count_func.test
index 6617c4ad2ea26e1734c54ee9c5841ca691e56ce0..c37fc7ab1143e7fe9530ec3c522cdf73db5616c2 100644
--- a/mysql-test/suite/sys_vars/t/max_prepared_stmt_count_func.test
+++ b/mysql-test/suite/sys_vars/t/max_prepared_stmt_count_func.test
@@ -19,7 +19,7 @@
# option_mysqld_max_prepared_stmt_count #
# #
################################################################################
-
+--source include/no_protocol.inc
--echo ** Setup **
--echo
diff --git a/mysql-test/suite/sys_vars/t/sql_buffer_result_func.test b/mysql-test/suite/sys_vars/t/sql_buffer_result_func.test
index 4530545b8f0a9c737669aaf8c969cb8ad745d976..2a2d7572d914917083f1475f25792054d53a59fb 100644
--- a/mysql-test/suite/sys_vars/t/sql_buffer_result_func.test
+++ b/mysql-test/suite/sys_vars/t/sql_buffer_result_func.test
@@ -46,17 +46,23 @@ INSERT INTO t1 VALUES('aa','bb');
SET SESSION sql_buffer_result = 1;
+--disable_ps_protocol
SHOW STATUS LIKE 'Created_tmp_tables';
+--enable_ps_protocol
--echo Expected value : 0.
SELECT * FROM t1;
+--disable_ps_protocol
SHOW STATUS LIKE 'Created_tmp_tables';
+--enable_ps_protocol
--echo Expected value : 1.
SELECT * FROM t1;
+--disable_ps_protocol
SHOW STATUS LIKE 'Created_tmp_tables';
+--enable_ps_protocol
--echo Expected value : 2.
--echo '#--------------------FN_DYNVARS_156_02-------------------------#'
@@ -66,12 +72,16 @@ SHOW STATUS LIKE 'Created_tmp_tables';
SET SESSION sql_buffer_result = 0;
+--disable_ps_protocol
SHOW STATUS LIKE 'Created_tmp_tables';
+--enable_ps_protocol
--echo Expected value : 2.
SELECT * FROM t1;
+--disable_ps_protocol
SHOW STATUS LIKE 'Created_tmp_tables';
+--enable_ps_protocol
--echo Expected value : 2.
--echo '#--------------------FN_DYNVARS_156_03-------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/thread_stack_basic.test b/mysql-test/suite/sys_vars/t/thread_stack_basic.test
index 2d4d144572dcc2ec4dee0b67ca78d2f17fff243c..bfd3fb40db3afac6395a6c7d67ae960985732396 100644
--- a/mysql-test/suite/sys_vars/t/thread_stack_basic.test
+++ b/mysql-test/suite/sys_vars/t/thread_stack_basic.test
@@ -1,17 +1,17 @@
#
# only global
#
---replace_result 196608 262144
+--replace_result 372736 299008
select @@global.thread_stack;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.thread_stack;
---replace_result 196608 262144
+--replace_result 372736 299008
show global variables like 'thread_stack';
---replace_result 196608 262144
+--replace_result 372736 299008
show session variables like 'thread_stack';
---replace_result 196608 262144
+--replace_result 372736 299008
select * from information_schema.global_variables where variable_name='thread_stack';
---replace_result 196608 262144
+--replace_result 372736 299008
select * from information_schema.session_variables where variable_name='thread_stack';
#
diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_bug27322.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_bug27322.test
index c83f3dc2507b613a9276b27fa721e1fa506c97f0..6e3c330ce0665c6dc9922a8b4784f207d4bf0306 100644
--- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_bug27322.test
+++ b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_bug27322.test
@@ -44,22 +44,23 @@ SET @def_var= @@session.transaction_prealloc_size;
SET SESSION transaction_prealloc_size=1024*1024*1024*1;
# Embedded server is shows "cleaning up" as STATE, while non-embedded shows "init"
--replace_column 1 3 6 7
---replace_regex /localhost[:0-9]*/localhost/
+--replace_result Execute Query
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*2;
--replace_column 1 3 6 7
---replace_regex /localhost[:0-9]*/localhost/
+--replace_result Execute Query
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*3;
--replace_column 1 3 6 7
---replace_regex /localhost[:0-9]*/localhost/
+--replace_result Execute Query
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*4;
--replace_column 1 3 6 7
---replace_regex /localhost[:0-9]*/localhost/
+--replace_result Execute Query
SHOW PROCESSLIST;
SET SESSION transaction_prealloc_size=1024*1024*1024*5;
--replace_column 1 3 6 7
+--replace_result Execute Query
SHOW PROCESSLIST;
--enable_warnings
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
index af03cc4d482492cf8aaa2b3ca0502aa031764897..cc81fabe2f0cd02de0d55a7b983005318417bc3a 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
@@ -25,8 +25,8 @@ a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols
insert into t1 values (1,2,3);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'c' in table 't1' ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for computed column 'c' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
@@ -65,8 +65,8 @@ a b c
# against vcols
insert into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
@@ -107,8 +107,8 @@ a b c
create table t2 like t1;
insert into t2 select * from t1;
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
-Warning 1906 The value specified for computed column 'c' in table 't2' ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for computed column 'c' in table 't2' has been ignored
select * from t1;
a b c
2 -2 -2
@@ -123,8 +123,8 @@ a b c
create table t2 like t1;
insert into t2 (a,b) select a,b from t1;
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
select * from t2;
a b c
2 -2 -2
@@ -159,7 +159,7 @@ a b c
2 -2 -2
update t1 set c=3 where a=2;
Warnings:
-Warning 1906 The value specified for computed column 'c' in table 't1' ignored
+Warning 1906 The value specified for computed column 'c' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
@@ -189,7 +189,7 @@ a b c
2 -2 -2
update t1 set c=3 where b=-2;
Warnings:
-Warning 1906 The value specified for computed column 'c' in table 't1' ignored
+Warning 1906 The value specified for computed column 'c' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
index 351dfd2858c3ac59af8535f913f7204e02fbe7f9..eccf1199790aec2864b587aee4c8b4dad2923d6d 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
@@ -25,8 +25,8 @@ a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols
insert into t1 values (1,2,3);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'c' in table 't1' ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for computed column 'c' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
@@ -65,8 +65,8 @@ a b c
# against vcols
insert into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
@@ -107,8 +107,8 @@ a b c
create table t2 like t1;
insert into t2 select * from t1;
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
-Warning 1906 The value specified for computed column 'c' in table 't2' ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for computed column 'c' in table 't2' has been ignored
select * from t1;
a b c
2 -2 -2
@@ -123,8 +123,8 @@ a b c
create table t2 like t1;
insert into t2 (a,b) select a,b from t1;
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
select * from t2;
a b c
2 -2 -2
@@ -159,7 +159,7 @@ a b c
2 -2 -2
update t1 set c=3 where a=2;
Warnings:
-Warning 1906 The value specified for computed column 'c' in table 't1' ignored
+Warning 1906 The value specified for computed column 'c' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
@@ -189,7 +189,7 @@ a b c
2 -2 -2
update t1 set c=3 where b=-2;
Warnings:
-Warning 1906 The value specified for computed column 'c' in table 't1' ignored
+Warning 1906 The value specified for computed column 'c' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index 6a3a71a716c309ee9b6f0d1955530904c291f333..5e84a314b38d69a1bb92a800fcdb4c9f33b8b1d4 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -108,10 +108,10 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (p int, a double NOT NULL, v double AS (ROUND(a,p)) VIRTUAL);
INSERT INTO t1 VALUES (0,1,0);
Warnings:
-Warning 1906 The value specified for computed column 'v' in table 't1' ignored
+Warning 1906 The value specified for computed column 'v' in table 't1' has been ignored
INSERT INTO t1 VALUES (NULL,0,0);
Warnings:
-Warning 1906 The value specified for computed column 'v' in table 't1' ignored
+Warning 1906 The value specified for computed column 'v' in table 't1' has been ignored
SELECT a, p, v, ROUND(a,p), ROUND(a,p+NULL) FROM t1;
a p v ROUND(a,p) ROUND(a,p+NULL)
1 0 1 1 NULL
@@ -306,15 +306,15 @@ d varchar(5) latin1_swedish_ci YES NULL PERSISTENT #
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,NULL);
UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a';
Warnings:
-Warning 1906 The value specified for computed column 'd' in table 't1' ignored
+Warning 1906 The value specified for computed column 'd' in table 't1' has been ignored
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
Warnings:
-Warning 1906 The value specified for computed column 'd' in table 't1' ignored
+Warning 1906 The value specified for computed column 'd' in table 't1' has been ignored
set sql_mode='strict_all_tables';
UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a';
-ERROR HY000: The value specified for computed column 'd' in table 't1' ignored
+ERROR HY000: The value specified for computed column 'd' in table 't1' has been ignored
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
-ERROR HY000: The value specified for computed column 'd' in table 't1' ignored
+ERROR HY000: The value specified for computed column 'd' in table 't1' has been ignored
drop table t1;
#
# MDEV-5611: self-referencing virtual column
diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result
index 6dee132b3e5956a66f4ef59ba30d7ddd8374e61e..9e0259087c5aba1eb0afc1ac6b7d96e0911c87b3 100644
--- a/mysql-test/suite/vcol/r/vcol_select_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result
@@ -273,9 +273,9 @@ INSERT INTO t1 VALUES (NULL),( 78), (185), (0), (154);
CREATE TABLE t2 (a int, b int AS (a) VIRTUAL);
INSERT INTO t2 VALUES (187,187), (9,9), (187,187);
Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
-Warning 1906 The value specified for computed column 'b' in table 't2' ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for computed column 'b' in table 't2' has been ignored
EXPLAIN EXTENDED
SELECT * FROM t1 JOIN t2 USING (b);
id select_type table type possible_keys key key_len ref rows filtered Extra
diff --git a/mysql-test/suite/vcol/t/wrong_arena.test b/mysql-test/suite/vcol/t/wrong_arena.test
index 484f1fe685df64754fa7021063f2ad77dc7c1438..f3030902784da488c5da599a2e2d4639491984d3 100644
--- a/mysql-test/suite/vcol/t/wrong_arena.test
+++ b/mysql-test/suite/vcol/t/wrong_arena.test
@@ -14,7 +14,9 @@ create table t1 (a datetime,
# other issues
e int as ((a,1) in ((1,1),(2,1),(NULL,1))) # cmp_item_row::alloc_comparators()
);
+enable_prepare_warnings;
show create table t1;
+disable_prepare_warnings;
connect con1, localhost, root;
insert t1 (a) values ('2010-10-10 10:10:10');
select * from t1;
diff --git a/mysql-test/t/analyze_stmt.test b/mysql-test/t/analyze_stmt.test
index d02139fe0c832d075d29749661576b5595d9fa9f..15fc00a321d6937315c22040a70b89333fdfc4c5 100644
--- a/mysql-test/t/analyze_stmt.test
+++ b/mysql-test/t/analyze_stmt.test
@@ -196,7 +196,7 @@ drop table t1;
--echo #
create table t1 (i int);
insert into t1 values (1);
-analyze select * from t1 into @var;
+analyze select * into @var from t1 ;
drop table t1;
--echo #
@@ -223,9 +223,9 @@ drop table t1;
create table t1(a int);
insert into t1 values (1),(2);
-analyze select a from t1 where a <2 into @var;
+analyze select a into @var from t1 where a <2 ;
--error ER_TOO_MANY_ROWS
-analyze select a from t1 into @var;
+analyze select a into @var from t1 ;
analyze insert into t1 select * from t1;
diff --git a/mysql-test/t/create_drop_role.test b/mysql-test/t/create_drop_role.test
index be33083e6c4081e4e68ce017353c0d45c60319f6..11bc832c6e9b346a3fc6509dfb6cc8542e0b19aa 100644
--- a/mysql-test/t/create_drop_role.test
+++ b/mysql-test/t/create_drop_role.test
@@ -54,3 +54,14 @@ DROP ROLE IF EXISTS role_1;
DROP ROLE role_1;
DROP USER u1@localhost;
+
+# MDEV-17942
+CREATE ROLE r;
+GRANT SHOW DATABASES ON *.* TO r;
+CREATE USER foo;
+CREATE USER bar;
+GRANT r TO foo;
+--error ER_PLUGIN_IS_NOT_LOADED
+CREATE OR REPLACE USER foo IDENTIFIED WITH non_existing_plugin;
+DROP ROLE r;
+DROP USER bar;
diff --git a/mysql-test/t/ddl_i18n_koi8r.test b/mysql-test/t/ddl_i18n_koi8r.test
index 0a62a8ba0f81be29d5ffbb97d2ee508cc3b26143..a3116b0f709b308f9f2883056db9f4e527202814 100644
--- a/mysql-test/t/ddl_i18n_koi8r.test
+++ b/mysql-test/t/ddl_i18n_koi8r.test
@@ -823,7 +823,7 @@ use mysqltest1|
# - Event ev1
-CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10);
@@ -840,7 +840,7 @@ END|
# - Event ev2
-CREATE EVENT ev2 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
@@ -857,7 +857,7 @@ END|
# - Event ev3
-CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
@@ -874,7 +874,7 @@ END|
# - Event ev4
-CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE ÐÅÒÅÍ1 CHAR(10) CHARACTER SET utf8;
diff --git a/mysql-test/t/ddl_i18n_utf8.test b/mysql-test/t/ddl_i18n_utf8.test
index 023047b952e6fc8d6cd29ec567bfd6b103a7171c..40b958cccacd211af5c9bbf7dc839775627b8bf6 100644
--- a/mysql-test/t/ddl_i18n_utf8.test
+++ b/mysql-test/t/ddl_i18n_utf8.test
@@ -823,7 +823,7 @@ use mysqltest1|
# - Event ev1
-CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE перем1 CHAR(10);
@@ -840,7 +840,7 @@ END|
# - Event ev2
-CREATE EVENT ev2 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
@@ -857,7 +857,7 @@ END|
# - Event ev3
-CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
@@ -874,7 +874,7 @@ END|
# - Event ev4
-CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '2030-01-01 00:00:00' DO
+CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8;
diff --git a/mysql-test/t/events_1.test b/mysql-test/t/events_1.test
index 9768127f45873e414ea9eec47175cebc37eea499..58c151bc86ede859cd48b16ed020d97f3a65e234 100644
--- a/mysql-test/t/events_1.test
+++ b/mysql-test/t/events_1.test
@@ -69,7 +69,7 @@ drop event event2;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
SELECT interval_field, interval_value, body FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
-ALTER EVENT event_starts_test ON SCHEDULE AT '2020-02-02 20:00:02';
+ALTER EVENT event_starts_test ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
ALTER EVENT event_starts_test COMMENT "non-empty comment";
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
@@ -77,7 +77,7 @@ ALTER EVENT event_starts_test COMMENT "";
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
DROP EVENT event_starts_test;
-CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2;
+CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '1970-01-02 00:00:00' ENDS '1970-01-03 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 2;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
ALTER EVENT event_starts_test COMMENT "non-empty comment";
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
diff --git a/mysql-test/t/events_stress.test b/mysql-test/t/events_stress.test
index 8ea7633877bad4772cacba8b00970218646e50bb..080707f029fb21444310a73b9ebae82d51c6b7b5 100644
--- a/mysql-test/t/events_stress.test
+++ b/mysql-test/t/events_stress.test
@@ -21,6 +21,7 @@ GRANT ALL ON *.* TO event_user3@localhost;
connect (conn2,localhost,event_user2,,events_conn2_db);
--echo "In the second connection we create some events which won't be dropped till the end"
--disable_query_log
+--disable_warnings
let $1= 50;
while ($1)
{
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 3cc244339d34de50adc495bf71c590e66b13f788..57da0f3c6fc4a8014c431ea83afd21fde14bed51 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -1,9 +1,7 @@
#
# simple test of group_concat function
#
---disable_warnings
-drop table if exists t1, t2;
---enable_warnings
+source include/have_sequence.inc;
create table t1 (grp int, a bigint unsigned, c char(10) not null, d char(10) not null);
insert into t1 values (1,1,"a","a");
@@ -873,3 +871,30 @@ SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1 GROUP BY f2;
DROP TABLE t1;
SET group_concat_max_len= DEFAULT;
+
+#
+# MDEV-9531 GROUP_CONCAT with ORDER BY inside takes a lot of memory while it's executed
+#
+set max_session_mem_used=16*1024*1024; # 8M..32M
+SELECT GROUP_CONCAT(concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1) ORDER BY 2,1,3,4,6,5,8,7) AS c
+FROM seq_1_to_200000;
+set max_session_mem_used=default;
+
+#
+# MDEV-19350 Server crashes in delete_tree_element / ... / Item_func_group_concat::repack_tree
+#
+SET group_concat_max_len= 8;
+CREATE TABLE t1 (a INT);
+INSERT t1 VALUES (1),(2);
+CREATE TABLE t2 (b DATE, c INT);
+INSERT t2 VALUES ('2019-12-04',1),('2020-03-28',2);
+CREATE TABLE t3 (d INT);
+INSERT t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14);
+CREATE TABLE t4 (e INT);
+INSERT t4 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15);
+SELECT (SELECT MAX(a) FROM t1 WHERE t2_sq.c > 0) AS f,
+ GROUP_CONCAT(t2_sq.b ORDER BY 1) AS gc
+FROM (SELECT t2_a.* FROM t2 AS t2_a, t2 AS t2_b) AS t2_sq, t3, t4
+GROUP BY f;
+DROP TABLE t1, t2, t3, t4;
+SET group_concat_max_len= default;
diff --git a/mysql-test/t/func_hybrid_type.test b/mysql-test/t/func_hybrid_type.test
index dd8a399025b4c0653332f67a6657439e852cf81e..c07303f7450c44a332bcf9e5787db36245d468bf 100644
--- a/mysql-test/t/func_hybrid_type.test
+++ b/mysql-test/t/func_hybrid_type.test
@@ -456,6 +456,26 @@ EXECUTE stmt USING @a,@a;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-11015 Assertion failed: precision > 0 in decimal_bin_size upon SELECT with DISTINCT, CAST and other functions
+--echo #
+
+CREATE TABLE t1 (b LONGBLOB);
+INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
+SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATETIME ) ) AS f FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (b LONGBLOB);
+INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
+SELECT DISTINCT - GREATEST( b, CAST( NULL AS TIME) ) AS f FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (b LONGBLOB);
+INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
+SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATE) ) AS f FROM t1;
+DROP TABLE t1;
+
--echo #
--echo # End of 10.1 tests
--echo #
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index 8cacb4c575a3950b7c84479186749042114e8676..4c2d79215934a43a77265619a417c122a106a378 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -599,3 +599,36 @@ SELECT STDDEV_POP(ROUND(0,@A:=2009)) FROM (SELECT 1 UNION SELECT 2) fake_table;
--echo #
--echo # End of 10.0 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.1 tests
+--echo #
+
+--echo #
+--echo # MDEV-17643 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
+--echo #
+
+CREATE TABLE t1 ( pk int NOT NULL, i1 int NOT NULL, d1 date NOT NULL, t1 time);
+INSERT INTO t1 VALUES (7,9,'2007-08-15','03:55:02'),(8,7,'1993-06-05','04:17:51'),(9,7,'2034-07-01','17:31:12'),(10,0,'1998-08-24','08:09:27');
+SELECT DISTINCT STDDEV_SAMP(EXPORT_SET(t1, -1379790335835635712, (i1 + 'o'), (MD5(d1)))) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(128));
+INSERT INTO t1 VALUES ('1e310');
+INSERT INTO t1 VALUES ('-1e310');
+INSERT INTO t1 VALUES ('0');
+SELECT STDDEV_SAMP(a) FROM t1;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a DOUBLE);
+INSERT INTO t1 VALUES (1.7e+308);
+INSERT INTO t1 VALUES (-1.7e+308);
+INSERT INTO t1 VALUES (0);
+SELECT STDDEV_SAMP(a) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.1 tests
+--echo #
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 46b4dc2e3f0b6ff1d4a4756dcdb0acbee32336de..9e2694607ca8a8f92676a4adb34bdffdbab744f4 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1610,6 +1610,36 @@ drop table t1,t2;
#
select md5(_filename "a"), sha(_filename "a");
+--echo #
+--echo # MDEV-18881 Assertion `0' failed in make_sortkey upon SELECT with GROUP BY after LOAD DATA
+--echo #
+
+CREATE TABLE t1 (a BIT(22), b CHAR(8) NOT NULL, c CHAR(8));
+INSERT INTO t1 VALUES (0xA4B,'foo','qux');
+INSERT INTO t1 VALUES (0x8F5,'bar','foobar');
+INSERT INTO t1 VALUES (0x0, '', NULL);
+INSERT INTO t1 VALUES (0x4B, 'foo','qux');
+INSERT INTO t1 VALUES (0x8F5, 'bar', 'foobar');
+SET SESSION SQL_MODE= '';
+SELECT GROUP_CONCAT(c) AS f FROM t1 GROUP BY LPAD('foo', 20, b);
+DROP TABLE t1;
+SET SESSION SQL_MODE=DEFAULT;
+
+CREATE TABLE t1 AS SELECT
+ LPAD('a',10,' '),
+ RPAD('a',10,' '),
+ LPAD('a',10,' '),
+ RPAD('a',10,' '),
+ LPAD('a',10,NULL),
+ RPAD('a',10,NULL),
+ LPAD('a',10,''),
+ RPAD('a',10,''),
+ LPAD('a',10,RAND()),
+ RPAD('a',10,RAND());
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+
--echo #
--echo # End of 5.5 tests
--echo #
@@ -1847,6 +1877,42 @@ SELECT f1,HEX(f2) FROM t1 WHERE f1='YQ==' AND (f2= from_base64(
SELECT f1,HEX(f2) FROM t1 WHERE f1='YQ==' AND (f2= from_base64("Yq==") OR f2= from_base64("YQ=="));
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18738 ASAN heap-use-after-free in copy_if_not_alloced / copy_fields
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT REPLACE( CAST( CURDATE() AS BINARY ), CURDATE(), REPEAT('a',32) ) AS f FROM t1 GROUP BY f;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT REPLACE( LEFT( CURDATE(), 4), LEFT(CURDATE(),4), REPEAT('a',32) ) AS f FROM t1 GROUP BY f;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT REPLACE(RIGHT(CURDATE(), 4), RIGHT(CURDATE(),4), REPEAT('a',32)) AS f FROM t1 GROUP BY f;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT REPLACE(SUBSTR(CURDATE(),2,3), SUBSTR(CURDATE(),2,3), REPEAT('a',32)) AS f FROM t1 GROUP BY f;
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
+--echo #
+
+CREATE TABLE t1 (a INT, b TIME, c TIME);
+INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42');
+SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
+DROP TABLE t1;
+
+
--echo #
--echo # End of 10.1 tests
--echo #
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 0a4b85c2a814462dd2dfc808688380d284a686b3..eabff67ca627706c0c21e58978eceb3df2ae7240 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -1906,6 +1906,36 @@ SELECT * FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-14926 AddressSanitizer: heap-use-after-free in make_date_time on weird combination of functions
+--echo #
+
+DO INET_ATON( FROM_UNIXTIME( @@timestamp, ( TRIM( UNHEX(HEX('%m.%d.%Y') ) ) ) ) );
+
+CREATE TABLE t1 (d DATE);
+INSERT INTO t1 VALUES ('1989-03-10');
+SELECT TIME_FORMAT('23:59:43', BINARY d) AS f FROM t1 GROUP BY 'foo';
+DROP TABLE t1;
+
+CREATE TABLE t1 (d DATE) ENGINE=MyISAM;
+INSERT INTO t1 VALUES ('1900-01-01');
+SELECT LENGTH( DATE_FORMAT( d, BINARY DATABASE() ) ) AS f FROM t1 GROUP BY d;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-18667 ASAN heap-use-after-free in make_date_time / Arg_comparator::compare_string / Item_func_nullif::compare
+--echo #
+
+SELECT NULLIF('foo', FROM_UNIXTIME('2012-12-12 12:12:12', TRIM(0)));
+
+--echo #
+--echo # MDEV-18626 ASAN stack-buffer-overflow in int10_to_str / make_date_time upon DATE_FORMAT
+--echo #
+
+SELECT DATE_FORMAT(100000000000, '%j');
+
+
--echo #
--echo # End of 10.1 tests
--echo #
diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test
index 7391b2114f394acd750f8b21accca130927531dc..7626da650b4c8d1c4b0a9e058fd558b42b9b2e0f 100644
--- a/mysql-test/t/gis-precise.test
+++ b/mysql-test/t/gis-precise.test
@@ -381,5 +381,11 @@ SELECT ST_RELATE(
'F*FFFF**F'
) as relate_res;
+# MDEV-18920 Prepared statements with st_convexhull hang and eat 100% cpu.
+prepare s from 'do st_convexhull(st_aswkb(multipoint(point(-11702,15179),point(-5031,27960),point(-30557,11158),point(-27804,30314))))';
+execute s;
+execute s;
+deallocate prepare s;
+
--source include/gis_debug.inc
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 9decb5604e8a7f1203ba6d5acfc83cc2ffec4528..db3ab00fb03e88fb20083d44b9d8e22a9790924d 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -1568,3 +1568,20 @@ CREATE TABLE t1 (g1 GEOMETRY NOT NULL,g2 GEOMETRY NULL);
CREATE TABLE t2 AS SELECT WITHIN(g1,g1) as w1,WITHIN(g2,g2) AS w2 FROM t1;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
+
+#
+# MDEV-3934 Assertion `((keypart_map+1) & keypart_map) == 0' failed in _mi_pack_key with an index on a POINT column
+#
+
+CREATE TABLE t1 (
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ point_data POINT NOT NULL,
+ PRIMARY KEY (id),
+ KEY idx_point_data(point_data)
+) ENGINE=MyISAM;
+INSERT t1 (point_data) VALUES
+ (GeomFromText('Point(37.0248492 23.8512726)')),
+ (GeomFromText('Point(38.0248492 23.8512726)'));
+SELECT id FROM t1
+WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
+DROP TABLE t1;
diff --git a/mysql-test/t/gis2.test b/mysql-test/t/gis2.test
deleted file mode 100644
index b734ab19ecd73a14c0559949aed5fc06328c3793..0000000000000000000000000000000000000000
--- a/mysql-test/t/gis2.test
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# MDEV-3934 Assertion `((keypart_map+1) & keypart_map) == 0' failed in _mi_pack_key with an index on a POINT column
-#
-
-CREATE TABLE t1 (
- id INT UNSIGNED NOT NULL AUTO_INCREMENT,
- point_data POINT NOT NULL,
- PRIMARY KEY (id),
- KEY idx_point_data(point_data)
-) ENGINE=MyISAM;
-INSERT t1 (point_data) VALUES
- (GeomFromText('Point(37.0248492 23.8512726)')),
- (GeomFromText('Point(38.0248492 23.8512726)'));
-SELECT id FROM t1
-WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
-DROP TABLE t1;
-
diff --git a/mysql-test/t/gis_notembedded.test b/mysql-test/t/gis_notembedded.test
new file mode 100644
index 0000000000000000000000000000000000000000..d25d6a7097e292569579d89d2f843d7710bb0c49
--- /dev/null
+++ b/mysql-test/t/gis_notembedded.test
@@ -0,0 +1,24 @@
+source include/not_embedded.inc;
+#
+# MDEV-60 Support for Spatial Reference systems for the GIS data.
+#
+show create procedure mysql.AddGeometryColumn;
+show create procedure mysql.DropGeometryColumn;
+create table t1 (a int, b int);
+call mysql.AddGeometryColumn('', 'test', 't1', 'c', 10);
+show create table t1;
+call mysql.DropGeometryColumn('', 'test', 't1', 'c');
+show create table t1;
+call mysql.DropGeometryColumn('', 'test', 't1', 'b');
+show create table t1;
+drop table t1;
+
+create user foo@localhost;
+grant execute on mysql.* to foo@localhost;
+connect (foo, localhost, foo);
+--error ER_TABLEACCESS_DENIED_ERROR
+call mysql.AddGeometryColumn('', 'mysql', 'proc', 'c', 10);
+disconnect foo;
+connection default;
+drop user foo@localhost;
+
diff --git a/mysql-test/t/grant4.test b/mysql-test/t/grant4.test
index a3578c9b85a2af6a55f15a4fd69c26b5978cef58..93e016ace75be0c825d156ed094d679dfc5b3b29 100644
--- a/mysql-test/t/grant4.test
+++ b/mysql-test/t/grant4.test
@@ -145,6 +145,34 @@ disconnect con1;
drop database mysqltest_db1;
drop user mysqltest_u1@localhost;
+#
+# MDEV-18241 Downgrade from 10.4 to 10.3 crashes
+#
+call mtr.add_suppression("Table 'mysql.user' doesn't exist");
+call mtr.add_suppression("'mysql.user' is not TABLE");
+rename table mysql.user to mysql.user1;
+create view mysql.user as select * from mysql.user1;
+--error ER_WRONG_OBJECT
+flush privileges;
+drop view mysql.user;
+create temporary table mysql.user select * from mysql.user1 limit 0;
+--error ER_NO_SUCH_TABLE
+flush privileges;
+drop temporary table mysql.user;
+rename table mysql.user1 to mysql.user;
+
+#
+# Bug#28986737: RENAMING AND REPLACING MYSQL.USER TABLE CAN LEAD TO A SERVER CRASH
+#
+call mtr.add_suppression('mysql.user table is damaged');
+rename table mysql.user to mysql.user1;
+create table mysql.user (Host char(100), User char(100));
+--error ER_UNKNOWN_ERROR
+flush privileges;
+drop table mysql.user;
+rename table mysql.user1 to mysql.user;
+
+--echo End of 5.5 tests
--echo #
--echo # Additional coverage for refactoring which is made as part
@@ -235,5 +263,6 @@ create user foo3 identified via mysql_old_password using '00';
--error ER_PASSWD_LENGTH
create user foo4 identified via mysql_old_password using '11111111111111111111111111111111111111111';
-
set GLOBAL sql_mode=default;
+
+--echo End of 10.1 tests
diff --git a/mysql-test/t/index_merge_innodb.test b/mysql-test/t/index_merge_innodb.test
index fb56e44b5ae14be33f46648b379598f538658444..b7b2e60f20b1a798d013dd66f2fd27ea5e6c93cc 100644
--- a/mysql-test/t/index_merge_innodb.test
+++ b/mysql-test/t/index_merge_innodb.test
@@ -46,6 +46,7 @@ CREATE TABLE t1 (
INDEX idx(a))
ENGINE=INNODB;
+begin;
INSERT INTO t1(a,b) VALUES
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
@@ -65,6 +66,7 @@ INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1 VALUES (1000000, 0, 0);
+commit;
SET SESSION sort_buffer_size = 1024*36;
set @tmp_optimizer_switch=@@optimizer_switch;
diff --git a/mysql-test/t/information_schema_prepare.test b/mysql-test/t/information_schema_prepare.test
new file mode 100644
index 0000000000000000000000000000000000000000..c5f3f89ff2912ceef5a45bc76290d3e4189f63fb
--- /dev/null
+++ b/mysql-test/t/information_schema_prepare.test
@@ -0,0 +1,7 @@
+#
+# MDEV-15907 ASAN heap-use-after-free in strnmov / .. / fill_effective_table_privileges on concurrent GRANT and CREATE VIEW
+#
+PREPARE stmt2 FROM "CREATE VIEW v AS SELECT * FROM INFORMATION_SCHEMA.TABLES";
+FLUSH PRIVILEGES;
+EXECUTE stmt2;
+DROP VIEW v;
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 3092608f893a850e2589bc0070893b4a3b16f5ec..6c19e33b59a57b0ebc71c4ea81ff29a60131b8b3 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -1,5 +1,5 @@
#
-# Test of refering to old values
+# Test of referring to old values
#
--disable_warnings
diff --git a/mysql-test/t/kill_processlist-6619.test b/mysql-test/t/kill_processlist-6619.test
index 551d36e03fdb613acd9aa9fefb280708a4d0c349..533297032e60aaf1184f260fced14716ef682b5f 100644
--- a/mysql-test/t/kill_processlist-6619.test
+++ b/mysql-test/t/kill_processlist-6619.test
@@ -7,6 +7,7 @@
--enable_connect_log
--connect (con1,localhost,root,,)
--let $con_id = `SELECT CONNECTION_ID()`
+--replace_result Execute Query
--replace_column 1 # 3 # 6 # 7 #
SHOW PROCESSLIST;
SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
@@ -30,5 +31,6 @@ let $wait_condition=
WHERE info is NULL;
--source include/wait_condition.inc
+--replace_result Execute Query
--replace_column 1 # 3 # 6 # 7 #
SHOW PROCESSLIST;
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 8f8ff3520a22edfbdcd1a52782dd00aaeed0a41c..de9de4305a350f1c6fe89dcf4794406402b95114 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -676,3 +676,48 @@ CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
LOAD DATA INFILE '../../std_data/loaddata/mdev-11631.txt' INTO TABLE t1 CHARACTER SET utf8;
SELECT HEX(a) FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-15744: Assertion `derived->table' failed in mysql_derived_merge_for_insert
+--echo #
+
+create table t1 (a int, b int);
+CREATE OR REPLACE VIEW t2 AS SELECT * FROM t1;
+CREATE VIEW v2 AS SELECT * FROM t2;
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE v2
+ FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+select * from v2;
+select * from t2;
+DROP VIEW IF EXISTS v2,t2;
+DROP TABLE IF EXISTS t1;
+
+--echo #
+--echo # MDEV-15950: LOAD DATA INTO compex_view crashed
+--echo #
+create table t1 (a int, b int);
+create table t0 (x int, y int);
+CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1,t0;
+CREATE VIEW v2 AS SELECT * FROM v1;
+
+--error ER_WRONG_USAGE
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE v1
+FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+
+--error ER_WRONG_USAGE
+LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE v2
+FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n';
+
+DROP VIEW IF EXISTS v2,v1;
+DROP TABLE IF EXISTS t1,t0;
+
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE(b));
+INSERT INTO t1 VALUES (1,1);
+CREATE TABLE t2 (c INT);
+CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2;
+SELECT a, b FROM t1 INTO OUTFILE '15645.data';
+--error ER_WRONG_USAGE
+LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b);
+--error ER_WRONG_USAGE
+LOAD DATA INFILE '15645.data' REPLACE INTO TABLE v (a,b);
+drop table t1,t2;
+drop view v;
diff --git a/mysql-test/t/log_slow.test b/mysql-test/t/log_slow.test
index 56e35bd5a207a16b339928307808aa23e017f05c..edb1865b5aee23e1560951162951183b26eb86ad 100644
--- a/mysql-test/t/log_slow.test
+++ b/mysql-test/t/log_slow.test
@@ -58,3 +58,43 @@ set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
set global log_output= default;
truncate mysql.slow_log;
+
+--echo #
+--echo # MDEV-18333 Slow_queries count doesn't increase when slow_query_log is turned off
+--echo #
+
+SET SESSION slow_query_log=OFF;
+SET GLOBAL slow_query_log=OFF;
+SET long_query_time=0.1;
+
+--echo # Although this query is disallowed by slow_query_log, it should still increment Slow_queries
+
+SELECT VARIABLE_VALUE INTO @global_slow_queries
+ FROM INFORMATION_SCHEMA.GLOBAL_STATUS
+ WHERE VARIABLE_NAME='SLOW_QUERIES';
+SELECT sleep(0.2) INTO @tmp FROM DUAL;
+SELECT
+ CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
+ FROM
+ INFORMATION_SCHEMA.GLOBAL_STATUS
+ WHERE
+ VARIABLE_NAME='SLOW_QUERIES';
+
+--echo # Although this query is disallowed by log_slow_filter, it should still increment Slow_queries
+
+SET log_slow_filter=filesort;
+SELECT sleep(0.2) INTO @tmp FROM DUAL;
+SELECT VARIABLE_VALUE INTO @global_slow_queries
+ FROM INFORMATION_SCHEMA.GLOBAL_STATUS
+ WHERE VARIABLE_NAME='SLOW_QUERIES';
+SELECT sleep(0.2) INTO @tmp FROM DUAL;
+SELECT
+ CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
+ FROM
+ INFORMATION_SCHEMA.GLOBAL_STATUS
+ WHERE
+ VARIABLE_NAME='SLOW_QUERIES';
+SET log_slow_filter=DEFAULT;
+
+SET @@long_query_time=default;
+SET GLOBAL slow_query_log= @org_slow_query_log;
diff --git a/mysql-test/t/log_slow_debug.test b/mysql-test/t/log_slow_debug.test
new file mode 100644
index 0000000000000000000000000000000000000000..35b5b93423d5d540d75a660ff02f424ccb6800f0
--- /dev/null
+++ b/mysql-test/t/log_slow_debug.test
@@ -0,0 +1,126 @@
+-- source include/have_debug.inc
+
+SET @org_slow_query_log= @@global.slow_query_log;
+SET @org_log_output= @@global.log_output;
+SET @org_log_slow_admin_statements= @@global.log_slow_admin_statements;
+
+SET @@GLOBAL.slow_query_log=OFF;
+SET @@GLOBAL.log_output='TABLE';
+FLUSH SLOW LOGS;
+SET @@GLOBAL.slow_query_log=ON;
+SET @@GLOBAL.log_slow_admin_statements=ON;
+SET SESSION debug_dbug="+d,simulate_slow_query";
+
+DELIMITER $$;
+CREATE PROCEDURE show_slow_log()
+BEGIN
+ SELECT CONCAT('[slow] ', sql_text) AS sql_text
+ FROM mysql.slow_log
+ WHERE sql_text NOT LIKE '%debug_dbug%';
+END
+$$
+DELIMITER ;$$
+
+
+--echo #
+--echo # Expect all admin statements in the slow log (ON,DEFAULT)
+--echo #
+
+SET @@GLOBAL.log_slow_admin_statements=ON;
+SET log_slow_filter=DEFAULT;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE INDEX t1a ON t1 (a);
+DROP INDEX t1a ON t1;
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+ALTER TABLE t2 RENAME t2;
+RENAME TABLE t2 TO t3;
+DROP TABLE t3;
+CREATE TABLE t4 (a INT);
+PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t4;
+CALL show_slow_log();
+
+
+--echo #
+--echo # Expect all admin statements in the slow log (ON,admin)
+--echo #
+
+SET @@GLOBAL.log_slow_admin_statements=ON;
+SET log_slow_filter=admin;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE INDEX t1a ON t1 (a);
+DROP INDEX t1a ON t1;
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+ALTER TABLE t2 RENAME t2;
+RENAME TABLE t2 TO t3;
+DROP TABLE t3;
+CREATE TABLE t4 (a INT);
+PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t4;
+CALL show_slow_log();
+
+
+--echo #
+--echo # Expect none of admin DDL statements in the slow log (ON,filesort)
+--echo #
+
+SET @@GLOBAL.log_slow_admin_statements=ON;
+SET log_slow_filter=filesort;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE INDEX t1a ON t1 (a);
+DROP INDEX t1a ON t1;
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+ALTER TABLE t2 RENAME t2;
+RENAME TABLE t2 TO t3;
+DROP TABLE t3;
+CREATE TABLE t4 (a INT);
+PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t4;
+CALL show_slow_log();
+
+
+--echo #
+--echo # Expect none of admin statements in the slow log (OFF,DEFAULT)
+--echo #
+
+SET @@GLOBAL.log_slow_admin_statements=OFF;
+SET log_slow_filter=DEFAULT;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE INDEX t1a ON t1 (a);
+DROP INDEX t1a ON t1;
+DROP TABLE t1;
+CREATE TABLE t2 (a INT);
+ALTER TABLE t2 RENAME t2;
+RENAME TABLE t2 TO t3;
+DROP TABLE t3;
+CREATE TABLE t4 (a INT);
+PREPARE stmt FROM 'ALTER TABLE t4 MODIFY a INT DEFAULT 1';
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+DROP TABLE t4;
+CALL show_slow_log();
+
+
+--echo #
+--echo # Clean up
+--echo #
+
+SET SESSION debug_dbug="-d,simulate_slow_query";
+TRUNCATE mysql.slow_log;
+SET @@global.slow_query_log= @org_slow_query_log;
+SET @@global.log_output= @org_log_output;
+SET @@global.log_slow_admin_statements= @org_log_slow_admin_statements;
+DROP PROCEDURE show_slow_log;
diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test
index a4158ba6a24ca0558e3912f4cabe6b5bc16c9206..f822ec8d7588067203cff03f60a84b26ec26e1ae 100644
--- a/mysql-test/t/log_tables.test
+++ b/mysql-test/t/log_tables.test
@@ -855,7 +855,9 @@ SET GLOBAL slow_query_log = @old_slow_query_log;
#
select CONNECTION_ID() into @thread_id;
+--disable_ps_protocol
truncate table mysql.general_log;
+--enable_ps_protocol
set global general_log = on;
--disable_result_log
set @lparam = "000 001 002 003 004 005 006 007 008 009"
diff --git a/mysql-test/t/mdev_19276.test b/mysql-test/t/mdev_19276.test
new file mode 100644
index 0000000000000000000000000000000000000000..3e6b72a3f55918f06b008732d37df49e3b1e1c2d
--- /dev/null
+++ b/mysql-test/t/mdev_19276.test
@@ -0,0 +1,17 @@
+source include/not_embedded.inc;
+
+CREATE DATABASE db1;
+CREATE USER u@localhost IDENTIFIED BY 'pw';
+set global log_warnings=2;
+
+--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
+--error ER_DBACCESS_DENIED_ERROR
+--connect(con1,localhost,u,pw,db1)
+--connection default
+let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_RANGE= -50;
+let SEARCH_PATTERN=Access denied for user 'u'@'localhost' to database 'db1';
+source include/search_pattern_in_file.inc;
+set global log_warnings=@@log_warnings;
+DROP DATABASE db1;
+DROP USER u@localhost;
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 0297280340db5a62d5a97726be2df4e46d014e9d..8399c465562cf5d1934ceadce6ab0231d74b7515 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -1056,6 +1056,37 @@ deallocate prepare stmt1;
drop view v3,v2,v1;
drop table t1,t2,t3;
+
+#
+# MDEV-18507 can't update temporary table when joined with table with triggers on read-only
+#
+create table t1 (id int not null, v1 varchar(10) not null);
+insert into t1 values (1,1),(2,2);
+create table t2 (log varchar(10) not null);
+create trigger t1_after_update after update on t1
+ for each row insert into t2 values ('triggered');
+
+create user foo;
+grant select, insert, update, delete, create, drop, reload, index, alter, show databases, create temporary tables, lock tables, execute, create view, show view, create routine, alter routine, trigger on *.* to 'foo'@'%';
+
+set global read_only=1;
+connect a, localhost, foo;
+
+create temporary table temp_t1 (id int not null, update_me varchar(10));
+insert into temp_t1 values (1,1),(2,2),(3,3);
+update temp_t1 left join t1 on temp_t1.id = t1.id set temp_t1.update_me = 'hello';
+
+connection default;
+set global read_only = 0;
+
+create table t3 (id int not null);
+insert t3 values (2);
+update t1 left join t3 on t1.id = t3.id set t1.v1 = 'hello';
+select * from t2;
+
+drop table t1,t2, t3;
+drop user foo;
+
--echo end of 5.5 tests
diff --git a/mysql-test/t/multi_update2-master.opt b/mysql-test/t/multi_update_big.opt
similarity index 100%
rename from mysql-test/t/multi_update2-master.opt
rename to mysql-test/t/multi_update_big.opt
diff --git a/mysql-test/t/multi_update2.test b/mysql-test/t/multi_update_big.test
similarity index 100%
rename from mysql-test/t/multi_update2.test
rename to mysql-test/t/multi_update_big.test
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 7969a3359200e2f89568f294cebbd74ff2cae16f..7997b6291fe3ba28fbade6bda2d732ce5d8b01be 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -702,3 +702,9 @@ select count(*) from t1; truncate table t1;
--exec $MYSQL --disable-local-infile -e "/*q*/$ldli"
select count(*) from t1; truncate table t1;
drop table t1;
+
+
+--echo #
+--echo # MDEV-15538 '-N' Produce html output wrong
+--echo #
+--exec $MYSQL -NHe "select 1 as a"
diff --git a/mysql-test/t/mysqld--help.test b/mysql-test/t/mysqld--help.test
index 3fb924b9199eb8d25b6c3132bbed54651c8b8c76..8b4674c140c68ab6587227080b8ad4ec587d0135 100644
--- a/mysql-test/t/mysqld--help.test
+++ b/mysql-test/t/mysqld--help.test
@@ -57,7 +57,7 @@ perl;
# fixes for 32-bit
s/\b4294967295\b/18446744073709551615/;
s/\b2146435072\b/9223372036853727232/;
- s/\b196608\b/262144/;
+ s/\b372736\b/299008/;
s/\b4294963200\b/18446744073709547520/;
foreach $var (@env) { s/\Q$ENV{$var}\E/$var/ }
next if /use --skip-(use-)?symbolic-links to disable/; # for valgrind, again
diff --git a/mysql-test/t/mysqldump-compat.test b/mysql-test/t/mysqldump-compat.test
index 9a830b16f2625d758b7dc23987c0a9318bad3cdd..ae74a760953fca6a302feca376256f0113e4d630 100644
--- a/mysql-test/t/mysqldump-compat.test
+++ b/mysql-test/t/mysqldump-compat.test
@@ -15,3 +15,16 @@ CREATE TABLE t1 (c1 int);
DROP DATABASE mysqldump_30126;
--remove_file $file
+use test;
+
+#
+# MDEV-19182 mysqldump not always handling SHOW CREATE TRIGGER failures correctly
+#
+create table t1 (a int);
+create trigger tr after insert on t1 for each row set @a=1;
+let $datadir=`select @@datadir`;
+move_file $datadir/test/tr.TRN $datadir/test/tr-1.TRN;
+error 2;
+exec $MYSQL_DUMP test t1 >/dev/null;
+move_file $datadir/test/tr-1.TRN $datadir/test/tr.TRN;
+drop table t1;
diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test
index 4a61cebdc0d9f68140cbeb487443ce95cfdb57f0..8d1951573b37d26c6800e53ca147b965af73c0e2 100644
--- a/mysql-test/t/olap.test
+++ b/mysql-test/t/olap.test
@@ -424,6 +424,43 @@ SELECT t, COUNT(*) FROM t1 GROUP BY t WITH ROLLUP HAVING t > '00:00:00';
DROP TABLE t1;
+--echo #
+--echo # MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP
+--echo #
+
+--echo # Note, returning "latin1" in the first row vs "binary" in the second row is wrong here.
+--echo # Both lines should return equal values.
+--echo # The point in this test is to make sure it does not crash.
+--echo # Bad result will be fixed in a later version.
+
+CREATE TABLE t (d DATE) ENGINE=MyISAM;
+INSERT INTO t VALUES ('2018-12-12');
+SELECT CHARSET(d) AS f FROM t GROUP BY d WITH ROLLUP;
+DROP TABLE t;
+
+
+--echo #
+--echo # MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP
+--echo #
+
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT GET_LOCK( 'foo', 0 );
+SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 GROUP BY f WITH ROLLUP;
+DROP TABLE t1;
+
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT i FROM t1 GROUP BY i WITH ROLLUP
+UNION ALL
+SELECT ELT( FOUND_ROWS(), 1 ) f FROM t1 GROUP BY f WITH ROLLUP;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT a FROM t1 GROUP BY NULLIF( CONVERT('', DATE), '2015-10-15' ) WITH ROLLUP;
+DROP TABLE t1;
+
--echo #
--echo # End of 10.1 tests
--echo #
diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test
index ed33da523c72c62fb2972af092a59e1b9e0df323..d2f628de6604e96a9d0da010cf691505ad75f136 100644
--- a/mysql-test/t/old-mode.test
+++ b/mysql-test/t/old-mode.test
@@ -22,7 +22,8 @@ drop table t1,t2;
--replace_column 1 3 6 7
# Embedded server is hardcoded to show "Writing to net" as STATE.
---replace_result "Writing to net" "NULL"
+# ps-protocol will have Execute not Query
+--replace_result "Writing to net" "NULL" "Execute" "Query"
--replace_regex /localhost[:0-9]*/localhost/
SHOW PROCESSLIST;
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 3b2445ad83dcdc05883ba5b18d0da3e881e1858f..0f965cc810a5fa68decd7095f772b9eeb53cb2d2 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -1197,7 +1197,7 @@ end//
call p()//
drop procedure p//
-drop table t1;
+drop table t1//
create procedure p ()
begin
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index 54994bc5a666475a6b35ea952165a0490334bb52..15c9625770b31033db5cda6cd8742a7fdba1f331 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -1028,3 +1028,27 @@ SET GLOBAL innodb_stats_persistent= @save_isp;
DROP view v;
DROP TABLE t;
+--echo #
+--echo # Bug#28573894 ALTER PARTITIONED TABLE ADD AUTO_INCREMENT DIFF RESULT
+--echo #
+CREATE TABLE t (a VARCHAR(10) NOT NULL,b INT,PRIMARY KEY (b)) ENGINE=INNODB
+PARTITION BY RANGE (b)
+(PARTITION pa VALUES LESS THAN (2),
+ PARTITION pb VALUES LESS THAN (20),
+ PARTITION pc VALUES LESS THAN (30),
+ PARTITION pd VALUES LESS THAN (40));
+
+INSERT INTO t
+VALUES('A',0),('B',1),('C',2),('D',3),('E',4),('F',5),('G',25),('H',35);
+CREATE TABLE t_copy LIKE t;
+INSERT INTO t_copy SELECT * FROM t;
+
+--enable_info
+ALTER TABLE t ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ADD UNIQUE KEY (r,b);
+ALTER TABLE t_copy ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ADD UNIQUE KEY (r,b), ALGORITHM=COPY;
+--disable_info
+SELECT * FROM t;
+SELECT * FROM t_copy;
+DROP TABLE t,t_copy;
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index e1e8dfeeb17dc47be6f6ad7be794f07d991dd9a9..c8fc3e3177efb7dbaedfe59c2e8299729968758c 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -3927,6 +3927,22 @@ END;
/
DELIMITER ;/
+--echo #
+--echo # MDEV-14572: Assertion `! is_set()' failed in
+--echo # Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+
+#EXPLAIN UPDATE t1, t2 SET a = 1;
+PREPARE stmt FROM 'EXPLAIN UPDATE t1, t2 SET a = 1';
+EXECUTE stmt;
+EXECUTE stmt;
+deallocate prepare stmt;
+
+# Cleanup
+DROP TABLE t1, t2;
--echo #
--echo # End of 10.1 tests
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index d9aed952fce3a369bcf6e42fd9785eb8dfceba38..39c990cdb15278bfc993c3d4d5eb43f4f5e17e19 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -47,7 +47,9 @@ insert into t1 values (5,5,5);
check table t1 changed;
check table t1 medium;
check table t1 extended;
+--disable_ps_protocol
show index from t1;
+--enable_ps_protocol
--disable_metadata
--error ER_DUP_ENTRY
insert into t1 values (5,5,5);
@@ -72,7 +74,9 @@ drop table t1;
show variables like "wait_timeout%";
show variables like "WAIT_timeout%";
show variables like "this_doesn't_exists%";
+--disable_ps_protocol
show table status from test like "this_doesn't_exists%";
+--enable_ps_protocol
show databases;
show databases like "test%";
--disable_metadata
@@ -409,7 +413,9 @@ CREATE TABLE t1(
PRIMARY KEY(field1(1000))
);
--enable_metadata
+--disable_ps_protocol
show index from t1;
+--enable_ps_protocol
--disable_metadata
drop table t1;
@@ -707,11 +713,15 @@ set names utf8;
--echo ----------------------------------------------------------------
+--disable_ps_protocol
SHOW CHARACTER SET LIKE 'utf8';
+--enable_ps_protocol
--echo ----------------------------------------------------------------
+--disable_ps_protocol
SHOW COLLATION LIKE 'latin1_bin';
+--enable_ps_protocol
--echo ----------------------------------------------------------------
@@ -727,7 +737,9 @@ SHOW CREATE TABLE t1;
--echo ----------------------------------------------------------------
+--disable_ps_protocol
SHOW INDEX FROM t1;
+--enable_ps_protocol
--echo ----------------------------------------------------------------
@@ -774,7 +786,9 @@ SHOW COLUMNS FROM t1;
--echo ----------------------------------------------------------------
+--disable_ps_protocol
SHOW TRIGGERS LIKE 't1';
+--enable_ps_protocol
--echo ----------------------------------------------------------------
@@ -1165,7 +1179,7 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1
FOR EACH ROW
SET NEW.c1 = 'ÔÅÓÔ';
-CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT 'ÔÅÓÔ' AS test;
+CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 'ÔÅÓÔ' AS test;
# Test: switch the character set and show that SHOW CREATE output is
# automatically converted to the new character_set_client.
@@ -1343,9 +1357,11 @@ let $wait_timeout= 10;
let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%GET_LOCK%' AND ID != CONNECTION_ID();
--source include/wait_condition.inc
--replace_column 1 ### 3 ### 6 ### 7 ###
+--replace_result "Execute" "Query"
SHOW PROCESSLIST;
SET NAMES utf8;
--replace_column 1 ### 3 ### 6 ### 7 ###
+--replace_result "Execute" "Query"
SHOW PROCESSLIST;
SELECT RELEASE_LOCK('t');
--connection con1
diff --git a/mysql-test/t/sp-ucs2.test b/mysql-test/t/sp-ucs2.test
index 3532169e5a12cb4ee03a5a1c8153c87fb83aff68..a1aec8071b42606ca00babb3446041b16ec56caa 100644
--- a/mysql-test/t/sp-ucs2.test
+++ b/mysql-test/t/sp-ucs2.test
@@ -52,16 +52,16 @@ CREATE FUNCTION f()
BEGIN
RETURN '';
END|
-SHOW CREATE FUNCTION f;
-DROP FUNCTION f;
+SHOW CREATE FUNCTION f|
+DROP FUNCTION f|
CREATE FUNCTION f()
RETURNS VARCHAR(64) BINARY UNICODE
BEGIN
RETURN '';
END|
-SHOW CREATE FUNCTION f;
-DROP FUNCTION f;
+SHOW CREATE FUNCTION f|
+DROP FUNCTION f|
#
@@ -72,16 +72,16 @@ CREATE FUNCTION f()
BEGIN
RETURN '';
END|
-SHOW CREATE FUNCTION f;
-DROP FUNCTION f;
+SHOW CREATE FUNCTION f|
+DROP FUNCTION f|
CREATE FUNCTION f()
RETURNS VARCHAR(64) BINARY ASCII
BEGIN
RETURN '';
END|
-SHOW CREATE FUNCTION f;
-DROP FUNCTION f;
+SHOW CREATE FUNCTION f|
+DROP FUNCTION f|
#
# Testing COLLATE in OUT parameter
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 2cdcc860506632970b87a66f288ceacb37b511f9..0e95fb5c2718121dc0b4d7619d5295b5b45b1331 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -8057,7 +8057,7 @@ create procedure p1() begin select * from t1; end$
call p1$
create table t1 (a integer)$
call p1$
-alter table t1 add b integer;
+alter table t1 add b integer$
call p1$
delimiter ;$
@@ -9073,6 +9073,15 @@ DROP PROCEDURE p1;
--echo # End of 5.5 test
+#MDEV-17610
+CREATE PROCEDURE sp() ALTER TABLE non_existing_table OPTIMIZE PARTITION p0;
+CALL sp;
+SELECT 1;
+DROP PROCEDURE sp;
+CREATE PROCEDURE sp() SHOW USER_STATISTICS;
+CALL sp;
+SELECT 1;
+DROP PROCEDURE sp;
--echo #
--echo # Bug#12663165 SP DEAD CODE REMOVAL DOESN'T UNDERSTAND CONTINUE HANDLERS
@@ -9369,6 +9378,47 @@ CALL sp;
DROP PROCEDURE sp;
DROP TABLE t1;
+--echo #
+--echo # MDEV-17055: Server crashes in find_order_in_list upon
+--echo # 2nd (3rd) execution of SP with UPDATE
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TABLE t2 (c INT);
+
+CREATE PROCEDURE sp() UPDATE v1 SET a = 1 ORDER BY a, b LIMIT 1;
+LOCK TABLE t2 READ;
+--error ER_TABLE_NOT_LOCKED
+CALL sp;
+UNLOCK TABLES;
+--error ER_BAD_FIELD_ERROR
+CALL sp;
+--error ER_BAD_FIELD_ERROR
+CALL sp;
+--error ER_BAD_FIELD_ERROR
+CALL sp;
+
+# Cleanup
+DROP PROCEDURE sp;
+
+CREATE PROCEDURE sp() UPDATE v1 SET a = 1 WHERE a=1 and b=2;
+LOCK TABLE t2 READ;
+--error ER_TABLE_NOT_LOCKED
+CALL sp;
+UNLOCK TABLES;
+--error ER_BAD_FIELD_ERROR
+CALL sp;
+--error ER_BAD_FIELD_ERROR
+CALL sp;
+--error ER_BAD_FIELD_ERROR
+CALL sp;
+
+# Cleanup
+DROP PROCEDURE sp;
+
+DROP VIEW v1;
+DROP TABLE t1, t2;
--echo # End of 5.5 test
diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test
index d7aaaa4340f155ff3b8c5113d16d371135652d7c..6dd2dbf7e8230bc63858a04932922d443238720e 100644
--- a/mysql-test/t/sp_notembedded.test
+++ b/mysql-test/t/sp_notembedded.test
@@ -116,7 +116,7 @@ end|
# a procedure which use tables and recursion
create table t3 (a int)|
insert into t3 values (0)|
-create view v1 as select a from t3;
+create view v1 as select a from t3|
create procedure bug10100pt(level int, lim int)
begin
if level < lim then
diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test
index a9759b9926959eaf55c306b35b13769ba8d5d3b5..7d6faba9789343d8cd139b0adbe6cc0f48f51cef 100644
--- a/mysql-test/t/sp_trans.test
+++ b/mysql-test/t/sp_trans.test
@@ -689,7 +689,7 @@ END|
LOCK TABLES t1 WRITE|
CALL p1()|
-FLUSH TABLES;
+FLUSH TABLES|
UNLOCK TABLES|
CALL p1()|
diff --git a/mysql-test/t/ssl_verify_ip.opt b/mysql-test/t/ssl_verify_ip.opt
new file mode 100644
index 0000000000000000000000000000000000000000..7b1c308e46bd50e599ba0eac991941046e18d823
--- /dev/null
+++ b/mysql-test/t/ssl_verify_ip.opt
@@ -0,0 +1,3 @@
+--loose-enable-ssl
+--loose-ssl-cert=$MYSQL_TEST_DIR/std_data/serversan-cert.pem
+--loose-ssl-key=$MYSQL_TEST_DIR/std_data/serversan-key.pem
diff --git a/mysql-test/t/ssl_verify_ip.test b/mysql-test/t/ssl_verify_ip.test
new file mode 100644
index 0000000000000000000000000000000000000000..2a2e780ecfccbe34bdc8aa3cf2a7c2743d7eda41
--- /dev/null
+++ b/mysql-test/t/ssl_verify_ip.test
@@ -0,0 +1,3 @@
+source include/have_ssl_crypto_functs.inc;
+--exec $MYSQL --protocol=tcp --host=127.0.0.1 --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl --ssl-verify-server-cert -e "select 1"
+--exec $MYSQL --protocol=tcp --host=localhost --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl --ssl-verify-server-cert -e "select 1"
diff --git a/mysql-test/t/stat_tables.test b/mysql-test/t/stat_tables.test
index b89ab2bbd2dd799065fe0dfdbeea3812064b3cdb..97f9f08569f236c83968adab3ac10492cbf093a9 100644
--- a/mysql-test/t/stat_tables.test
+++ b/mysql-test/t/stat_tables.test
@@ -402,3 +402,57 @@ SELECT MAX(pk) FROM t1;
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
+
+--echo #
+--echo # MDEV-17605: SHOW INDEXES with use_stat_tables='preferably'
+--echo #
+
+set use_stat_tables='preferably';
+
+CREATE DATABASE dbt3_s001;
+
+use dbt3_s001;
+
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='extended_keys=off';
+
+--disable_query_log
+--disable_result_log
+--disable_warnings
+--source include/dbt3_s001.inc
+create index i_p_retailprice on part(p_retailprice);
+delete from mysql.table_stats;
+delete from mysql.column_stats;
+delete from mysql.index_stats;
+ANALYZE TABLE lineitem;
+FLUSH TABLE mysql.table_stats, mysql.index_stats;
+--enable_warnings
+--enable_result_log
+--enable_query_log
+
+select * from mysql.table_stats;
+select * from mysql.index_stats;
+
+SHOW INDEXES FROM lineitem;
+
+SELECT * FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name='lineitem';
+
+SELECT
+ COUNT(DISTINCT l_orderkey), COUNT(DISTINCT l_orderkey,l_linenumber),
+ COUNT(DISTINCT l_shipDATE),
+ COUNT(DISTINCT l_partkey), COUNT(DISTINCT l_partkey,l_suppkey),
+ COUNT(DISTINCT l_suppkey), COUNT(DISTINCT l_receiptDATE),
+ COUNT(DISTINCT l_orderkey, l_quantity), COUNT(DISTINCT l_commitDATE)
+FROM lineitem;
+
+set optimizer_switch=@save_optimizer_switch;
+
+DROP DATABASE dbt3_s001;
+
+delete from mysql.table_stats;
+delete from mysql.column_stats;
+delete from mysql.index_stats;
+
+set @save_optimizer_switch=@@optimizer_switch;
+
+set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/t/statistics.test b/mysql-test/t/statistics.test
index e4f9870a622fbf54ec77a96ab12bbb56910f793a..7d2e7e898d3117fc2455a1a480ac094ff11a0cee 100644
--- a/mysql-test/t/statistics.test
+++ b/mysql-test/t/statistics.test
@@ -809,4 +809,19 @@ rename table t1 to t2, t3 to t4;
drop table t1, mysql.table_stats;
rename table test.table_stats to mysql.table_stats;
+--echo #
+--echo # MDEV-19334: bool is_eits_usable(Field*): Assertion `field->table->stats_is_read' failed.
+--echo #
+
+create temporary table t1(a int);
+insert into t1 values (1),(2),(3);
+
+set use_stat_tables=preferably;
+set @optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=4;
+
+select * from t1 where a >= 2;
+drop table t1;
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+
set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/t/status2.test b/mysql-test/t/status2.test
index 2d1541c54f250e70812ffea7c3e313cdd83f5a6d..fa3b718efaaf9f55f79731b948abc4b619905510 100644
--- a/mysql-test/t/status2.test
+++ b/mysql-test/t/status2.test
@@ -20,11 +20,11 @@ END $$
DELIMITER ;$$
--disable_warnings
DROP TABLE IF EXISTS t1,t2;
+CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
+ DO INSERT INTO t1 VALUES(1);
--enable_warnings
CREATE TABLE t1 (c1 INT);
CREATE TABLE t2 (c1 INT);
-CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
- DO INSERT INTO t1 VALUES(1);
--echo Assert Questions == 7
SHOW STATUS LIKE 'Questions';
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index 623e414310aed2f592c85e22e27ec698f8b4c85e..1a1b8757864faa05288baa3b6f8a1d1a75c93605 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -2873,6 +2873,16 @@ EXECUTE stmt;
drop view v3;
drop table t1,t2,t3;
+--echo #
+--echo # MDEV-18896: IN subquery in WHERE of a table-less query used for INSERT
+--echo #
+
+create table t1 (a1 varchar(25));
+create table t2 (a2 varchar(25)) ;
+insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
+
+drop table t1,t2;
+
--echo # End of 5.5 test
# The following command must be the last one the file
diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test
index fd40bee6705b10078da8249d8687fc7a1ec56204..1f514be23d24edeba763e7227d874f223c7fa9be 100644
--- a/mysql-test/t/subselect_sj_mat.test
+++ b/mysql-test/t/subselect_sj_mat.test
@@ -1570,7 +1570,9 @@ INSERT INTO t2 values(1),(2);
EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
flush status;
CREATE TABLE t3 SELECT * FROM t1 WHERE a IN (SELECT * FROM t2 GROUP BY a HAVING a > 1);
+--disable_ps_protocol
SHOW STATUS LIKE 'Created_tmp_tables';
+--enable_ps_protocol
DROP TABLE t1,t2,t3;
--echo #
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index 43621cf6ba11e745b3c5ef434ad42da602ad6fe1..9613a16e6ff794bb777f4dae5ecaa5752dab5627 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -114,8 +114,10 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES ('2002-10-24 14:50:32'),('2002-10-24 14:50:33'),('2002-10-24 14:50:34'),('2002-10-24 14:50:34'),('2002-10-24 14:50:34'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:38'),('2002-10-24 14:50:38'),('2002-10-24 14:50:38'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:40'),('2002-10-24 14:50:40'),('2002-10-24 14:50:40');
flush status;
+--disable_ps_protocol
select * from t1 group by d;
show status like "created_tmp%tables";
+--enable_ps_protocol
drop table t1;
# Fix for BUG#8921: Check that temporary table is ingored by view commands.
diff --git a/mysql-test/t/timezone2.test b/mysql-test/t/timezone2.test
index 7a38610ad957f4f0df174309a1353ccca1f1bd19..1e5615502da49ea173c0f27627862e02625d4978 100644
--- a/mysql-test/t/timezone2.test
+++ b/mysql-test/t/timezone2.test
@@ -308,3 +308,34 @@ SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' );
--echo #
--echo # End of 5.3 tests
--echo #
+
+--echo #
+--echo # Start of 10.1 tests
+--echo #
+
+--echo #
+--echo # MDEV-11895 NO_ZERO_DATE affects timestamp values without any warnings
+--echo #
+
+SET sql_mode = '';
+CREATE TABLE t1 (a TIMESTAMP NULL) ENGINE = MyISAM;
+CREATE TABLE t2 (a TIMESTAMP NULL) ENGINE = MyISAM;
+CREATE TABLE t3 (a TIMESTAMP NULL) ENGINE = MyISAM;
+
+SET @@session.time_zone = 'UTC';
+INSERT INTO t1 VALUES ('2011-10-29 23:00:00');
+INSERT INTO t1 VALUES ('2011-10-29 23:00:01');
+INSERT INTO t1 VALUES ('2011-10-29 23:59:59');
+
+SET @@session.time_zone = 'Europe/Moscow';
+SET sql_mode='NO_ZERO_DATE';
+INSERT INTO t2 SELECT * FROM t1;
+SET sql_mode='';
+INSERT INTO t3 SELECT * FROM t1;
+SELECT UNIX_TIMESTAMP(a), a FROM t2;
+SELECT UNIX_TIMESTAMP(a), a FROM t3;
+DROP TABLE t1, t2, t3;
+
+--echo #
+--echo # End of 10.1 tests
+--echo #
diff --git a/mysql-test/t/tmp_table_count-7586.test b/mysql-test/t/tmp_table_count-7586.test
index e7bac127815a36e669bfe4c1fb4358272bd66d78..8bfb0e7c5cf4868a6d7e77d0986fb6900c400901 100644
--- a/mysql-test/t/tmp_table_count-7586.test
+++ b/mysql-test/t/tmp_table_count-7586.test
@@ -9,12 +9,16 @@ create view v2 as select a from t2;
flush status;
select * from v2;
+--disable_ps_protocol
show status like '%Created_tmp%';
+--enable_ps_protocol
explain select * from v2;
select * from (select * from t2) T1;
+--disable_ps_protocol
show status like '%Created_tmp%';
+--enable_ps_protocol
explain select * from (select * from t2) T1;
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index 01a610999bd2dae50aad8cdbdf0d0e8c39472d58..4df6d72ce9a79bf4ba73f6ceb1f8bb6a18650d0a 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -458,3 +458,13 @@ DROP TABLE t2;
SELECT COALESCE(val, 1) FROM t1;
--disable_metadata
DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-18452 ASAN unknown-crash in Field::set_default upon SET bit_column = DEFAULT
+--echo #
+
+CREATE TABLE t1 (b BIT(20)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (0);
+UPDATE t1 SET b = DEFAULT;
+DROP TABLE t1;
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index 8248386a93fbd25db6dfd4fe087b361ec3272393..554542f9dd372056ac50db15719d992972758560 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -585,6 +585,20 @@ INSERT INTO t1 VALUES ('1985-05-13'),('1989-12-24');
SELECT d, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP HAVING CASE d WHEN '2017-05-25' THEN 0 ELSE 1 END;
DROP TABLE t1;
+--echo #
+--echo # MDEV-17299 Assertion `maybe_null' failed in make_sortkey
+--echo #
+
+CREATE TABLE t1 (pk int NOT NULL, d1 date, d2 date NOT NULL);
+INSERT INTO t1 values (1,'2018-06-22','2018-06-22'),(2,'2018-07-11','2018-07-11');
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT group_concat(d1/(CASE 'b' WHEN 'j' THEN 'c' END))
+ FROM v1 GROUP BY greatest(pk, 0, d2);
+CREATE TABLE t2 AS SELECT greatest(pk, 0, d2) AS c1 FROM t1 LIMIT 0;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP VIEW v1;
+DROP TABLE t1;
--echo #
--echo # End of 10.1 tests
diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test
index 834fd0c53276b2e3a444dfb021bdff0a8b93070d..4a4b3d5288480e34f179e2b82fb5b5d14bccc7fb 100644
--- a/mysql-test/t/type_decimal.test
+++ b/mysql-test/t/type_decimal.test
@@ -612,3 +612,24 @@ select cast('-0.0' as decimal(5,1)) < 0;
--echo #
--echo # End of 5.5 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.1 tests
+--echo #
+
+--echo #
+--echo # MDEV-18968 Both (WHERE 0.1) and (WHERE NOT 0.1) return empty set
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (10);
+SELECT CASE WHEN 0.1 THEN 'TRUE' ELSE 'FALSE' END FROM t1;
+SELECT * FROM t1 WHERE 0.1;
+SELECT * FROM t1 WHERE NOT 0.1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.1 tests
+--echo #
diff --git a/mysql-test/t/type_year.test b/mysql-test/t/type_year.test
index c971c884fef9acd5b6258925253bbfede3007978..9ce9c00873b7da9402872ade9b450bea297f0f20 100644
--- a/mysql-test/t/type_year.test
+++ b/mysql-test/t/type_year.test
@@ -214,6 +214,17 @@ SELECT * FROM t1 WHERE a=10 AND a>=10;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=10 AND a>=10;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-16958 Assertion `field_length < 5' failed in Field_year::val_str or data corruption upon SELECT with UNION and aggregate functions
+--echo #
+
+CREATE TABLE t1 (f YEAR);
+INSERT IGNORE INTO t1 VALUES (1971),(1972);
+SELECT MAX( NULLIF( f, '1900' ) ) AS f FROM t1 UNION SELECT MAX( NULLIF( f, '1900' ) ) AS f FROM t1;
+DROP TABLE t1;
+
+
--echo #
--echo # End of 10.1 tests
--echo #
diff --git a/mysql-test/t/update_innodb.test b/mysql-test/t/update_innodb.test
index acc8aceab00708907c4234e8521b51d623ef674c..a29dd071cf866f042918b23f5b0315ed54f8b901 100644
--- a/mysql-test/t/update_innodb.test
+++ b/mysql-test/t/update_innodb.test
@@ -75,3 +75,32 @@ SELECT t2.b_id FROM t1,t2 WHERE t2.c_id = t1.c_id;
UPDATE t1 SET b_id = (SELECT t2.b_id FROM t2 t2 WHERE t2.c_id = t1.c_id);
SELECT * FROM t1;
drop table t1,t2;
+
+--echo #
+--echo # MDEV-18300: ASAN error in Field_blob::get_key_image upon UPDATE with subquery
+--echo #
+
+set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
+set @save_use_stat_tables= @@use_stat_tables;
+set use_stat_tables=preferably;
+set optimizer_use_condition_selectivity=4;
+
+CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=InnoDB;
+insert into t1 values (1,'foo'),(2, 'abc');
+CREATE TABLE t2 (c CHAR(8), d BLOB) ENGINE=InnoDB;
+insert into t2 values ('abc', 'foo'),('edf', 'food');
+
+--disable_result_log
+ANALYZE TABLE t1,t2;
+--enable_result_log
+UPDATE t1 SET a = 1 WHERE b = ( SELECT c FROM t2 WHERE d = 'foo' );
+SELECT * FROM t1;
+DROP TABLE t1, t2;
+
+create table t1 (a int not null, b int, c int) engine=InnoDB;
+create table t2 (d int, e int) engine=InnoDB;
+update t1, t2 set a=NULL, b=2, c=NULL where b=d and e=200;
+drop table t1,t2;
+
+set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set @@use_stat_tables= @save_use_stat_tables;
diff --git a/mysql-test/t/userstat.test b/mysql-test/t/userstat.test
index 9ce3a32c442229ab3e96e3f31040202df52f632d..547138cfeaa059fb4304c9912623f5729758919d 100644
--- a/mysql-test/t/userstat.test
+++ b/mysql-test/t/userstat.test
@@ -73,8 +73,11 @@ select * from information_schema.index_statistics;
select * from information_schema.table_statistics;
show table_statistics;
show index_statistics;
---query_vertical select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;
---query_vertical select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;
+--query_vertical select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;
+--query_vertical select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;
+# different values in --ps-protocol
+select OTHER_COMMANDS IN (7,8) from information_schema.client_statistics;
+select OTHER_COMMANDS IN (7,8) from information_schema.user_statistics;
flush table_statistics;
flush index_statistics;
select * from information_schema.index_statistics;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 6ff226d738f528c0d7096ac24f14c97b079f8f4b..2d1266dd17a6773bcd55c14e07b0e00b777f3cfa 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -2437,6 +2437,7 @@ DROP TABLE t1;
# Bug#15943 mysql_next_result hangs on invalid SHOW CREATE VIEW
#
+--disable_ps_protocol
delimiter //;
drop table if exists t1;
drop view if exists v1;
@@ -2447,6 +2448,7 @@ show create view v1;
drop view v1;
//
delimiter ;//
+--enable_ps_protocol
#
@@ -3957,7 +3959,9 @@ CREATE VIEW v1 AS SELECT f1() FROM t1;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
copy_file std_data/bug48449.frm $MYSQLD_DATADIR/test/v2.frm;
+enable_prepare_warnings;
SHOW CREATE VIEW v1;
+disable_prepare_warnings;
DROP VIEW v1,v2;
DROP TABLE t1,t2;
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test
index 6d0cd8e5c289c4db762158ccb7188f53e89589d7..4f10d48ee77fdf1b364c8a09933976257a4377db 100644
--- a/mysql-test/t/view_grant.test
+++ b/mysql-test/t/view_grant.test
@@ -244,6 +244,8 @@ create table mysqltest.t1 (a int, b int, primary key(a));
insert into mysqltest.t1 values (10,2), (20,3), (30,4), (40,5), (50,10);
create table mysqltest.t2 (x int);
insert into mysqltest.t2 values (3), (4), (5), (6);
+create table mysqltest.t3 (x int);
+insert into mysqltest.t3 values (3), (4), (5), (6);
create view mysqltest.v1 (a,c) as select a, b+1 from mysqltest.t1;
create view mysqltest.v2 (a,c) as select a, b from mysqltest.t1;
create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1;
@@ -251,6 +253,7 @@ create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1;
create user mysqltest_1@localhost;
grant update (a) on mysqltest.v2 to mysqltest_1@localhost;
grant update on mysqltest.v1 to mysqltest_1@localhost;
+grant update on mysqltest.t3 to mysqltest_1@localhost;
grant select on mysqltest.* to mysqltest_1@localhost;
connection user1;
@@ -265,6 +268,8 @@ update t2,v2 set v2.a=v2.a+v2.c where t2.x=v2.c;
select * from t1;
update v2 set a=a+c;
select * from t1;
+# update a table, select only on view
+update t3,v3 set t3.x=t3.x+v3.c where t3.x=v3.c;
# no rights on column
--error ER_COLUMNACCESS_DENIED_ERROR
update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c;
diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests
index a5ff43c0c4869a550d37facae353d495d95b0d69..b400c4e971e525e3957fbfbff2409bf9df63ec43 100644
--- a/mysql-test/unstable-tests
+++ b/mysql-test/unstable-tests
@@ -23,67 +23,104 @@
#
##############################################################################
-# Based on 10.1 955c7b32226c816b24a2ed1750e12bc0256565ad
+# Based on 10.1 5b035c84567b60c2ca680de96f5179a6dd3d9e61
-main.alter_table : Modified in 10.1.37
main.alter_table_trans : MDEV-12084 - timeout
+main.analyze_stmt : Modified in 10.1.39
main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result
main.auth_named_pipe : MDEV-14724 - System error 2
main.auto_increment_ranges_innodb : Modified in 10.1.38
main.bigint : Modified in 10.1.38
+main.bootstrap : MDEV-19199 - error: 34304, status: 134, errno: 2
main.connect : Modified in 10.1.38
main.count_distinct2 : MDEV-11768 - timeout
main.create_delayed : MDEV-10605 - failed with timeout
main.create_drop_event : MDEV-16271 - Wrong result
-main.create_or_replace : Modified in 10.1.37
-main.ctype_latin1 : Modified in 10.1.38
-main.ctype_uca : Modified in 10.1.37
-main.ctype_utf16 : MDEV-10675: timeout or extra warnings
+main.create_drop_role : Modified in 10.1.39
+main.ctype_big5 : Include file modified in 10.1.39
+main.ctype_euckr : Include file modified in 10.1.39
+main.ctype_gb2312 : Include file modified in 10.1.39
+main.ctype_gbk : Include file modified in 10.1.39
+main.ctype_latin1 : Include file modified in 10.1.39
+main.ctype_sjis : Include file modified in 10.1.39
+main.ctype_tis620 : Include file modified in 10.1.39
+main.ctype_uca : Include file modified in 10.1.39
+main.ctype_ucs : Include file modified in 10.1.39
+main.ctype_ujis : Include file modified in 10.1.39
+main.ctype_utf16 : MDEV-10675: timeout or extra warnings; include file modified in 10.1.39
+main.ctype_utf16le : Include file modified in 10.1.39
+main.ctype_utf16_uca : Include file modified in 10.1.39
+main.ctype_utf32 : Include file modified in 10.1.39
+main.ctype_utf32_uca : Include file modified in 10.1.39
+main.ctype_utf8 : Include file modified in 10.1.39
+main.ctype_utf8mb4 : Include file modified in 10.1.39
+main.ctype_utf8mb4_heap : Include file modified in 10.1.39
+main.ctype_utf8mb4_innodb : Include file modified in 10.1.39
+main.ctype_utf8mb4_myisam : Include file modified in 10.1.39
+main.ddl_i18n_koi8r : Modified in 10.1.39
+main.ddl_i18n_utf8 : Modified in 10.1.39
main.debug_sync : MDEV-10607 - internal error
-main.derived_opt : MDEV-11768 - timeout; modified in 10.1.37
+main.derived_opt : MDEV-11768 - timeout
+main.dirty_close : MDEV-19368 - mysqltest failed but provided no output
+main.events_1 : Modified in 10.1.39
main.events_2 : MDEV-13277 - Server crash
main.events_bugs : MDEV-12892 - Crash in fill_schema_processlist
main.events_slowlog : MDEV-12821 - Wrong result
main.events_restart : MDEV-12236 - Server shutdown problem
main.flush : Modified in 10.1.38
-main.func_concat : Modified in 10.1.37
+main.func_gconcat : Modified in 10.1.39
main.func_group_innodb : Modified in 10.1.38
+main.func_hybrid_type : Modified in 10.1.39
+main.func_math : Modified in 10.1.39
main.func_misc : Modified in 10.1.38
-main.func_time : Modified in 10.1.37
-main.gis : MDEV-13411 - wrong result on P8
-main.grant : Modified in 10.1.37
+main.func_str : Modified in 10.1.39
+main.func_time : Modified in 10.1.39
+main.gis : MDEV-13411 - wrong result on P8; modified in 10.1.39
+main.gis-precise : Modified in 10.1.39
+main.gis_notembedded : Added in 10.1.39
+main.grant4 : Modified in 10.1.39
main.grant5 : Modified in 10.1.38
main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown
main.huge_frm-6224 : Modified in 10.1.38
main.index_intersect_innodb : MDEV-10643 - failed with timeout
-main.index_merge_innodb : MDEV-7142 - Wrong execution plan, timeout with valgrind
-main.index_merge_myisam : Modified in 10.1.38
+main.index_merge_innodb : MDEV-7142 - Wrong execution plan, timeout with valgrind; modified in 10.1.39
+main.index_merge_myisam : Include files modified in 10.1.39
+main.information_schema_prepare : Added in 10.1.39
main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure
-main.kill_processlist-6619 : MDEV-10793 - wrong result in processlist
+main.kill_processlist-6619 : MDEV-10793 - wrong result in processlist; modified in 10.1.39
+main.loaddata : MDEV-19368 - mysqltest failed but provided no output; modified in 10.1.39
main.lock : Modified in 10.1.38
main.lock_multi : Modified in 10.1.38
main.lock_sync : Modified in 10.1.38
+main.log_slow : MDEV-13263 - Wrong result; modified in 10.1.39
+main.log_slow_debug : Added in 10.1.39
main.log_tables-big : MDEV-13408 - wrong result
-main.lowercase_fs_off : Modified in 10.1.37
main.mdev-504 : MDEV-10607 - sporadic "can't connect"
main.mdev375 : MDEV-10607 - sporadic "can't connect"
+main.mdev_19276 : Added in 10.1.39
main.merge : MDEV-10607 - sporadic "can't connect"
-main.mysql : Modified in 10.1.38
+main.multi_update : Modified in 10.1.39
+main.multi_update_big : Added in 10.1.39
+main.mysql : Modified in 10.1.39
+main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2
+main.mysql_client_test_comp : MDEV-19369 - error: 5888, status: 23, errno: 2
main.mysql_client_test_nonblock : MDEV-15096 - exec failed
main.mysql_upgrade_noengine : MDEV-14355 - Plugin is busy
main.mysqlbinlog_row_minimal : Modified in 10.1.38
+main.mysqld--help : Modified in 10.1.39
main.mysqldump : Modified in 10.1.38
+main.mysqldump-compat : Modified in 10.1.39
main.mysqlhotcopy_myisam : MDEV-10995 - test hangs on debug build
main.mysqlslap : MDEV-11801 - timeout
main.mysqltest : MDEV-9269 - fails on Alpha
+main.olap : Modified in 10.1.39
+main.old-mode : MDEV-19373 - Wrong result
main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan
-main.order_by_zerolength-4285 : Modified in 10.1.37
-main.partition : Modified in 10.1.38
+main.partition : Modified in 10.1.39
main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock
-main.partition_explicit_prune : Modified in 10.1.37
-main.partition_innodb : Modified in 10.1.38
+main.partition_innodb : Modified in 10.1.39
main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings
-main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count
+main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; modified in 10.1.39
main.query_cache : MDEV-12895 - Wrong result
main.query_cache_debug : MDEV-15281 - Resize or similar command in progress
main.range_innodb : Modified in 10.1.38
@@ -92,27 +129,41 @@ main.read_only : Modified in 10.1.38
main.row-checksum : Modified in 10.1.38
main.set_statement : MDEV-13183 - Wrong result
main.show_explain : MDEV-10674 - sporadic failure
-main.sp_notembedded : MDEV-10607 - internal error
-main.sp-security : MDEV-10607 - sporadic "can't connect"; modified in 10.1.37
-main.stat_tables : Modified in 10.1.38
+main.sp : Modified in 10.1.39
+main.sp_notembedded : MDEV-10607 - internal error; modified in 10.1.39
+main.sp-security : MDEV-10607 - sporadic "can't connect"
+main.sp_trans : Modified in 10.1.39
+main.sp-ucs2 : Modified in 10.1.39
+main.ssl_verify_ip : Added in 10.1.39
+main.statistics : Modified in 10.1.39
+main.stat_tables : Modified in 10.1.39
main.stat_tables_par_innodb : MDEV-14155 - wrong rounding
main.status : MDEV-8510 - sporadic wrong result
+main.status2 : Modified in 10.1.39
main.subselect_innodb : MDEV-10614 - sporadic wrong results
main.subselect_mat : Modified in 10.1.38
+main.subselect_sj : Modified in 10.1.39
main.subselect2 : Modified in 10.1.38
main.tc_heuristic_recover : MDEV-15200 - wrong error on mysqld_stub_cmd
+main.timezone2 : Modified in 10.1.39
+main.type_bit : Modified in 10.1.39
main.type_blob : MDEV-15195 - Wrong result
-main.type_datetime : Modified in 10.1.37
+main.type_date : Modified in 10.1.39
main.type_datetime_hires : MDEV-10687 - timeout
-main.type_float : Modified in 10.1.37
-main.type_newdecimal : Modified in 10.1.37
-main.type_year : Modified in 10.1.37
+main.type_decimal : Modified in 10.1.39
+main.type_year : Modified in 10.1.39
main.union : Modified in 10.1.38
+main.update_innodb : Modified in 10.1.39
+main.userstat : Modified in 10.1.39
+main.view : Modified in 10.1.39
+main.view_grant : Modified in 10.1.39
+main.wait_timeout : Lost connection to MySQL server during query
main.xa : MDEV-11769 - lock wait timeout
#----------------------------------------------------------------
archive.archive_bitfield : MDEV-11771 - Extra warning
+archive.archive_eits : Added in 10.1.39
archive.archive_symlink : MDEV-12170 - unexpected error on rmdir
archive.discover : MDEV-10510 - Table is marked as crashed
archive.mysqlhotcopy_archive : MDEV-14726 - Table is marked as crashed
@@ -121,14 +172,11 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed
#----------------------------------------------------------------
-auth_gssapi.basic : Modified in 10.1.37
-
-#----------------------------------------------------------------
-
binlog.binlog_base64_flag : Modified in 10.1.38
binlog.binlog_commit_wait : MDEV-10150 - Error: too much time elapsed
-binlog.binlog_flush_binlogs_delete_domain : Modified in 10.1.37
+binlog.binlog_innodb_stm : Added in 10.1.39
binlog.binlog_killed : MDEV-12925 - Wrong result
+binlog.binlog_mysqlbinlog2 : Modified in 10.1.39
binlog.binlog_mysqlbinlog_row_frag : Added in 10.1.38
binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint
@@ -140,6 +188,7 @@ binlog_encryption.rpl_parallel : MDEV-10653 - Timeout
binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout
binlog_encryption.rpl_semi_sync : MDEV-11220 - Wrong result, MDEV-11673 - Valgrind warning
binlog_encryption.rpl_ssl : MDEV-14507 - Timeout on SLES 11.4
+binlog_encryption.rpl_stm_relay_ign_space : MDEV-19375 - Test assertion failed in assertion.inc
binlog_encryption.rpl_typeconv : MDEV-14362 - Lost connection to MySQL server during query
binlog.load_data_stm_view : MDEV-16948 - Wrong result
@@ -147,7 +196,6 @@ binlog.load_data_stm_view : MDEV-16948 - Wrong result
connect.part_table : Modified in 10.1.38
connect.pivot : MDEV-14803 - failed to discover table
-connect.xml2 : Modified in 10.1.37
connect.zip : MDEV-13884 - Wrong result
#----------------------------------------------------------------
@@ -155,9 +203,10 @@ connect.zip : MDEV-13884 - Wrong result
encryption.create_or_replace : MDEV-16115 - Trying to access tablespace
encryption.debug_key_management : MDEV-13841 - Timeout on wait condition
encryption.encrypt_and_grep : MDEV-13765 - Wrong result
+encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect through socket
encryption.innodb-checksum-algorithm : Modified in 10.1.38
encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate
-encryption.innodb-encryption-alter : Modified in 10.1.38
+encryption.innodb-encryption-alter : Modified in 10.1.39
encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result
encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure
encryption.innodb_encryption_row_compressed : MDEV-16113 - Crash
@@ -191,8 +240,10 @@ federated.federatedx : MDEV-10617 - Wrong checksum, timeouts
#----------------------------------------------------------------
funcs_1.memory_views : MDEV-11773 - timeout
-funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result
-funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan
+funcs_1.processlist_priv_no_prot : Include file modified in 10.1.39
+funcs_1.processlist_priv_ps : Include file modified in 10.1.39
+funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result; include file modified in 10.1.39
+funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan; include file modified in 10.1.39
funcs_2.memory_charset : MDEV-10290 - Timeout
funcs_2.myisam_charset : MDEV-11535 - Timeout
@@ -205,28 +256,27 @@ galera_3nodes.* : The suite has not been stabilized yet
#----------------------------------------------------------------
-heap.heap_btree : Modified in 10.1.37
-
-#----------------------------------------------------------------
-
innodb.alter_candidate_key : Added in 10.1.38
-innodb.alter_inplace_perfschema : Added in 10.1.37
+innodb.alter_crash : Added in 10.1.39
innodb.binlog_consistent : MDEV-10618 - Server fails to start
innodb.doublewrite : MDEV-12905 - Lost connection to MySQL server
-innodb.foreign_key : Modified in 10.1.38
+innodb.foreign-keys : Modified in 10.1.39
+innodb.foreign_key : Modified in 10.1.39
innodb.group_commit_crash : MDEV-11770 - checksum mismatch
innodb.group_commit_crash_no_optimize_thread : MDEV-11770 - checksum mismatch
innodb.innodb_28867993 : Added in 10.1.38
innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup
innodb.innodb-alter : Modified in 10.1.38
innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS; modified in 10.1.38
+innodb.innodb-alter-nullable : Modified in 10.1.39
innodb.innodb-alter-table : MDEV-10619 - Testcase timeout
innodb.innodb-blob : MDEV-12053 - Client crash
innodb.innodb_bug14147491 : MDEV-11808 - wrong error codes
innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan
innodb.innodb_bug48024 : MDEV-14352 - Assertion failure
+innodb.innodb-corrupted-table : Modified in 10.1.39
innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown
-innodb.innodb-index : Modified in 10.1.38
+innodb.innodb-index : Modified in 10.1.39
innodb.innodb_max_recordsize_64k : MDEV-15203 - wrong result
innodb.innodb_monitor : MDEV-10939 - Testcase timeout
innodb.innodb-page_compression_default : MDEV-14121 - Assertion failure
@@ -236,6 +286,7 @@ innodb.innodb_simulate_comp_failures : MDEV-18417 - ASAN failures
innodb.innodb_stats : MDEV-10682 - wrong result
innodb.innodb_sys_semaphore_waits : MDEV-10331 - wrong result
innodb.innodb-table-online : Modified in 10.1.38
+innodb.innodb-truncate : Modified in 10.1.39
innodb.innodb-virtual-columns : Modified in 10.1.38
innodb.innodb_zip_innochecksum : Modified in 10.1.38
innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks
@@ -243,7 +294,8 @@ innodb.log_file_size : MDEV-15668 - Not found pattern
innodb.recovery_shutdown : MDEV-15671 - Warning: database page corruption
innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace
innodb.table_definition_cache_debug : MDEV-14206 - Extra warning
-innodb.table_flags : Modified in 10.1.37
+innodb.table_flags : MDEV-19374 - Server failed to restart
+innodb.xa_debug : Added in 10.1.39
innodb.xa_recovery : MDEV-15279 - mysqld got exception
#----------------------------------------------------------------
@@ -253,18 +305,19 @@ innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning
#----------------------------------------------------------------
-maria.fulltext2 : Added in 10.1.37
maria.insert_select : MDEV-12757 - Timeout
maria.insert_select-7314 : MDEV-16492 - Timeout
maria.maria : MDEV-14430 - Wrong result
#----------------------------------------------------------------
+mariabackup.absolute_ibdata_paths : Modified in 10.1.39
mariabackup.encrypted_page_compressed : Added in 10.1.38
mariabackup.encrypted_page_corruption : Added in 10.1.38
mariabackup.huge_lsn : Opt file modified in 10.1.38
mariabackup.incremental_encrypted : MDEV-15667 - Timeout
mariabackup.mdev-14447 : MDEV-15201 - Timeout
+mariabackup.page_compression_level : Added in 10.1.39
mariabackup.unencrypted_page_compressed : Added in 10.1.38
mariabackup.xb_compressed_encrypted : MDEV-14812 - Segfault
mariabackup.xb_partition : MDEV-17584 - Crash on shutdown
@@ -296,9 +349,9 @@ multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_h
parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL server during query
parts.partition_auto_increment_archive : MDEV-16491 - Table marked as crashed
parts.partition_auto_increment_maria : MDEV-14430 - Wrong result
+parts.partition_auto_increment_max : Added in 10.1.39
parts.partition_exch_qa_10 : MDEV-11765 - wrong result
parts.partition_innodb_status_file : MDEV-12901 - Valgrind
-parts.update_and_cache : Added in 10.1.37
#----------------------------------------------------------------
@@ -321,18 +374,20 @@ perfschema_stress.* : MDEV-10996 - tests not maintained
#----------------------------------------------------------------
plugins.feedback_plugin_send : MDEV-7932 - ssl failed for url
+plugins.pam : Modified in 10.1.39
plugins.server_audit : MDEV-9562 - crashes on sol10-sparc
plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc
#----------------------------------------------------------------
roles.create_and_grant_role : MDEV-11772 - wrong result
-roles.flush_roles-17898 : Added in 10.1.38
+roles.flush_roles-17898 : Modified in 10.1.39
#----------------------------------------------------------------
+rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free
+rpl.kill_race_condition : MDEV-19370 - Wrong value for slave parameter; added in 10.1.39
rpl.last_insert_id : MDEV-10625 - warnings in error log
-rpl.rpl_15919 : Added in 10.1.37
rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips
rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips
rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log
@@ -340,8 +395,10 @@ rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registering
rpl.rpl_colSize : MDEV-16112 - Server crash
rpl.rpl_ddl : MDEV-10417 - Fails on Mips
rpl.rpl_domain_id_filter_io_crash : MDEV-14357 - Wrong result
-rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result
+rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Warnings/errors
+rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Warnings/errors
rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start
+rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output
rpl.rpl_gtid_basic : MDEV-10681 - server startup problem
rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master
rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout in include
@@ -357,8 +414,8 @@ rpl.rpl_insert_id : MDEV-15197 - Wrong result
rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure
rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query
rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips
-rpl.rpl_lcase_tblnames_rewrite_db : Added in 10.1.37
rpl.rpl_mariadb_slave_capability : MDEV-11018 - sporadic wrong events in binlog
+rpl.rpl_mdev12179 : MDEV-19043 - Warnings/errors
rpl.rpl_mdev6020 : MDEV-10417 - Fails on Mips
rpl.rpl_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed
rpl.rpl_non_direct_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed
@@ -367,12 +424,12 @@ rpl.rpl_non_direct_stm_mixing_engines : MDEV-14489 - Sync slave with master fail
rpl.rpl_parallel : MDEV-10653 - Timeouts
rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure
rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout
-rpl.rpl_parallel_optimistic : MDEV-10511 - Timeout; modified in 10.1.37
-rpl.rpl_parallel_optimistic_nobinlog : Config file modified in 10.1.37
+rpl.rpl_parallel_optimistic : MDEV-10511 - Timeout
rpl.rpl_parallel_retry : MDEV-11119 - Server crash
rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables
rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips
rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings
+rpl.rpl_rewrt_db : Modified in 10.1.39
rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start
rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed
rpl.rpl_row_big_table_id : Added in 10.1.38
@@ -381,7 +438,6 @@ rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed
rpl.rpl_row_img_eng_min : MDEV-13875 - command "diff_files" failed
rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed
rpl.rpl_row_index_choice : MDEV-15196 - Slave crash
-rpl.rpl_row_lcase_tblnames : Added in 10.1.37
rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x
rpl.rpl_semi_sync : MDEV-11220 - Wrong result
rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result
@@ -392,12 +448,13 @@ rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition
rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem
rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha
rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock
+rpl.rpl_slave_invalid_external_user : Added in 10.1.39
rpl.rpl_start_stop_slave : MDEV-13567 - Replication failure
-rpl.rpl_stm_lcase_tblnames : Added in 10.1.37
rpl.rpl_stm_mixing_engines : MDEV-14489 - Sync slave with master failed
rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion
rpl.rpl_sync : MDEV-10633 - Database page corruption
rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries
+rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output
rpl.rpl_trigger : MDEV-18055 - Wrong result
rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result
@@ -434,14 +491,14 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout
sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x
sys_vars.delayed_insert_limit_func : MDEV-17683 - Wrong result; modified in 10.1.38
-sys_vars.innodb_ft_result_cache_limit_32 : Added in 10.1.37
-sys_vars.innodb_ft_result_cache_limit_64 : Added in 10.1.37
sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout
sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash
sys_vars.rpl_init_slave_func : MDEV-10149 - wrong results
sys_vars.sql_low_priority_updates_func : Modified in 10.1.38
sys_vars.table_definition_cache_basic : Modified in 10.1.38
sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result
+sys_vars.thread_stack_basic : Modified in 10.1.39
+sys_vars.transaction_prealloc_size_bug27322 : Modified in 10.1.39
sys_vars.wait_timeout_func : MDEV-12896 - Wrong result
sys_vars.wsrep_sst_method_basic : Modified in 10.1.38
@@ -469,6 +526,8 @@ tokudb.type_datetime : MDEV-15193 - Wrong result
tokudb_backup.* : MDEV-11001 - tests don't work
tokudb_bugs.PS-4979 : Added in 10.1.38
+tokudb_bugs.PS-5158 : Added in 10.1.39
+tokudb_bugs.PS-5163 : Added in 10.1.39
tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output
tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output
tokudb_bugs.frm_store : MDEV-12823 - Valgrind
@@ -483,20 +542,22 @@ rpl-tokudb.* : MDEV-14354 - Tests fail with tcmalloc
#----------------------------------------------------------------
-unit.lf : MDEV-18416 - object was probably modified after being freed
-unit.ma_test_loghandler : MDEV-10638 - record read not ok
-unit.my_atomic : MDEV-18472 - Signal 11 thrown
+unit.ma_pagecache_consist_64kRD : MDEV-19367 - AddressSanitizer CHECK failed
+unit.ma_pagecache_consist_64kWR : MDEV-19367 - AddressSanitizer CHECK failed
+unit.ma_test_loghandler : MDEV-10638 - record read not ok
#----------------------------------------------------------------
vcol.not_supported : MDEV-10639 - Testcase timeout
vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout
vcol.vcol_misc : MDEV-16651 - Wrong error message
+vcol.wrong_arena : Modified in 10.1.39
#----------------------------------------------------------------
wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node
wsrep.mdev_6832 : MDEV-14195 - Failure upon check-testcase
-wsrep.variables : MDEV-17585 - Deadlock; modified in 10.1.37
+wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use
+wsrep.variables : MDEV-17585 - Deadlock
wsrep_info.plugin : MDEV-12909 - Wrong result
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index 45376f7c5fc8281bb1ef492e40da31689e10d009..5c3437382a5d191f4cbd318038bf35d2837bad7e 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -497,17 +497,6 @@ has_old_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner)
return 0;
}
-static inline my_bool have_specific_lock(THR_LOCK_DATA *data,
- enum thr_lock_type type)
-{
- for ( ; data ; data=data->next)
- {
- if (data->type == type)
- return 1;
- }
- return 0;
-}
-
static void wake_up_waiters(THR_LOCK *lock);
diff --git a/mysys/tree.c b/mysys/tree.c
index 5eaeb30037de4ae55512b66f7c086f1877db4ed7..83be0a0d20f2eba4cb4179823f7cec0c11190f8f 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -77,6 +77,7 @@ static void rb_insert(TREE *tree,TREE_ELEMENT ***parent,
TREE_ELEMENT *leaf);
static void rb_delete_fixup(TREE *tree,TREE_ELEMENT ***parent);
+static TREE_ELEMENT null_element= { NULL, NULL, 0, BLACK };
/* The actual code for handling binary trees */
@@ -95,8 +96,7 @@ void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE);
- bzero((uchar*) &tree->null_element,sizeof(tree->null_element));
- tree->root= &tree->null_element;
+ tree->root= &null_element;
tree->compare=compare;
tree->size_of_element= size > 0 ? (uint) size : 0;
tree->memory_limit=memory_limit;
@@ -104,8 +104,6 @@ void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
tree->allocated=0;
tree->elements_in_tree=0;
tree->custom_arg = custom_arg;
- tree->null_element.colour=BLACK;
- tree->null_element.left=tree->null_element.right=0;
tree->my_flags= my_flags;
tree->flag= 0;
if (!free_element && size >= 0 &&
@@ -158,7 +156,7 @@ static void free_tree(TREE *tree, myf free_flags)
free_root(&tree->mem_root, free_flags);
}
}
- tree->root= &tree->null_element;
+ tree->root= &null_element;
tree->elements_in_tree=0;
tree->allocated=0;
@@ -179,7 +177,7 @@ void reset_tree(TREE* tree)
static void delete_tree_element(TREE *tree, TREE_ELEMENT *element)
{
- if (element != &tree->null_element)
+ if (element != &null_element)
{
delete_tree_element(tree,element->left);
if (tree->free)
@@ -209,7 +207,7 @@ TREE_ELEMENT *tree_insert(TREE *tree, void *key, uint key_size,
*parent = &tree->root; element= tree->root;
for (;;)
{
- if (element == &tree->null_element ||
+ if (element == &null_element ||
(cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
break;
@@ -222,11 +220,11 @@ TREE_ELEMENT *tree_insert(TREE *tree, void *key, uint key_size,
*++parent = &element->left; element= element->left;
}
}
- if (element == &tree->null_element)
+ if (element == &null_element)
{
uint alloc_size;
if (tree->flag & TREE_ONLY_DUPS)
- return((TREE_ELEMENT *) 1);
+ return TREE_ELEMENT_UNIQUE;
alloc_size=sizeof(TREE_ELEMENT)+key_size+tree->size_of_element;
tree->allocated+=alloc_size;
@@ -246,7 +244,7 @@ TREE_ELEMENT *tree_insert(TREE *tree, void *key, uint key_size,
if (!element)
return(NULL);
**parent=element;
- element->left=element->right= &tree->null_element;
+ element->left=element->right= &null_element;
if (!tree->offset_to_key)
{
if (key_size == sizeof(void*)) /* no length, save pointer */
@@ -288,7 +286,7 @@ int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg)
*parent= &tree->root; element= tree->root;
for (;;)
{
- if (element == &tree->null_element)
+ if (element == &null_element)
return 1; /* Was not in tree */
if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
@@ -302,12 +300,12 @@ int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg)
*++parent = &element->left; element= element->left;
}
}
- if (element->left == &tree->null_element)
+ if (element->left == &null_element)
{
(**parent)=element->right;
remove_colour= element->colour;
}
- else if (element->right == &tree->null_element)
+ else if (element->right == &null_element)
{
(**parent)=element->left;
remove_colour= element->colour;
@@ -316,7 +314,7 @@ int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg)
{
org_parent= parent;
*++parent= &element->right; nod= element->right;
- while (nod->left != &tree->null_element)
+ while (nod->left != &null_element)
{
*++parent= &nod->left; nod= nod->left;
}
@@ -346,7 +344,7 @@ void *tree_search(TREE *tree, void *key, void *custom_arg)
for (;;)
{
- if (element == &tree->null_element)
+ if (element == &null_element)
return (void*) 0;
if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
@@ -371,8 +369,8 @@ void *tree_search_key(TREE *tree, const void *key,
TODO: support for HA_READ_KEY_OR_PREV, HA_READ_PREFIX flags if needed.
*/
- *parents = &tree->null_element;
- while (element != &tree->null_element)
+ *parents = &null_element;
+ while (element != &null_element)
{
*++parents= element;
if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element),
@@ -443,14 +441,14 @@ void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
{
TREE_ELEMENT *element= tree->root;
- *parents= &tree->null_element;
- while (element != &tree->null_element)
+ *parents= &null_element;
+ while (element != &null_element)
{
*++parents= element;
element= ELEMENT_CHILD(element, child_offs);
}
*last_pos= parents;
- return **last_pos != &tree->null_element ?
+ return **last_pos != &null_element ?
ELEMENT_KEY(tree, **last_pos) : NULL;
}
@@ -459,11 +457,11 @@ void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
{
TREE_ELEMENT *x= **last_pos;
- if (ELEMENT_CHILD(x, r_offs) != &tree->null_element)
+ if (ELEMENT_CHILD(x, r_offs) != &null_element)
{
x= ELEMENT_CHILD(x, r_offs);
*++*last_pos= x;
- while (ELEMENT_CHILD(x, l_offs) != &tree->null_element)
+ while (ELEMENT_CHILD(x, l_offs) != &null_element)
{
x= ELEMENT_CHILD(x, l_offs);
*++*last_pos= x;
@@ -473,12 +471,12 @@ void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
else
{
TREE_ELEMENT *y= *--*last_pos;
- while (y != &tree->null_element && x == ELEMENT_CHILD(y, r_offs))
+ while (y != &null_element && x == ELEMENT_CHILD(y, r_offs))
{
x= y;
y= *--*last_pos;
}
- return y == &tree->null_element ? NULL : ELEMENT_KEY(tree, y);
+ return y == &null_element ? NULL : ELEMENT_KEY(tree, y);
}
}
@@ -494,7 +492,7 @@ ha_rows tree_record_pos(TREE *tree, const void *key,
double left= 1;
double right= tree->elements_in_tree;
- while (element != &tree->null_element)
+ while (element != &null_element)
{
if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element),
key)) == 0)
diff --git a/pcre/AUTHORS b/pcre/AUTHORS
index eb9b1a44b34a62cde8ca6188812fd9253780faa7..23c005a33d62727cfae38e0cf7ba90adfb225f74 100644
--- a/pcre/AUTHORS
+++ b/pcre/AUTHORS
@@ -8,7 +8,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2018 University of Cambridge
+Copyright (c) 1997-2019 University of Cambridge
All rights reserved
@@ -19,7 +19,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2010-2018 Zoltan Herczeg
+Copyright(c) 2010-2019 Zoltan Herczeg
All rights reserved.
@@ -30,7 +30,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2009-2018 Zoltan Herczeg
+Copyright(c) 2009-2019 Zoltan Herczeg
All rights reserved.
diff --git a/pcre/ChangeLog b/pcre/ChangeLog
index 7b53195f6a6365716b9ae9811eb0253b3566a6c6..e4d2d9fa24cd80ebafb3ef5990c3ab1a6f985fc3 100644
--- a/pcre/ChangeLog
+++ b/pcre/ChangeLog
@@ -5,6 +5,49 @@ Note that the PCRE 8.xx series (PCRE1) is now in a bugfix-only state. All
development is happening in the PCRE2 10.xx series.
+Version 8.43 23-February-2019
+-----------------------------
+
+1. Some time ago the config macro SUPPORT_UTF8 was changed to SUPPORT_UTF
+because it also applies to UTF-16 and UTF-32. However, this change was not made
+in the pcre2cpp files; consequently the C++ wrapper has from then been compiled
+with a bug in it, which would have been picked up by the unit test except that
+it also had its UTF8 code cut out. The bug was in a global replace when moving
+forward after matching an empty string.
+
+2. The C++ wrapper got broken a long time ago (version 7.3, August 2007) when
+(*CR) was invented (assuming it was the first such start-of-pattern option).
+The wrapper could never handle such patterns because it wraps patterns in
+(?:...)\z in order to support end anchoring. I have hacked in some code to fix
+this, that is, move the wrapping till after any existing start-of-pattern
+special settings.
+
+3. "pcre2grep" (sic) was accidentally mentioned in an error message (fix was
+ported from PCRE2).
+
+4. Typo LCC_ALL for LC_ALL fixed in pcregrep.
+
+5. In a pattern such as /[^\x{100}-\x{ffff}]*[\x80-\xff]/ which has a repeated
+negative class with no characters less than 0x100 followed by a positive class
+with only characters less than 0x100, the first class was incorrectly being
+auto-possessified, causing incorrect match failures.
+
+6. If the only branch in a conditional subpattern was anchored, the whole
+subpattern was treated as anchored, when it should not have been, since the
+assumed empty second branch cannot be anchored. Demonstrated by test patterns
+such as /(?(1)^())b/ or /(?(?=^))b/.
+
+7. Fix subject buffer overread in JIT when UTF is disabled and \X or \R has
+a greater than 1 fixed quantifier. This issue was found by Yunho Kim.
+
+8. If a pattern started with a subroutine call that had a quantifier with a
+minimum of zero, an incorrect "match must start with this character" could be
+recorded. Example: /(?&xxx)*ABC(?XYZ)/ would (incorrectly) expect 'A' to
+be the first character of a match.
+
+9. Improve MAP_JIT flag usage on MacOS. Patch by Rich Siegel.
+
+
Version 8.42 20-March-2018
--------------------------
diff --git a/pcre/LICENCE b/pcre/LICENCE
index f6ef7fd76649608d9d6f8a88c5e84d83a0cc946d..760a6666b6056fc3d3033730978adc3d9640fdd0 100644
--- a/pcre/LICENCE
+++ b/pcre/LICENCE
@@ -25,7 +25,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2018 University of Cambridge
+Copyright (c) 1997-2019 University of Cambridge
All rights reserved.
@@ -34,9 +34,9 @@ PCRE JUST-IN-TIME COMPILATION SUPPORT
Written by: Zoltan Herczeg
Email local part: hzmester
-Emain domain: freemail.hu
+Email domain: freemail.hu
-Copyright(c) 2010-2018 Zoltan Herczeg
+Copyright(c) 2010-2019 Zoltan Herczeg
All rights reserved.
@@ -45,9 +45,9 @@ STACK-LESS JUST-IN-TIME COMPILER
Written by: Zoltan Herczeg
Email local part: hzmester
-Emain domain: freemail.hu
+Email domain: freemail.hu
-Copyright(c) 2009-2018 Zoltan Herczeg
+Copyright(c) 2009-2019 Zoltan Herczeg
All rights reserved.
diff --git a/pcre/NEWS b/pcre/NEWS
index 09b4ad360037039ac37eb011639bd6d824eabfab..0f18408174045969d8aad6c991a17647117bee04 100644
--- a/pcre/NEWS
+++ b/pcre/NEWS
@@ -1,6 +1,16 @@
News about PCRE releases
------------------------
+Note that this library (now called PCRE1) is now being maintained for bug fixes
+only. New projects are advised to use the new PCRE2 libraries.
+
+
+Release 8.43 23-February-2019
+-----------------------------
+
+This is a bug-fix release.
+
+
Release 8.42 20-March-2018
--------------------------
diff --git a/pcre/configure.ac b/pcre/configure.ac
index dcdef6a942796ed43745f6cec1801c849067ca1b..d2e5236cbd61611b5942082054530d4ca9af2b79 100644
--- a/pcre/configure.ac
+++ b/pcre/configure.ac
@@ -9,17 +9,17 @@ dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might
dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8])
-m4_define(pcre_minor, [42])
+m4_define(pcre_minor, [43])
m4_define(pcre_prerelease, [])
-m4_define(pcre_date, [2018-03-20])
+m4_define(pcre_date, [2019-02-23])
# NOTE: The CMakeLists.txt file searches for the above variables in the first
# 50 lines of this file. Please update that if the variables above are moved.
# Libtool shared library interface versions (current:revision:age)
-m4_define(libpcre_version, [3:10:2])
-m4_define(libpcre16_version, [2:10:2])
-m4_define(libpcre32_version, [0:10:0])
+m4_define(libpcre_version, [3:11:2])
+m4_define(libpcre16_version, [2:11:2])
+m4_define(libpcre32_version, [0:11:0])
m4_define(libpcreposix_version, [0:6:0])
m4_define(libpcrecpp_version, [0:1:0])
diff --git a/pcre/pcre_compile.c b/pcre/pcre_compile.c
index 9b9da46f0d090744b8653ba9dc1bc6c38c96ae97..734875de2fb762fef9d43f62d1e0905aee90b732 100644
--- a/pcre/pcre_compile.c
+++ b/pcre/pcre_compile.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2016 University of Cambridge
+ Copyright (c) 1997-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -3300,7 +3300,7 @@ for(;;)
if ((*xclass_flags & XCL_MAP) == 0)
{
/* No bits are set for characters < 256. */
- if (list[1] == 0) return TRUE;
+ if (list[1] == 0) return (*xclass_flags & XCL_NOT) == 0;
/* Might be an empty repeat. */
continue;
}
@@ -7645,6 +7645,8 @@ for (;; ptr++)
/* Can't determine a first byte now */
if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ zerofirstchar = firstchar;
+ zerofirstcharflags = firstcharflags;
continue;
@@ -8685,10 +8687,18 @@ do {
if (!is_anchored(scode, new_map, cd, atomcount)) return FALSE;
}
- /* Positive forward assertions and conditions */
+ /* Positive forward assertion */
- else if (op == OP_ASSERT || op == OP_COND)
+ else if (op == OP_ASSERT)
+ {
+ if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
+ }
+
+ /* Condition; not anchored if no second branch */
+
+ else if (op == OP_COND)
{
+ if (scode[GET(scode,1)] != OP_ALT) return FALSE;
if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
}
diff --git a/pcre/pcre_jit_compile.c b/pcre/pcre_jit_compile.c
index 2bad74b02317c99f6939f5dc2bb17a90d06d5ddc..bc5f9c0143300dd00ea5cc2ff704dc6a65430959 100644
--- a/pcre/pcre_jit_compile.c
+++ b/pcre/pcre_jit_compile.c
@@ -9002,7 +9002,7 @@ if (exact > 1)
#ifdef SUPPORT_UTF
&& !common->utf
#endif
- )
+ && type != OP_ANYNL && type != OP_EXTUNI)
{
OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(exact));
add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_GREATER, TMP1, 0, STR_END, 0));
diff --git a/pcre/pcrecpp.cc b/pcre/pcrecpp.cc
index d09c9abc51682aef5cdb66ac839916a48a0f9dd7..77a2fedc4be6a807f7c0e83b076833e90144fe71 100644
--- a/pcre/pcrecpp.cc
+++ b/pcre/pcrecpp.cc
@@ -80,6 +80,24 @@ static const string empty_string;
// If the user doesn't ask for any options, we just use this one
static RE_Options default_options;
+// Specials for the start of patterns. See comments where start_options is used
+// below. (PH June 2018)
+static const char *start_options[] = {
+ "(*UTF8)",
+ "(*UTF)",
+ "(*UCP)",
+ "(*NO_START_OPT)",
+ "(*NO_AUTO_POSSESS)",
+ "(*LIMIT_RECURSION=",
+ "(*LIMIT_MATCH=",
+ "(*CRLF)",
+ "(*CR)",
+ "(*BSR_UNICODE)",
+ "(*BSR_ANYCRLF)",
+ "(*ANYCRLF)",
+ "(*ANY)",
+ "" };
+
void RE::Init(const string& pat, const RE_Options* options) {
pattern_ = pat;
if (options == NULL) {
@@ -135,7 +153,49 @@ pcre* RE::Compile(Anchor anchor) {
} else {
// Tack a '\z' at the end of RE. Parenthesize it first so that
// the '\z' applies to all top-level alternatives in the regexp.
- string wrapped = "(?:"; // A non-counting grouping operator
+
+ /* When this code was written (for PCRE 6.0) it was enough just to
+ parenthesize the entire pattern. Unfortunately, when the feature of
+ starting patterns with (*UTF8) or (*CR) etc. was added to PCRE patterns,
+ this code was never updated. This bug was not noticed till 2018, long after
+ PCRE became obsolescent and its maintainer no longer around. Since PCRE is
+ frozen, I have added a hack to check for all the existing "start of
+ pattern" specials - knowing that no new ones will ever be added. I am not a
+ C++ programmer, so the code style is no doubt crude. It is also
+ inefficient, but is only run when the pattern starts with "(*".
+ PH June 2018. */
+
+ string wrapped = "";
+
+ if (pattern_.c_str()[0] == '(' && pattern_.c_str()[1] == '*') {
+ int kk, klen, kmat;
+ for (;;) { // Loop for any number of leading items
+
+ for (kk = 0; start_options[kk][0] != 0; kk++) {
+ klen = strlen(start_options[kk]);
+ kmat = strncmp(pattern_.c_str(), start_options[kk], klen);
+ if (kmat >= 0) break;
+ }
+ if (kmat != 0) break; // Not found
+
+ // If the item ended in "=" we must copy digits up to ")".
+
+ if (start_options[kk][klen-1] == '=') {
+ while (isdigit(pattern_.c_str()[klen])) klen++;
+ if (pattern_.c_str()[klen] != ')') break; // Syntax error
+ klen++;
+ }
+
+ // Move the item from the pattern to the start of the wrapped string.
+
+ wrapped += pattern_.substr(0, klen);
+ pattern_.erase(0, klen);
+ }
+ }
+
+ // Wrap the rest of the pattern.
+
+ wrapped += "(?:"; // A non-counting grouping operator
wrapped += pattern_;
wrapped += ")\\z";
re = pcre_compile(wrapped.c_str(), pcre_options,
@@ -415,7 +475,7 @@ int RE::GlobalReplace(const StringPiece& rewrite,
matchend++;
}
// We also need to advance more than one char if we're in utf8 mode.
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
if (options_.utf8()) {
while (matchend < static_cast(str->length()) &&
((*str)[matchend] & 0xc0) == 0x80)
diff --git a/pcre/pcrecpp_unittest.cc b/pcre/pcrecpp_unittest.cc
index 4b15fbef1c34eef490f92c5dbc724ff4b31ca975..1fc01a042b3cb42efd9d4efaeccb0150be29378b 100644
--- a/pcre/pcrecpp_unittest.cc
+++ b/pcre/pcrecpp_unittest.cc
@@ -309,7 +309,7 @@ static void TestReplace() {
"@aa",
"@@@",
3 },
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
{ "b*",
"bb",
"\xE3\x83\x9B\xE3\x83\xBC\xE3\x83\xA0\xE3\x81\xB8", // utf8
@@ -327,7 +327,7 @@ static void TestReplace() {
{ "", NULL, NULL, NULL, NULL, 0 }
};
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
const bool support_utf8 = true;
#else
const bool support_utf8 = false;
@@ -535,7 +535,7 @@ static void TestQuoteMetaLatin1() {
}
static void TestQuoteMetaUtf8() {
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
TestQuoteMeta("Pl\xc3\xa1\x63ido Domingo", pcrecpp::UTF8());
TestQuoteMeta("xyz", pcrecpp::UTF8()); // No fancy utf8
TestQuoteMeta("\xc2\xb0", pcrecpp::UTF8()); // 2-byte utf8 (degree symbol)
@@ -1178,7 +1178,7 @@ int main(int argc, char** argv) {
CHECK(re.error().empty()); // Must have no error
}
-#ifdef SUPPORT_UTF8
+#ifdef SUPPORT_UTF
// Check UTF-8 handling
{
printf("Testing UTF-8 handling\n");
@@ -1203,6 +1203,30 @@ int main(int argc, char** argv) {
RE re_test2("...", pcrecpp::UTF8());
CHECK(re_test2.FullMatch(utf8_string));
+ // PH added these tests for leading option settings
+
+ RE re_testZ0("(*CR)(*NO_START_OPT).........");
+ CHECK(re_testZ0.FullMatch(utf8_string));
+
+#ifdef SUPPORT_UTF
+ RE re_testZ1("(*UTF8)...");
+ CHECK(re_testZ1.FullMatch(utf8_string));
+
+ RE re_testZ2("(*UTF)...");
+ CHECK(re_testZ2.FullMatch(utf8_string));
+
+#ifdef SUPPORT_UCP
+ RE re_testZ3("(*UCP)(*UTF)...");
+ CHECK(re_testZ3.FullMatch(utf8_string));
+
+ RE re_testZ4("(*UCP)(*LIMIT_MATCH=1000)(*UTF)...");
+ CHECK(re_testZ4.FullMatch(utf8_string));
+
+ RE re_testZ5("(*UCP)(*LIMIT_MATCH=1000)(*ANY)(*UTF)...");
+ CHECK(re_testZ5.FullMatch(utf8_string));
+#endif
+#endif
+
// Check that '.' matches one byte or UTF-8 character
// according to the mode.
string ss;
@@ -1248,7 +1272,7 @@ int main(int argc, char** argv) {
CHECK(!match_sentence.FullMatch(target));
CHECK(!match_sentence_re.FullMatch(target));
}
-#endif /* def SUPPORT_UTF8 */
+#endif /* def SUPPORT_UTF */
printf("Testing error reporting\n");
diff --git a/pcre/pcregrep.c b/pcre/pcregrep.c
index a406be962d77088c4d41a1b0d57bd4e7ea2fe7a7..5982406862b4a1c1a82bb512c82d2274ecab228c 100644
--- a/pcre/pcregrep.c
+++ b/pcre/pcregrep.c
@@ -2252,7 +2252,7 @@ if (isdirectory(pathname))
int fnlength = strlen(pathname) + strlen(nextfile) + 2;
if (fnlength > 2048)
{
- fprintf(stderr, "pcre2grep: recursive filename is too long\n");
+ fprintf(stderr, "pcregrep: recursive filename is too long\n");
rc = 2;
break;
}
@@ -3034,7 +3034,7 @@ LC_ALL environment variable is set, and if so, use it. */
if (locale == NULL)
{
locale = getenv("LC_ALL");
- locale_from = "LCC_ALL";
+ locale_from = "LC_ALL";
}
if (locale == NULL)
diff --git a/pcre/testdata/testinput1 b/pcre/testdata/testinput1
index 5c23f41fa818d00bd6f578a36de2ae47fe882b87..02e4f4825fc8c81b8c9efd3e9c8da5de51a97831 100644
--- a/pcre/testdata/testinput1
+++ b/pcre/testdata/testinput1
@@ -5742,4 +5742,19 @@ AbcdCBefgBhiBqz
/X+(?#comment)?/
>XXX<
+/ (? \w+ )* \. /xi
+ pokus.
+
+/(?(DEFINE) (? \w+ ) ) (?&word)* \./xi
+ pokus.
+
+/(?(DEFINE) (? \w+ ) ) ( (?&word)* ) \./xi
+ pokus.
+
+/(?&word)* (?(DEFINE) (? \w+ ) ) \./xi
+ pokus.
+
+/(?&word)* \. (? \w+ )/xi
+ pokus.hokus
+
/-- End of testinput1 --/
diff --git a/pcre/testdata/testinput2 b/pcre/testdata/testinput2
index 8ba4dc4ddaba708d280a35016f87ffdbbcda10a6..3528de153ebb011e0734f0bf18bf8c186401e805 100644
--- a/pcre/testdata/testinput2
+++ b/pcre/testdata/testinput2
@@ -4257,4 +4257,7 @@ backtracking verbs. --/
ab
aaab
+/(?(?=^))b/
+ abc
+
/-- End of testinput2 --/
diff --git a/pcre/testdata/testinput4 b/pcre/testdata/testinput4
index 8bdbdac4c26ee5af5e2fd6034311fcf27b3799a2..63368c0a097aa2950e2d3f535aad3634a525c9fb 100644
--- a/pcre/testdata/testinput4
+++ b/pcre/testdata/testinput4
@@ -727,4 +727,7 @@
/\C(\W?Å¿)'?{{/8
\\C(\\W?Å¿)'?{{
+/[^\x{100}-\x{ffff}]*[\x80-\xff]/8
+ \x{99}\x{99}\x{99}
+
/-- End of testinput4 --/
diff --git a/pcre/testdata/testoutput1 b/pcre/testdata/testoutput1
index eff8ecc948c04abee3ef7e05538785027061ba31..e6147e60b95c6d78be8aa968579140fb36e8586e 100644
--- a/pcre/testdata/testoutput1
+++ b/pcre/testdata/testoutput1
@@ -9446,4 +9446,28 @@ No match
>XXX<
0: X
+/ (? \w+ )* \. /xi
+ pokus.
+ 0: pokus.
+ 1: pokus
+
+/(?(DEFINE) (? \w+ ) ) (?&word)* \./xi
+ pokus.
+ 0: pokus.
+
+/(?(DEFINE) (? \w+ ) ) ( (?&word)* ) \./xi
+ pokus.
+ 0: pokus.
+ 1:
+ 2: pokus
+
+/(?&word)* (?(DEFINE) (? \w+ ) ) \./xi
+ pokus.
+ 0: pokus.
+
+/(?&word)* \. (? \w+ )/xi
+ pokus.hokus
+ 0: pokus.hokus
+ 1: hokus
+
/-- End of testinput1 --/
diff --git a/pcre/testdata/testoutput2 b/pcre/testdata/testoutput2
index 61ed8d9d4e404196c67a5613ab54c0b50bd0f89e..4ccda272010c5630c3cce58c044bad551a75754b 100644
--- a/pcre/testdata/testoutput2
+++ b/pcre/testdata/testoutput2
@@ -14721,4 +14721,8 @@ No need char
0: ab
1: a
+/(?(?=^))b/
+ abc
+ 0: b
+
/-- End of testinput2 --/
diff --git a/pcre/testdata/testoutput4 b/pcre/testdata/testoutput4
index d43c12392dd636315ecd2addfdab60951de83801..69e812cd35773ab06a57cab7028c74c47436045b 100644
--- a/pcre/testdata/testoutput4
+++ b/pcre/testdata/testoutput4
@@ -1277,4 +1277,8 @@ No match
\\C(\\W?Å¿)'?{{
No match
+/[^\x{100}-\x{ffff}]*[\x80-\xff]/8
+ \x{99}\x{99}\x{99}
+ 0: \x{99}\x{99}\x{99}
+
/-- End of testinput4 --/
diff --git a/plugin/auth_gssapi/cmake/FindGSSAPI.cmake b/plugin/auth_gssapi/cmake/FindGSSAPI.cmake
index cc8e62d1ca792b38fe0c2a281e5d28ea8c4d4262..67309eed1ee50934c52089ba13197898734ee946 100644
--- a/plugin/auth_gssapi/cmake/FindGSSAPI.cmake
+++ b/plugin/auth_gssapi/cmake/FindGSSAPI.cmake
@@ -40,7 +40,7 @@ if(GSSAPI_LIBS AND GSSAPI_FLAVOR)
else(GSSAPI_LIBS AND GSSAPI_FLAVOR)
find_program(KRB5_CONFIG NAMES krb5-config heimdal-krb5-config PATHS
- /opt/local/bin
+ /opt/local/bin /usr/lib/mit/bin
ONLY_CMAKE_FIND_ROOT_PATH # this is required when cross compiling with cmake 2.6 and ignored with cmake 2.4, Alex
)
mark_as_advanced(KRB5_CONFIG)
diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt
index 51317527c77e853e99acb1c175d7c392183af692..606fef002e7e93b7b60346fc8b38149539a7dabf 100644
--- a/plugin/auth_pam/CMakeLists.txt
+++ b/plugin/auth_pam/CMakeLists.txt
@@ -8,6 +8,7 @@ IF(HAVE_PAM_APPL_H)
IF(HAVE_STRNDUP)
ADD_DEFINITIONS(-DHAVE_STRNDUP)
ENDIF(HAVE_STRNDUP)
+ FIND_LIBRARY(PAM_LIBRARY pam)
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
ENDIF(HAVE_PAM_APPL_H)
diff --git a/plugin/auth_pam/auth_pam.c b/plugin/auth_pam/auth_pam.c
index ffc3d6f553733ab0ef41a2bd7efb99df509b8b6b..83fd64e4cb1f050a64da1abad77506ba6bac2eca 100644
--- a/plugin/auth_pam/auth_pam.c
+++ b/plugin/auth_pam/auth_pam.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2011, 2012, Monty Program Ab
+ Copyright (c) 2011, 2019, MariaDB Corporation.
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
@@ -52,6 +52,8 @@ static char pam_debug = 0;
#define PAM_DEBUG(X) /* no-op */
#endif
+static char winbind_hack = 0;
+
static int conv(int n, const struct pam_message **msg,
struct pam_response **resp, void *data)
{
@@ -159,9 +161,10 @@ static int pam_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
PAM_DEBUG((stderr, "PAM: pam_get_item(PAM_USER)\n"));
DO( pam_get_item(pamh, PAM_USER, (pam_get_item_3_arg) &new_username) );
- if (new_username && strcmp(new_username, info->user_name))
+ if (new_username &&
+ (winbind_hack ? strcasecmp : strcmp)(new_username, info->user_name))
strncpy(info->authenticated_as, new_username,
- sizeof(info->authenticated_as));
+ sizeof(info->authenticated_as)-1);
info->authenticated_as[sizeof(info->authenticated_as)-1]= 0;
end:
@@ -185,6 +188,10 @@ static MYSQL_SYSVAR_BOOL(use_cleartext_plugin, use_cleartext_plugin,
"supports simple PAM policies that don't require anything besides "
"a password", NULL, NULL, 0);
+static MYSQL_SYSVAR_BOOL(winbind_workaround, winbind_hack, PLUGIN_VAR_OPCMDARG,
+ "Compare usernames case insensitively to work around pam_winbind "
+ "unconditional username lowercasing", NULL, NULL, 0);
+
#ifndef DBUG_OFF
static MYSQL_SYSVAR_BOOL(debug, pam_debug, PLUGIN_VAR_OPCMDARG,
"Log all PAM activity", NULL, NULL, 0);
@@ -193,6 +200,7 @@ static MYSQL_SYSVAR_BOOL(debug, pam_debug, PLUGIN_VAR_OPCMDARG,
static struct st_mysql_sys_var* vars[] = {
MYSQL_SYSVAR(use_cleartext_plugin),
+ MYSQL_SYSVAR(winbind_workaround),
#ifndef DBUG_OFF
MYSQL_SYSVAR(debug),
#endif
diff --git a/plugin/aws_key_management/CMakeLists.txt b/plugin/aws_key_management/CMakeLists.txt
index 9221b54ef7ef5230ab05c50591b449506b251d88..49f6b54a24c43de16293d17a289145f490b8b1cc 100644
--- a/plugin/aws_key_management/CMakeLists.txt
+++ b/plugin/aws_key_management/CMakeLists.txt
@@ -22,11 +22,17 @@ MACRO(SKIP_AWS_PLUGIN msg)
ENDMACRO()
SET(CMAKE_CXX_STANDARD 11)
+IF(NOT NOT_FOR_DISTRIBUTION)
+ SKIP_AWS_PLUGIN("AWS SDK has Apache 2.0 License which is not complatible with GPLv2. Set -DNOT_FOR_DISTRIBUTION=ON if you need this plugin")
+ENDIF()
+
MYSQL_ADD_PLUGIN(aws_key_management aws_key_management_plugin.cc DISABLED
COMPONENT aws-key-management)
IF(NOT TARGET aws_key_management)
RETURN()
+ELSE()
+ SET(NON_DISTRIBUTABLE_WARNING "Apache 2.0" PARENT_SCOPE)
ENDIF()
# This plugin needs recent C++ compilers (AWS C++ SDK header files are using C++11 features)
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index b5f6e996b424672c296ff777690237d7cb594d40..c4dcf082f42603b471b929f2b0cd33867cd79dc5 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -1056,7 +1056,7 @@ static int start_logging()
}
error_header();
fprintf(stderr, "logging started to the file %s.\n", alt_fname);
- strncpy(current_log_buf, alt_fname, sizeof(current_log_buf));
+ strncpy(current_log_buf, alt_fname, sizeof(current_log_buf)-1);
current_log_buf[sizeof(current_log_buf)-1]= 0;
}
else if (output_type == OUTPUT_SYSLOG)
@@ -1064,7 +1064,8 @@ static int start_logging()
openlog(syslog_ident, LOG_NOWAIT, syslog_facility_codes[syslog_facility]);
error_header();
fprintf(stderr, "logging started to the syslog.\n");
- strncpy(current_log_buf, "[SYSLOG]", sizeof(current_log_buf));
+ strncpy(current_log_buf, "[SYSLOG]", sizeof(current_log_buf)-1);
+ compile_time_assert(sizeof current_log_buf > sizeof "[SYSLOG]");
}
is_active= 1;
return 0;
@@ -2600,7 +2601,7 @@ static void update_file_path(MYSQL_THD thd,
internal_stop_logging= 0;
}
- strncpy(path_buffer, new_name, sizeof(path_buffer));
+ strncpy(path_buffer, new_name, sizeof(path_buffer)-1);
path_buffer[sizeof(path_buffer)-1]= 0;
file_path= path_buffer;
exit_func:
@@ -2653,7 +2654,7 @@ static void update_incl_users(MYSQL_THD thd,
if (!maria_55_started || !debug_server_started)
flogger_mutex_lock(&lock_operations);
mark_always_logged(thd);
- strncpy(incl_user_buffer, new_users, sizeof(incl_user_buffer));
+ strncpy(incl_user_buffer, new_users, sizeof(incl_user_buffer)-1);
incl_user_buffer[sizeof(incl_user_buffer)-1]= 0;
incl_users= incl_user_buffer;
user_coll_fill(&incl_user_coll, incl_users, &excl_user_coll, 1);
@@ -2672,7 +2673,7 @@ static void update_excl_users(MYSQL_THD thd __attribute__((unused)),
if (!maria_55_started || !debug_server_started)
flogger_mutex_lock(&lock_operations);
mark_always_logged(thd);
- strncpy(excl_user_buffer, new_users, sizeof(excl_user_buffer));
+ strncpy(excl_user_buffer, new_users, sizeof(excl_user_buffer)-1);
excl_user_buffer[sizeof(excl_user_buffer)-1]= 0;
excl_users= excl_user_buffer;
user_coll_fill(&excl_user_coll, excl_users, &incl_user_coll, 0);
@@ -2804,7 +2805,7 @@ static void update_syslog_ident(MYSQL_THD thd __attribute__((unused)),
void *var_ptr __attribute__((unused)), const void *save)
{
char *new_ident= (*(char **) save) ? *(char **) save : empty_str;
- strncpy(syslog_ident_buffer, new_ident, sizeof(syslog_ident_buffer));
+ strncpy(syslog_ident_buffer, new_ident, sizeof(syslog_ident_buffer)-1);
syslog_ident_buffer[sizeof(syslog_ident_buffer)-1]= 0;
syslog_ident= syslog_ident_buffer;
error_header();
diff --git a/scripts/maria_add_gis_sp.sql.in b/scripts/maria_add_gis_sp.sql.in
index 3a5dd49b95bb203dda1405c80f33e449a8985373..5826cc1a038130206dfcb58cbfa91d458a6e42c7 100644
--- a/scripts/maria_add_gis_sp.sql.in
+++ b/scripts/maria_add_gis_sp.sql.in
@@ -24,12 +24,12 @@ DROP PROCEDURE IF EXISTS AddGeometryColumn;
DROP PROCEDURE IF EXISTS DropGeometryColumn;
CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
- t_name varchar(64), geometry_column varchar(64), t_srid int)
+ t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER
begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end @ADD_GIS_SP_EOL@
CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64),
- t_name varchar(64), geometry_column varchar(64))
+ t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER
begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end @ADD_GIS_SP_EOL@
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index b89ea716aabe4bc97b1fae5d5bfe80aa608c06eb..43b7d7a52f6538facbf1807f42ad949047ecbf86 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -35,7 +35,9 @@ force=0
in_rpm=0
ip_only=0
cross_bootstrap=0
-install_params=""
+install_params="create database if not exists mysql;
+create database if not exists test;
+use mysql;"
auth_root_authentication_method=normal
auth_root_socket_user='root'
@@ -302,6 +304,8 @@ fi
parse_arguments `"$print_defaults" $defaults $defaults_group_suffix --mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
+rel_mysqld="$dirname0/@INSTALL_SBINDIR@/mysqld"
+
# Configure paths to support files
if test -n "$srcdir"
then
@@ -341,12 +345,12 @@ then
exit 1
fi
# relative from where the script was run for a relocatable install
-elif test -n "$dirname0" -a -x "$dirname0/@INSTALL_SBINDIR@/mysqld"
+elif test -n "$dirname0" -a -x "$rel_mysqld" -a ! "$rel_mysqld" -ef "@sbindir@/mysqld"
then
basedir="$dirname0"
- bindir="$basedir/@INSTALL_SBINDIR@"
+ bindir="$basedir/@INSTALL_BINDIR@"
resolveip="$bindir/resolveip"
- mysqld="$basedir/@INSTALL_SBINDIR@/mysqld"
+ mysqld="$rel_mysqld"
srcpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
buildpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
else
@@ -429,7 +433,7 @@ then
fi
# Create database directories
-for dir in "$ldata" "$ldata/mysql" "$ldata/test"
+for dir in "$ldata"
do
if test ! -d "$dir"
then
@@ -491,7 +495,7 @@ SET @auth_root_socket=NULL;" ;;
SET @skip_auth_root_nopasswd=1;
SET @auth_root_socket='$auth_root_socket_user';" ;;
esac
-if { echo "use mysql;$install_params"; cat "$create_system_tables" "$create_system_tables2" "$fill_system_tables"; } | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null
+if { echo "$install_params"; cat "$create_system_tables" "$create_system_tables2" "$fill_system_tables"; } | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null
then
s_echo "OK"
else
diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh
index 98241da3cba4a388dd13b5f7dea4608ceac619f3..6a6ab0dc8b5a9fb77773ba41dadfe0862adef082 100644
--- a/scripts/mysqldumpslow.sh
+++ b/scripts/mysqldumpslow.sh
@@ -38,7 +38,7 @@ GetOptions(\%opt,
'v|verbose+',# verbose
'help+', # write usage info
'd|debug+', # debug
- 's=s', # what to sort by (al, at, ar, ae, c, t, l, r, e)
+ 's=s', # what to sort by (aa, ae, al, ar, at, a, c, e, l, r, t)
'r!', # reverse the sort order (largest last instead of first)
't=i', # just show the top n queries
'a!', # don't abstract all numbers to N and strings to 'S'
@@ -202,12 +202,15 @@ Parse and summarize the MySQL slow query log. Options are
-v verbose
-d debug
- -s ORDER what to sort by (al, at, ar, ae, c, l, r, e, t), 'at' is default
+ -s ORDER what to sort by (aa, ae, al, ar, at, a, c, e, l, r, t), 'at' is default
+ aa: average rows affected
+ ae: aggregated rows examined
al: average lock time
ar: average rows sent
at: average query time
- aa: average rows affected
+ a: rows affected
c: count
+ e: rows examined
l: lock time
r: rows sent
t: query time
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index 976f0e0cf2d5050ca0fd331ea8f4b64606451f8c..da148495b8c44837c136ea24e3a830150b4abc6a 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -28,7 +28,6 @@ WSREP_SST_OPT_PSWD=${WSREP_SST_OPT_PSWD:-}
WSREP_SST_OPT_DEFAULT=""
WSREP_SST_OPT_EXTRA_DEFAULT=""
WSREP_SST_OPT_SUFFIX_DEFAULT=""
-WSREP_SST_OPT_SUFFIX_VALUE=""
INNODB_DATA_HOME_DIR_ARG=""
while [ $# -gt 0 ]; do
@@ -94,7 +93,6 @@ case "$1" in
;;
'--defaults-group-suffix')
readonly WSREP_SST_OPT_SUFFIX_DEFAULT="$1=$2"
- readonly WSREP_SST_OPT_SUFFIX_VALUE="$2"
shift
;;
'--host')
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 4891ade7c3c40cd34b3038839bf971d4e7e9471a..e8344bbaf8d5dbd66fb6a28bcafc51ad66830d37 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -1,6 +1,6 @@
#!/bin/bash -ue
# Copyright (C) 2013 Percona Inc
-# Copyright (C) 2017 MariaDB
+# Copyright (C) 2017-2019 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
@@ -22,6 +22,7 @@
. $(dirname $0)/wsrep_sst_common
+OS=$(uname)
ealgo=""
ekey=""
ekeyfile=""
@@ -76,13 +77,13 @@ sdecomp=""
# 5.6.21 PXC and later can't donate to an older joiner
sst_ver=1
-if which pv &>/dev/null && pv --help | grep -q FORMAT;then
+if pv --help 2>/dev/null | grep -q FORMAT;then
pvopts+=$pvformat
fi
pcmd="pv $pvopts"
declare -a RC
-INNOBACKUPEX_BIN=mariabackup
+INNOBACKUPEX_BIN=$(which mariabackup)
XBSTREAM_BIN=mbstream
XBCRYPT_BIN=xbcrypt # Not available in MariaBackup
@@ -174,10 +175,8 @@ get_transfer()
fi
if [[ $tfmt == 'nc' ]];then
- if [[ ! -x `which nc` ]];then
- wsrep_log_error "nc(netcat) not found in path: $PATH"
- exit 2
- fi
+ wsrep_check_programs nc
+
wsrep_log_info "Using netcat as streamer"
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
if nc -h 2>&1 | grep -q ncat;then
@@ -204,11 +203,8 @@ get_transfer()
fi
else
tfmt='socat'
+ wsrep_check_programs socat
wsrep_log_info "Using socat as streamer"
- if [[ ! -x `which socat` ]];then
- wsrep_log_error "socat not found in path: $PATH"
- exit 2
- fi
if [[ $encrypt -eq 2 || $encrypt -eq 3 ]] && ! socat -V | grep -q "WITH_OPENSSL 1";then
wsrep_log_error "Encryption requested, but socat is not OpenSSL enabled (encrypt=$encrypt)"
@@ -297,7 +293,7 @@ get_footprint()
adjust_progress()
{
- if [[ ! -x `which pv` ]];then
+ if ! command -v pv >/dev/null;then
wsrep_log_error "pv not found in path: $PATH"
wsrep_log_error "Disabling all progress/rate-limiting"
pcmd=""
@@ -336,6 +332,7 @@ read_cnf()
rebuild=$(parse_cnf sst rebuild 0)
ttime=$(parse_cnf sst time 0)
cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$')
+ [[ $OS == "FreeBSD" ]] && cpat=$(parse_cnf sst cpat '.*galera\.cache$|.*sst_in_progress$|.*\.sst$|.*gvwstate\.dat$|.*grastate\.dat$|.*\.err$|.*\.log$|.*RPM_UPGRADE_MARKER$|.*RPM_UPGRADE_HISTORY$')
ealgo=$(parse_cnf xtrabackup encrypt "")
ekey=$(parse_cnf xtrabackup encrypt-key "")
ekeyfile=$(parse_cnf xtrabackup encrypt-key-file "")
@@ -520,7 +517,7 @@ kill_xtrabackup()
setup_ports()
{
if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then
- if [[ ${WSREP_SST_OPT_ADDR:0:1} == '[' ]];then
+ if [ "${WSREP_SST_OPT_ADDR#\[}" != "$WSREP_SST_OPT_ADDR" ]; then
remain=$(echo $WSREP_SST_OPT_ADDR | awk -F '\\][:/]' '{ print $2 }')
REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F '\\]:' '{ print $1 }')"]"
SST_PORT=$(echo $remain | awk -F '[:/]' '{ print $1 }')
@@ -533,7 +530,7 @@ setup_ports()
sst_ver=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $5 }')
fi
else
- if [[ ${WSREP_SST_OPT_ADDR:0:1} == '[' ]];then
+ if [ "${WSREP_SST_OPT_ADDR#\[}" != "$WSREP_SST_OPT_ADDR" ]; then
SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F '\\]:' '{ print $2 }')
else
SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $2 }')
@@ -550,8 +547,12 @@ wait_for_listen()
local MODULE=$3
for i in {1..50}
do
- ss -p state listening "( sport = :$PORT )" | grep -qE 'socat|nc' && break
- sleep 0.2
+ if [ "$OS" = "FreeBSD" ];then
+ sockstat -46lp $PORT | grep -qE "^[^ ]* *(socat|nc) *[^ ]* *[^ ]* *[^ ]* *[^ ]*:$PORT" && break
+ else
+ ss -p state listening "( sport = :$PORT )" | grep -qE 'socat|nc' && break
+ fi
+ sleep 0.2
done
echo "ready ${ADDR}/${MODULE}//$sst_ver"
}
@@ -597,7 +598,7 @@ recv_joiner()
pushd ${dir} 1>/dev/null
set +e
- if [[ $tmt -gt 0 && -x `which timeout` ]];then
+ if [[ $tmt -gt 0 ]] && command -v timeout >/dev/null;then
if timeout --help | grep -q -- '-k';then
ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd"
else
@@ -662,13 +663,13 @@ monitor_process()
while true ; do
- if ! ps --pid "${WSREP_SST_OPT_PARENT}" &>/dev/null; then
+ if ! ps -p "${WSREP_SST_OPT_PARENT}" &>/dev/null; then
wsrep_log_error "Parent mysqld process (PID:${WSREP_SST_OPT_PARENT}) terminated unexpectedly."
kill -- -"${WSREP_SST_OPT_PARENT}"
exit 32
fi
- if ! ps --pid "${sst_stream_pid}" &>/dev/null; then
+ if ! ps -p "${sst_stream_pid}" &>/dev/null; then
break
fi
@@ -677,10 +678,7 @@ monitor_process()
done
}
-if [[ ! -x `which $INNOBACKUPEX_BIN` ]];then
- wsrep_log_error "${INNOBACKUPEX_BIN} not in path: $PATH"
- exit 2
-fi
+wsrep_check_programs "$INNOBACKUPEX_BIN"
rm -f "${MAGIC_FILE}"
@@ -704,9 +702,30 @@ fi
INNOEXTRA=""
+INNODB_DATA_HOME_DIR=${INNODB_DATA_HOME_DIR:-""}
+# Try to set INNODB_DATA_HOME_DIR from the command line:
+if [ ! -z "$INNODB_DATA_HOME_DIR_ARG" ]; then
+ INNODB_DATA_HOME_DIR=$INNODB_DATA_HOME_DIR_ARG
+fi
+# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
+if [ -z "$INNODB_DATA_HOME_DIR" ]; then
+ INNODB_DATA_HOME_DIR=$(parse_cnf --mysqld innodb-data-home-dir '')
+fi
+if [ ! -z "$INNODB_DATA_HOME_DIR" ]; then
+ INNOEXTRA+=" --innodb-data-home-dir=$INNODB_DATA_HOME_DIR"
+fi
+
+if [ -n "$INNODB_DATA_HOME_DIR" ]; then
+ # handle both relative and absolute paths
+ INNODB_DATA_HOME_DIR=$(cd $DATA; mkdir -p "$INNODB_DATA_HOME_DIR"; cd $INNODB_DATA_HOME_DIR; pwd -P)
+else
+ # default to datadir
+ INNODB_DATA_HOME_DIR=$(cd $DATA; pwd -P)
+fi
+
if [[ $ssyslog -eq 1 ]];then
- if [[ ! -x `which logger` ]];then
+ if ! command -v logger >/dev/null;then
wsrep_log_error "logger not in path: $PATH. Ignoring"
else
@@ -724,7 +743,7 @@ if [[ $ssyslog -eq 1 ]];then
logger -p daemon.info -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@"
}
- INNOAPPLY="${INNOBACKUPEX_BIN} --innobackupex $disver $iapts --apply-log \$rebuildcmd \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-apply "
+ INNOAPPLY="${INNOBACKUPEX_BIN} --innobackupex $disver $iapts \$INNOEXTRA --apply-log \$rebuildcmd \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-apply "
INNOMOVE="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-move "
INNOBACKUP="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2> >(logger -p daemon.err -t ${ssystag}innobackupex-backup)"
fi
@@ -733,8 +752,8 @@ else
if [[ "$sstlogarchive" -eq 1 ]]
then
- ARCHIVETIMESTAMP=$(date "+%Y.%m.%d-%H.%M.%S")
- newfile=""
+ ARCHIVETIMESTAMP=$(date "+%Y.%m.%d-%H.%M.%S.%N")
+ newfile=""
if [[ ! -z "$sstlogarchivedir" ]]
then
@@ -788,7 +807,7 @@ then
fi
- INNOAPPLY="${INNOBACKUPEX_BIN} --innobackupex $disver $iapts --apply-log \$rebuildcmd \${DATA} &> ${INNOAPPLYLOG}"
+ INNOAPPLY="${INNOBACKUPEX_BIN} --innobackupex $disver $iapts \$INNOEXTRA --apply-log \$rebuildcmd \${DATA} &> ${INNOAPPLYLOG}"
INNOMOVE="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} &> ${INNOMOVELOG}"
INNOBACKUP="${INNOBACKUPEX_BIN} --innobackupex ${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2> ${INNOBACKUPLOG}"
fi
@@ -809,7 +828,7 @@ then
exit 93
fi
- if [[ -z $(parse_cnf mysqld tmpdir "") && -z $(parse_cnf xtrabackup tmpdir "") ]];then
+ if [[ -z $(parse_cnf --mysqld tmpdir "") && -z $(parse_cnf xtrabackup tmpdir "") ]];then
xtmpdir=$(mktemp -d)
tmpopts=" --tmpdir=$xtmpdir "
wsrep_log_info "Using $xtmpdir as xtrabackup temporary directory"
@@ -931,9 +950,9 @@ then
[[ -e $SST_PROGRESS_FILE ]] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE"
[[ -n $SST_PROGRESS_FILE ]] && touch $SST_PROGRESS_FILE
- ib_home_dir=$(parse_cnf mysqld innodb-data-home-dir "")
- ib_log_dir=$(parse_cnf mysqld innodb-log-group-home-dir "")
- ib_undo_dir=$(parse_cnf mysqld innodb-undo-directory "")
+ ib_home_dir=$INNODB_DATA_HOME_DIR
+ ib_log_dir=$(parse_cnf --mysqld innodb-log-group-home-dir "")
+ ib_undo_dir=$(parse_cnf --mysqld innodb-undo-directory "")
stagemsg="Joiner-Recv"
@@ -952,7 +971,7 @@ then
if [ -z "${SST_PORT}" ]
then
SST_PORT=4444
- if [[ ${ADDR:0:1} == '[' ]];then
+ if [ "${ADDR#\[}" != "$ADDR" ]; then
ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F '\\]:' '{ print $1 }')]:${SST_PORT}"
else
ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $1 }'):${SST_PORT}"
@@ -1003,11 +1022,14 @@ then
jpid=$!
wsrep_log_info "Proceeding with SST"
-
wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories"
- find $ib_home_dir $ib_log_dir $ib_undo_dir $DATA -mindepth 1 -regex $cpat -prune -o -exec rm -rfv {} 1>&2 \+
+ if [ "${OS}" = "FreeBSD" ]; then
+ find -E $ib_home_dir $ib_log_dir $ib_undo_dir $DATA -mindepth 1 -prune -regex $cpat -o -exec rm -rfv {} 1>&2 \+
+ else
+ find $ib_home_dir $ib_log_dir $ib_undo_dir $DATA -mindepth 1 -prune -regex $cpat -o -exec rm -rfv {} 1>&2 \+
+ fi
- tempdir=$(parse_cnf mysqld log-bin "")
+ tempdir=$(parse_cnf --mysqld log-bin "")
if [[ -n ${tempdir:-} ]];then
binlog_dir=$(dirname $tempdir)
binlog_file=$(basename $tempdir)
@@ -1052,7 +1074,7 @@ then
wsrep_log_info "Compressed qpress files found"
- if [[ ! -x `which qpress` ]];then
+ if ! command -v qpress >/dev/null;then
wsrep_log_error "qpress not found in path: $PATH"
exit 22
fi
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
index 1bded37a6b63a58ec57756c020b3f355b08665df..bc2af40e2a97d6a30f3e45661ced399e24a3e955 100644
--- a/scripts/wsrep_sst_rsync.sh
+++ b/scripts/wsrep_sst_rsync.sh
@@ -136,10 +136,7 @@ if [ ! -z "$INNODB_DATA_HOME_DIR_ARG" ]; then
fi
# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
if [ -z "$INNODB_DATA_HOME_DIR" ]; then
- INNODB_DATA_HOME_DIR=$(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE innodb-data-home-dir '')
-fi
-if [ -z "$INNODB_DATA_HOME_DIR" ]; then
- INNODB_DATA_HOME_DIR=$(parse_cnf --mysqld innodb-data-home-dir "")
+ INNODB_DATA_HOME_DIR=$(parse_cnf --mysqld innodb-data-home-dir '')
fi
if [ -n "$INNODB_DATA_HOME_DIR" ]; then
@@ -364,7 +361,7 @@ then
rm -rf "$RSYNC_PID"
ADDR=$WSREP_SST_OPT_ADDR
- if [[ ${ADDR:0:1} == '[' ]]; then
+ if [ "${ADDR#\[}" != "$ADDR" ]; then
RSYNC_PORT=$(echo $ADDR | awk -F '\\]:' '{ print $2 }')
RSYNC_ADDR=$(echo $ADDR | awk -F '\\]:' '{ print $1 }')"]"
else
diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh
index 5fad91df18b54a5a6740d24a8e22e42043520f1a..54a7c8852e580f099ce5953a3a6faf455fc6d66e 100644
--- a/scripts/wsrep_sst_xtrabackup-v2.sh
+++ b/scripts/wsrep_sst_xtrabackup-v2.sh
@@ -905,9 +905,6 @@ if [ ! -z "$INNODB_DATA_HOME_DIR_ARG" ]; then
INNODB_DATA_HOME_DIR=$INNODB_DATA_HOME_DIR_ARG
fi
# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
-if [ -z "$INNODB_DATA_HOME_DIR" ]; then
- INNODB_DATA_HOME_DIR=$(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE innodb-data-home-dir '')
-fi
if [ -z "$INNODB_DATA_HOME_DIR" ]; then
INNODB_DATA_HOME_DIR=$(parse_cnf --mysqld innodb-data-home-dir "")
fi
diff --git a/sql-common/client.c b/sql-common/client.c
index 4fa167a21f10821582118758bc598ae82b4b4903..4420a1afc17f95bbfbdefa3d9e219a5d116c9623 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1354,7 +1354,7 @@ unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
{
uchar *pos;
/* fields count may be wrong */
- if (field - result >= fields)
+ if (field - result >= (my_ptrdiff_t)fields)
goto err;
cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
@@ -1401,7 +1401,7 @@ unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
/* old protocol, for backward compatibility */
for (row=data->data; row ; row = row->next,field++)
{
- if (field - result >= fields)
+ if (field - result >= (my_ptrdiff_t)fields)
goto err;
cli_fetch_lengths(&lengths[0], row->data, default_value ? 6 : 5);
field->org_table= field->table= strdup_root(alloc,(char*) row->data[0]);
@@ -1439,7 +1439,7 @@ unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
}
}
#endif /* DELETE_SUPPORT_OF_4_0_PROTOCOL */
- if (field - result < fields)
+ if (field - result < (my_ptrdiff_t)fields)
goto err;
free_rows(data); /* Free old data */
DBUG_RETURN(result);
@@ -1838,8 +1838,10 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
*/
#ifdef HAVE_X509_check_host
- ret_validation= X509_check_host(server_cert, server_hostname,
- strlen(server_hostname), 0, 0) != 1;
+ ret_validation=
+ (X509_check_host(server_cert, server_hostname,
+ strlen(server_hostname), 0, 0) != 1) &&
+ (X509_check_ip_asc(server_cert, server_hostname, 0) != 1);
#else
subject= X509_get_subject_name(server_cert);
cn_loc= X509_NAME_get_index_by_NID(subject, NID_commonName, -1);
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc
index f6291ca7acc16d54b493d2957a22e200be5b306d..3dfbcdbcf813f65676d66f641f44aefcf730128f 100644
--- a/sql/debug_sync.cc
+++ b/sql/debug_sync.cc
@@ -584,7 +584,7 @@ static void debug_sync_remove_action(st_debug_sync_control *ds_control,
memmove(save_action, action, sizeof(st_debug_sync_action));
/* Move actions down. */
- memmove(ds_control->ds_action + dsp_idx,
+ memmove((void*)(ds_control->ds_action + dsp_idx),
ds_control->ds_action + dsp_idx + 1,
(ds_control->ds_active - dsp_idx) *
sizeof(st_debug_sync_action));
@@ -595,8 +595,8 @@ static void debug_sync_remove_action(st_debug_sync_control *ds_control,
produced by the shift. Again do not use an assignment operator to
avoid string allocation/copy.
*/
- memmove(ds_control->ds_action + ds_control->ds_active, save_action,
- sizeof(st_debug_sync_action));
+ memmove((void*)(ds_control->ds_action + ds_control->ds_active),
+ save_action, sizeof(st_debug_sync_action));
}
DBUG_VOID_RETURN;
diff --git a/sql/encryption.cc b/sql/encryption.cc
index 52eab262570c9f0a2dab1831de7d715115fe28df..e5b54633066a3dd7860fad2f3bac127b3f556b88 100644
--- a/sql/encryption.cc
+++ b/sql/encryption.cc
@@ -25,6 +25,10 @@ struct encryption_service_st encryption_handler;
extern "C" {
+uint no_get_key(uint, uint, uchar*, uint*)
+{
+ return ENCRYPTION_KEY_VERSION_INVALID;
+}
uint no_key(uint)
{
return ENCRYPTION_KEY_VERSION_INVALID;
@@ -47,6 +51,11 @@ static unsigned int get_length(unsigned int slen, unsigned int key_id,
return my_aes_get_size(MY_AES_CBC, slen);
}
+uint ctx_size(unsigned int, unsigned int)
+{
+ return MY_AES_CTX_SIZE;
+}
+
} /* extern "C" */
int initialize_encryption_plugin(st_plugin_int *plugin)
@@ -72,8 +81,7 @@ int initialize_encryption_plugin(st_plugin_int *plugin)
if (handle->crypt_ctx_size)
encryption_handler.encryption_ctx_size_func= handle->crypt_ctx_size;
else
- encryption_handler.encryption_ctx_size_func=
- (uint (*)(unsigned int, unsigned int))my_aes_ctx_size;
+ encryption_handler.encryption_ctx_size_func= ctx_size;
encryption_handler.encryption_ctx_init_func=
handle->crypt_ctx_init ? handle->crypt_ctx_init : ctx_init;
@@ -102,8 +110,7 @@ int finalize_encryption_plugin(st_plugin_int *plugin)
if (used)
{
- encryption_handler.encryption_key_get_func=
- (uint (*)(uint, uint, uchar*, uint*))no_key;
+ encryption_handler.encryption_key_get_func= no_get_key;
encryption_handler.encryption_key_get_latest_version_func= no_key;
encryption_handler.encryption_ctx_size_func= zero_size;
}
diff --git a/sql/events.cc b/sql/events.cc
index 187a3208d9f8480718748b720160e0f5bc459c11..17417997632f236d1c686c47d89d98f66fb4916a 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -417,6 +417,12 @@ Events::create_event(THD *thd, Event_parse_data *parse_data)
thd->restore_stmt_binlog_format(save_binlog_format);
+ if (!ret && Events::opt_event_scheduler == Events::EVENTS_OFF)
+ {
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
+ "Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.");
+ }
+
DBUG_RETURN(ret);
WSREP_ERROR_LABEL:
diff --git a/sql/field.h b/sql/field.h
index c21bba6936fbffc158627d403923f0b535137ca8..2243f8499fec67b0e5b7176fd9d6f79d0847e513 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -854,7 +854,7 @@ class Field: public Value_source
{
my_ptrdiff_t l_offset= (my_ptrdiff_t) (table->s->default_values -
table->record[0]);
- memcpy(ptr, ptr + l_offset, pack_length());
+ memcpy(ptr, ptr + l_offset, pack_length_in_rec());
if (maybe_null_in_table())
*null_ptr= ((*null_ptr & (uchar) ~null_bit) |
(null_ptr[l_offset] & null_bit));
@@ -1329,6 +1329,17 @@ class Field: public Value_source
/* Hash value */
virtual void hash(ulong *nr, ulong *nr2);
+ /**
+ Get the upper limit of the MySQL integral and floating-point type.
+
+ @return maximum allowed value for the field
+ */
+ virtual ulonglong get_max_int_value() const
+ {
+ DBUG_ASSERT(false);
+ return 0ULL;
+ }
+
/**
Checks whether a string field is part of write_set.
@@ -1796,6 +1807,11 @@ class Field_tiny :public Field_num {
*to= *from;
return from + 1;
}
+
+ virtual ulonglong get_max_int_value() const
+ {
+ return unsigned_flag ? 0xFFULL : 0x7FULL;
+ }
};
@@ -1837,6 +1853,11 @@ class Field_short :public Field_num {
virtual const uchar *unpack(uchar* to, const uchar *from,
const uchar *from_end, uint param_data)
{ return unpack_int16(to, from, from_end); }
+
+ virtual ulonglong get_max_int_value() const
+ {
+ return unsigned_flag ? 0xFFFFULL : 0x7FFFULL;
+ }
};
class Field_medium :public Field_num {
@@ -1870,6 +1891,11 @@ class Field_medium :public Field_num {
{
return Field::pack(to, from, max_length);
}
+
+ virtual ulonglong get_max_int_value() const
+ {
+ return unsigned_flag ? 0xFFFFFFULL : 0x7FFFFFULL;
+ }
};
@@ -1915,6 +1941,11 @@ class Field_long :public Field_num {
{
return unpack_int32(to, from, from_end);
}
+
+ virtual ulonglong get_max_int_value() const
+ {
+ return unsigned_flag ? 0xFFFFFFFFULL : 0x7FFFFFFFULL;
+ }
};
@@ -1964,6 +1995,10 @@ class Field_longlong :public Field_num {
{
return unpack_int64(to, from, from_end);
}
+ virtual ulonglong get_max_int_value() const
+ {
+ return unsigned_flag ? 0xFFFFFFFFFFFFFFFFULL : 0x7FFFFFFFFFFFFFFFULL;
+ }
};
@@ -1997,6 +2032,13 @@ class Field_float :public Field_real {
uint32 pack_length() const { return sizeof(float); }
uint row_pack_length() const { return pack_length(); }
void sql_type(String &str) const;
+ virtual ulonglong get_max_int_value() const
+ {
+ /*
+ We use the maximum as per IEEE754-2008 standard, 2^24
+ */
+ return 0x1000000ULL;
+ }
private:
int do_save_field_metadata(uchar *first_byte);
};
@@ -2039,6 +2081,13 @@ class Field_double :public Field_real {
uint32 pack_length() const { return sizeof(double); }
uint row_pack_length() const { return pack_length(); }
void sql_type(String &str) const;
+ virtual ulonglong get_max_int_value() const
+ {
+ /*
+ We use the maximum as per IEEE754-2008 standard, 2^53
+ */
+ return 0x20000000000000ULL;
+ }
private:
int do_save_field_metadata(uchar *first_byte);
};
diff --git a/sql/gcalc_slicescan.cc b/sql/gcalc_slicescan.cc
index ab48542add6d46cbbd84eef11df39edc210f3e82..644ab4b87105fcc50af4642b8525be2238c03472 100644
--- a/sql/gcalc_slicescan.cc
+++ b/sql/gcalc_slicescan.cc
@@ -982,6 +982,8 @@ void Gcalc_heap::reset()
{
if (m_n_points)
{
+ if (m_hook)
+ *m_hook= NULL;
free_list(m_first);
m_n_points= 0;
}
diff --git a/sql/gen_win_tzname_data.ps1 b/sql/gen_win_tzname_data.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..13b6ce6ffd07002dd6e671bec43374abbd9192f2
--- /dev/null
+++ b/sql/gen_win_tzname_data.ps1
@@ -0,0 +1,11 @@
+# Generates a header file for converting between Windows timezone names to tzdb names
+# using CLDR data.
+# Usage: powershell -File gen_win_tzname_data.ps1 > win_tzname_data.h
+
+write-output "/* This file was generated using gen_win_tzname_data.ps1 */"
+$xdoc = new-object System.Xml.XmlDocument
+$xdoc.load("https://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml")
+$nodes = $xdoc.SelectNodes("//mapZone[@territory='001']") # use default territory (001)
+foreach ($node in $nodes) {
+ write-output ('{L"'+ $node.other + '","'+ $node.type+'"},')
+}
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index d0ae8f47007d253d5ce46641df534ae2142ef8d2..80bf7ef17fe1e91a7695ed68920b249eb20505de 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2005, 2017, Oracle and/or its affiliates.
- Copyright (c) 2009, 2017, MariaDB
+ Copyright (c) 2005, 2019, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, 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
@@ -8329,7 +8329,12 @@ bool ha_partition::inplace_alter_table(TABLE *altered_table,
for (index= 0; index < m_tot_parts && !error; index++)
{
- ha_alter_info->handler_ctx= part_inplace_ctx->handler_ctx_array[index];
+ if ((ha_alter_info->handler_ctx=
+ part_inplace_ctx->handler_ctx_array[index]) != NULL
+ && index != 0)
+ ha_alter_info->handler_ctx->set_shared_data
+ (*part_inplace_ctx->handler_ctx_array[index - 1]);
+
if (m_file[index]->ha_inplace_alter_table(altered_table,
ha_alter_info))
error= true;
@@ -8706,31 +8711,37 @@ void ha_partition::release_auto_increment()
m_file[i]->ha_release_auto_increment();
}
}
- else if (next_insert_id)
+ else
{
- ulonglong next_auto_inc_val;
lock_auto_increment();
- next_auto_inc_val= part_share->next_auto_inc_val;
- /*
- If the current auto_increment values is lower than the reserved
- value, and the reserved value was reserved by this thread,
- we can lower the reserved value.
- */
- if (next_insert_id < next_auto_inc_val &&
- auto_inc_interval_for_cur_row.maximum() >= next_auto_inc_val)
+ if (next_insert_id)
{
- THD *thd= ha_thd();
+ ulonglong next_auto_inc_val= part_share->next_auto_inc_val;
/*
- Check that we do not lower the value because of a failed insert
- with SET INSERT_ID, i.e. forced/non generated values.
+ If the current auto_increment values is lower than the reserved
+ value, and the reserved value was reserved by this thread,
+ we can lower the reserved value.
*/
- if (thd->auto_inc_intervals_forced.maximum() < next_insert_id)
- part_share->next_auto_inc_val= next_insert_id;
+ if (next_insert_id < next_auto_inc_val &&
+ auto_inc_interval_for_cur_row.maximum() >= next_auto_inc_val)
+ {
+ THD *thd= ha_thd();
+ /*
+ Check that we do not lower the value because of a failed insert
+ with SET INSERT_ID, i.e. forced/non generated values.
+ */
+ if (thd->auto_inc_intervals_forced.maximum() < next_insert_id)
+ part_share->next_auto_inc_val= next_insert_id;
+ }
+ DBUG_PRINT("info", ("part_share->next_auto_inc_val: %lu",
+ (ulong) part_share->next_auto_inc_val));
}
- DBUG_PRINT("info", ("part_share->next_auto_inc_val: %lu",
- (ulong) part_share->next_auto_inc_val));
-
- /* Unlock the multi row statement lock taken in get_auto_increment */
+ /*
+ Unlock the multi-row statement lock taken in get_auto_increment.
+ These actions must be performed even if the next_insert_id field
+ contains zero, otherwise if the update_auto_increment fails then
+ an unnecessary lock will remain:
+ */
if (auto_increment_safe_stmt_log_lock)
{
auto_increment_safe_stmt_log_lock= FALSE;
diff --git a/sql/handler.cc b/sql/handler.cc
index 497409d0f538d15be620c6c2eae4da9e5e20e789..87331a41db60a1fc5ce059ff5ece832ed56dd7a2 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1949,6 +1949,7 @@ int ha_recover(HASH *commit_list)
for (info.len= MAX_XID_LIST_SIZE ;
info.list==0 && info.len > MIN_XID_LIST_SIZE; info.len/=2)
{
+ DBUG_EXECUTE_IF("min_xa_len", info.len = 16;);
info.list=(XID *)my_malloc(info.len*sizeof(XID), MYF(0));
}
if (!info.list)
@@ -2854,11 +2855,17 @@ compute_next_insert_id(ulonglong nr,struct system_variables *variables)
nr= nr + 1; // optimization of the formula below
else
{
- nr= (((nr+ variables->auto_increment_increment -
- variables->auto_increment_offset)) /
- (ulonglong) variables->auto_increment_increment);
- nr= (nr* (ulonglong) variables->auto_increment_increment +
- variables->auto_increment_offset);
+ /*
+ Calculating the number of complete auto_increment_increment extents:
+ */
+ nr= (nr + variables->auto_increment_increment -
+ variables->auto_increment_offset) /
+ (ulonglong) variables->auto_increment_increment;
+ /*
+ Adding an offset to the auto_increment_increment extent boundary:
+ */
+ nr= nr * (ulonglong) variables->auto_increment_increment +
+ variables->auto_increment_offset;
}
if (unlikely(nr <= save_nr))
@@ -2912,8 +2919,14 @@ prev_insert_id(ulonglong nr, struct system_variables *variables)
}
if (variables->auto_increment_increment == 1)
return nr; // optimization of the formula below
- nr= (((nr - variables->auto_increment_offset)) /
- (ulonglong) variables->auto_increment_increment);
+ /*
+ Calculating the number of complete auto_increment_increment extents:
+ */
+ nr= (nr - variables->auto_increment_offset) /
+ (ulonglong) variables->auto_increment_increment;
+ /*
+ Adding an offset to the auto_increment_increment extent boundary:
+ */
return (nr * (ulonglong) variables->auto_increment_increment +
variables->auto_increment_offset);
}
@@ -3135,10 +3148,32 @@ int handler::update_auto_increment()
if (unlikely(tmp)) // Out of range value in store
{
/*
- It's better to return an error here than getting a confusing
- 'duplicate key error' later.
+ First, test if the query was aborted due to strict mode constraints
+ or new field value greater than maximum integer value:
*/
- result= HA_ERR_AUTOINC_ERANGE;
+ if (thd->killed == KILL_BAD_DATA ||
+ nr > table->next_number_field->get_max_int_value())
+ {
+ /*
+ It's better to return an error here than getting a confusing
+ 'duplicate key error' later.
+ */
+ result= HA_ERR_AUTOINC_ERANGE;
+ }
+ else
+ {
+ /*
+ Field refused this value (overflow) and truncated it, use the result
+ of the truncation (which is going to be inserted); however we try to
+ decrease it to honour auto_increment_* variables.
+ That will shift the left bound of the reserved interval, we don't
+ bother shifting the right bound (anyway any other value from this
+ interval will cause a duplicate key).
+ */
+ nr= prev_insert_id(table->next_number_field->val_int(), variables);
+ if (unlikely(table->next_number_field->store((longlong)nr, TRUE)))
+ nr= table->next_number_field->val_int();
+ }
}
if (append)
{
diff --git a/sql/handler.h b/sql/handler.h
index 792cce281f69b3935fc0eff8fed0f2b73dfbde66..99dfefd4c5ac4eef90ec2301acae18a21b44d778 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1,8 +1,8 @@
#ifndef HANDLER_INCLUDED
#define HANDLER_INCLUDED
/*
- Copyright (c) 2000, 2016, Oracle and/or its affiliates.
- Copyright (c) 2009, 2018, MariaDB
+ Copyright (c) 2000, 2019, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, MariaDB
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -1687,7 +1687,6 @@ struct Table_scope_and_contents_source_st
uint options; /* OR of HA_CREATE_ options */
uint merge_insert_method;
uint extra_size; /* length of extra data segment */
- SQL_I_List merge_list;
handlerton *db_type;
/**
Row type of the table definition.
@@ -1716,6 +1715,7 @@ struct Table_scope_and_contents_source_st
TABLE_LIST *pos_in_locked_tables;
MDL_ticket *mdl_ticket;
bool table_was_deleted;
+ TABLE_LIST *merge_list;
void init()
{
@@ -1833,6 +1833,7 @@ class inplace_alter_handler_ctx : public Sql_alloc
inplace_alter_handler_ctx() {}
virtual ~inplace_alter_handler_ctx() {}
+ virtual void set_shared_data(const inplace_alter_handler_ctx& ctx) {}
};
diff --git a/sql/item.cc b/sql/item.cc
index d8f27bdb30e983430413694989e3f5b84784dd66..3bfbdb75c4093ad63917aab8c91a6e0da953d58f 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -9476,7 +9476,10 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
break;
}
default:
- max_length= MY_MAX(max_length, display_length(item));
+ if (fld_type == MYSQL_TYPE_YEAR)
+ max_length= MY_MAX(max_length, item->max_length);
+ else
+ max_length= MY_MAX(max_length, display_length(item));
};
maybe_null|= item->maybe_null;
get_full_info(item);
diff --git a/sql/item.h b/sql/item.h
index 79cde008946b32d2e3952995bcbc6c5ab9fc0bdb..5c432887ed9e079856edbce8d2c6ee92c71c634d 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -663,6 +663,45 @@ class Item: public Value_source,
SEL_TREE *get_mm_tree_for_const(RANGE_OPT_PARAM *param);
Field *create_tmp_field(bool group, TABLE *table, uint convert_int_length);
+ /* Helper methods, to get an Item value from another Item */
+ double val_real_from_item(Item *item)
+ {
+ DBUG_ASSERT(fixed == 1);
+ double value= item->val_real();
+ null_value= item->null_value;
+ return value;
+ }
+ longlong val_int_from_item(Item *item)
+ {
+ DBUG_ASSERT(fixed == 1);
+ longlong value= item->val_int();
+ null_value= item->null_value;
+ return value;
+ }
+ String *val_str_from_item(Item *item, String *str)
+ {
+ DBUG_ASSERT(fixed == 1);
+ String *res= item->val_str(str);
+ if (res)
+ res->set_charset(collation.collation);
+ if ((null_value= item->null_value))
+ res= NULL;
+ return res;
+ }
+ my_decimal *val_decimal_from_item(Item *item, my_decimal *decimal_value)
+ {
+ DBUG_ASSERT(fixed == 1);
+ my_decimal *value= item->val_decimal(decimal_value);
+ if ((null_value= item->null_value))
+ value= NULL;
+ return value;
+ }
+ bool get_date_from_item(Item *item, MYSQL_TIME *ltime, ulonglong fuzzydate)
+ {
+ bool rc= item->get_date(ltime, fuzzydate);
+ null_value= MY_TEST(rc || item->null_value);
+ return rc;
+ }
/*
This method is used if the item was not null but convertion to
TIME/DATE/DATETIME failed. We return a zero date if allowed,
@@ -1000,6 +1039,13 @@ class Item: public Value_source,
virtual bool val_bool();
virtual String *val_nodeset(String*) { return 0; }
+ bool eval_const_cond()
+ {
+ DBUG_ASSERT(const_item());
+ DBUG_ASSERT(!is_expensive());
+ return val_bool();
+ }
+
/*
save_val() is method of val_* family which stores value in the given
field.
@@ -2611,6 +2657,10 @@ class Item_null_result :public Item_null
{
return result_field->type();
}
+ CHARSET_INFO *charset_for_protocol(void) const
+ {
+ return collation.collation;
+ }
#else
const Type_handler *type_handler() const
{
@@ -3935,6 +3985,12 @@ class Item_ref :public Item_ident
void save_org_in_field(Field *field, fast_field_copier optimizer_data);
fast_field_copier setup_fast_field_copier(Field *field)
{ return (*ref)->setup_fast_field_copier(field); }
+#if MARIADB_VERSION_ID < 100300
+ CHARSET_INFO *charset_for_protocol(void) const
+ {
+ return (*ref)->charset_for_protocol();
+ }
+#endif
enum Item_result result_type () const { return (*ref)->result_type(); }
enum_field_types field_type() const { return (*ref)->field_type(); }
Field *get_tmp_table_field()
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 2c1320f82b3f7a57af41a3f7c70759910c8750b9..4e572b95ea3fdcf21dc93f8bcd92c364d38b852a 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2009, 2016, MariaDB
+ Copyright (c) 2009, 2019, 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
@@ -4667,7 +4667,7 @@ Item_cond::fix_fields(THD *thd, Item **ref)
if (item->const_item() && !item->with_param &&
!item->is_expensive() && !cond_has_datetime_is_null(item))
{
- if (item->val_int() == is_and_cond && top_level())
+ if (item->eval_const_cond() == is_and_cond && top_level())
{
/*
a. This is "... AND true_cond AND ..."
@@ -4728,7 +4728,7 @@ Item_cond::eval_not_null_tables(uchar *opt_arg)
if (item->const_item() && !item->with_param &&
!item->is_expensive() && !cond_has_datetime_is_null(item))
{
- if (item->val_int() == is_and_cond && top_level())
+ if (item->eval_const_cond() == is_and_cond && top_level())
{
/*
a. This is "... AND true_cond AND ..."
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 169eb76d802d98eb2ab273978820091bcab188fe..86111374175cdc726e0bd584a0c1fc260ec5fc30 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -68,18 +68,6 @@ bool check_reserved_words(LEX_STRING *name)
}
-/**
- @return
- TRUE if item is a constant
-*/
-
-bool
-eval_const_cond(COND *cond)
-{
- return ((Item_func*) cond)->val_int() ? TRUE : FALSE;
-}
-
-
/**
Test if the sum of arguments overflows the ulonglong range.
*/
@@ -2805,15 +2793,21 @@ void Item_func_min_max::fix_length_and_dec()
switch (tmp_cmp_type) {
case TIME_RESULT:
+ {
// At least one temporal argument was found.
+ if (temporal_type_count < arg_count)
+ maybe_null= true; // Non-temporal-to-temporal conversion can return NULL
collation.set_numeric();
set_handler_by_field_type(temporal_field_type);
if (is_temporal_type_with_time(temporal_field_type))
set_if_smaller(decimals, TIME_SECOND_PART_DIGITS);
else
decimals= 0;
+ uint len= decimals ? (decimals + 1) : 0;
+ len+= mysql_temporal_int_part_length(temporal_field_type);
+ fix_char_length(len);
break;
-
+ }
case STRING_RESULT:
/*
All arguments are of string-alike types:
diff --git a/sql/item_func.h b/sql/item_func.h
index e3eab02f213e0b4966dcfe0679f5b6c2abbe25ce..36a2f94b31d4b4263751be834a6f2af77069d386 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -1120,10 +1120,13 @@ class Item_func_rollup_const :public Item_func
name= a->name;
name_length= a->name_length;
}
- double val_real() { return args[0]->val_real(); }
- longlong val_int() { return args[0]->val_int(); }
- String *val_str(String *str) { return args[0]->val_str(str); }
- my_decimal *val_decimal(my_decimal *dec) { return args[0]->val_decimal(dec); }
+ double val_real() { return val_real_from_item(args[0]); }
+ longlong val_int() { return val_int_from_item(args[0]); }
+ String *val_str(String *str) { return val_str_from_item(args[0], str); }
+ my_decimal *val_decimal(my_decimal *dec)
+ { return val_decimal_from_item(args[0], dec); }
+ bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+ { return get_date_from_item(args[0], ltime, fuzzydate); }
const char *func_name() const { return "rollup_const"; }
bool const_item() const { return 0; }
Item_result result_type() const { return args[0]->result_type(); }
@@ -1737,7 +1740,6 @@ class Item_func_set_user_var :public Item_func_user_var
user variable it the first connection context).
*/
my_thread_id entry_thread_id;
- char buffer[MAX_FIELD_WIDTH];
String value;
my_decimal decimal_buff;
bool null_item;
@@ -2279,7 +2281,6 @@ extern enum_field_types agg_field_type(Item **items, uint nitems,
Item *find_date_time_item(Item **args, uint nargs, uint col);
double my_double_round(double value, longlong dec, bool dec_unsigned,
bool truncate);
-bool eval_const_cond(COND *cond);
extern bool volatile mqh_used;
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 73080d9f7fe95fa346698a8cc73e9d0f6dec7d9b..de13999bab82818247c6854ed2c089ff3f2d5b7d 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -3066,8 +3066,12 @@ String *Item_func_binlog_gtid_pos::val_str(String *str)
}
-void Item_func_rpad::fix_length_and_dec()
+void Item_func_pad::fix_length_and_dec()
{
+ String *str;
+ if (!args[2]->basic_const_item() || !(str= args[2]->val_str(&pad_str)) || !str->length())
+ maybe_null= true;
+
// Handle character set for args[0] and args[2].
if (agg_arg_charsets_for_string_result(collation, &args[0], 2, 2))
return;
@@ -3101,7 +3105,7 @@ String *Item_func_rpad::val_str(String *str)
longlong count= args[1]->val_int();
longlong byte_count;
String *res= args[0]->val_str(str);
- String *rpad= args[2]->val_str(&rpad_str);
+ String *rpad= args[2]->val_str(&pad_str);
if (!res || args[1]->null_value || !rpad ||
((count < 0) && !args[1]->unsigned_flag))
@@ -3174,32 +3178,6 @@ String *Item_func_rpad::val_str(String *str)
}
-void Item_func_lpad::fix_length_and_dec()
-{
- // Handle character set for args[0] and args[2].
- if (agg_arg_charsets_for_string_result(collation, &args[0], 2, 2))
- return;
-
- if (args[1]->const_item())
- {
- ulonglong char_length= (ulonglong) args[1]->val_int();
- DBUG_ASSERT(collation.collation->mbmaxlen > 0);
- /* Assumes that the maximum length of a String is < INT_MAX32. */
- /* Set here so that rest of code sees out-of-bound value as such. */
- if (args[1]->null_value)
- char_length= 0;
- else if (char_length > INT_MAX32)
- char_length= INT_MAX32;
- fix_char_length_ulonglong(char_length);
- }
- else
- {
- max_length= MAX_BLOB_WIDTH;
- maybe_null= 1;
- }
-}
-
-
String *Item_func_lpad::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
@@ -3208,7 +3186,7 @@ String *Item_func_lpad::val_str(String *str)
longlong count= args[1]->val_int();
longlong byte_count;
String *res= args[0]->val_str(&tmp_value);
- String *pad= args[2]->val_str(&lpad_str);
+ String *pad= args[2]->val_str(&pad_str);
if (!res || args[1]->null_value || !pad ||
((count < 0) && !args[1]->unsigned_flag))
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 49faed2fec17ab9fffb4f90ebe60d1dce7f2ad3c..ace246bc271fce7e38f5d50ee37df06257b2f3d7 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -823,26 +823,33 @@ class Item_func_binlog_gtid_pos :public Item_str_func
};
-class Item_func_rpad :public Item_str_func
+class Item_func_pad: public Item_str_func
{
- String tmp_value, rpad_str;
+protected:
+ String tmp_value, pad_str;
public:
- Item_func_rpad(THD *thd, Item *arg1, Item *arg2, Item *arg3):
+ Item_func_pad(THD *thd, Item *arg1, Item *arg2, Item *arg3):
Item_str_func(thd, arg1, arg2, arg3) {}
- String *val_str(String *);
void fix_length_and_dec();
+};
+
+
+class Item_func_rpad :public Item_func_pad
+{
+public:
+ Item_func_rpad(THD *thd, Item *arg1, Item *arg2, Item *arg3):
+ Item_func_pad(thd, arg1, arg2, arg3) {}
+ String *val_str(String *);
const char *func_name() const { return "rpad"; }
};
-class Item_func_lpad :public Item_str_func
+class Item_func_lpad :public Item_func_pad
{
- String tmp_value, lpad_str;
public:
Item_func_lpad(THD *thd, Item *arg1, Item *arg2, Item *arg3):
- Item_str_func(thd, arg1, arg2, arg3) {}
+ Item_func_pad(thd, arg1, arg2, arg3) {}
String *val_str(String *);
- void fix_length_and_dec();
const char *func_name() const { return "lpad"; }
};
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index b4e31ba012f26d5543167f11a59a84d0b044d75d..71f07706d229ff908b9904495d88efa7d859caff 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -1765,6 +1765,18 @@ double Item_sum_std::val_real()
{
DBUG_ASSERT(fixed == 1);
double nr= Item_sum_variance::val_real();
+ if (isnan(nr))
+ {
+ /*
+ variance_fp_recurrence_next() can overflow in some cases and return "nan":
+
+ CREATE OR REPLACE TABLE t1 (a DOUBLE);
+ INSERT INTO t1 VALUES (1.7e+308), (-1.7e+308), (0);
+ SELECT STDDEV_SAMP(a) FROM t1;
+ */
+ null_value= true; // Convert "nan" to NULL
+ return 0;
+ }
if (my_isinf(nr))
return DBL_MAX;
DBUG_ASSERT(nr >= 0.0);
@@ -1812,8 +1824,9 @@ static void variance_fp_recurrence_next(double *m, double *s, ulonglong *count,
else
{
double m_kminusone= *m;
- *m= m_kminusone + (nr - m_kminusone) / (double) *count;
- *s= *s + (nr - m_kminusone) * (nr - *m);
+ volatile double diff= nr - m_kminusone;
+ *m= m_kminusone + diff / (double) *count;
+ *s= *s + diff * (nr - *m);
}
}
@@ -3155,6 +3168,7 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
tmp_table_param(item->tmp_table_param),
separator(item->separator),
tree(item->tree),
+ tree_len(item->tree_len),
unique_filter(item->unique_filter),
table(item->table),
context(item->context),
@@ -3279,7 +3293,10 @@ void Item_func_group_concat::clear()
warning_for_row= FALSE;
no_appended= TRUE;
if (tree)
+ {
reset_tree(tree);
+ tree_len= 0;
+ }
if (unique_filter)
unique_filter->reset();
if (table && table->blob_storage)
@@ -3287,6 +3304,62 @@ void Item_func_group_concat::clear()
/* No need to reset the table as we never call write_row */
}
+struct st_repack_tree {
+ TREE tree;
+ TABLE *table;
+ size_t len, maxlen;
+};
+
+extern "C"
+int copy_to_tree(void* key, element_count count __attribute__((unused)),
+ void* arg)
+{
+ struct st_repack_tree *st= (struct st_repack_tree*)arg;
+ TABLE *table= st->table;
+ Field* field= table->field[0];
+ const uchar *ptr= field->ptr_in_record((uchar*)key - table->s->null_bytes);
+ size_t len= field->val_int(ptr);
+
+ DBUG_ASSERT(count == 1);
+ if (!tree_insert(&st->tree, key, 0, st->tree.custom_arg))
+ return 1;
+
+ st->len += len;
+ return st->len > st->maxlen;
+}
+
+bool Item_func_group_concat::repack_tree(THD *thd)
+{
+ struct st_repack_tree st;
+
+ init_tree(&st.tree, MY_MIN(thd->variables.max_heap_table_size,
+ thd->variables.sortbuff_size/16), 0,
+ tree->size_of_element, group_concat_key_cmp_with_order, NULL,
+ (void*) this, MYF(MY_THREAD_SPECIFIC));
+ st.table= table;
+ st.len= 0;
+ st.maxlen= thd->variables.group_concat_max_len;
+ tree_walk(tree, ©_to_tree, &st, left_root_right);
+ if (st.len <= st.maxlen) // Copying aborted. Must be OOM
+ {
+ delete_tree(&st.tree);
+ return 1;
+ }
+ delete_tree(tree);
+ *tree= st.tree;
+ tree_len= st.len;
+ return 0;
+}
+
+/*
+ Repacking the tree is expensive. But it keeps the tree small, and
+ inserting into an unnecessary large tree is also waste of time.
+
+ The following number is best-by-test. Test execution time slowly
+ decreases up to N=10 (that is, factor=1024) and then starts to increase,
+ again, very slowly.
+*/
+#define GCONCAT_REPACK_FACTOR (1 << 10)
bool Item_func_group_concat::add()
{
@@ -3296,6 +3369,9 @@ bool Item_func_group_concat::add()
if (copy_funcs(tmp_table_param->items_to_copy, table->in_use))
return TRUE;
+ size_t row_str_len= 0;
+ StringBuffer buf;
+ String *res;
for (uint i= 0; i < arg_count_field; i++)
{
Item *show_item= args[i];
@@ -3303,8 +3379,13 @@ bool Item_func_group_concat::add()
continue;
Field *field= show_item->get_tmp_table_field();
- if (field && field->is_null_in_record((const uchar*) table->record[0]))
- return 0; // Skip row if it contains null
+ if (field)
+ {
+ if (field->is_null_in_record((const uchar*) table->record[0]))
+ return 0; // Skip row if it contains null
+ if (tree && (res= field->val_str(&buf)))
+ row_str_len+= res->length();
+ }
}
null_value= FALSE;
@@ -3322,11 +3403,18 @@ bool Item_func_group_concat::add()
TREE_ELEMENT *el= 0; // Only for safety
if (row_eligible && tree)
{
+ THD *thd= table->in_use;
+ table->field[0]->store(row_str_len);
+ if (tree_len > thd->variables.group_concat_max_len * GCONCAT_REPACK_FACTOR
+ && tree->elements_in_tree > 1)
+ if (repack_tree(thd))
+ return 1;
el= tree_insert(tree, table->record[0] + table->s->null_bytes, 0,
tree->custom_arg);
/* check if there was enough memory to insert the row */
if (!el)
return 1;
+ tree_len+= row_str_len;
}
/*
If the row is not a duplicate (el->count == 1)
@@ -3458,10 +3546,19 @@ bool Item_func_group_concat::setup(THD *thd)
if (setup_order(thd, ref_pointer_array, context->table_list, list,
all_fields, *order))
DBUG_RETURN(TRUE);
+ /*
+ Prepend the field to store the length of the string representation
+ of this row. Used to detect when the tree goes over group_concat_max_len
+ */
+ Item *item= new (thd->mem_root)
+ Item_int(thd, thd->variables.group_concat_max_len);
+ if (!item || all_fields.push_front(item, thd->mem_root))
+ DBUG_RETURN(TRUE);
}
count_field_types(select_lex, tmp_table_param, all_fields, 0);
tmp_table_param->force_copy_fields= force_copy_fields;
+ tmp_table_param->hidden_field_count= (arg_count_order > 0);
DBUG_ASSERT(table == 0);
if (order_or_distinct)
{
@@ -3520,11 +3617,12 @@ bool Item_func_group_concat::setup(THD *thd)
syntax of this function). If there is no ORDER BY clause, we don't
create this tree.
*/
- init_tree(tree, (uint) MY_MIN(thd->variables.max_heap_table_size,
- thd->variables.sortbuff_size/16), 0,
+ init_tree(tree, MY_MIN(thd->variables.max_heap_table_size,
+ thd->variables.sortbuff_size/16), 0,
tree_key_length,
group_concat_key_cmp_with_order, NULL, (void*) this,
MYF(MY_THREAD_SPECIFIC));
+ tree_len= 0;
}
if (distinct)
diff --git a/sql/item_sum.h b/sql/item_sum.h
index d6ccfeb8529604cbfc8f2727d4f081ff7fddb3b5..001d1d13fe470342884a12e6e961a636429b0a85 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -1431,6 +1431,7 @@ class Item_func_group_concat : public Item_sum
String *separator;
TREE tree_base;
TREE *tree;
+ size_t tree_len;
Item **ref_pointer_array;
/**
@@ -1468,6 +1469,8 @@ class Item_func_group_concat : public Item_sum
element_count count __attribute__((unused)),
void* item_arg);
+ bool repack_tree(THD *thd);
+
public:
Item_func_group_concat(THD *thd, Name_resolution_context *context_arg,
bool is_distinct, List- *is_select,
@@ -1479,8 +1482,8 @@ class Item_func_group_concat : public Item_sum
enum Sumfunctype sum_func () const {return GROUP_CONCAT_FUNC;}
const char *func_name() const { return "group_concat"; }
- virtual Item_result result_type () const { return STRING_RESULT; }
- virtual Field *make_string_field(TABLE *table);
+ Item_result result_type () const { return STRING_RESULT; }
+ Field *make_string_field(TABLE *table);
enum_field_types field_type() const
{
if (too_big_for_varchar())
@@ -1522,8 +1525,8 @@ class Item_func_group_concat : public Item_sum
String* val_str(String* str);
Item *copy_or_same(THD* thd);
void no_rows_in_result() {}
- virtual void print(String *str, enum_query_type query_type);
- virtual bool change_context_processor(uchar *cntx)
+ void print(String *str, enum_query_type query_type);
+ bool change_context_processor(uchar *cntx)
{ context= (Name_resolution_context *)cntx; return FALSE; }
};
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 83949f2502eb5a2a51cfa959869681e40c719ea7..e8440803295203ac5d6f868a61eb44fbb46206a7 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -455,7 +455,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
Create a formated date/time value in a string.
*/
-static bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time,
+static bool make_date_time(const LEX_CSTRING &format, MYSQL_TIME *l_time,
timestamp_type type, MY_LOCALE *locale, String *str)
{
char intbuff[15];
@@ -469,7 +469,7 @@ static bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time,
if (l_time->neg)
str->append('-');
- end= (ptr= format->format.str) + format->format.length;
+ end= (ptr= format.str) + format.length;
for (; ptr != end ; ptr++)
{
if (*ptr != '%' || ptr+1 == end)
@@ -577,7 +577,7 @@ static bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time,
str->append_with_prefill(intbuff, length, 2, '0');
break;
case 'j':
- if (type == MYSQL_TIMESTAMP_TIME)
+ if (type == MYSQL_TIMESTAMP_TIME || !l_time->month || !l_time->year)
return 1;
length= (uint) (int10_to_str(calc_daynr(l_time->year,l_time->month,
l_time->day) -
@@ -1949,6 +1949,7 @@ uint Item_func_date_format::format_length(const String *format)
String *Item_func_date_format::val_str(String *str)
{
+ StringBuffer<64> format_buffer;
String *format;
MYSQL_TIME l_time;
uint size;
@@ -1958,7 +1959,7 @@ String *Item_func_date_format::val_str(String *str)
if (get_arg0_date(&l_time, is_time_flag))
return 0;
- if (!(format = args[1]->val_str(str)) || !format->length())
+ if (!(format= args[1]->val_str(&format_buffer)) || !format->length())
goto null_date;
if (fixed_length)
@@ -1969,18 +1970,13 @@ String *Item_func_date_format::val_str(String *str)
if (size < MAX_DATE_STRING_REP_LENGTH)
size= MAX_DATE_STRING_REP_LENGTH;
- if (format == str)
- str= &value; // Save result here
+ DBUG_ASSERT(format != str);
if (str->alloc(size))
goto null_date;
- DATE_TIME_FORMAT date_time_format;
- date_time_format.format.str= (char*) format->ptr();
- date_time_format.format.length= format->length();
-
/* Create the result string */
str->set_charset(collation.collation);
- if (!make_date_time(&date_time_format, &l_time,
+ if (!make_date_time(format->lex_cstring(), &l_time,
is_time_format ? MYSQL_TIMESTAMP_TIME :
MYSQL_TIMESTAMP_DATE,
locale, str))
diff --git a/sql/log.cc b/sql/log.cc
index a1e7e5b218fc10345a387b045d4ade79ad024a0b..bab250223f36201fd8723611a1e85c3bb9a6cea4 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -9593,9 +9593,9 @@ TC_LOG_BINLOG::log_and_order(THD *thd, my_xid xid, bool all,
*/
if (!xid || !need_unlog)
DBUG_RETURN(BINLOG_COOKIE_DUMMY(cache_mngr->delayed_error));
- else
- DBUG_RETURN(BINLOG_COOKIE_MAKE(cache_mngr->binlog_id,
- cache_mngr->delayed_error));
+
+ DBUG_RETURN(BINLOG_COOKIE_MAKE(cache_mngr->binlog_id,
+ cache_mngr->delayed_error));
}
/*
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 1b372778b88c229619f5896702859c88b22f5cb6..a6091fcc28db356a1ce93f94481437a889891b44 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2009, 2018, MariaDB
+ Copyright (c) 2000, 2019, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, 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
@@ -40,6 +40,7 @@
#include "transaction.h"
#include
#include "sql_show.h" // append_identifier
+#include "debug_sync.h" // debug_sync
#include
#include
#include "compat56.h"
@@ -4528,7 +4529,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
thd->variables.sql_log_slow= opt_log_slow_slave_statements;
}
- thd->enable_slow_log= thd->variables.sql_log_slow;
+ thd->enable_slow_log= true;
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
/* Finalize server status flags after executing a statement. */
thd->update_server_status();
@@ -9910,6 +9911,12 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
/* A small test to verify that objects have consistent types */
DBUG_ASSERT(sizeof(thd->variables.option_bits) == sizeof(OPTION_RELAXED_UNIQUE_CHECKS));
+ DBUG_EXECUTE_IF("rows_log_event_before_open_table",
+ {
+ const char action[] = "now SIGNAL before_open_table WAIT_FOR go_ahead_sql";
+ DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(action)));
+ };);
+
if (slave_run_triggers_for_rbr)
{
LEX *lex= thd->lex;
@@ -9934,7 +9941,6 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
}
if (open_and_lock_tables(thd, rgi->tables_to_lock, FALSE, 0))
{
- uint actual_error= thd->get_stmt_da()->sql_errno();
#ifdef WITH_WSREP
if (WSREP(thd))
{
@@ -9947,23 +9953,22 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
(long long)wsrep_thd_trx_seqno(thd));
}
#endif
- if ((thd->is_slave_error || thd->is_fatal_error) &&
- !is_parallel_retry_error(rgi, actual_error))
+ if (thd->is_error() &&
+ !is_parallel_retry_error(rgi, error= thd->get_stmt_da()->sql_errno()))
{
/*
Error reporting borrowed from Query_log_event with many excessive
- simplifications.
+ simplifications.
We should not honour --slave-skip-errors at this point as we are
- having severe errors which should not be skiped.
+ having severe errors which should not be skipped.
*/
- rli->report(ERROR_LEVEL, actual_error, rgi->gtid_info(),
+ rli->report(ERROR_LEVEL, error, rgi->gtid_info(),
"Error executing row event: '%s'",
- (actual_error ? thd->get_stmt_da()->message() :
+ (error ? thd->get_stmt_da()->message() :
"unexpected success or fatal error"));
thd->is_slave_error= 1;
}
/* remove trigger's tables */
- error= actual_error;
goto err;
}
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc
index a6f2ed3f41678e067d13ee6d86baadfff5dbd6ef..f0c1c61bb1d9bd63a32cbde0ec89c2b38604cf4d 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2007, 2018, Oracle and/or its affiliates.
- Copyright (c) 2009, 2018, MariaDB
+/* Copyright (c) 2007, 2019, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, 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
@@ -101,21 +101,20 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, rpl_group_info *rgi)
if (open_and_lock_tables(ev_thd, rgi->tables_to_lock, FALSE, 0))
{
- uint actual_error= ev_thd->get_stmt_da()->sql_errno();
- if (ev_thd->is_slave_error || ev_thd->is_fatal_error)
+ if (ev_thd->is_error())
{
/*
Error reporting borrowed from Query_log_event with many excessive
- simplifications (we don't honour --slave-skip-errors)
+ simplifications.
+ We should not honour --slave-skip-errors at this point as we are
+ having severe errors which should not be skipped.
*/
- rli->report(ERROR_LEVEL, actual_error, NULL,
+ rli->report(ERROR_LEVEL, ev_thd->get_stmt_da()->sql_errno(), NULL,
"Error '%s' on opening tables",
- (actual_error ? ev_thd->get_stmt_da()->message() :
- "unexpected success or fatal error"));
+ ev_thd->get_stmt_da()->message());
ev_thd->is_slave_error= 1;
}
- rgi->slave_close_thread_tables(thd);
- DBUG_RETURN(actual_error);
+ DBUG_RETURN(1);
}
/*
diff --git a/sql/log_slow.h b/sql/log_slow.h
index 3b6dbd1b2ac949a0f05d53cc49648f2b132638c9..5092e8332ed2aba9e09ff37f74301a137ccb5ab8 100644
--- a/sql/log_slow.h
+++ b/sql/log_slow.h
@@ -34,4 +34,5 @@
#define QPLAN_FILESORT_PRIORITY_QUEUE (1U << 9)
/* ... */
+#define QPLAN_STATUS (1U << 31) /* not in the slow_log_filter */
#define QPLAN_MAX (1U << 31) /* reserved as placeholder */
diff --git a/sql/mdl.h b/sql/mdl.h
index 7961f1f24b2ec4f2feae7f478b487c1426a73c21..15a1976876b228926f6d08bbe8e4ac7316bcc3d7 100644
--- a/sql/mdl.h
+++ b/sql/mdl.h
@@ -475,6 +475,16 @@ class MDL_request
DBUG_ASSERT(ticket == NULL);
type= type_arg;
}
+ void move_from(MDL_request &from)
+ {
+ type= from.type;
+ duration= from.duration;
+ ticket= from.ticket;
+ next_in_list= from.next_in_list;
+ prev_in_list= from.prev_in_list;
+ key.mdl_key_init(&from.key);
+ from.ticket= NULL; // that's what "move" means
+ }
/*
This is to work around the ugliness of TABLE_LIST
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5452f7164e692097dfe6ebcf6f7a31b3250f2e02..cf76a6a4c5c842212dd352b518c63e532f7e16e1 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4009,6 +4009,39 @@ static int init_early_variables()
return 0;
}
+#ifdef _WIN32
+static void get_win_tzname(char* buf, size_t size)
+{
+ static struct
+ {
+ const wchar_t* windows_name;
+ const char* tzdb_name;
+ }
+ tz_data[] =
+ {
+#include "win_tzname_data.h"
+ {0,0}
+ };
+ DYNAMIC_TIME_ZONE_INFORMATION tzinfo;
+ if (GetDynamicTimeZoneInformation(&tzinfo) == TIME_ZONE_ID_UNKNOWN)
+ {
+ strncpy(buf, "unknown", size);
+ return;
+ }
+
+ for (size_t i= 0; tz_data[i].windows_name; i++)
+ {
+ if (wcscmp(tzinfo.TimeZoneKeyName, tz_data[i].windows_name) == 0)
+ {
+ strncpy(buf, tz_data[i].tzdb_name, size);
+ return;
+ }
+ }
+ wcstombs(buf, tzinfo.TimeZoneKeyName, size);
+ buf[size-1]= 0;
+ return;
+}
+#endif
static int init_common_variables()
{
@@ -4053,23 +4086,13 @@ static int init_common_variables()
if (ignore_db_dirs_init())
return 1;
-
-#ifdef HAVE_TZNAME
+#ifdef _WIN32
+ get_win_tzname(system_time_zone, sizeof(system_time_zone));
+#elif defined(HAVE_TZNAME)
struct tm tm_tmp;
localtime_r(&server_start_time,&tm_tmp);
const char *tz_name= tzname[tm_tmp.tm_isdst != 0 ? 1 : 0];
-#ifdef _WIN32
- /*
- Time zone name may be localized and contain non-ASCII characters,
- Convert from ANSI encoding to UTF8.
- */
- wchar_t wtz_name[sizeof(system_time_zone)];
- mbstowcs(wtz_name, tz_name, sizeof(system_time_zone)-1);
- WideCharToMultiByte(CP_UTF8,0, wtz_name, -1, system_time_zone,
- sizeof(system_time_zone) - 1, NULL, NULL);
-#else
strmake_buf(system_time_zone, tz_name);
-#endif /* _WIN32 */
#endif /* HAVE_TZNAME */
/*
@@ -4563,6 +4586,20 @@ static int init_common_variables()
return 1;
}
+#ifdef WITH_WSREP
+ /*
+ We need to initialize auxiliary variables, that will be
+ further keep the original values of auto-increment options
+ as they set by the user. These variables used to restore
+ user-defined values of the auto-increment options after
+ setting of the wsrep_auto_increment_control to 'OFF'.
+ */
+ global_system_variables.saved_auto_increment_increment=
+ global_system_variables.auto_increment_increment;
+ global_system_variables.saved_auto_increment_offset=
+ global_system_variables.auto_increment_offset;
+#endif /* WITH_WSREP */
+
return 0;
}
@@ -9016,7 +9053,8 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
val= p--;
while (my_isspace(mysqld_charset, *p) && p > argument)
*p-- = 0;
- if (p == argument)
+ /* Db name can be one char also */
+ if (p == argument && my_isspace(mysqld_charset, *p))
{
sql_print_error("Bad syntax in replicate-rewrite-db - empty FROM db!\n");
return 1;
@@ -9480,7 +9518,7 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
else
global_system_variables.option_bits&= ~OPTION_BIG_SELECTS;
- if (!opt_bootstrap && WSREP_PROVIDER_EXISTS &&
+ if (!opt_bootstrap && WSREP_PROVIDER_EXISTS && WSREP_ON &&
global_system_variables.binlog_format != BINLOG_FORMAT_ROW)
{
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 46b10b559b295454ceaebacb9b66f286358481a8..2f76f918e341596978d903796a35f2d53d90655d 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -1340,8 +1340,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT()
- Use rowids from unique to run a disk-ordered sweep
*/
-QUICK_INDEX_SORT_SELECT::QUICK_INDEX_SORT_SELECT(THD *thd_param,
- TABLE *table)
+QUICK_INDEX_SORT_SELECT::QUICK_INDEX_SORT_SELECT(THD *thd_param, TABLE *table)
:unique(NULL), pk_quick_select(NULL), thd(thd_param)
{
DBUG_ENTER("QUICK_INDEX_SORT_SELECT::QUICK_INDEX_SORT_SELECT");
@@ -5111,6 +5110,16 @@ typedef struct st_partial_index_intersect_info
key_map filtered_scans; /* scans to be filtered by cpk conditions */
MY_BITMAP *intersect_fields; /* bitmap of fields used in intersection */
+
+ void init()
+ {
+ common_info= NULL;
+ intersect_fields= NULL;
+ records_sent_to_unique= records= length= in_memory= use_cpk_filter= 0;
+ cost= index_read_cost= in_memory_cost= 0.0;
+ filtered_scans.init();
+ filtered_scans.clear_all();
+ }
} PARTIAL_INDEX_INTERSECT_INFO;
@@ -5247,8 +5256,7 @@ bool prepare_search_best_index_intersect(PARAM *param,
if (!n_index_scans)
return 1;
- bzero(init, sizeof(*init));
- init->filtered_scans.init();
+ init->init();
init->common_info= common;
init->cost= cutoff_cost;
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 85f5645949e19532603410a7536386c83f379eae..852f91efc00ef45385aba85e748f15af34d2573e 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -675,7 +675,7 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
select_lex->outer_select()->join && // 6
parent_unit->first_select()->leaf_tables.elements && // 7
!in_subs->has_strategy() && // 8
- select_lex->outer_select()->leaf_tables.elements && // 9
+ select_lex->outer_select()->table_list.first && // 9
!((join->select_options | // 10
select_lex->outer_select()->join->select_options) // 10
& SELECT_STRAIGHT_JOIN) && // 10
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index c633ea708d09f80bed57c78e2190fba38c8ae9e8..892b7e8bd05fa7f4791ff06c52d4e22a32e38f37 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -47,7 +47,7 @@ partition_info *partition_info::get_clone(THD *thd)
mem_alloc_error(sizeof(partition_info));
DBUG_RETURN(NULL);
}
- memcpy(clone, this, sizeof(partition_info));
+ *clone= *this;
memset(&(clone->read_partitions), 0, sizeof(clone->read_partitions));
memset(&(clone->lock_partitions), 0, sizeof(clone->lock_partitions));
clone->bitmaps_are_initialized= FALSE;
@@ -63,7 +63,7 @@ partition_info *partition_info::get_clone(THD *thd)
mem_alloc_error(sizeof(partition_element));
DBUG_RETURN(NULL);
}
- memcpy(part_clone, part, sizeof(partition_element));
+ *part_clone= *part;
part_clone->subpartitions.empty();
while ((subpart= (subpart_it++)))
{
@@ -73,7 +73,7 @@ partition_info *partition_info::get_clone(THD *thd)
mem_alloc_error(sizeof(partition_element));
DBUG_RETURN(NULL);
}
- memcpy(subpart_clone, subpart, sizeof(partition_element));
+ *subpart_clone= *subpart;
part_clone->subpartitions.push_back(subpart_clone, mem_root);
}
clone->partitions.push_back(part_clone, mem_root);
@@ -1897,12 +1897,11 @@ void partition_info::print_no_partition_found(TABLE *table_arg, myf errflag)
TABLE_LIST table_list;
THD *thd= current_thd;
- bzero(&table_list, sizeof(table_list));
+ table_list.reset();
table_list.db= table_arg->s->db.str;
table_list.table_name= table_arg->s->table_name.str;
- if (check_single_table_access(thd,
- SELECT_ACL, &table_list, TRUE))
+ if (check_single_table_access(thd, SELECT_ACL, &table_list, TRUE))
{
my_message(ER_NO_PARTITION_FOR_GIVEN_VALUE,
ER_THD(thd, ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT), errflag);
diff --git a/sql/protocol.h b/sql/protocol.h
index ea33c6bbb4575836a9eb5a1a300a9187459bde25..2edad5663e8a4cba56b6b3eb888c3c3d3afd038c 100644
--- a/sql/protocol.h
+++ b/sql/protocol.h
@@ -230,60 +230,29 @@ class Protocol_discard : public Protocol_text
{
public:
Protocol_discard(THD *thd_arg) : Protocol_text(thd_arg) {}
- /* The real writing is done only in write() */
- virtual bool write() { return 0; }
- virtual bool send_result_set_metadata(List- *list, uint flags)
- {
- // Don't pas Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF flags
- return Protocol_text::send_result_set_metadata(list, 0);
- }
-
- // send_error is intentionally not overloaded.
- virtual bool send_eof(uint server_status, uint statement_warn_count)
- {
- return 0;
- }
-
- void prepare_for_resend()
- {
-#ifndef DBUG_OFF
- field_pos= 0;
-#endif
- }
+ bool write() { return 0; }
+ bool send_result_set_metadata(List
- *, uint) { return 0; }
+ bool send_eof(uint, uint) { return 0; }
+ void prepare_for_resend() { IF_DBUG(field_pos= 0,); }
/*
Provide dummy overrides for any storage methods so that we
avoid allocating and copying of data
*/
- virtual bool store_null()
- { return false; }
- virtual bool store_tiny(longlong from)
- { return false; }
- virtual bool store_short(longlong from)
- { return false; }
- virtual bool store_long(longlong from)
- { return false; }
- virtual bool store_longlong(longlong from, bool unsigned_flag)
- { return false; }
- virtual bool store_decimal(const my_decimal *)
- { return false; }
- virtual bool store(const char *from, size_t length, CHARSET_INFO *cs)
- { return false; }
- virtual bool store(const char *from, size_t length,
- CHARSET_INFO *fromcs, CHARSET_INFO *tocs)
- { return false; }
- virtual bool store(MYSQL_TIME *time, int decimals)
- { return false; }
- virtual bool store_date(MYSQL_TIME *time)
- { return false; }
- virtual bool store_time(MYSQL_TIME *time, int decimals)
- { return false; }
- virtual bool store(float nr, uint32 decimals, String *buffer)
- { return false; }
- virtual bool store(double from, uint32 decimals, String *buffer)
- { return false; }
- virtual bool store(Field *field)
- { return false; }
+ bool store_null() { return false; }
+ bool store_tiny(longlong) { return false; }
+ bool store_short(longlong) { return false; }
+ bool store_long(longlong) { return false; }
+ bool store_longlong(longlong, bool) { return false; }
+ bool store_decimal(const my_decimal *) { return false; }
+ bool store(const char *, size_t, CHARSET_INFO *) { return false; }
+ bool store(const char *, size_t, CHARSET_INFO *, CHARSET_INFO *) { return false; }
+ bool store(MYSQL_TIME *, int) { return false; }
+ bool store_date(MYSQL_TIME *) { return false; }
+ bool store_time(MYSQL_TIME *, int) { return false; }
+ bool store(float, uint32, String *) { return false; }
+ bool store(double, uint32, String *) { return false; }
+ bool store(Field *) { return false; }
};
diff --git a/sql/records.h b/sql/records.h
index a3f0b5eb084d27aacff48006a339677e49aaf7f8..b55fbc22f5538900b77ec35e6f8fb47ae971ca61 100644
--- a/sql/records.h
+++ b/sql/records.h
@@ -69,8 +69,6 @@ struct READ_RECORD
*/
Copy_field *copy_field;
Copy_field *copy_field_end;
-public:
- READ_RECORD() {}
};
bool init_read_record(READ_RECORD *info, THD *thd, TABLE *reg_form,
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index d73a22c80dc98799bd2c8d31e4481c592ab3abe4..43d63fd705ad32c4a4e8925fcfb4612cdd45f8c4 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -5972,8 +5972,8 @@ ER_EVENT_RECURSION_FORBIDDEN
eng "Recursion of EVENT DDL statements is forbidden when body is present"
ger "Rekursivität von EVENT-DDL-Anweisungen ist unzulässig wenn ein Hauptteil (Body) existiert"
ER_EVENTS_DB_ERROR
- eng "Cannot proceed because system tables used by Event Scheduler were found damaged at server start"
- ger "Kann nicht weitermachen, weil die Tabellen, die von Events verwendet werden, beim Serverstart als beschädigt markiert wurden"
+ eng "Cannot proceed, because event scheduler is disabled"
+ ger "Die Operation kann nicht fortgesetzt werden, da Event Scheduler deaktiviert ist."
ER_ONLY_INTEGERS_ALLOWED
eng "Only integers allowed as number here"
ger "An dieser Stelle sind nur Ganzzahlen zulässig"
@@ -6978,7 +6978,7 @@ ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN
ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN
eng "Cannot define foreign key with %s clause on a computed column"
ER_WARNING_NON_DEFAULT_VALUE_FOR_VIRTUAL_COLUMN
- eng "The value specified for computed column '%s' in table '%s' ignored"
+ eng "The value specified for computed column '%s' in table '%s' has been ignored"
ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN
eng "This is not yet supported for computed columns"
ER_CONST_EXPR_IN_VCOL
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 2dc6eca1be806c227ea674708cc7492a0b27557b..852ba4530907ad6bbfd0c7156ab46f6456bf5795 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -243,6 +243,7 @@ sp_get_flags_for_command(LEX *lex)
case SQLCOM_SHOW_EXPLAIN:
case SQLCOM_SHOW_FIELDS:
case SQLCOM_SHOW_FUNC_CODE:
+ case SQLCOM_SHOW_GENERIC:
case SQLCOM_SHOW_GRANTS:
case SQLCOM_SHOW_ENGINE_STATUS:
case SQLCOM_SHOW_ENGINE_LOGS:
@@ -616,6 +617,7 @@ sp_head::sp_head()
DBUG_ENTER("sp_head::sp_head");
+ m_security_ctx.init();
m_backpatch.empty();
m_cont_backpatch.empty();
m_lex.empty();
@@ -2883,7 +2885,7 @@ sp_head::show_routine_code(THD *thd)
const char *format= "Instruction at position %u has m_ip=%u";
char tmp[sizeof(format) + 2*SP_INSTR_UINT_MAXLEN + 1];
- sprintf(tmp, format, ip, i->m_ip);
+ my_snprintf(tmp, sizeof(tmp), format, ip, i->m_ip);
/*
Since this is for debugging purposes only, we don't bother to
introduce a special error code for it.
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 9d6e6c51fb659126bc4b524a7e84a92cf52913b3..6448f65a2cdb6e558d417aca2ac13da739f8af8e 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1271,6 +1271,13 @@ static bool acl_load(THD *thd, TABLE_LIST *tables)
goto end;
table->use_all_columns();
+ if (table->s->fields < 13) // number of columns in 3.21
+ {
+ sql_print_error("Fatal error: mysql.user table is damaged or in "
+ "unsupported 3.20 format.");
+ goto end;
+ }
+
username_char_length= MY_MIN(table->field[1]->char_length(),
USERNAME_CHAR_LENGTH);
password_length= table->field[2]->field_length /
@@ -5311,7 +5318,7 @@ static bool merge_role_db_privileges(ACL_ROLE *grantee, const char *dbname,
ulong UNINIT_VAR(access), update_flags= 0;
for (int *p= dbs.front(); p <= dbs.back(); p++)
{
- if (first<0 || (!dbname && strcmp(acl_dbs.at(*p).db, acl_dbs.at(*p-1).db)))
+ if (first<0 || (!dbname && strcmp(acl_dbs.at(p[0]).db, acl_dbs.at(p[-1]).db)))
{ // new db name series
update_flags|= update_role_db(merged, first, access, grantee->user.str);
merged= -1;
@@ -7776,6 +7783,51 @@ void mysql_show_grants_get_fields(THD *thd, List
- *fields,
fields->push_back(field, thd->mem_root);
}
+bool get_show_user(THD *thd, LEX_USER *lex_user, const char **username,
+ const char **hostname, const char **rolename)
+{
+ if (lex_user->user.str == current_user.str)
+ {
+ *username= thd->security_ctx->priv_user;
+ *hostname= thd->security_ctx->priv_host;
+ return 0;
+ }
+ if (lex_user->user.str == current_role.str)
+ {
+ *rolename= thd->security_ctx->priv_role;
+ return 0;
+ }
+ if (lex_user->user.str == current_user_and_current_role.str)
+ {
+ *username= thd->security_ctx->priv_user;
+ *hostname= thd->security_ctx->priv_host;
+ *rolename= thd->security_ctx->priv_role;
+ return 0;
+ }
+
+ Security_context *sctx= thd->security_ctx;
+ bool do_check_access;
+
+ if (!(lex_user= get_current_user(thd, lex_user)))
+ return 1;
+
+ if (lex_user->is_role())
+ {
+ *rolename= lex_user->user.str;
+ do_check_access= strcmp(*rolename, sctx->priv_role);
+ }
+ else
+ {
+ *username= lex_user->user.str;
+ *hostname= lex_user->host.str;
+ do_check_access= strcmp(*username, sctx->priv_user) ||
+ strcmp(*hostname, sctx->priv_host);
+ }
+
+ if (do_check_access && check_access(thd, SELECT_ACL, "mysql", 0, 0, 1, 0))
+ return 1;
+ return 0;
+}
/*
SHOW GRANTS; Send grants for a user to the client
@@ -7791,9 +7843,9 @@ bool mysql_show_grants(THD *thd, LEX_USER *lex_user)
ACL_ROLE *acl_role= NULL;
char buff[1024];
Protocol *protocol= thd->protocol;
- char *username= NULL;
- char *hostname= NULL;
- char *rolename= NULL;
+ const char *username= NULL;
+ const char *hostname= NULL;
+ const char *rolename= NULL;
DBUG_ENTER("mysql_show_grants");
if (!initialized)
@@ -7802,46 +7854,9 @@ bool mysql_show_grants(THD *thd, LEX_USER *lex_user)
DBUG_RETURN(TRUE);
}
- if (lex_user->user.str == current_user.str)
- {
- username= thd->security_ctx->priv_user;
- hostname= thd->security_ctx->priv_host;
- }
- else if (lex_user->user.str == current_role.str)
- {
- rolename= thd->security_ctx->priv_role;
- }
- else if (lex_user->user.str == current_user_and_current_role.str)
- {
- username= thd->security_ctx->priv_user;
- hostname= thd->security_ctx->priv_host;
- rolename= thd->security_ctx->priv_role;
- }
- else
- {
- Security_context *sctx= thd->security_ctx;
- bool do_check_access;
-
- lex_user= get_current_user(thd, lex_user);
- if (!lex_user)
- DBUG_RETURN(TRUE);
-
- if (lex_user->is_role())
- {
- rolename= lex_user->user.str;
- do_check_access= strcmp(rolename, sctx->priv_role);
- }
- else
- {
- username= lex_user->user.str;
- hostname= lex_user->host.str;
- do_check_access= strcmp(username, sctx->priv_user) ||
- strcmp(hostname, sctx->priv_host);
- }
+ if (get_show_user(thd, lex_user, &username, &hostname, &rolename))
+ DBUG_RETURN(TRUE);
- if (do_check_access && check_access(thd, SELECT_ACL, "mysql", 0, 0, 1, 0))
- DBUG_RETURN(TRUE);
- }
DBUG_ASSERT(rolename || username);
List
- field_list;
@@ -8530,18 +8545,19 @@ static int open_grant_tables(THD *thd, TABLE_LIST *tables,
}
int prev= -1;
- bzero(tables, sizeof(TABLE_LIST) * TABLES_MAX);
for (int cur=TABLES_MAX-1, mask= 1 << cur; mask; cur--, mask >>= 1)
{
if ((tables_to_open & mask) == 0)
+ {
+ tables[cur].table= NULL;
continue;
+ }
tables[cur].init_one_table(C_STRING_WITH_LEN("mysql"),
acl_table_names[cur].str,
acl_table_names[cur].length,
acl_table_names[cur].str, lock_type);
tables[cur].open_type= OT_BASE_ONLY;
- if (lock_type >= TL_WRITE_ALLOW_WRITE)
- tables[cur].updating= 1;
+ tables[cur].i_s_requested_object= OPEN_TABLE_ONLY;
if (cur >= FIRST_OPTIONAL_TABLE)
tables[cur].open_strategy= TABLE_LIST::OPEN_IF_EXISTS;
if (prev != -1)
@@ -9439,6 +9455,7 @@ bool mysql_create_user(THD *thd, List
&list, bool handle_as_role)
List_iterator user_list(list);
TABLE_LIST tables[TABLES_MAX];
bool binlog= false;
+ bool some_users_dropped= false;
DBUG_ENTER("mysql_create_user");
DBUG_PRINT("entry", ("Handle as %s", handle_as_role ? "role" : "user"));
@@ -9504,6 +9521,8 @@ bool mysql_create_user(THD *thd, List &list, bool handle_as_role)
result= true;
continue;
}
+ else
+ some_users_dropped= true;
// Proceed with the creation
}
else if (thd->lex->create_info.if_not_exists())
@@ -9570,12 +9589,21 @@ bool mysql_create_user(THD *thd, List &list, bool handle_as_role)
}
}
+ if (result && some_users_dropped && !handle_as_role)
+ {
+ /* Rebuild in-memory structs, since 'acl_users' has been modified */
+ rebuild_check_host();
+ rebuild_role_grants();
+ }
+
mysql_mutex_unlock(&acl_cache->lock);
if (result)
+ {
my_error(ER_CANNOT_USER, MYF(0),
(handle_as_role) ? "CREATE ROLE" : "CREATE USER",
wrong_users.c_ptr_safe());
+ }
if (binlog)
result |= write_bin_log(thd, FALSE, thd->query(), thd->query_length());
@@ -11267,7 +11295,7 @@ struct MPVIO_EXT :public MYSQL_PLUGIN_VIO
};
/**
- a helper function to report an access denied error in all the proper places
+ a helper function to report an access denied error in most proper places
*/
static void login_failed_error(THD *thd)
{
@@ -12687,10 +12715,26 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
/* Change a database if necessary */
if (mpvio.db.length)
{
- if (mysql_change_db(thd, &mpvio.db, FALSE))
+ uint err = mysql_change_db(thd, &mpvio.db, FALSE);
+ if(err)
{
- /* mysql_change_db() has pushed the error message. */
- status_var_increment(thd->status_var.access_denied_errors);
+ if (err == ER_DBACCESS_DENIED_ERROR)
+ {
+ /*
+ Got an "access denied" error, which must be handled
+ other access denied errors (see login_failed_error()).
+ mysql_change_db() already sent error to client, and
+ wrote to general log, we only need to increment the counter
+ and maybe write a warning to error log.
+ */
+ status_var_increment(thd->status_var.access_denied_errors);
+ if (global_system_variables.log_warnings > 1)
+ {
+ Security_context* sctx = thd->security_ctx;
+ sql_print_warning(ER_THD(thd, err),
+ sctx->priv_user, sctx->priv_host, mpvio.db.str);
+ }
+ }
DBUG_RETURN(1);
}
}
diff --git a/sql/sql_acl.h b/sql/sql_acl.h
index c2ad9a649e56b66edb44273fa846a9220b1a339b..fc3fcdc534a51fac042aa85fb0f8cab9313c7b0f 100644
--- a/sql/sql_acl.h
+++ b/sql/sql_acl.h
@@ -241,6 +241,8 @@ ulong get_table_grant(THD *thd, TABLE_LIST *table);
ulong get_column_grant(THD *thd, GRANT_INFO *grant,
const char *db_name, const char *table_name,
const char *field_name);
+bool get_show_user(THD *thd, LEX_USER *lex_user, const char **username,
+ const char **hostname, const char **rolename);
void mysql_show_grants_get_fields(THD *thd, List- *fields,
const char *name);
bool mysql_show_grants(THD *thd, LEX_USER *user);
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index b8881f8f10873d2ccf65cf138feb88044d6f3ee0..0ec6719037cd77b8f26e05f3cb30ba2d2d2b5682 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -528,7 +528,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
if (!table->table->part_info)
{
my_error(ER_PARTITION_MGMT_ON_NONPARTITIONED, MYF(0));
- goto err2;
+ thd->resume_subsequent_commits(suspended_wfc);
+ DBUG_RETURN(TRUE);
}
if (set_part_state(alter_info, table->table->part_info, PART_ADMIN))
{
@@ -1159,7 +1160,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
close_thread_tables(thd); // Shouldn't be needed
thd->mdl_context.release_transactional_locks();
-err2:
thd->resume_subsequent_commits(suspended_wfc);
DBUG_RETURN(TRUE);
}
@@ -1246,7 +1246,6 @@ bool Sql_cmd_analyze_table::execute(THD *thd)
FALSE, UINT_MAX, FALSE))
goto error;
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
- thd->enable_slow_log= opt_log_slow_admin_statements;
res= mysql_admin_table(thd, first_table, &m_lex->check_opt,
"analyze", lock_type, 1, 0, 0, 0,
&handler::ha_analyze, 0);
@@ -1278,8 +1277,6 @@ bool Sql_cmd_check_table::execute(THD *thd)
if (check_table_access(thd, SELECT_ACL, first_table,
TRUE, UINT_MAX, FALSE))
goto error; /* purecov: inspected */
- thd->enable_slow_log= opt_log_slow_admin_statements;
-
res= mysql_admin_table(thd, first_table, &m_lex->check_opt, "check",
lock_type, 0, 0, HA_OPEN_FOR_REPAIR, 0,
&handler::ha_check, &view_check);
@@ -1303,7 +1300,6 @@ bool Sql_cmd_optimize_table::execute(THD *thd)
FALSE, UINT_MAX, FALSE))
goto error; /* purecov: inspected */
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
- thd->enable_slow_log= opt_log_slow_admin_statements;
res= (specialflag & SPECIAL_NO_NEW_FUNC) ?
mysql_recreate_table(thd, first_table, true) :
mysql_admin_table(thd, first_table, &m_lex->check_opt,
@@ -1336,7 +1332,6 @@ bool Sql_cmd_repair_table::execute(THD *thd)
if (check_table_access(thd, SELECT_ACL | INSERT_ACL, first_table,
FALSE, UINT_MAX, FALSE))
goto error; /* purecov: inspected */
- thd->enable_slow_log= opt_log_slow_admin_statements;
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
res= mysql_admin_table(thd, first_table, &m_lex->check_opt, "repair",
TL_WRITE, 1,
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc
index 758489ddcfb7cdfed1a8617dc6781af3d3c8f459..ddac271146e642a23fec87d4cf8e3099393c3103 100644
--- a/sql/sql_alter.cc
+++ b/sql/sql_alter.cc
@@ -233,7 +233,7 @@ bool Sql_cmd_alter_table::execute(THD *thd)
DBUG_RETURN(TRUE); /* purecov: inspected */
/* If it is a merge table, check privileges for merge children. */
- if (create_info.merge_list.first)
+ if (create_info.merge_list)
{
/*
The user must have (SELECT_ACL | UPDATE_ACL | DELETE_ACL) on the
@@ -271,7 +271,7 @@ bool Sql_cmd_alter_table::execute(THD *thd)
*/
if (check_table_access(thd, SELECT_ACL | UPDATE_ACL | DELETE_ACL,
- create_info.merge_list.first, FALSE, UINT_MAX, FALSE))
+ create_info.merge_list, FALSE, UINT_MAX, FALSE))
DBUG_RETURN(TRUE);
}
@@ -282,9 +282,9 @@ bool Sql_cmd_alter_table::execute(THD *thd)
{
// Rename of table
TABLE_LIST tmp_table;
- memset(&tmp_table, 0, sizeof(tmp_table));
- tmp_table.table_name= lex->name.str;
- tmp_table.db= select_lex->db;
+ tmp_table.init_one_table(select_lex->db, strlen(select_lex->db),
+ lex->name.str, lex->name.length,
+ lex->name.str, TL_IGNORE);
tmp_table.grant.privilege= priv;
if (check_grant(thd, INSERT_ACL | CREATE_ACL, &tmp_table, FALSE,
UINT_MAX, FALSE))
@@ -302,8 +302,6 @@ bool Sql_cmd_alter_table::execute(THD *thd)
"INDEX DIRECTORY");
create_info.data_file_name= create_info.index_file_name= NULL;
- thd->enable_slow_log= opt_log_slow_admin_statements;
-
#ifdef WITH_WSREP
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl);
@@ -352,8 +350,6 @@ bool Sql_cmd_discard_import_tablespace::execute(THD *thd)
if (check_grant(thd, ALTER_ACL, table_list, false, UINT_MAX, false))
return true;
- thd->enable_slow_log= opt_log_slow_admin_statements;
-
/*
Check if we attempt to alter mysql.slow_log or
mysql.general_log table and return an error if
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index 1f801a33dcd40d0326e5a1117192a07887e1a0a8..45f4f87f172e78d53a8c9e03018767bcda264ede 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -298,9 +298,9 @@ bool get_ev_num_info(EV_NUM_INFO *ev_info, NUM_INFO *info, const char *num)
} // get_ev_num_info
-void free_string(String *s)
+void free_string(void* str, TREE_FREE, void*)
{
- s->free();
+ ((String*)str)->free();
}
diff --git a/sql/sql_analyse.h b/sql/sql_analyse.h
index 820877f2a696e4285ba7a547de995f068f7257d2..738737f0edcaa51809dc376a7bffd1bae91fa7a9 100644
--- a/sql/sql_analyse.h
+++ b/sql/sql_analyse.h
@@ -68,7 +68,7 @@ int compare_ulonglong2(void* cmp_arg __attribute__((unused)),
int compare_decimal2(int* len, const char *s, const char *t);
Procedure *proc_analyse_init(THD *thd, ORDER *param, select_result *result,
List
- &field_list);
-void free_string(String*);
+void free_string(void* str, TREE_FREE, void*);
class analyse;
class field_info :public Sql_alloc
@@ -121,8 +121,7 @@ class field_str :public field_info
must_be_blob(0), was_zero_fill(0),
was_maybe_zerofill(0), can_be_still_num(1)
{ init_tree(&tree, 0, 0, sizeof(String), (qsort_cmp2) sortcmp2,
- (tree_element_free) free_string, NULL,
- MYF(MY_THREAD_SPECIFIC)); };
+ free_string, NULL, MYF(MY_THREAD_SPECIFIC)); };
void add();
void get_opt_type(String*, ha_rows);
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 733a3a1f3ed92fff3170be436894e252b704889e..3a7ffdb656acd962bf3d9ca7c8ba30182a1293db 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -3923,6 +3923,45 @@ open_and_process_routine(THD *thd, Query_tables_list *prelocking_ctx,
DBUG_RETURN(FALSE);
}
+/*
+ If we are not already in prelocked mode and extended table list is not
+ yet built we might have to build the prelocking set for this statement.
+
+ Since currently no prelocking strategy prescribes doing anything for
+ tables which are only read, we do below checks only if table is going
+ to be changed.
+*/
+bool extend_table_list(THD *thd, TABLE_LIST *tables,
+ Prelocking_strategy *prelocking_strategy,
+ bool has_prelocking_list)
+{
+ bool error= false;
+ LEX *lex= thd->lex;
+
+ if (thd->locked_tables_mode <= LTM_LOCK_TABLES &&
+ ! has_prelocking_list && tables->updating &&
+ tables->lock_type >= TL_WRITE_ALLOW_WRITE)
+ {
+ bool need_prelocking= FALSE;
+ TABLE_LIST **save_query_tables_last= lex->query_tables_last;
+ /*
+ Extend statement's table list and the prelocking set with
+ tables and routines according to the current prelocking
+ strategy.
+
+ For example, for DML statements we need to add tables and routines
+ used by triggers which are going to be invoked for this element of
+ table list and also add tables required for handling of foreign keys.
+ */
+ error= prelocking_strategy->handle_table(thd, lex, tables,
+ &need_prelocking);
+
+ if (need_prelocking && ! lex->requires_prelocking())
+ lex->mark_as_requiring_prelocking(save_query_tables_last);
+ }
+ return error;
+}
+
/**
Handle table list element by obtaining metadata lock, opening table or view
@@ -3949,14 +3988,13 @@ open_and_process_routine(THD *thd, Query_tables_list *prelocking_ctx,
*/
static bool
-open_and_process_table(THD *thd, LEX *lex, TABLE_LIST *tables,
- uint *counter, uint flags,
+open_and_process_table(THD *thd, TABLE_LIST *tables, uint *counter, uint flags,
Prelocking_strategy *prelocking_strategy,
- bool has_prelocking_list,
- Open_table_context *ot_ctx)
+ bool has_prelocking_list, Open_table_context *ot_ctx)
{
bool error= FALSE;
bool safe_to_ignore_table= FALSE;
+ LEX *lex= thd->lex;
DBUG_ENTER("open_and_process_table");
DEBUG_SYNC(thd, "open_and_process_table");
@@ -4175,38 +4213,9 @@ open_and_process_table(THD *thd, LEX *lex, TABLE_LIST *tables,
if (tables->open_strategy && !tables->table)
goto end;
- /*
- If we are not already in prelocked mode and extended table list is not
- yet built we might have to build the prelocking set for this statement.
-
- Since currently no prelocking strategy prescribes doing anything for
- tables which are only read, we do below checks only if table is going
- to be changed.
- */
- if (thd->locked_tables_mode <= LTM_LOCK_TABLES &&
- ! has_prelocking_list &&
- tables->lock_type >= TL_WRITE_ALLOW_WRITE)
- {
- bool need_prelocking= FALSE;
- TABLE_LIST **save_query_tables_last= lex->query_tables_last;
- /*
- Extend statement's table list and the prelocking set with
- tables and routines according to the current prelocking
- strategy.
-
- For example, for DML statements we need to add tables and routines
- used by triggers which are going to be invoked for this element of
- table list and also add tables required for handling of foreign keys.
- */
- error= prelocking_strategy->handle_table(thd, lex, tables,
- &need_prelocking);
-
- if (need_prelocking && ! lex->requires_prelocking())
- lex->mark_as_requiring_prelocking(save_query_tables_last);
-
- if (error)
- goto end;
- }
+ error= extend_table_list(thd, tables, prelocking_strategy, has_prelocking_list);
+ if (error)
+ goto end;
/* Copy grant information from TABLE_LIST instance to TABLE one. */
tables->table->grant= tables->grant;
@@ -4521,7 +4530,8 @@ open_tables_check_upgradable_mdl(THD *thd, TABLE_LIST *tables_start,
*/
bool open_tables(THD *thd, const DDL_options_st &options,
- TABLE_LIST **start, uint *counter, uint flags,
+ TABLE_LIST **start, uint *counter,
+ Sroutine_hash_entry **sroutine_to_open_list, uint flags,
Prelocking_strategy *prelocking_strategy)
{
/*
@@ -4564,7 +4574,7 @@ bool open_tables(THD *thd, const DDL_options_st &options,
has_prelocking_list= thd->lex->requires_prelocking();
table_to_open= start;
- sroutine_to_open= (Sroutine_hash_entry**) &thd->lex->sroutines_list.first;
+ sroutine_to_open= sroutine_to_open_list;
*counter= 0;
THD_STAGE_INFO(thd, stage_opening_tables);
@@ -4634,9 +4644,9 @@ bool open_tables(THD *thd, const DDL_options_st &options,
for (tables= *table_to_open; tables;
table_to_open= &tables->next_global, tables= tables->next_global)
{
- error= open_and_process_table(thd, thd->lex, tables, counter,
- flags, prelocking_strategy,
- has_prelocking_list, &ot_ctx);
+ error= open_and_process_table(thd, tables, counter, flags,
+ prelocking_strategy, has_prelocking_list,
+ &ot_ctx);
if (error)
{
diff --git a/sql/sql_base.h b/sql/sql_base.h
index 94294e3aa43c1ef47ae720f85a17d4dfb9491fa7..53b5885460b6df1335d7bf7cf5a31c08346b24bf 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -251,8 +251,19 @@ lock_table_names(THD *thd, TABLE_LIST *table_list,
table_list_end, lock_wait_timeout, flags);
}
bool open_tables(THD *thd, const DDL_options_st &options,
- TABLE_LIST **tables, uint *counter, uint flags,
+ TABLE_LIST **tables, uint *counter,
+ Sroutine_hash_entry **sroutine_to_open, uint flags,
Prelocking_strategy *prelocking_strategy);
+
+static inline bool
+open_tables(THD *thd, const DDL_options_st &options, TABLE_LIST **tables,
+ uint *counter, uint flags, Prelocking_strategy *prelocking_strategy)
+{
+ return open_tables(thd, options, tables, counter,
+ &thd->lex->sroutines_list.first, flags,
+ prelocking_strategy);
+}
+
static inline bool
open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags,
Prelocking_strategy *prelocking_strategy)
@@ -547,6 +558,10 @@ inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables,
bool restart_trans_for_tables(THD *thd, TABLE_LIST *table);
+bool extend_table_list(THD *thd, TABLE_LIST *tables,
+ Prelocking_strategy *prelocking_strategy,
+ bool has_prelocking_list);
+
/**
A context of open_tables() function, used to recover
from a failed open_table() or open_routine() attempt.
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 0971d4fdaaab9780176300c09a3167d3e8fec0a9..6fa8c100894c90b76b04bf115b2aa0103d57d36e 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -983,6 +983,7 @@ THD::THD(bool is_wsrep_applier)
memset(&invoker_host, 0, sizeof(invoker_host));
prepare_derived_at_open= FALSE;
create_tmp_table_for_derived= FALSE;
+ force_read_stats= FALSE;
save_prep_leaf_list= FALSE;
/* Restore THR_THD */
set_current_thd(old_THR_THD);
@@ -2405,18 +2406,28 @@ CHANGED_TABLE_LIST* THD::changed_table_dup(const char *key, long key_length)
}
-int THD::send_explain_fields(select_result *result, uint8 explain_flags, bool is_analyze)
+int THD::prepare_explain_fields(select_result *result, List
- *field_list,
+ uint8 explain_flags, bool is_analyze)
{
- List
- field_list;
if (lex->explain_json)
- make_explain_json_field_list(field_list, is_analyze);
+ make_explain_json_field_list(*field_list, is_analyze);
else
- make_explain_field_list(field_list, explain_flags, is_analyze);
+ make_explain_field_list(*field_list, explain_flags, is_analyze);
- result->prepare(field_list, NULL);
- return (result->send_result_set_metadata(field_list,
- Protocol::SEND_NUM_ROWS |
- Protocol::SEND_EOF));
+ return result->prepare(*field_list, NULL);
+}
+
+
+int THD::send_explain_fields(select_result *result,
+ uint8 explain_flags,
+ bool is_analyze)
+{
+ List
- field_list;
+ int rc;
+ rc= prepare_explain_fields(result, &field_list, explain_flags, is_analyze) ||
+ result->send_result_set_metadata(field_list, Protocol::SEND_NUM_ROWS |
+ Protocol::SEND_EOF);
+ return rc;
}
@@ -2491,7 +2502,7 @@ void THD::make_explain_field_list(List
- &field_list, uint8 explain_flags,
if (is_analyze)
{
field_list.push_back(item= new (mem_root)
- Item_float(this, "r_rows", 0.1234, 10, 4),
+ Item_float(this, "r_rows", 0.1234, 2, 4),
mem_root);
item->maybe_null=1;
}
@@ -5532,6 +5543,9 @@ int xid_cache_iterate(THD *thd, my_hash_walk_action action, void *arg)
Call this function only when you have established the list of all tables
which you'll want to update (including stored functions, triggers, views
inside your statement).
+
+ Ignore tables prelocked for foreign key cascading actions, as these
+ actions cannot generate new auto_increment values.
*/
static bool
@@ -5541,6 +5555,7 @@ has_write_table_with_auto_increment(TABLE_LIST *tables)
{
/* we must do preliminary checks as table->table may be NULL */
if (!table->placeholder() &&
+ table->prelocking_placeholder != TABLE_LIST::FK &&
table->table->found_next_number_field &&
(table->lock_type >= TL_WRITE_ALLOW_WRITE))
return 1;
diff --git a/sql/sql_class.h b/sql/sql_class.h
index fae4a683370f8629d39b3684125192a5b4681e37..c0dc42deefe13148adffcf463e4a68943beaa31c 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -36,6 +36,7 @@
#include "violite.h" /* vio_is_connected */
#include "thr_lock.h" /* thr_lock_type, THR_LOCK_DATA, THR_LOCK_INFO */
#include "thr_timer.h"
+#include
#include "sql_digest_stream.h" // sql_digest_state
@@ -550,6 +551,16 @@ typedef struct system_variables
ha_rows max_join_size;
ha_rows expensive_subquery_limit;
ulong auto_increment_increment, auto_increment_offset;
+#ifdef WITH_WSREP
+ /*
+ Stored values of the auto_increment_increment and auto_increment_offset
+ that are will be restored when wsrep_auto_increment_control will be set
+ to 'OFF', because the setting it to 'ON' leads to overwriting of the
+ original values (which are set by the user) by calculated ones (which
+ are based on the cluster size):
+ */
+ ulong saved_auto_increment_increment, saved_auto_increment_offset;
+#endif /* WITH_WSREP */
ulong lock_wait_timeout;
ulong join_cache_level;
ulong max_allowed_packet;
@@ -2189,6 +2200,9 @@ class THD :public Statement,
*/
bool create_tmp_table_for_derived;
+ /* The flag to force reading statistics from EITS tables */
+ bool force_read_stats;
+
bool save_prep_leaf_list;
/* container for handler's private per-connection data */
@@ -3321,6 +3335,8 @@ class THD :public Statement,
void add_changed_table(TABLE *table);
void add_changed_table(const char *key, long key_length);
CHANGED_TABLE_LIST * changed_table_dup(const char *key, long key_length);
+ int prepare_explain_fields(select_result *result, List- *field_list,
+ uint8 explain_flags, bool is_analyze);
int send_explain_fields(select_result *result, uint8 explain_flags,
bool is_analyze);
void make_explain_field_list(List
- &field_list, uint8 explain_flags,
@@ -4250,6 +4266,7 @@ class select_result_sink: public Sql_alloc
virtual ~select_result_sink() {};
};
+class select_result_interceptor;
/*
Interface for sending tabular data, together with some other stuff:
@@ -4338,11 +4355,10 @@ class select_result :public select_result_sink
/*
This returns
- - FALSE if the class sends output row to the client
- - TRUE if the output is set elsewhere (a file, @variable, or table).
- Currently all intercepting classes derive from select_result_interceptor.
+ - NULL if the class sends output row to the client
+ - this if the output is set elsewhere (a file, @variable, or table).
*/
- virtual bool is_result_interceptor()=0;
+ virtual select_result_interceptor *result_interceptor()=0;
};
@@ -4410,7 +4426,7 @@ class select_result_interceptor: public select_result
} /* Remove gcc warning */
uint field_count(List
- &fields) const { return 0; }
bool send_result_set_metadata(List
- &fields, uint flag) { return FALSE; }
- bool is_result_interceptor() { return true; }
+ select_result_interceptor *result_interceptor() { return this; }
/*
Instruct the object to not call my_ok(). Client output will be handled
@@ -4438,7 +4454,7 @@ class select_send :public select_result {
virtual bool check_simple_select() const { return FALSE; }
void abort_result_set();
virtual void cleanup();
- bool is_result_interceptor() { return false; }
+ select_result_interceptor *result_interceptor() { return NULL; }
};
@@ -4553,7 +4569,6 @@ class select_insert :public select_result_interceptor {
class select_create: public select_insert {
- ORDER *group;
TABLE_LIST *create_table;
Table_specification_st *create_info;
TABLE_LIST *select_tables;
@@ -5446,6 +5461,11 @@ class select_dumpvar :public select_result_interceptor {
*/
#define CF_UPDATES_DATA (1U << 18)
+/**
+ Not logged into slow log as "admin commands"
+*/
+#define CF_ADMIN_COMMAND (1U << 19)
+
/* Bits in server_command_flags */
/**
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index d7ed82a2ef37e98bfb580d76f5fb06ffaa366db3..7b83332ea625331328e24ed011847c87760801d9 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -1451,12 +1451,12 @@ static void backup_current_db_name(THD *thd,
a stack pointer set by Stored Procedures was used by replication after
the stack address was long gone.
- @return Operation status
- @retval FALSE Success
- @retval TRUE Error
+ @return error code (ER_XXX)
+ @retval 0 Success
+ @retval >0 Error
*/
-bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
+uint mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
{
LEX_STRING new_db_file_name;
@@ -1480,13 +1480,13 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
mysql_change_db_impl(thd, NULL, 0, thd->variables.collation_server);
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(0);
}
else
{
my_message(ER_NO_DB_ERROR, ER_THD(thd, ER_NO_DB_ERROR), MYF(0));
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(ER_NO_DB_ERROR);
}
}
DBUG_PRINT("enter",("name: '%s'", new_db_name->str));
@@ -1498,7 +1498,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
mysql_change_db_impl(thd, &INFORMATION_SCHEMA_NAME, SELECT_ACL,
system_charset_info);
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(0);
}
/*
@@ -1513,7 +1513,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
new_db_file_name.length= new_db_name->length;
if (new_db_file_name.str == NULL)
- DBUG_RETURN(TRUE); /* the error is set */
+ DBUG_RETURN(ER_OUT_OF_RESOURCES); /* the error is set */
/*
NOTE: if check_db_name() fails, we should throw an error in any case,
@@ -1532,7 +1532,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
if (force_switch)
mysql_change_db_impl(thd, NULL, 0, thd->variables.collation_server);
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(ER_WRONG_DB_NAME);
}
DBUG_PRINT("info",("Use database: %s", new_db_file_name.str));
@@ -1562,7 +1562,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
general_log_print(thd, COM_INIT_DB, ER_THD(thd, ER_DBACCESS_DENIED_ERROR),
sctx->priv_user, sctx->priv_host, new_db_file_name.str);
my_free(new_db_file_name.str);
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(ER_DBACCESS_DENIED_ERROR);
}
#endif
@@ -1586,7 +1586,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
/* The operation succeed. */
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(0);
}
else
{
@@ -1597,7 +1597,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
/* The operation failed. */
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(ER_BAD_DB_ERROR);
}
}
@@ -1610,7 +1610,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
mysql_change_db_impl(thd, &new_db_file_name, db_access, db_default_cl);
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(0);
}
diff --git a/sql/sql_db.h b/sql/sql_db.h
index ed8417a77932b18bb7fb52fdbb67ede47799c5fb..b778e42645a982639b257b497f0acaa733700807 100644
--- a/sql/sql_db.h
+++ b/sql/sql_db.h
@@ -26,7 +26,7 @@ bool mysql_alter_db(THD *thd, const char *db,
const Schema_specification_st *create);
bool mysql_rm_db(THD *thd, char *db, bool if_exists);
bool mysql_upgrade_db(THD *thd, LEX_STRING *old_db);
-bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name,
+uint mysql_change_db(THD *thd, const LEX_STRING *new_db_name,
bool force_switch);
bool mysql_opt_change_db(THD *thd,
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 7733d2501b866c5c9b5a9b20e3a53679de342635..9f3caf9df4f57575cbfe6c8def114be819499a56 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -39,7 +39,7 @@
#include "sql_statistics.h"
#include "transaction.h"
#include "records.h" // init_read_record,
-#include "sql_derived.h" // mysql_handle_list_of_derived
+#include "sql_derived.h" // mysql_handle_derived
// end_read_record
#include "sql_partition.h" // make_used_partitions_str
@@ -248,9 +248,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (open_and_lock_tables(thd, table_list, TRUE, 0))
DBUG_RETURN(TRUE);
- if (mysql_handle_list_of_derived(thd->lex, table_list, DT_MERGE_FOR_INSERT))
+ if (thd->lex->handle_list_of_derived(table_list, DT_MERGE_FOR_INSERT))
DBUG_RETURN(TRUE);
- if (mysql_handle_list_of_derived(thd->lex, table_list, DT_PREPARE))
+ if (thd->lex->handle_list_of_derived(table_list, DT_PREPARE))
DBUG_RETURN(TRUE);
if (!table_list->single_table_updatable())
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index b29e676bfc7ea4d74cf4752a8b0b3311835b3d9a..c93aa132e37d76c9fb52375cb75f36c73328202b 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -91,6 +91,7 @@ mysql_handle_derived(LEX *lex, uint phases)
sl= sl->next_select_in_list())
{
TABLE_LIST *cursor= sl->get_table_list();
+ sl->changed_elements|= TOUCHED_SEL_DERIVED;
/*
DT_MERGE_FOR_INSERT is not needed for views/derived tables inside
subqueries. Views and derived tables of subqueries should be
@@ -200,36 +201,6 @@ mysql_handle_single_derived(LEX *lex, TABLE_LIST *derived, uint phases)
}
-/**
- Run specified phases for derived tables/views in the given list
-
- @param lex LEX for this thread
- @param table_list list of derived tables/view to handle
- @param phase_map phases to process tables/views through
-
- @details
- This function runs phases specified by the 'phases_map' on derived
- tables/views found in the 'dt_list' with help of the
- TABLE_LIST::handle_derived function.
- 'lex' is passed as an argument to the TABLE_LIST::handle_derived.
-
- @return FALSE ok
- @return TRUE error
-*/
-
-bool
-mysql_handle_list_of_derived(LEX *lex, TABLE_LIST *table_list, uint phases)
-{
- for (TABLE_LIST *tl= table_list; tl; tl= tl->next_local)
- {
- if (tl->is_view_or_derived() &&
- tl->handle_derived(lex, phases))
- return TRUE;
- }
- return FALSE;
-}
-
-
/**
Merge a derived table/view into the embedding select
diff --git a/sql/sql_derived.h b/sql/sql_derived.h
index 1dffef7235b40aa01094b842fcc806ff8c7830da..301ae31b0163d2ea26b544f6a68d6f44f48d4a7b 100644
--- a/sql/sql_derived.h
+++ b/sql/sql_derived.h
@@ -22,7 +22,6 @@ struct LEX;
bool mysql_handle_derived(LEX *lex, uint phases);
bool mysql_handle_single_derived(LEX *lex, TABLE_LIST *derived, uint phases);
-bool mysql_handle_list_of_derived(LEX *lex, TABLE_LIST *dt_list, uint phases);
bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived);
/**
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 5a022ba72cfa4342db4cda9791ecfaff2748ccd0..bc6119b9a9c49b510806b97b0b665d2ce138b882 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -359,8 +359,6 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, SQL_HANDLER *reopen)
sql_handler->reset();
}
sql_handler->table= table;
- memcpy(&sql_handler->mdl_request, &tables->mdl_request,
- sizeof(tables->mdl_request));
if (!(sql_handler->lock= get_lock_data(thd, &sql_handler->table, 1,
GET_LOCK_STORE_LOCKS)))
@@ -374,6 +372,8 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, SQL_HANDLER *reopen)
if (error)
goto err;
+ sql_handler->mdl_request.move_from(tables->mdl_request);
+
/* Always read all columns */
table->read_set= &table->s->all_set;
if (table->vcol_set)
@@ -403,9 +403,6 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, SQL_HANDLER *reopen)
*/
table->open_by_handler= 1;
- /* Safety, cleanup the pointer to satisfy MDL assertions. */
- tables->mdl_request.ticket= NULL;
-
if (! reopen)
my_ok(thd);
DBUG_PRINT("exit",("OK"));
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index de5c3b4c40947f7ca893abd4f475e8ac72f6237f..1745c6b4aaaf28afe88aa5a01887f9d01ecd0587 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1461,7 +1461,7 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
DBUG_RETURN(TRUE);
if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT))
DBUG_RETURN(TRUE);
- if (mysql_handle_list_of_derived(thd->lex, table_list, DT_PREPARE))
+ if (thd->lex->handle_list_of_derived(table_list, DT_PREPARE))
DBUG_RETURN(TRUE);
/*
For subqueries in VALUES() we should not see the table in which we are
@@ -1557,7 +1557,6 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
DBUG_RETURN(TRUE);
}
select_lex->fix_prepare_information(thd, &fake_conds, &fake_conds);
- select_lex->first_execution= 0;
}
/*
Only call prepare_for_posistion() if we are not performing a DELAYED
@@ -1862,7 +1861,6 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
info->deleted++;
else
error= 0;
- thd->record_first_successful_insert_id_in_cur_stmt(table->file->insert_id_for_cur_row);
/*
Since we pretend that we have done insert we should call
its after triggers.
@@ -1903,7 +1901,6 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
if (table->file->insert_id_for_cur_row == 0)
table->file->insert_id_for_cur_row= insert_id_for_cur_row;
- thd->record_first_successful_insert_id_in_cur_stmt(table->file->insert_id_for_cur_row);
/*
Restore column maps if they where replaced during an duplicate key
problem.
@@ -4322,14 +4319,12 @@ select_create::binlog_show_create_table(TABLE **tables, uint count)
DBUG_ASSERT(thd->is_current_stmt_binlog_format_row());
DBUG_ASSERT(tables && *tables && count > 0);
- char buf[2048];
- String query(buf, sizeof(buf), system_charset_info);
+ StringBuffer<2048> query(system_charset_info);
int result;
TABLE_LIST tmp_table_list;
- memset(&tmp_table_list, 0, sizeof(tmp_table_list));
+ tmp_table_list.reset();
tmp_table_list.table = *tables;
- query.length(0); // Have to zero it since constructor doesn't
result= show_create_table(thd, &tmp_table_list, &query,
create_info, WITH_DB_NAME);
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 09f8eb650dec20d0266f012b2898061c2e5aa410..df868d0321f3dd674ac91c6c7680f22cdcfa6b83 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -2127,7 +2127,7 @@ void st_select_lex::init_query()
n_child_sum_items= 0;
subquery_in_having= explicit_limit= 0;
is_item_list_lookup= 0;
- first_execution= 1;
+ changed_elements= 0;
first_natural_join_processing= 1;
first_cond_optimization= 1;
parsing_place= NO_MATTER;
@@ -3597,9 +3597,10 @@ void st_select_lex::fix_prepare_information(THD *thd, Item **conds,
Item **having_conds)
{
DBUG_ENTER("st_select_lex::fix_prepare_information");
- if (!thd->stmt_arena->is_conventional() && first_execution)
+ if (!thd->stmt_arena->is_conventional() &&
+ !(changed_elements & TOUCHED_SEL_COND))
{
- first_execution= 0;
+ changed_elements|= TOUCHED_SEL_COND;
if (group_list.first)
{
if (!group_list_ptrs)
@@ -3850,14 +3851,7 @@ bool st_select_lex::optimize_unflattened_subqueries(bool const_only)
bool st_select_lex::handle_derived(LEX *lex, uint phases)
{
- for (TABLE_LIST *cursor= (TABLE_LIST*) table_list.first;
- cursor;
- cursor= cursor->next_local)
- {
- if (cursor->is_view_or_derived() && cursor->handle_derived(lex, phases))
- return TRUE;
- }
- return FALSE;
+ return lex->handle_list_of_derived(table_list.first, phases);
}
@@ -4725,6 +4719,7 @@ bool LEX::is_partition_management() const
alter_info.flags == Alter_info::ALTER_REORGANIZE_PARTITION));
}
+
#ifdef MYSQL_SERVER
uint binlog_unsafe_map[256];
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index edc647522d3a31d7c096ac2b9911e0c2185ea15b..845e1242eb7439e39d87ca93708b41eb038d0781 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -543,7 +543,7 @@ class st_select_lex_node {
List
*hints= 0,
List *partition_names= 0,
LEX_STRING *option= 0);
- virtual void set_lock_for_tables(thr_lock_type lock_type) {}
+ virtual void set_lock_for_tables(thr_lock_type lock_type, bool for_update) {}
friend class st_select_lex_unit;
friend bool mysql_new_select(LEX *lex, bool move_down);
@@ -714,6 +714,10 @@ class st_select_lex_unit: public st_select_lex_node {
typedef class st_select_lex_unit SELECT_LEX_UNIT;
+
+#define TOUCHED_SEL_COND 1/* WHERE/HAVING/ON should be reinited before use */
+#define TOUCHED_SEL_DERIVED (1<<1)/* derived should be reinited before use */
+
/*
SELECT_LEX - store information of parsed SELECT statment
*/
@@ -875,7 +879,8 @@ class st_select_lex: public st_select_lex_node
subquery. Prepared statements work OK in that regard, as in
case of an error during prepare the PS is not created.
*/
- bool first_execution;
+ uint8 changed_elements; // see TOUCHED_SEL_*
+ /* TODO: add foloowing first_* to bitmap above */
bool first_natural_join_processing;
bool first_cond_optimization;
/* do not wrap view fields with Item_ref */
@@ -958,7 +963,7 @@ class st_select_lex: public st_select_lex_node
TABLE_LIST *convert_right_join();
List- * get_item_list();
ulong get_table_join_options();
- void set_lock_for_tables(thr_lock_type lock_type);
+ void set_lock_for_tables(thr_lock_type lock_type, bool for_update);
inline void init_order()
{
order_list.elements= 0;
@@ -2998,6 +3003,31 @@ struct LEX: public Query_tables_list
*/
bool tmp_table() const { return create_info.tmp_table(); }
bool if_exists() const { return create_info.if_exists(); }
+
+ /*
+ Run specified phases for derived tables/views in the given list
+
+ @param table_list - list of derived tables/view to handle
+ @param phase - phases to process tables/views through
+
+ @details
+ This method runs phases specified by the 'phases' on derived
+ tables/views found in the 'table_list' with help of the
+ TABLE_LIST::handle_derived function.
+ 'this' is passed as an argument to the TABLE_LIST::handle_derived.
+
+ @return false - ok
+ @return true - error
+ */
+ bool handle_list_of_derived(TABLE_LIST *table_list, uint phases)
+ {
+ for (TABLE_LIST *tl= table_list; tl; tl= tl->next_local)
+ {
+ if (tl->is_view_or_derived() && tl->handle_derived(this, phases))
+ return true;
+ }
+ return false;
+ }
};
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 45c5dc038fc9bd0eecbd1494778ff903387d5054..85ab43df0ec143dbf1a06edafc0a3931843cb0f3 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -68,15 +68,13 @@ class READ_INFO {
File file;
uchar *buffer, /* Buffer for read text */
*end_of_buff; /* Data in bufferts ends here */
- uint buff_length, /* Length of buffert */
- max_length; /* Max length of row */
+ uint buff_length; /* Length of buffert */
const uchar *field_term_ptr,*line_term_ptr;
const char *line_start_ptr,*line_start_end;
uint field_term_length,line_term_length,enclosed_length;
int field_term_char,line_term_char,enclosed_char,escape_char;
int *stack,*stack_pos;
bool found_end_of_line,start_of_line,eof;
- NET *io_net;
int level; /* for load xml */
@@ -293,8 +291,9 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if (open_and_lock_tables(thd, table_list, TRUE, 0))
DBUG_RETURN(TRUE);
- if (mysql_handle_single_derived(thd->lex, table_list, DT_MERGE_FOR_INSERT) ||
- mysql_handle_single_derived(thd->lex, table_list, DT_PREPARE))
+ if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT))
+ DBUG_RETURN(TRUE);
+ if (thd->lex->handle_list_of_derived(table_list, DT_PREPARE))
DBUG_RETURN(TRUE);
if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context,
&thd->lex->select_lex.top_join_list,
@@ -310,6 +309,11 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "LOAD");
DBUG_RETURN(TRUE);
}
+ if (table_list->is_multitable())
+ {
+ my_error(ER_WRONG_USAGE, MYF(0), "Multi-table VIEW", "LOAD");
+ DBUG_RETURN(TRUE);
+ }
if (table_list->prepare_where(thd, 0, TRUE) ||
table_list->prepare_check_option(thd))
{
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3f6ce8356ce52d6a069c919a99c5fd8bcd69c8a7..73b820cf87c6ca62c122ef42c211a1141dc0152e 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
- Copyright (c) 2008, 2018, MariaDB
+ Copyright (c) 2008, 2019, 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
@@ -309,10 +309,11 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_CREATE_TABLE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS |
CF_CAN_GENERATE_ROW_EVENTS;
- sql_command_flags[SQLCOM_CREATE_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS;
+ sql_command_flags[SQLCOM_CREATE_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS |
+ CF_REPORT_PROGRESS | CF_ADMIN_COMMAND;
sql_command_flags[SQLCOM_ALTER_TABLE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND |
CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS |
- CF_INSERTS_DATA;
+ CF_INSERTS_DATA | CF_ADMIN_COMMAND;
sql_command_flags[SQLCOM_TRUNCATE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND |
CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_DROP_TABLE]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
@@ -323,8 +324,10 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_DROP_DB]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_ALTER_DB_UPGRADE]= CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_ALTER_DB]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
- sql_command_flags[SQLCOM_RENAME_TABLE]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
- sql_command_flags[SQLCOM_DROP_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS;
+ sql_command_flags[SQLCOM_RENAME_TABLE]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS |
+ CF_ADMIN_COMMAND;
+ sql_command_flags[SQLCOM_DROP_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS |
+ CF_REPORT_PROGRESS | CF_ADMIN_COMMAND;
sql_command_flags[SQLCOM_CREATE_VIEW]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_DROP_VIEW]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS;
@@ -492,10 +495,14 @@ void init_update_queries(void)
The following admin table operations are allowed
on log tables.
*/
- sql_command_flags[SQLCOM_REPAIR]= CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS;
- sql_command_flags[SQLCOM_OPTIMIZE]|= CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS;
- sql_command_flags[SQLCOM_ANALYZE]= CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS;
- sql_command_flags[SQLCOM_CHECK]= CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS;
+ sql_command_flags[SQLCOM_REPAIR]= CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS |
+ CF_REPORT_PROGRESS | CF_ADMIN_COMMAND;
+ sql_command_flags[SQLCOM_OPTIMIZE]|= CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS |
+ CF_REPORT_PROGRESS | CF_ADMIN_COMMAND;
+ sql_command_flags[SQLCOM_ANALYZE]= CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS |
+ CF_REPORT_PROGRESS | CF_ADMIN_COMMAND;
+ sql_command_flags[SQLCOM_CHECK]= CF_WRITE_LOGS_COMMAND | CF_AUTO_COMMIT_TRANS |
+ CF_REPORT_PROGRESS | CF_ADMIN_COMMAND;
sql_command_flags[SQLCOM_CHECKSUM]= CF_REPORT_PROGRESS;
sql_command_flags[SQLCOM_CREATE_USER]|= CF_AUTO_COMMIT_TRANS;
@@ -1304,11 +1311,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
m_key);
thd->set_command(command);
- /*
- Commands which always take a long time are logged into
- the slow log only if opt_log_slow_admin_statements is set.
- */
- thd->enable_slow_log= thd->variables.sql_log_slow;
+ thd->enable_slow_log= true;
thd->query_plan_flags= QPLAN_INIT;
thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
thd->reset_kill_query();
@@ -1718,7 +1721,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
status_var_increment(thd->status_var.com_other);
- thd->enable_slow_log&= opt_log_slow_admin_statements;
thd->query_plan_flags|= QPLAN_ADMIN;
if (check_global_access(thd, REPL_SLAVE_ACL))
break;
@@ -1989,6 +1991,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
dec_thread_running();
thd->packet.shrink(thd->variables.net_buffer_length); // Reclaim some memory
thd->reset_kill_query(); /* Ensure that killed_errmsg is released */
+ /*
+ LEX::m_sql_cmd can point to Sql_cmd allocated on thd->mem_root.
+ Unlink it now, before freeing the root.
+ */
+ thd->lex->m_sql_cmd= NULL;
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
#if defined(ENABLED_PROFILING)
@@ -2029,21 +2036,44 @@ void log_slow_statement(THD *thd)
if (unlikely(thd->in_sub_stmt))
goto end; // Don't set time for sub stmt
+ /*
+ Skip both long_query_count increment and logging if the current
+ statement forces slow log suppression (e.g. an SP statement).
+
+ Note, we don't check for global_system_variables.sql_log_slow here.
+ According to the manual, the "Slow_queries" status variable does not require
+ sql_log_slow to be ON. So even if sql_log_slow is OFF, we still need to
+ continue and increment long_query_count (and skip only logging, see below):
+ */
+ if (!thd->enable_slow_log)
+ goto end; // E.g. SP statement
+
+ DBUG_EXECUTE_IF("simulate_slow_query", {
+ if (thd->get_command() == COM_QUERY ||
+ thd->get_command() == COM_STMT_EXECUTE)
+ thd->server_status|= SERVER_QUERY_WAS_SLOW;
+ });
- /* Follow the slow log filter configuration. */
- if (!thd->enable_slow_log || !global_system_variables.sql_log_slow ||
- (thd->variables.log_slow_filter
- && !(thd->variables.log_slow_filter & thd->query_plan_flags)))
- goto end;
-
if (((thd->server_status & SERVER_QUERY_WAS_SLOW) ||
((thd->server_status &
(SERVER_QUERY_NO_INDEX_USED | SERVER_QUERY_NO_GOOD_INDEX_USED)) &&
opt_log_queries_not_using_indexes &&
- !(sql_command_flags[thd->lex->sql_command] & CF_STATUS_COMMAND))) &&
+ !(thd->query_plan_flags & QPLAN_STATUS))) &&
thd->get_examined_row_count() >= thd->variables.min_examined_row_limit)
{
thd->status_var.long_query_count++;
+
+ /*
+ until opt_log_slow_admin_statements is removed, it
+ duplicates slow_log_filter=admin
+ */
+ if ((thd->query_plan_flags & QPLAN_ADMIN) &&
+ !opt_log_slow_admin_statements)
+ goto end;
+
+ if (!global_system_variables.sql_log_slow || !thd->variables.sql_log_slow)
+ goto end;
+
/*
If rate limiting of slow log writes is enabled, decide whether to log
this query to the log or not.
@@ -2052,6 +2082,14 @@ void log_slow_statement(THD *thd)
(global_query_id % thd->variables.log_slow_rate_limit) != 0)
goto end;
+ /*
+ Follow the slow log filter configuration:
+ skip logging if the current statement matches the filter.
+ */
+ if (thd->variables.log_slow_filter &&
+ !(thd->variables.log_slow_filter & thd->query_plan_flags))
+ goto end;
+
THD_STAGE_INFO(thd, stage_logging_slow_query);
slow_log_print(thd, thd->query(), thd->query_length(),
thd->utime_after_query);
@@ -2404,15 +2442,14 @@ static bool do_execute_sp(THD *thd, sp_head *sp)
my_error(ER_SP_BADSELECT, MYF(0), sp->m_qname.str);
return 1;
}
- /*
- If SERVER_MORE_RESULTS_EXISTS is not set,
- then remember that it should be cleared
- */
- bits_to_be_cleared= (~thd->server_status &
- SERVER_MORE_RESULTS_EXISTS);
- thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
}
-
+ /*
+ If SERVER_MORE_RESULTS_EXISTS is not set,
+ then remember that it should be cleared
+ */
+ bits_to_be_cleared= (~thd->server_status &
+ SERVER_MORE_RESULTS_EXISTS);
+ thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
ha_rows select_limit= thd->variables.select_limit;
thd->variables.select_limit= HA_POS_ERROR;
@@ -2592,9 +2629,6 @@ mysql_execute_command(THD *thd)
my_message(ER_SLAVE_IGNORED_TABLE, ER_THD(thd, ER_SLAVE_IGNORED_TABLE),
MYF(0));
}
-
- for (table=all_tables; table; table=table->next_global)
- table->updating= TRUE;
}
/*
@@ -2906,6 +2940,11 @@ mysql_execute_command(THD *thd)
goto error;
}
+ if (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND)
+ thd->query_plan_flags|= QPLAN_STATUS;
+ if (sql_command_flags[lex->sql_command] & CF_ADMIN_COMMAND)
+ thd->query_plan_flags|= QPLAN_ADMIN;
+
/* Start timeouts */
thd->set_query_timer();
@@ -2968,12 +3007,16 @@ mysql_execute_command(THD *thd)
case SQLCOM_SHOW_PROFILE:
case SQLCOM_SELECT:
{
-#ifdef WITH_WSREP
if (lex->sql_command == SQLCOM_SELECT)
- WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ)
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ);
else
- WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW)
-#endif /* WITH_WSREP */
+ {
+ WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
+#ifdef ENABLED_PROFILING
+ if (lex->sql_command == SQLCOM_SHOW_PROFILE)
+ thd->profiling.discard_current_query();
+#endif
+ }
thd->status_var.last_query_cost= 0.0;
@@ -3527,13 +3570,6 @@ mysql_execute_command(THD *thd)
if (check_one_table_access(thd, INDEX_ACL, all_tables))
goto error; /* purecov: inspected */
WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL)
- /*
- Currently CREATE INDEX or DROP INDEX cause a full table rebuild
- and thus classify as slow administrative statements just like
- ALTER TABLE.
- */
- thd->enable_slow_log&= opt_log_slow_admin_statements;
- thd->query_plan_flags|= QPLAN_ADMIN;
bzero((char*) &create_info, sizeof(create_info));
create_info.db_type= 0;
@@ -3696,49 +3732,6 @@ mysql_execute_command(THD *thd)
DBUG_PRINT("debug", ("lex->only_view: %d, table: %s.%s",
lex->only_view,
first_table->db, first_table->table_name));
- if (lex->only_view)
- {
- if (check_table_access(thd, SELECT_ACL, first_table, FALSE, 1, FALSE))
- {
- DBUG_PRINT("debug", ("check_table_access failed"));
- my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
- "SHOW", thd->security_ctx->priv_user,
- thd->security_ctx->host_or_ip, first_table->alias);
- goto error;
- }
- DBUG_PRINT("debug", ("check_table_access succeeded"));
-
- /* Ignore temporary tables if this is "SHOW CREATE VIEW" */
- first_table->open_type= OT_BASE_ONLY;
-
- }
- else
- {
- /*
- Temporary tables should be opened for SHOW CREATE TABLE, but not
- for SHOW CREATE VIEW.
- */
- if (open_temporary_tables(thd, all_tables))
- goto error;
-
- /*
- The fact that check_some_access() returned FALSE does not mean that
- access is granted. We need to check if first_table->grant.privilege
- contains any table-specific privilege.
- */
- DBUG_PRINT("debug", ("first_table->grant.privilege: %lx",
- first_table->grant.privilege));
- if (check_some_access(thd, SHOW_CREATE_TABLE_ACLS, first_table) ||
- (first_table->grant.privilege & SHOW_CREATE_TABLE_ACLS) == 0)
- {
- my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
- "SHOW", thd->security_ctx->priv_user,
- thd->security_ctx->host_or_ip, first_table->alias);
- goto error;
- }
- }
-
- /* Access is granted. Execute the command. */
res= mysqld_show_create(thd, first_table);
break;
#endif
@@ -3807,6 +3800,16 @@ mysql_execute_command(THD *thd)
else
res= 0;
+ /*
+ We can not use mysql_explain_union() because of parameters of
+ mysql_select in mysql_multi_update so just set the option if needed
+ */
+ if (thd->lex->describe)
+ {
+ select_lex->set_explain_type(FALSE);
+ select_lex->options|= SELECT_DESCRIBE;
+ }
+
res= mysql_multi_update_prepare(thd);
#ifdef HAVE_REPLICATION
@@ -4089,7 +4092,7 @@ mysql_execute_command(THD *thd)
case SQLCOM_DELETE:
{
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
- select_result *sel_result=lex->result;
+ select_result *sel_result= NULL;
DBUG_ASSERT(first_table == all_tables && first_table != 0);
if (WSREP_CLIENT(thd) &&
wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE))
@@ -4120,16 +4123,15 @@ mysql_execute_command(THD *thd)
}
else
{
- if (!(sel_result= lex->result) &&
- !(sel_result= new (thd->mem_root) select_send(thd)))
- return 1;
+ if (!lex->result && !(sel_result= new (thd->mem_root) select_send(thd)))
+ goto error;
}
}
res = mysql_delete(thd, all_tables,
select_lex->where, &select_lex->order_list,
unit->select_limit_cnt, select_lex->options,
- sel_result);
+ lex->result ? lex->result : sel_result);
if (replaced_protocol)
{
@@ -5691,7 +5693,6 @@ mysql_execute_command(THD *thd)
case SQLCOM_REPAIR:
case SQLCOM_TRUNCATE:
case SQLCOM_ALTER_TABLE:
- thd->query_plan_flags|= QPLAN_ADMIN;
DBUG_ASSERT(first_table == all_tables && first_table != 0);
/* fall through */
case SQLCOM_SIGNAL:
@@ -5931,8 +5932,8 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
Protocol *save_protocol= NULL;
if (lex->analyze_stmt)
{
- if (result && result->is_result_interceptor())
- ((select_result_interceptor*)result)->disable_my_ok_calls();
+ if (result && result->result_interceptor())
+ result->result_interceptor()->disable_my_ok_calls();
else
{
DBUG_ASSERT(thd->protocol);
@@ -6070,7 +6071,7 @@ static bool check_rename_table(THD *thd, TABLE_LIST *first_table,
0, 0))
return 1;
- /* check if these are refering to temporary tables */
+ /* check if these are referring to temporary tables */
table->table= find_temporary_table_for_rename(thd, first_table, table);
table->next_local->table= table->table;
@@ -6491,7 +6492,7 @@ static bool check_show_access(THD *thd, TABLE_LIST *table)
Check_grant will grant access if there is any column privileges on
all of the tables thanks to the fourth parameter (bool show_table).
*/
- if (check_grant(thd, SELECT_ACL, dst_table, TRUE, UINT_MAX, FALSE))
+ if (check_grant(thd, SELECT_ACL, dst_table, TRUE, 1, FALSE))
return TRUE; /* Access denied */
close_thread_tables(thd);
@@ -8008,9 +8009,8 @@ TABLE_LIST *st_select_lex::convert_right_join()
query
*/
-void st_select_lex::set_lock_for_tables(thr_lock_type lock_type)
+void st_select_lex::set_lock_for_tables(thr_lock_type lock_type, bool for_update)
{
- bool for_update= lock_type >= TL_READ_NO_INSERT;
DBUG_ENTER("set_lock_for_tables");
DBUG_PRINT("enter", ("lock_type: %d for_update: %d", lock_type,
for_update));
@@ -8958,7 +8958,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
goto err;
/* If it is a merge table, check privileges for merge children. */
- if (lex->create_info.merge_list.first)
+ if (lex->create_info.merge_list)
{
/*
The user must have (SELECT_ACL | UPDATE_ACL | DELETE_ACL) on the
@@ -8996,8 +8996,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
*/
if (check_table_access(thd, SELECT_ACL | UPDATE_ACL | DELETE_ACL,
- lex->create_info.merge_list.first,
- FALSE, UINT_MAX, FALSE))
+ lex->create_info.merge_list, FALSE, UINT_MAX, FALSE))
goto err;
}
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc
index 1ac9e748d4215070b584b372ba9e20d6f4db4e1b..d2fdee934ceaa62903b1edfb980489e3e8c77e81 100644
--- a/sql/sql_partition_admin.cc
+++ b/sql/sql_partition_admin.cc
@@ -89,7 +89,6 @@ bool Sql_cmd_alter_table_exchange_partition::execute(THD *thd)
/* Not allowed with EXCHANGE PARTITION */
DBUG_ASSERT(!create_info.data_file_name && !create_info.index_file_name);
- thd->enable_slow_log= opt_log_slow_admin_statements;
DBUG_RETURN(exchange_partition(thd, first_table, &alter_info));
}
diff --git a/sql/sql_plugin_services.ic b/sql/sql_plugin_services.ic
index 95301a5fbe8165874612a20896aa534e4b47c18d..427d8937c57653a44f7552e351fbacf9387df943 100644
--- a/sql/sql_plugin_services.ic
+++ b/sql/sql_plugin_services.ic
@@ -177,6 +177,7 @@ static struct wsrep_service_st wsrep_handler = {
wsrep_thd_ignore_table,
wsrep_thd_trx_seqno,
wsrep_thd_ws_handle,
+ wsrep_thd_auto_increment_variables,
wsrep_trx_is_aborting,
wsrep_trx_order_before,
wsrep_unlock_rollback,
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 92d2b1c68b0ab82b608d5edce617e71ad60ccf2e..9de2f7f34a58d02038f1131f57733ef1237acd0e 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1527,7 +1527,7 @@ static int mysql_test_select(Prepared_statement *stmt,
*/
if (unit->prepare(thd, 0, 0))
goto error;
- if (!lex->describe && !stmt->is_sql_prepare())
+ if (!lex->describe && !thd->lex->analyze_stmt && !stmt->is_sql_prepare())
{
/* Make copy of item list, as change_columns may change it */
List
- fields(lex->select_lex.item_list);
@@ -1883,9 +1883,20 @@ static int mysql_test_show_grants(Prepared_statement *stmt)
DBUG_ENTER("mysql_test_show_grants");
THD *thd= stmt->thd;
List
- fields;
+ char buff[1024];
+ const char *username= NULL, *hostname= NULL, *rolename= NULL;
- mysql_show_grants_get_fields(thd, &fields, "Grants for");
-
+ if (get_show_user(thd, thd->lex->grant_user, &username, &hostname, &rolename))
+ DBUG_RETURN(1);
+
+ if (username)
+ strxmov(buff,"Grants for ",username,"@",hostname, NullS);
+ else if (rolename)
+ strxmov(buff,"Grants for ",rolename, NullS);
+ else
+ DBUG_RETURN(1);
+
+ mysql_show_grants_get_fields(thd, &fields, buff);
DBUG_RETURN(send_stmt_metadata(thd, stmt, &fields));
}
#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
@@ -1909,7 +1920,7 @@ static int mysql_test_show_slave_status(Prepared_statement *stmt)
THD *thd= stmt->thd;
List
- fields;
- show_master_info_get_fields(thd, &fields, 0, 0);
+ show_master_info_get_fields(thd, &fields, thd->lex->verbose, 0);
DBUG_RETURN(send_stmt_metadata(thd, stmt, &fields));
}
@@ -2424,6 +2435,7 @@ static bool check_prepared_statement(Prepared_statement *stmt)
case SQLCOM_CREATE_INDEX:
case SQLCOM_DROP_INDEX:
case SQLCOM_ROLLBACK:
+ case SQLCOM_ROLLBACK_TO_SAVEPOINT:
case SQLCOM_TRUNCATE:
case SQLCOM_DROP_VIEW:
case SQLCOM_REPAIR:
@@ -2452,6 +2464,7 @@ static bool check_prepared_statement(Prepared_statement *stmt)
case SQLCOM_GRANT:
case SQLCOM_GRANT_ROLE:
case SQLCOM_REVOKE:
+ case SQLCOM_REVOKE_ALL:
case SQLCOM_REVOKE_ROLE:
case SQLCOM_KILL:
case SQLCOM_COMPOUND:
@@ -2475,8 +2488,26 @@ static bool check_prepared_statement(Prepared_statement *stmt)
break;
}
if (res == 0)
- DBUG_RETURN(stmt->is_sql_prepare() ?
- FALSE : (send_prep_stmt(stmt, 0) || thd->protocol->flush()));
+ {
+ if (!stmt->is_sql_prepare())
+ {
+ if (lex->describe || lex->analyze_stmt)
+ {
+ select_send result(thd);
+ List
- field_list;
+ res= thd->prepare_explain_fields(&result, &field_list,
+ lex->describe, lex->analyze_stmt) ||
+ send_prep_stmt(stmt, result.field_count(field_list)) ||
+ result.send_result_set_metadata(field_list,
+ Protocol::SEND_EOF);
+ }
+ else
+ res= send_prep_stmt(stmt, 0);
+ if (!res)
+ thd->protocol->flush();
+ }
+ DBUG_RETURN(FALSE);
+ }
error:
DBUG_RETURN(TRUE);
}
@@ -2794,7 +2825,7 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
}
for (; sl; sl= sl->next_select_in_list())
{
- if (!sl->first_execution)
+ if (sl->changed_elements & TOUCHED_SEL_COND)
{
/* remove option which was put by mysql_explain_union() */
sl->options&= ~SELECT_DESCRIBE;
@@ -2841,19 +2872,28 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
order->next= sl->group_list_ptrs->at(ix+1);
}
}
+ }
+ { // no harm to do it (item_ptr set on parsing)
+ ORDER *order;
for (order= sl->group_list.first; order; order= order->next)
+ {
order->item= &order->item_ptr;
+ }
/* Fix ORDER list */
for (order= sl->order_list.first; order; order= order->next)
- order->item= &order->item_ptr;
{
+ order->item= &order->item_ptr;
+ }
+ }
+ if (sl->changed_elements & TOUCHED_SEL_DERIVED)
+ {
#ifndef DBUG_OFF
- bool res=
+ bool res=
#endif
- sl->handle_derived(lex, DT_REINIT);
- DBUG_ASSERT(res == 0);
- }
+ sl->handle_derived(lex, DT_REINIT);
+ DBUG_ASSERT(res == 0);
}
+
{
SELECT_LEX_UNIT *unit= sl->master_unit();
unit->unclean();
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index e30060c8d3e7cf6436cfd004ab2c6ddeae11ee14..f54c66e1d9998c49fcc2842dbd93edc4c8eb5838 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -175,12 +175,6 @@
*/
#define OPTION_MASTER_SQL_ERROR (1ULL << 35)
-/*
- Dont report errors for individual rows,
- But just report error on commit (or read ofcourse)
- Note! Reserved for use in MySQL Cluster
-*/
-#define OPTION_ALLOW_BATCH (1ULL << 36) // THD, intern (slave)
#define OPTION_SKIP_REPLICATION (1ULL << 37) // THD, user
#define OPTION_RPL_SKIP_PARALLEL (1ULL << 38)
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 155e261ac3471fe777363c42f33f16f48590e5dd..eb9e0492dc7623ceae92109faf2b6e4ed89b2ded 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2329,7 +2329,7 @@ void JOIN::restore_tmp()
{
DBUG_PRINT("info", ("restore_tmp this %p tmp_join %p", this, tmp_join));
DBUG_ASSERT(tmp_join != this);
- memcpy(tmp_join, this, (size_t) sizeof(JOIN));
+ memcpy((void*)tmp_join, this, (size_t) sizeof(JOIN));
}
@@ -3610,7 +3610,7 @@ make_join_statistics(JOIN *join, List
&tables_list,
DBUG_RETURN(1);
/* The following should be optimized to only clear critical things */
- bzero(stat, sizeof(JOIN_TAB)* table_count);
+ bzero((void*)stat, sizeof(JOIN_TAB)* table_count);
/* Initialize POSITION objects */
for (i=0 ; i <= table_count ; i++)
(void) new ((char*) (join->positions + i)) POSITION;
@@ -8758,7 +8758,7 @@ get_best_combination(JOIN *join)
1. Put into main join order a JOIN_TAB that represents a lookup or scan
in the temptable.
*/
- bzero(j, sizeof(JOIN_TAB));
+ bzero((void*)j, sizeof(JOIN_TAB));
j->join= join;
j->table= NULL; //temporary way to tell SJM tables from others.
j->ref.key = -1;
@@ -9360,7 +9360,7 @@ JOIN::make_simple_join(JOIN *parent, TABLE *temp_table)
row_limit= unit->select_limit_cnt;
do_send_rows= row_limit ? 1 : 0;
- bzero(join_tab, sizeof(JOIN_TAB));
+ bzero((void*)join_tab, sizeof(JOIN_TAB));
join_tab->table=temp_table;
join_tab->set_select_cond(NULL, __LINE__);
join_tab->type= JT_ALL; /* Map through all records */
@@ -15644,7 +15644,7 @@ Item::remove_eq_conds(THD *thd, Item::cond_result *cond_value, bool top_level_ar
{
if (const_item() && !is_expensive())
{
- *cond_value= eval_const_cond(this) ? Item::COND_TRUE : Item::COND_FALSE;
+ *cond_value= eval_const_cond() ? Item::COND_TRUE : Item::COND_FALSE;
return (COND*) 0;
}
*cond_value= Item::COND_OK;
@@ -15658,7 +15658,7 @@ Item_bool_func2::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
{
if (const_item() && !is_expensive())
{
- *cond_value= eval_const_cond(this) ? Item::COND_TRUE : Item::COND_FALSE;
+ *cond_value= eval_const_cond() ? Item::COND_TRUE : Item::COND_FALSE;
return (COND*) 0;
}
if ((*cond_value= eq_cmp_result()) != Item::COND_OK)
@@ -16281,27 +16281,27 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
/* Fall through */
case Item::COND_ITEM:
+ case Item::SUBSELECT_ITEM:
+ case Item::REF_ITEM:
+ case Item::EXPR_CACHE_ITEM:
+ if (make_copy_field)
+ {
+ DBUG_ASSERT(((Item_result_field*)item)->result_field);
+ *from_field= ((Item_result_field*)item)->result_field;
+ }
+ /* Fall through */
case Item::FIELD_AVG_ITEM:
case Item::FIELD_STD_ITEM:
- case Item::SUBSELECT_ITEM:
- /* The following can only happen with 'CREATE TABLE ... SELECT' */
case Item::PROC_ITEM:
case Item::INT_ITEM:
case Item::REAL_ITEM:
case Item::DECIMAL_ITEM:
case Item::STRING_ITEM:
case Item::DATE_ITEM:
- case Item::REF_ITEM:
case Item::NULL_ITEM:
case Item::VARBIN_ITEM:
case Item::CACHE_ITEM:
- case Item::EXPR_CACHE_ITEM:
case Item::PARAM_ITEM:
- if (make_copy_field)
- {
- DBUG_ASSERT(((Item_result_field*)item)->result_field);
- *from_field= ((Item_result_field*)item)->result_field;
- }
return create_tmp_field_from_item(thd, item, table,
(make_copy_field ? 0 : copy_func),
modify_item);
@@ -17275,11 +17275,11 @@ TABLE *create_virtual_tmp_table(THD *thd, List &field_list)
NullS))
return 0;
- bzero(table, sizeof(*table));
- bzero(share, sizeof(*share));
+ table->reset();
table->field= field;
table->s= share;
table->temp_pool_slot= MY_BIT_NONE;
+ share->reset();
share->blob_field= blob_field;
share->fields= field_count;
setup_tmp_table_column_bitmaps(table, bitmaps);
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 8c55528e12040c981c7253fea3e81e681c823f1f..266fe7a70661197ada3a3544246d0fe2bb51ac07 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -199,7 +199,6 @@ class SJ_TMP_TABLE;
class JOIN_TAB_RANGE;
typedef struct st_join_table {
- st_join_table() {} /* Remove gcc warning */
TABLE *table;
KEYUSE *keyuse; /**< pointer to first used key */
KEY *hj_key; /**< descriptor of the used best hash join key
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 46030f96043f131a82bcc8a7001a69a42a567e7e..7f0c50a2e551c1adaf304c68c653f5d8dabca4d4 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1142,13 +1142,56 @@ mysqld_show_create_get_fields(THD *thd, TABLE_LIST *table_list,
List- *field_list, String *buffer)
{
bool error= TRUE;
+ LEX *lex= thd->lex;
MEM_ROOT *mem_root= thd->mem_root;
DBUG_ENTER("mysqld_show_create_get_fields");
DBUG_PRINT("enter",("db: %s table: %s",table_list->db,
table_list->table_name));
+ if (lex->only_view)
+ {
+ if (check_table_access(thd, SELECT_ACL, table_list, FALSE, 1, FALSE))
+ {
+ DBUG_PRINT("debug", ("check_table_access failed"));
+ my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
+ "SHOW", thd->security_ctx->priv_user,
+ thd->security_ctx->host_or_ip, table_list->alias);
+ goto exit;
+ }
+ DBUG_PRINT("debug", ("check_table_access succeeded"));
+
+ /* Ignore temporary tables if this is "SHOW CREATE VIEW" */
+ table_list->open_type= OT_BASE_ONLY;
+ }
+ else
+ {
+ /*
+ Temporary tables should be opened for SHOW CREATE TABLE, but not
+ for SHOW CREATE VIEW.
+ */
+ if (open_temporary_tables(thd, table_list))
+ goto exit;
+
+ /*
+ The fact that check_some_access() returned FALSE does not mean that
+ access is granted. We need to check if table_list->grant.privilege
+ contains any table-specific privilege.
+ */
+ DBUG_PRINT("debug", ("table_list->grant.privilege: %lx",
+ table_list->grant.privilege));
+ if (check_some_access(thd, SHOW_CREATE_TABLE_ACLS, table_list) ||
+ (table_list->grant.privilege & SHOW_CREATE_TABLE_ACLS) == 0)
+ {
+ my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
+ "SHOW", thd->security_ctx->priv_user,
+ thd->security_ctx->host_or_ip, table_list->alias);
+ goto exit;
+ }
+ }
+ /* Access is granted. Execute the command. */
+
/* We want to preserve the tree for views. */
- thd->lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VIEW;
+ lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VIEW;
{
/*
@@ -1163,14 +1206,14 @@ mysqld_show_create_get_fields(THD *thd, TABLE_LIST *table_list,
bool open_error=
open_tables(thd, &table_list, &counter,
MYSQL_OPEN_FORCE_SHARED_HIGH_PRIO_MDL) ||
- mysql_handle_derived(thd->lex, DT_PREPARE);
+ mysql_handle_derived(lex, DT_PREPARE);
thd->pop_internal_handler();
if (open_error && (thd->killed || thd->is_error()))
goto exit;
}
/* TODO: add environment variables show when it become possible */
- if (thd->lex->only_view && !table_list->view)
+ if (lex->only_view && !table_list->view)
{
my_error(ER_WRONG_OBJECT, MYF(0),
table_list->db, table_list->table_name, "VIEW");
@@ -4230,6 +4273,7 @@ fill_schema_table_by_open(THD *thd, bool is_show_fields_or_keys,
'only_view_structure()'.
*/
lex->sql_command= SQLCOM_SHOW_FIELDS;
+ thd->force_read_stats= get_schema_table_idx(schema_table) == SCH_STATISTICS;
result= (open_temporary_tables(thd, table_list) ||
open_normal_and_derived_tables(thd, table_list,
(MYSQL_OPEN_IGNORE_FLUSH |
@@ -4237,6 +4281,10 @@ fill_schema_table_by_open(THD *thd, bool is_show_fields_or_keys,
(can_deadlock ?
MYSQL_OPEN_FAIL_ON_MDL_CONFLICT : 0)),
DT_PREPARE | DT_CREATE));
+
+ (void) read_statistics_for_tables_if_needed(thd, table_list);
+ thd->force_read_stats= false;
+
/*
Restore old value of sql_command back as it is being looked at in
process_table() function.
@@ -6223,7 +6271,7 @@ static int get_schema_views_record(THD *thd, TABLE_LIST *tables,
{
TABLE_LIST table_list;
uint view_access;
- memset(&table_list, 0, sizeof(table_list));
+ table_list.reset();
table_list.db= tables->db;
table_list.table_name= tables->table_name;
table_list.grant.privilege= thd->col_access;
@@ -7901,8 +7949,6 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
table->alias_name_used= my_strcasecmp(table_alias_charset,
table_list->schema_table_name,
table_list->alias);
- table_list->table_name= table->s->table_name.str;
- table_list->table_name_length= table->s->table_name.length;
table_list->table= table;
table->next= thd->derived_tables;
thd->derived_tables= table;
diff --git a/sql/sql_signal.cc b/sql/sql_signal.cc
index 5f4862f173c44f5de01440f8f63aa609e70ef0d9..1b7edbee54a3082c49037e2dfafe93f5752a9e1c 100644
--- a/sql/sql_signal.cc
+++ b/sql/sql_signal.cc
@@ -63,20 +63,6 @@ const LEX_STRING Diag_condition_item_names[]=
{ C_STRING_WITH_LEN("TRIGGER_SCHEMA") }
};
-const LEX_STRING Diag_statement_item_names[]=
-{
- { C_STRING_WITH_LEN("NUMBER") },
- { C_STRING_WITH_LEN("MORE") },
- { C_STRING_WITH_LEN("COMMAND_FUNCTION") },
- { C_STRING_WITH_LEN("COMMAND_FUNCTION_CODE") },
- { C_STRING_WITH_LEN("DYNAMIC_FUNCTION") },
- { C_STRING_WITH_LEN("DYNAMIC_FUNCTION_CODE") },
- { C_STRING_WITH_LEN("ROW_COUNT") },
- { C_STRING_WITH_LEN("TRANSACTIONS_COMMITTED") },
- { C_STRING_WITH_LEN("TRANSACTIONS_ROLLED_BACK") },
- { C_STRING_WITH_LEN("TRANSACTION_ACTIVE") }
-};
-
Set_signal_information::Set_signal_information(
const Set_signal_information& set)
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index f4dcafdb7c33b741d86c5af3ced0e8f880a63f4b..061622a2cd62d582cc18b417f81dac07754aa157 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -2177,7 +2177,10 @@ inline bool statistics_for_command_is_needed(THD *thd)
{
if (thd->bootstrap || thd->variables.use_stat_tables == NEVER)
return FALSE;
-
+
+ if (thd->force_read_stats)
+ return TRUE;
+
switch(thd->lex->sql_command) {
case SQLCOM_SELECT:
case SQLCOM_INSERT:
@@ -4064,6 +4067,14 @@ bool is_stat_table(const char *db, const char *table)
bool is_eits_usable(Field *field)
{
+ Column_statistics* col_stats= field->read_stats;
+
+ // check if column_statistics was allocated for this field
+ if (!col_stats)
+ return false;
+
+ DBUG_ASSERT(field->table->stats_is_read);
+
/*
(1): checks if we have EITS statistics for a particular column
(2): Don't use EITS for GEOMETRY columns
@@ -4071,9 +4082,9 @@ bool is_eits_usable(Field *field)
partition list of a table. We assume the selecticivity for
such columns would be handled during partition pruning.
*/
- Column_statistics* col_stats= field->read_stats;
- return col_stats && !col_stats->no_stat_values_provided() && //(1)
- field->type() != MYSQL_TYPE_GEOMETRY && //(2)
+
+ return !col_stats->no_stat_values_provided() && //(1)
+ field->type() != MYSQL_TYPE_GEOMETRY && //(2)
#ifdef WITH_PARTITION_STORAGE_ENGINE
(!field->table->part_info ||
!field->table->part_info->field_in_partition_expr(field)) && //(3)
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index c22e33182c6ab9644e53d271004c89580eacc41b..8c69bea2487c9fbff14ae2143aff82e5b07b416a 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -909,6 +909,27 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length)
(void) from->realloc(from_length);
return from;
}
+ if (from->uses_buffer_owned_by(to))
+ {
+ DBUG_ASSERT(!from->alloced);
+ DBUG_ASSERT(to->alloced);
+ /*
+ "from" is a constant string pointing to a fragment of alloced string "to":
+ to= xxxFFFyyy
+ - FFF is the part of "to" pointed by "from"
+ - xxx is the part of "to" before "from"
+ - yyy is the part of "to" after "from"
+ */
+ uint32 xxx_length= (uint32) (from->ptr() - to->ptr());
+ uint32 yyy_length= (uint32) (to->end() - from->end());
+ DBUG_ASSERT(to->length() >= yyy_length);
+ to->length(to->length() - yyy_length); // Remove the "yyy" part
+ DBUG_ASSERT(to->length() >= xxx_length);
+ to->replace(0, xxx_length, "", 0); // Remove the "xxx" part
+ to->realloc(from_length);
+ to->str_charset= from->str_charset;
+ return to;
+ }
if (to->realloc(from_length))
return from; // Actually an error
if ((to->str_length=MY_MIN(from->str_length,from_length)))
diff --git a/sql/sql_string.h b/sql/sql_string.h
index b8979d397e662b53362d189eb62e84833f5d6dac..ba28dbeea26978d2f82dadfcd740a5c9ca29ae4b 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -649,11 +649,6 @@ class StringBuffer : public String
{
length(0);
}
- StringBuffer(const char *str, size_t length_arg, CHARSET_INFO *cs)
- : String(buff, buff_sz, cs)
- {
- set(str, length_arg, cs);
- }
};
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 55b77c8b934293ad15b1541c0e8bbffdd304a85e..57333e7dc3010b64e1cc1c4b2e9da4f06ec49930 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -9150,6 +9150,8 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
new_table->file->get_foreign_key_list(thd, &fk_list);
while ((fk= fk_list_it++))
{
+ MDL_request mdl_request;
+
if (lower_case_table_names)
{
char buf[NAME_LEN];
@@ -9161,20 +9163,14 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
len = my_casedn_str(files_charset_info, buf);
thd->make_lex_string(fk->referenced_table, buf, len);
}
- if (table_already_fk_prelocked(table_list, fk->referenced_db,
- fk->referenced_table, TL_READ_NO_INSERT))
- continue;
- TABLE_LIST *tl= (TABLE_LIST *) thd->alloc(sizeof(TABLE_LIST));
- tl->init_one_table_for_prelocking(fk->referenced_db->str, fk->referenced_db->length,
- fk->referenced_table->str, fk->referenced_table->length,
- NULL, TL_READ_NO_INSERT, false, NULL, 0,
- &thd->lex->query_tables_last);
+ mdl_request.init(MDL_key::TABLE,
+ fk->referenced_db->str, fk->referenced_table->str,
+ MDL_SHARED_NO_WRITE, MDL_TRANSACTION);
+ if (thd->mdl_context.acquire_lock(&mdl_request,
+ thd->variables.lock_wait_timeout))
+ goto err_new_table_cleanup;
}
-
- if (open_tables(thd, &table_list->next_global, &tables_opened, 0,
- &alter_prelocking_strategy))
- goto err_new_table_cleanup;
}
}
/*
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 14e1e84739b04a0705cbc32b08978c2b9ea9a2b4..f6dd48131bf1d0bbe9cb10972fe6c8c3582b2fab 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -1818,7 +1818,7 @@ bool Table_triggers_list::drop_all_triggers(THD *thd, char *db, char *name)
bool result= 0;
DBUG_ENTER("drop_all_triggers");
- bzero(&table, sizeof(table));
+ table.reset();
init_sql_alloc(&table.mem_root, 8192, 0, MYF(0));
if (Table_triggers_list::check_n_load(thd, db, name, &table, 1))
@@ -2038,7 +2038,7 @@ bool Table_triggers_list::change_table_name(THD *thd, const char *db,
LEX_STRING *err_trigname;
DBUG_ENTER("change_table_name");
- bzero(&table, sizeof(table));
+ table.reset();
init_sql_alloc(&table.mem_root, 8192, 0, MYF(0));
/*
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc
index 57cb6df55ca6ceb67515db85768cde5043d97d09..6252caf98b0c835cacac53da69a86ab570d08ec5 100644
--- a/sql/sql_truncate.cc
+++ b/sql/sql_truncate.cc
@@ -150,15 +150,11 @@ fk_truncate_illegal_if_parent(THD *thd, TABLE *table)
/* Loop over the set of foreign keys for which this table is a parent. */
while ((fk_info= it++))
{
- DBUG_ASSERT(!my_strcasecmp(system_charset_info,
- fk_info->referenced_db->str,
- table->s->db.str));
-
- DBUG_ASSERT(!my_strcasecmp(system_charset_info,
- fk_info->referenced_table->str,
- table->s->table_name.str));
-
- if (my_strcasecmp(system_charset_info, fk_info->foreign_db->str,
+ if (my_strcasecmp(system_charset_info, fk_info->referenced_db->str,
+ table->s->db.str) ||
+ my_strcasecmp(system_charset_info, fk_info->referenced_table->str,
+ table->s->table_name.str) ||
+ my_strcasecmp(system_charset_info, fk_info->foreign_db->str,
table->s->db.str) ||
my_strcasecmp(system_charset_info, fk_info->foreign_table->str,
table->s->table_name.str))
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index e12cae0f80e9830e3ddab3e8bdabcc163a2c3885..72926a26e13ef7daf24d913b727412cc028a0541 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -313,8 +313,9 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd_arg,
called at the first execution of the statement, while first_execution
shows whether this is called at the first execution of the union that
may form just a subselect.
- */
- if (!fake_select_lex->first_execution && first_execution)
+ */
+ if ((fake_select_lex->changed_elements & TOUCHED_SEL_COND) &&
+ first_execution)
{
for (ORDER *order= global_parameters()->order_list.first;
order;
@@ -660,16 +661,6 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
allocation in setup_ref_array().
*/
fake_select_lex->n_child_sum_items+= global_parameters()->n_sum_items;
-
- saved_error= fake_select_lex->join->
- prepare(&fake_select_lex->ref_pointer_array,
- fake_select_lex->table_list.first,
- 0, 0,
- global_parameters()->order_list.elements, // og_num
- global_parameters()->order_list.first, // order
- false, NULL, NULL, NULL,
- fake_select_lex, this);
- fake_select_lex->table_list.empty();
}
}
else
@@ -680,6 +671,27 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
*/
table->reset_item_list(&item_list);
}
+ if (fake_select_lex != NULL &&
+ (thd->stmt_arena->is_stmt_prepare() ||
+ (thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIEW)))
+ {
+ if (!fake_select_lex->join &&
+ !(fake_select_lex->join=
+ new JOIN(thd, item_list, thd->variables.option_bits, result)))
+ {
+ fake_select_lex->table_list.empty();
+ DBUG_RETURN(TRUE);
+ }
+ saved_error= fake_select_lex->join->
+ prepare(&fake_select_lex->ref_pointer_array,
+ fake_select_lex->table_list.first,
+ 0, 0,
+ global_parameters()->order_list.elements, // og_num
+ global_parameters()->order_list.first, // order
+ false, NULL, NULL, NULL,
+ fake_select_lex, this);
+ fake_select_lex->table_list.empty();
+ }
}
thd_arg->lex->current_select= lex_select_save;
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 960b5cbccc535802af68316beebe3f13a7d7a25a..721e1ed908c9fa152e16c659183d8b8fe43c3175 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -301,6 +301,8 @@ int mysql_update(THD *thd,
if (lock_tables(thd, table_list, table_count, 0))
DBUG_RETURN(1);
+ (void) read_statistics_for_tables_if_needed(thd, table_list);
+
if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT))
DBUG_RETURN(1);
if (table_list->handle_derived(thd->lex, DT_PREPARE))
@@ -1382,6 +1384,9 @@ int mysql_multi_update_prepare(THD *thd)
List
- *fields= &lex->select_lex.item_list;
table_map tables_for_update;
bool update_view= 0;
+ DML_prelocking_strategy prelocking_strategy;
+ bool has_prelocking_list= thd->lex->requires_prelocking();
+
/*
if this multi-update was converted from usual update, here is table
counter else junk will be assigned here, but then replaced with real
@@ -1402,10 +1407,10 @@ int mysql_multi_update_prepare(THD *thd)
keep prepare of multi-UPDATE compatible with concurrent LOCK TABLES WRITE
and global read lock.
*/
- if ((original_multiupdate &&
- open_tables(thd, &table_list, &table_count,
- (thd->stmt_arena->is_stmt_prepare() ?
- MYSQL_OPEN_FORCE_SHARED_MDL : 0))) ||
+ if ((original_multiupdate && open_tables(thd, &table_list, &table_count,
+ thd->stmt_arena->is_stmt_prepare()
+ ? MYSQL_OPEN_FORCE_SHARED_MDL : 0,
+ &prelocking_strategy)) ||
mysql_handle_derived(lex, DT_INIT))
DBUG_RETURN(TRUE);
/*
@@ -1452,6 +1457,9 @@ int mysql_multi_update_prepare(THD *thd)
if (unsafe_key_update(lex->select_lex.leaf_tables, tables_for_update))
DBUG_RETURN(true);
+ TABLE_LIST **new_tables= lex->query_tables_last;
+ DBUG_ASSERT(*new_tables== NULL);
+
/*
Setup timestamp handling and locking mode
*/
@@ -1477,6 +1485,11 @@ int mysql_multi_update_prepare(THD *thd)
If table will be updated we should not downgrade lock for it and
leave it as is.
*/
+ tl->updating= 1;
+ if (tl->belong_to_view)
+ tl->belong_to_view->updating= 1;
+ if (extend_table_list(thd, tl, &prelocking_strategy, has_prelocking_list))
+ DBUG_RETURN(TRUE);
}
else
{
@@ -1499,7 +1512,6 @@ int mysql_multi_update_prepare(THD *thd)
tl->lock_type= lock_type;
else
tl->set_lock_type(thd, lock_type);
- tl->updating= 0;
}
}
@@ -1508,6 +1520,20 @@ int mysql_multi_update_prepare(THD *thd)
Note that unlike in the above loop we need to iterate here not only
through all leaf tables but also through all view hierarchy.
*/
+
+ uint addon_table_count= 0;
+ if (*new_tables)
+ {
+ Sroutine_hash_entry **new_routines= thd->lex->sroutines_list.next;
+ DBUG_ASSERT(*new_routines == NULL);
+ if (open_tables(thd, thd->lex->create_info, new_tables,
+ &addon_table_count, new_routines,
+ thd->stmt_arena->is_stmt_prepare()
+ ? MYSQL_OPEN_FORCE_SHARED_MDL : 0,
+ &prelocking_strategy))
+ DBUG_RETURN(TRUE);
+ }
+
for (tl= table_list; tl; tl= tl->next_local)
{
bool not_used= false;
@@ -1536,10 +1562,11 @@ int mysql_multi_update_prepare(THD *thd)
/* now lock and fill tables */
if (!thd->stmt_arena->is_stmt_prepare() &&
- lock_tables(thd, table_list, table_count, 0))
+ lock_tables(thd, table_list, table_count + addon_table_count, 0))
{
DBUG_RETURN(TRUE);
}
+ (void) read_statistics_for_tables_if_needed(thd, table_list);
/* @todo: downgrade the metadata locks here. */
/*
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 9a9309a133bd17df5060b42f68835311dcc42b72..cef20ba08f9f2dd9637ebff8161d9abe9735ce0d 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -214,7 +214,8 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view)
LEX *lex= thd->lex;
TABLE_LIST decoy;
- memcpy (&decoy, view, sizeof (TABLE_LIST));
+ decoy= *view;
+ decoy.mdl_request.key.mdl_key_init(&view->mdl_request.key);
if (tdc_open_view(thd, &decoy, decoy.alias, OPEN_VIEW_NO_PARSE))
return TRUE;
@@ -330,12 +331,11 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
{
if (!tbl->table_in_first_from_clause)
{
- if (check_access(thd, SELECT_ACL, tbl->db,
- &tbl->grant.privilege,
- &tbl->grant.m_internal,
- 0, 0) ||
- check_grant(thd, SELECT_ACL, tbl, FALSE, 1, FALSE))
+ if (check_single_table_access(thd, SELECT_ACL, tbl, FALSE))
+ {
+ tbl->hide_view_error(thd);
goto err;
+ }
}
}
}
@@ -435,7 +435,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
*/
if (lex->current_select->lock_type != TL_READ_DEFAULT)
{
- lex->current_select->set_lock_for_tables(TL_READ_DEFAULT);
+ lex->current_select->set_lock_for_tables(TL_READ_DEFAULT, false);
view->mdl_request.set_type(MDL_EXCLUSIVE);
}
@@ -891,15 +891,8 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
View definition query is stored in the client character set.
*/
- char view_query_buff[4096];
- String view_query(view_query_buff,
- sizeof (view_query_buff),
- thd->charset());
-
- char is_query_buff[4096];
- String is_query(is_query_buff,
- sizeof (is_query_buff),
- system_charset_info);
+ StringBuffer<4096> view_query(thd->charset());
+ StringBuffer<4096> is_query(system_charset_info);
char md5[MD5_BUFF_LENGTH];
bool can_be_merged;
@@ -1535,6 +1528,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
{
tbl->lock_type= table->lock_type;
tbl->mdl_request.set_type(table->mdl_request.type);
+ tbl->updating= table->updating;
}
/*
If the view is mergeable, we might want to
@@ -2141,7 +2135,7 @@ mysql_rename_view(THD *thd,
view definition parsing or use temporary 'view_def'
object for it.
*/
- bzero(&view_def, sizeof(view_def));
+ view_def.reset();
view_def.timestamp.str= view_def.timestamp_buffer;
view_def.view_suid= TRUE;
diff --git a/sql/sql_yacc.cc b/sql/sql_yacc.cc
index c41e87be61db61c5828f55e2c3982574c559c012..6c54c78cd99f3acb4eda81684868760b105d5949 100644
--- a/sql/sql_yacc.cc
+++ b/sql/sql_yacc.cc
@@ -2972,92 +2972,92 @@ static const yytype_uint16 yyrline[] =
12834, 12836, 12837, 12841, 12857, 12858, 12862, 12861, 12871, 12872,
12876, 12876, 12880, 12879, 12885, 12889, 12890, 12894, 12895, 12903,
12902, 12913, 12917, 12921, 12934, 12933, 12948, 12949, 12950, 12953,
- 12954, 12955, 12956, 12964, 12968, 12977, 12983, 12995, 13006, 13016,
- 13027, 12994, 13035, 13036, 13040, 13041, 13045, 13046, 13054, 13058,
- 13059, 13060, 13063, 13065, 13069, 13070, 13074, 13079, 13086, 13091,
- 13098, 13100, 13104, 13105, 13109, 13114, 13122, 13123, 13126, 13128,
- 13136, 13137, 13141, 13142, 13143, 13147, 13149, 13154, 13155, 13164,
- 13165, 13169, 13170, 13174, 13187, 13211, 13223, 13230, 13249, 13257,
- 13262, 13275, 13284, 13300, 13317, 13318, 13319, 13327, 13328, 13329,
- 13330, 13344, 13350, 13356, 13362, 13368, 13374, 13392, 13402, 13412,
- 13418, 13427, 13439, 13445, 13451, 13467, 13468, 13472, 13481, 13496,
- 13500, 13543, 13547, 13564, 13568, 13640, 13664, 13694, 13695, 13705,
- 13712, 13716, 13722, 13728, 13738, 13744, 13753, 13763, 13764, 13792,
- 13806, 13820, 13835, 13836, 13846, 13847, 13857, 13858, 13859, 13863,
- 13876, 13906, 13916, 13916, 13918, 13928, 13929, 13930, 13931, 13932,
- 13933, 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942,
- 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952,
- 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962,
- 13963, 13964, 13965, 13966, 13967, 13968, 13969, 13970, 13971, 13972,
- 13973, 13974, 13975, 13976, 13977, 13978, 13979, 13980, 13981, 13982,
- 13983, 13984, 13985, 13986, 13987, 13988, 13998, 13999, 14000, 14001,
- 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011,
- 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021,
- 14022, 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031,
- 14032, 14033, 14034, 14035, 14036, 14037, 14038, 14039, 14040, 14041,
- 14042, 14043, 14044, 14045, 14046, 14047, 14052, 14053, 14054, 14055,
- 14056, 14057, 14058, 14059, 14060, 14061, 14062, 14063, 14064, 14065,
- 14066, 14067, 14068, 14069, 14070, 14071, 14072, 14073, 14074, 14075,
- 14076, 14077, 14078, 14079, 14080, 14081, 14082, 14083, 14084, 14085,
- 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095,
- 14096, 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105,
- 14106, 14107, 14108, 14109, 14110, 14111, 14112, 14113, 14114, 14115,
- 14116, 14117, 14118, 14119, 14120, 14121, 14122, 14123, 14124, 14125,
- 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135,
- 14136, 14137, 14138, 14139, 14140, 14141, 14142, 14143, 14144, 14145,
- 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155,
- 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165,
- 14166, 14167, 14168, 14169, 14170, 14171, 14172, 14173, 14174, 14175,
- 14176, 14177, 14178, 14179, 14180, 14181, 14182, 14183, 14184, 14185,
- 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195,
- 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, 14204, 14205,
- 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215,
- 14216, 14217, 14218, 14219, 14220, 14221, 14222, 14223, 14224, 14225,
- 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235,
- 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245,
- 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255,
- 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14263, 14264, 14265,
- 14266, 14267, 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275,
- 14276, 14277, 14278, 14279, 14280, 14281, 14282, 14283, 14284, 14285,
- 14286, 14287, 14288, 14289, 14290, 14291, 14292, 14293, 14294, 14295,
- 14296, 14297, 14298, 14299, 14300, 14301, 14302, 14303, 14304, 14305,
- 14306, 14307, 14308, 14309, 14310, 14322, 14321, 14334, 14342, 14333,
- 14359, 14360, 14365, 14364, 14371, 14370, 14380, 14379, 14390, 14389,
- 14395, 14403, 14405, 14410, 14410, 14419, 14418, 14432, 14431, 14436,
- 14440, 14441, 14442, 14446, 14447, 14448, 14449, 14453, 14454, 14455,
- 14456, 14461, 14485, 14511, 14522, 14539, 14553, 14568, 14587, 14604,
- 14616, 14624, 14640, 14666, 14703, 14717, 14718, 14719, 14720, 14724,
- 14742, 14760, 14761, 14765, 14766, 14767, 14768, 14772, 14786, 14790,
- 14791, 14792, 14802, 14803, 14804, 14810, 14816, 14828, 14827, 14840,
- 14841, 14845, 14846, 14850, 14865, 14866, 14867, 14872, 14873, 14878,
- 14877, 14894, 14903, 14913, 14912, 14943, 14944, 14948, 14949, 14953,
- 14954, 14955, 14956, 14958, 14957, 14970, 14971, 14972, 14973, 14974,
- 14980, 14985, 14991, 15002, 15013, 15017, 15024, 15033, 15035, 15040,
- 15045, 15052, 15064, 15076, 15083, 15095, 15096, 15099, 15100, 15103,
- 15108, 15116, 15126, 15145, 15148, 15150, 15154, 15155, 15162, 15164,
- 15168, 15169, 15174, 15173, 15177, 15176, 15180, 15179, 15183, 15182,
- 15185, 15186, 15187, 15188, 15189, 15190, 15191, 15192, 15193, 15194,
- 15195, 15196, 15197, 15198, 15199, 15200, 15201, 15202, 15203, 15204,
- 15205, 15206, 15207, 15208, 15209, 15210, 15214, 15215, 15219, 15220,
- 15224, 15231, 15238, 15248, 15259, 15268, 15277, 15289, 15294, 15302,
- 15307, 15315, 15320, 15327, 15327, 15328, 15328, 15331, 15338, 15343,
- 15349, 15355, 15361, 15365, 15369, 15370, 15374, 15402, 15404, 15408,
- 15412, 15416, 15423, 15424, 15428, 15429, 15433, 15434, 15438, 15439,
- 15445, 15451, 15457, 15463, 15473, 15472, 15482, 15491, 15492, 15496,
- 15497, 15502, 15503, 15504, 15509, 15510, 15511, 15515, 15516, 15520,
- 15532, 15541, 15551, 15560, 15574, 15575, 15580, 15579, 15595, 15596,
- 15600, 15601, 15605, 15605, 15626, 15627, 15631, 15632, 15633, 15637,
- 15642, 15650, 15653, 15651, 15666, 15673, 15694, 15720, 15722, 15726,
- 15727, 15731, 15732, 15740, 15741, 15742, 15743, 15749, 15755, 15765,
- 15767, 15769, 15774, 15775, 15776, 15777, 15778, 15782, 15783, 15784,
- 15785, 15786, 15787, 15797, 15798, 15803, 15816, 15832, 15834, 15836,
- 15842, 15843, 15845, 15851, 15850, 15869, 15870, 15874, 15880, 15889,
- 15889, 15913, 15914, 15919, 15920, 15922, 15924, 15938, 15947, 15953,
- 15958, 15935, 16008, 16009, 16013, 16033, 16054, 16058, 16064, 16070,
- 16029, 16129, 16141, 16150, 16154, 16128, 16171, 16175, 16179, 16183,
- 16187, 16191, 16198, 16205, 16212, 16222, 16223, 16227, 16228, 16229,
- 16233, 16234, 16239, 16241, 16240, 16246, 16247, 16251, 16258, 16268,
- 16274, 16285
+ 12954, 12955, 12956, 12964, 12968, 12977, 12983, 12995, 13007, 13017,
+ 13028, 12994, 13036, 13037, 13041, 13042, 13046, 13047, 13055, 13059,
+ 13060, 13061, 13064, 13066, 13070, 13071, 13075, 13080, 13087, 13092,
+ 13099, 13101, 13105, 13106, 13110, 13115, 13123, 13124, 13127, 13129,
+ 13137, 13138, 13142, 13143, 13144, 13148, 13150, 13155, 13156, 13165,
+ 13166, 13170, 13171, 13175, 13188, 13212, 13224, 13231, 13250, 13258,
+ 13263, 13276, 13285, 13301, 13318, 13319, 13320, 13328, 13329, 13330,
+ 13331, 13345, 13351, 13357, 13363, 13369, 13375, 13393, 13403, 13413,
+ 13419, 13428, 13440, 13446, 13452, 13468, 13469, 13473, 13482, 13497,
+ 13501, 13544, 13548, 13565, 13569, 13641, 13665, 13695, 13696, 13706,
+ 13713, 13717, 13723, 13729, 13739, 13745, 13754, 13764, 13765, 13793,
+ 13807, 13821, 13836, 13837, 13847, 13848, 13858, 13859, 13860, 13864,
+ 13877, 13907, 13917, 13917, 13919, 13929, 13930, 13931, 13932, 13933,
+ 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943,
+ 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953,
+ 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962, 13963,
+ 13964, 13965, 13966, 13967, 13968, 13969, 13970, 13971, 13972, 13973,
+ 13974, 13975, 13976, 13977, 13978, 13979, 13980, 13981, 13982, 13983,
+ 13984, 13985, 13986, 13987, 13988, 13989, 13999, 14000, 14001, 14002,
+ 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012,
+ 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022,
+ 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032,
+ 14033, 14034, 14035, 14036, 14037, 14038, 14039, 14040, 14041, 14042,
+ 14043, 14044, 14045, 14046, 14047, 14048, 14053, 14054, 14055, 14056,
+ 14057, 14058, 14059, 14060, 14061, 14062, 14063, 14064, 14065, 14066,
+ 14067, 14068, 14069, 14070, 14071, 14072, 14073, 14074, 14075, 14076,
+ 14077, 14078, 14079, 14080, 14081, 14082, 14083, 14084, 14085, 14086,
+ 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14096,
+ 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106,
+ 14107, 14108, 14109, 14110, 14111, 14112, 14113, 14114, 14115, 14116,
+ 14117, 14118, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126,
+ 14127, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136,
+ 14137, 14138, 14139, 14140, 14141, 14142, 14143, 14144, 14145, 14146,
+ 14147, 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156,
+ 14157, 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166,
+ 14167, 14168, 14169, 14170, 14171, 14172, 14173, 14174, 14175, 14176,
+ 14177, 14178, 14179, 14180, 14181, 14182, 14183, 14184, 14185, 14186,
+ 14187, 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196,
+ 14197, 14198, 14199, 14200, 14201, 14202, 14203, 14204, 14205, 14206,
+ 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216,
+ 14217, 14218, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226,
+ 14227, 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236,
+ 14237, 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246,
+ 14247, 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256,
+ 14257, 14258, 14259, 14260, 14261, 14262, 14263, 14264, 14265, 14266,
+ 14267, 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14276,
+ 14277, 14278, 14279, 14280, 14281, 14282, 14283, 14284, 14285, 14286,
+ 14287, 14288, 14289, 14290, 14291, 14292, 14293, 14294, 14295, 14296,
+ 14297, 14298, 14299, 14300, 14301, 14302, 14303, 14304, 14305, 14306,
+ 14307, 14308, 14309, 14310, 14311, 14323, 14322, 14335, 14343, 14334,
+ 14360, 14361, 14366, 14365, 14372, 14371, 14381, 14380, 14391, 14390,
+ 14396, 14404, 14406, 14411, 14411, 14420, 14419, 14433, 14432, 14437,
+ 14441, 14442, 14443, 14447, 14448, 14449, 14450, 14454, 14455, 14456,
+ 14457, 14462, 14486, 14512, 14523, 14540, 14554, 14569, 14588, 14605,
+ 14617, 14625, 14641, 14667, 14704, 14718, 14719, 14720, 14721, 14725,
+ 14743, 14761, 14762, 14766, 14767, 14768, 14769, 14773, 14787, 14791,
+ 14792, 14793, 14803, 14804, 14805, 14811, 14817, 14829, 14828, 14841,
+ 14842, 14846, 14847, 14851, 14869, 14870, 14871, 14876, 14877, 14882,
+ 14881, 14898, 14907, 14917, 14916, 14947, 14948, 14952, 14953, 14957,
+ 14958, 14959, 14960, 14962, 14961, 14974, 14975, 14976, 14977, 14978,
+ 14984, 14989, 14995, 15006, 15017, 15021, 15028, 15037, 15039, 15044,
+ 15049, 15056, 15068, 15080, 15087, 15099, 15100, 15103, 15104, 15107,
+ 15112, 15120, 15130, 15149, 15152, 15154, 15158, 15159, 15166, 15168,
+ 15172, 15173, 15178, 15177, 15181, 15180, 15184, 15183, 15187, 15186,
+ 15189, 15190, 15191, 15192, 15193, 15194, 15195, 15196, 15197, 15198,
+ 15199, 15200, 15201, 15202, 15203, 15204, 15205, 15206, 15207, 15208,
+ 15209, 15210, 15211, 15212, 15213, 15214, 15218, 15219, 15223, 15224,
+ 15228, 15235, 15242, 15252, 15263, 15272, 15281, 15293, 15298, 15306,
+ 15311, 15319, 15324, 15331, 15331, 15332, 15332, 15335, 15342, 15347,
+ 15353, 15359, 15365, 15369, 15373, 15374, 15378, 15406, 15408, 15412,
+ 15416, 15420, 15427, 15428, 15432, 15433, 15437, 15438, 15442, 15443,
+ 15449, 15455, 15461, 15467, 15477, 15476, 15486, 15495, 15496, 15500,
+ 15501, 15506, 15507, 15508, 15513, 15514, 15515, 15519, 15520, 15524,
+ 15536, 15545, 15555, 15564, 15578, 15579, 15584, 15583, 15599, 15600,
+ 15604, 15605, 15609, 15609, 15630, 15631, 15635, 15636, 15637, 15641,
+ 15646, 15654, 15657, 15655, 15670, 15677, 15698, 15724, 15726, 15730,
+ 15731, 15735, 15736, 15744, 15745, 15746, 15747, 15753, 15759, 15769,
+ 15771, 15773, 15778, 15779, 15780, 15781, 15782, 15786, 15787, 15788,
+ 15789, 15790, 15791, 15801, 15802, 15807, 15820, 15836, 15838, 15840,
+ 15846, 15847, 15849, 15855, 15854, 15873, 15874, 15878, 15884, 15893,
+ 15893, 15917, 15918, 15923, 15924, 15926, 15928, 15942, 15951, 15957,
+ 15962, 15939, 16012, 16013, 16017, 16037, 16058, 16062, 16068, 16074,
+ 16033, 16133, 16145, 16154, 16158, 16132, 16175, 16179, 16183, 16187,
+ 16191, 16195, 16202, 16209, 16216, 16226, 16227, 16231, 16232, 16233,
+ 16237, 16238, 16243, 16245, 16244, 16250, 16251, 16255, 16262, 16272,
+ 16278, 16289
};
#endif
@@ -24408,7 +24408,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
from the global list.
*/
LEX *lex=Lex;
- lex->create_info.merge_list= lex->select_lex.table_list;
+ lex->create_info.merge_list= lex->select_lex.table_list.first;
lex->select_lex.table_list= lex->save_list;
/*
When excluding union list from the global list we assume that
@@ -24417,7 +24417,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
*/
TABLE_LIST *last_non_sel_table= lex->create_last_non_select_table;
DBUG_ASSERT(last_non_sel_table->next_global ==
- lex->create_info.merge_list.first);
+ lex->create_info.merge_list);
last_non_sel_table->next_global= 0;
Lex->query_tables_last= &last_non_sel_table->next_global;
@@ -28532,7 +28532,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
{
LEX *lex=Lex;
lex->current_select->lock_type= TL_WRITE;
- lex->current_select->set_lock_for_tables(TL_WRITE);
+ lex->current_select->set_lock_for_tables(TL_WRITE, false);
lex->safe_to_cache_query=0;
}
#line 28539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
@@ -28544,7 +28544,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
LEX *lex=Lex;
lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS;
lex->current_select->
- set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS);
+ set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
lex->safe_to_cache_query=0;
}
#line 28551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
@@ -33368,7 +33368,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
case 1754:
#line 11783 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
- Select->set_lock_for_tables((yyvsp[-2].lock_type));
+ Select->set_lock_for_tables((yyvsp[-2].lock_type), true);
Lex->current_select= &Lex->select_lex;
}
#line 33375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
@@ -33394,7 +33394,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
case 1757:
#line 11800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
- Select->set_lock_for_tables((yyvsp[-1].lock_type));
+ Select->set_lock_for_tables((yyvsp[-1].lock_type), true);
Lex->current_select= &Lex->select_lex;
}
#line 33401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
@@ -33675,14 +33675,14 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
case 1802:
#line 11977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
- LEX *lex= Lex;
- if (lex->select_lex.table_list.elements > 1)
- lex->sql_command= SQLCOM_UPDATE_MULTI;
- else if (lex->select_lex.get_table_list()->derived)
+ SELECT_LEX *slex= &Lex->select_lex;
+ if (slex->table_list.elements > 1)
+ Lex->sql_command= SQLCOM_UPDATE_MULTI;
+ else if (slex->get_table_list()->derived)
{
/* it is single table update and it is update of derived table */
my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
- lex->select_lex.get_table_list()->alias, "UPDATE");
+ slex->get_table_list()->alias, "UPDATE");
MYSQL_YYABORT;
}
/*
@@ -33690,7 +33690,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
be too pessimistic. We will decrease lock level if possible in
mysql_multi_update().
*/
- Select->set_lock_for_tables((yyvsp[-4].lock_type));
+ slex->set_lock_for_tables((yyvsp[-4].lock_type), slex->table_list.elements == 1);
}
#line 33696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
@@ -35207,6 +35207,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
#line 12995 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
+ mysql_init_select(lex);
if (lex->sphead)
{
@@ -35215,11 +35216,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 35219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35220 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2018:
-#line 13006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_LOAD;
@@ -35229,11 +35230,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!(lex->exchange= new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str, 0, (yyvsp[-5].filetype))))
MYSQL_YYABORT;
}
-#line 35233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2019:
-#line 13016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
@@ -35244,53 +35245,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->value_list.empty();
lex->many_values.empty();
}
-#line 35248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2020:
-#line 13027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->exchange->cs= (yyvsp[0].charset); }
-#line 35254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2021:
-#line 13031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 35260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2022:
-#line 13035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.filetype)= FILETYPE_CSV; }
-#line 35266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2023:
-#line 13036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.filetype)= FILETYPE_XML; }
-#line 35272 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2024:
-#line 13040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)=0;}
-#line 35278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2025:
-#line 13041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)=1;}
-#line 35284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2026:
-#line 13045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
-#line 35290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2027:
-#line 13047 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
/*
Ignore this option in SP to avoid problem with query cache and
@@ -35298,182 +35299,182 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
*/
(yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
-#line 35302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2028:
-#line 13054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
-#line 35308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2029:
-#line 13058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->duplicates=DUP_ERROR; }
-#line 35314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2030:
-#line 13059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->duplicates=DUP_REPLACE; }
-#line 35320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2031:
-#line 13060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ignore= 1; }
-#line 35326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2036:
-#line 13075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->field_term= (yyvsp[0].string);
}
-#line 35335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2037:
-#line 13080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
DBUG_ASSERT(lex->exchange != 0);
lex->exchange->enclosed= (yyvsp[0].string);
lex->exchange->opt_enclosed= 1;
}
-#line 35346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2038:
-#line 13087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->enclosed= (yyvsp[0].string);
}
-#line 35355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2039:
-#line 13092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->escaped= (yyvsp[0].string);
}
-#line 35364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2044:
-#line 13110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->line_term= (yyvsp[0].string);
}
-#line 35373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2045:
-#line 13115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->line_start= (yyvsp[0].string);
}
-#line 35382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2046:
-#line 13122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ }
-#line 35388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2047:
-#line 13124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->exchange->line_term = (yyvsp[0].string); }
-#line 35394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2049:
-#line 13129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->skip_lines= atol((yyvsp[-1].lex_str).str);
}
-#line 35403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2050:
-#line 13136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ }
-#line 35409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2051:
-#line 13137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ }
-#line 35415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2052:
-#line 13141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 35421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2053:
-#line 13142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 35427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2054:
-#line 13143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 35433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2055:
-#line 13148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 35439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2056:
-#line 13150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 35445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2057:
-#line 13154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{(yyval.item)= (yyvsp[0].item);}
-#line 35451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2058:
-#line 13156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)= new (thd->mem_root) Item_user_var_as_out_param(thd, (yyvsp[0].lex_str));
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2059:
-#line 13164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 35467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2060:
-#line 13165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 35473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35474 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2063:
-#line 13175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->update_list.push_back((yyvsp[-4].item), thd->mem_root) ||
@@ -35481,11 +35482,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
(yyvsp[-1].item)->set_name_no_truncate((yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
}
-#line 35485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2064:
-#line 13188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX_STRING tmp;
CHARSET_INFO *cs_con= thd->variables.collation_connection;
@@ -35509,11 +35510,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2065:
-#line 13212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
uint repertoire= Lex->text_string_is_7bit ?
MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30;
@@ -35525,22 +35526,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2066:
-#line 13224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)= new (thd->mem_root) Item_string_with_introducer(thd, (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length, (yyvsp[-1].charset));
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2067:
-#line 13231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Item_string* item= (Item_string*) (yyvsp[-1].item);
item->append((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
@@ -35556,11 +35557,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
(yyvsp[0].lex_str).length);
}
}
-#line 35560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2068:
-#line 13250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.string)= new (thd->mem_root) String((yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length,
@@ -35568,17 +35569,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyval.string) == NULL)
MYSQL_YYABORT;
}
-#line 35572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2069:
-#line 13257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.string)= (yyvsp[0].string); }
-#line 35578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2070:
-#line 13263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Item *tmp= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length);
@@ -35591,11 +35592,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
tmp->quick_fix_field();
(yyval.string)= tmp->val_str((String*) 0);
}
-#line 35595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2071:
-#line 13276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Item *tmp= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length);
@@ -35604,11 +35605,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
tmp->quick_fix_field();
(yyval.string)= tmp->val_str((String*) 0);
}
-#line 35608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2072:
-#line 13285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Item *tmp= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length);
@@ -35621,11 +35622,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
tmp->quick_fix_field();
(yyval.string)= tmp->val_str((String*) 0);
}
-#line 35625 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35626 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2073:
-#line 13301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
Lex_input_stream *lip= YYLIP;
@@ -35639,50 +35640,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!((yyval.item_param)= item) || lex->param_list.push_back(item, thd->mem_root))
my_yyabort_error((ER_OUT_OF_RESOURCES, MYF(0)));
}
-#line 35643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2074:
-#line 13317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item) = (yyvsp[0].item); }
-#line 35649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2075:
-#line 13318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item) = (yyvsp[0].item_num); }
-#line 35655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35656 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2076:
-#line 13320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyvsp[0].item_num)->max_length++;
(yyval.item)= (yyvsp[0].item_num)->neg(thd);
}
-#line 35664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2077:
-#line 13327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item) = (yyvsp[0].item); }
-#line 35670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2078:
-#line 13328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item) = (yyvsp[0].item_num); }
-#line 35676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2079:
-#line 13329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item)= (yyvsp[0].item); }
-#line 35682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2080:
-#line 13331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
/*
For the digest computation, in this context only,
@@ -35696,61 +35697,61 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT;
}
-#line 35700 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2081:
-#line 13345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)= new (thd->mem_root) Item_int(thd, (char*) "FALSE",0,1);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2082:
-#line 13351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)= new (thd->mem_root) Item_int(thd, (char*) "TRUE",1,1);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2083:
-#line 13357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35730 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2084:
-#line 13363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2085:
-#line 13369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2086:
-#line 13375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Item_string_with_introducer *item_str;
/*
@@ -35765,11 +35766,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
(yyval.item)= item_str;
}
-#line 35769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2087:
-#line 13393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
int error;
(yyval.item_num)= new (thd->mem_root)
@@ -35779,11 +35780,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyval.item_num) == NULL)
MYSQL_YYABORT;
}
-#line 35783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2088:
-#line 13403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13404 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
int error;
(yyval.item_num)= new (thd->mem_root)
@@ -35793,21 +35794,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyval.item_num) == NULL)
MYSQL_YYABORT;
}
-#line 35797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35798 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2089:
-#line 13413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item_num)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if ((yyval.item_num) == NULL)
MYSQL_YYABORT;
}
-#line 35807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2090:
-#line 13419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item_num)= new (thd->mem_root) Item_decimal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length,
thd->charset());
@@ -35816,11 +35817,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 35820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2091:
-#line 13428 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item_num)= new (thd->mem_root) Item_float(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (((yyval.item_num) == NULL) || (thd->is_error()))
@@ -35828,53 +35829,53 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 35832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2092:
-#line 13440 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL,
MYSQL_TYPE_DATE, true)))
MYSQL_YYABORT;
}
-#line 35842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2093:
-#line 13446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL,
MYSQL_TYPE_TIME, true)))
MYSQL_YYABORT;
}
-#line 35852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2094:
-#line 13452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length, YYCSCL,
MYSQL_TYPE_DATETIME, true)))
MYSQL_YYABORT;
}
-#line 35862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2095:
-#line 13467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item)=(yyvsp[0].item); }
-#line 35868 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2096:
-#line 13468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item)=(yyvsp[0].item); }
-#line 35874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2097:
-#line 13473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
SELECT_LEX *sel= Select;
(yyval.item)= new (thd->mem_root) Item_field(thd, Lex->current_context(),
@@ -35883,11 +35884,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
sel->with_wild++;
}
-#line 35887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2098:
-#line 13482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
SELECT_LEX *sel= Select;
const char* schema= thd->client_capabilities & CLIENT_NO_SCHEMA ?
@@ -35899,17 +35900,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
sel->with_wild++;
}
-#line 35903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2099:
-#line 13496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item)=(yyvsp[0].item); }
-#line 35909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2100:
-#line 13501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
Lex_input_stream *lip= YYLIP;
@@ -35952,17 +35953,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 35956 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2101:
-#line 13543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13544 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item)= (yyvsp[0].item); }
-#line 35962 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2102:
-#line 13548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
SELECT_LEX *sel=Select;
if ((sel->parsing_place != IN_HAVING) ||
@@ -35979,17 +35980,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 35983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2103:
-#line 13564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item)= (yyvsp[0].item); }
-#line 35989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 35990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2104:
-#line 13569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13570 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
@@ -36061,11 +36062,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 36065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2105:
-#line 13641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
SELECT_LEX *sel= lex->current_select;
@@ -36089,11 +36090,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 36093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2106:
-#line 13665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
SELECT_LEX *sel= lex->current_select;
@@ -36120,17 +36121,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 36124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2107:
-#line 13694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13695 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 36130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2108:
-#line 13696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13697 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
TABLE_LIST *table= Select->table_list.first;
if (my_strcasecmp(table_alias_charset, (yyvsp[-4].lex_str).str, table->db))
@@ -36140,96 +36141,96 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].lex_str).str));
(yyval.lex_str)=(yyvsp[0].lex_str);
}
-#line 36144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2109:
-#line 13706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
TABLE_LIST *table= Select->table_list.first;
if (my_strcasecmp(table_alias_charset, (yyvsp[-2].lex_str).str, table->alias))
my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].lex_str).str));
(yyval.lex_str)=(yyvsp[0].lex_str);
}
-#line 36155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2110:
-#line 13712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 36161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2111:
-#line 13717 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.table)= new (thd->mem_root) Table_ident((yyvsp[0].lex_str));
if ((yyval.table) == NULL)
MYSQL_YYABORT;
}
-#line 36171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2112:
-#line 13723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.table)= new (thd->mem_root) Table_ident(thd, (yyvsp[-2].lex_str), (yyvsp[0].lex_str), 0);
if ((yyval.table) == NULL)
MYSQL_YYABORT;
}
-#line 36181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36182 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2113:
-#line 13729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13730 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
/* For Delphi */
(yyval.table)= new (thd->mem_root) Table_ident((yyvsp[0].lex_str));
if ((yyval.table) == NULL)
MYSQL_YYABORT;
}
-#line 36192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2114:
-#line 13739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.table)= new (thd->mem_root) Table_ident((yyvsp[-1].lex_str));
if ((yyval.table) == NULL)
MYSQL_YYABORT;
}
-#line 36202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2115:
-#line 13745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.table)= new (thd->mem_root) Table_ident(thd, (yyvsp[-3].lex_str), (yyvsp[-1].lex_str), 0);
if ((yyval.table) == NULL)
MYSQL_YYABORT;
}
-#line 36212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2116:
-#line 13754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX_STRING db={(char*) any_db,3};
(yyval.table)= new (thd->mem_root) Table_ident(thd, db, (yyvsp[0].lex_str), 0);
if ((yyval.table) == NULL)
MYSQL_YYABORT;
}
-#line 36223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2117:
-#line 13763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
-#line 36229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2118:
-#line 13765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (thd->charset_is_system_charset)
{
@@ -36254,11 +36255,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 36258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2119:
-#line 13793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13794 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (thd->charset_is_system_charset)
(yyval.lex_str)= (yyvsp[0].lex_str);
@@ -36269,11 +36270,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 36273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2120:
-#line 13807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (thd->charset_is_collation_connection)
(yyval.lex_str)= (yyvsp[0].lex_str);
@@ -36284,11 +36285,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 36288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2121:
-#line 13821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13822 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (thd->charset_is_character_set_filesystem)
(yyval.lex_str)= (yyvsp[0].lex_str);
@@ -36300,63 +36301,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 36304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2122:
-#line 13835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
-#line 36310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2123:
-#line 13837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_str).str= thd->strmake((yyvsp[0].symbol).str, (yyvsp[0].symbol).length);
if ((yyval.lex_str).str == NULL)
MYSQL_YYABORT;
(yyval.lex_str).length= (yyvsp[0].symbol).length;
}
-#line 36321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36322 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2124:
-#line 13846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
-#line 36327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36328 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2125:
-#line 13848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_str).str= thd->strmake((yyvsp[0].symbol).str, (yyvsp[0].symbol).length);
if ((yyval.lex_str).str == NULL)
MYSQL_YYABORT;
(yyval.lex_str).length= (yyvsp[0].symbol).length;
}
-#line 36338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2126:
-#line 13857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 36344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2127:
-#line 13858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 36350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2128:
-#line 13859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 36356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2129:
-#line 13864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
MYSQL_YYABORT;
@@ -36369,11 +36370,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
system_charset_info, 0))
MYSQL_YYABORT;
}
-#line 36373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2130:
-#line 13877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
MYSQL_YYABORT;
@@ -36403,11 +36404,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
(yyval.lex_user)->host= host_not_specified;
}
}
-#line 36407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2131:
-#line 13907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (!((yyval.lex_user)=(LEX_USER*)thd->calloc(sizeof(LEX_USER))))
MYSQL_YYABORT;
@@ -36415,2241 +36416,2241 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
(yyval.lex_user)->plugin= empty_lex_str;
(yyval.lex_user)->auth= empty_lex_str;
}
-#line 36419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2134:
-#line 13919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if ((yyvsp[0].lex_user)->user.str != current_user.str && (yyvsp[0].lex_user)->host.str == 0)
(yyvsp[0].lex_user)->host= host_not_specified;
(yyval.lex_user)= (yyvsp[0].lex_user);
}
-#line 36429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2135:
-#line 13928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2136:
-#line 13929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2137:
-#line 13930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2138:
-#line 13931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2139:
-#line 13932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2140:
-#line 13933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2141:
-#line 13934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2142:
-#line 13935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2143:
-#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2144:
-#line 13937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2145:
-#line 13938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2146:
-#line 13939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2147:
-#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2148:
-#line 13941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2149:
-#line 13942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2150:
-#line 13943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2151:
-#line 13944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36531 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2152:
-#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36537 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2153:
-#line 13946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2154:
-#line 13947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2155:
-#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2156:
-#line 13949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2157:
-#line 13950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2158:
-#line 13951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2159:
-#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2160:
-#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2161:
-#line 13954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36592 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2162:
-#line 13955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2163:
-#line 13956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2164:
-#line 13957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2165:
-#line 13958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2166:
-#line 13959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2167:
-#line 13960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2168:
-#line 13961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2169:
-#line 13962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2170:
-#line 13963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2171:
-#line 13964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2172:
-#line 13965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2173:
-#line 13966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2174:
-#line 13967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2175:
-#line 13968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2176:
-#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2177:
-#line 13970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36688 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2178:
-#line 13971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36694 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2179:
-#line 13972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36700 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2180:
-#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36706 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2181:
-#line 13974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36712 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2182:
-#line 13975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36718 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2183:
-#line 13976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36724 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2184:
-#line 13977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36730 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2185:
-#line 13978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36736 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2186:
-#line 13979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36742 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2187:
-#line 13980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36748 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2188:
-#line 13981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36754 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2189:
-#line 13982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13983 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36760 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2190:
-#line 13983 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36766 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2191:
-#line 13984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2192:
-#line 13985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2193:
-#line 13986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2194:
-#line 13987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2195:
-#line 13988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2196:
-#line 13998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 13999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2197:
-#line 13999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2198:
-#line 14000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2199:
-#line 14001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2200:
-#line 14002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2201:
-#line 14003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2202:
-#line 14004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2203:
-#line 14005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2204:
-#line 14006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2205:
-#line 14007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2206:
-#line 14008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2207:
-#line 14009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36868 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2208:
-#line 14010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2209:
-#line 14011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36880 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2210:
-#line 14012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2211:
-#line 14013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2212:
-#line 14014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2213:
-#line 14015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2214:
-#line 14016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2215:
-#line 14017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2216:
-#line 14018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2217:
-#line 14019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2218:
-#line 14020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2219:
-#line 14021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2220:
-#line 14022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2221:
-#line 14023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2222:
-#line 14024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2223:
-#line 14025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36963 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2224:
-#line 14026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2225:
-#line 14027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2226:
-#line 14028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2227:
-#line 14029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2228:
-#line 14030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 36994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2229:
-#line 14031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 36999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2230:
-#line 14032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37006 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2231:
-#line 14033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2232:
-#line 14034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2233:
-#line 14035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2234:
-#line 14036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2235:
-#line 14037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2236:
-#line 14038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2237:
-#line 14039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37048 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2238:
-#line 14040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2239:
-#line 14041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2240:
-#line 14042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2241:
-#line 14043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2242:
-#line 14044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2243:
-#line 14045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2244:
-#line 14046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14047 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2245:
-#line 14047 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2246:
-#line 14052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2247:
-#line 14053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2248:
-#line 14054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2249:
-#line 14055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2250:
-#line 14056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2251:
-#line 14057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2252:
-#line 14058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2253:
-#line 14059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2254:
-#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2255:
-#line 14061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2256:
-#line 14062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2257:
-#line 14063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2258:
-#line 14064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2259:
-#line 14065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2260:
-#line 14066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2261:
-#line 14067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2262:
-#line 14068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2263:
-#line 14069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2264:
-#line 14070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2265:
-#line 14071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2266:
-#line 14072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2267:
-#line 14073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2268:
-#line 14074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2269:
-#line 14075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2270:
-#line 14076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2271:
-#line 14077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2272:
-#line 14078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2273:
-#line 14079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2274:
-#line 14080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2275:
-#line 14081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2276:
-#line 14082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2277:
-#line 14083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2278:
-#line 14084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2279:
-#line 14085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2280:
-#line 14086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37306 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2281:
-#line 14087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2282:
-#line 14088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2283:
-#line 14089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2284:
-#line 14090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37330 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2285:
-#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2286:
-#line 14092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2287:
-#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37348 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2288:
-#line 14094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2289:
-#line 14095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2290:
-#line 14096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2291:
-#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2292:
-#line 14098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2293:
-#line 14099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2294:
-#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2295:
-#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2296:
-#line 14102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2297:
-#line 14103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2298:
-#line 14104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2299:
-#line 14105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2300:
-#line 14106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2301:
-#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2302:
-#line 14108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2303:
-#line 14109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2304:
-#line 14110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2305:
-#line 14111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2306:
-#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2307:
-#line 14113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2308:
-#line 14114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37474 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2309:
-#line 14115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2310:
-#line 14116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2311:
-#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2312:
-#line 14118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2313:
-#line 14119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37504 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2314:
-#line 14120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37510 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2315:
-#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37516 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2316:
-#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2317:
-#line 14123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2318:
-#line 14124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2319:
-#line 14125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2320:
-#line 14126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2321:
-#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2322:
-#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2323:
-#line 14129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37564 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2324:
-#line 14130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2325:
-#line 14131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2326:
-#line 14132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37582 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2327:
-#line 14133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2328:
-#line 14134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2329:
-#line 14135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37600 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2330:
-#line 14136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37606 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2331:
-#line 14137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2332:
-#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2333:
-#line 14139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2334:
-#line 14140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2335:
-#line 14141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2336:
-#line 14142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2337:
-#line 14143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2338:
-#line 14144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2339:
-#line 14145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2340:
-#line 14146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2341:
-#line 14147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2342:
-#line 14148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2343:
-#line 14149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2344:
-#line 14150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2345:
-#line 14151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2346:
-#line 14152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2347:
-#line 14153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2348:
-#line 14154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2349:
-#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2350:
-#line 14156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2351:
-#line 14157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2352:
-#line 14158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37738 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2353:
-#line 14159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37744 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2354:
-#line 14160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2355:
-#line 14161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2356:
-#line 14162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2357:
-#line 14163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2358:
-#line 14164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2359:
-#line 14165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2360:
-#line 14166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2361:
-#line 14167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37792 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2362:
-#line 14168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37798 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2363:
-#line 14169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2364:
-#line 14170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2365:
-#line 14171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37816 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2366:
-#line 14172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2367:
-#line 14173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37828 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2368:
-#line 14174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2369:
-#line 14175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37840 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2370:
-#line 14176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2371:
-#line 14177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2372:
-#line 14178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2373:
-#line 14179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2374:
-#line 14180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2375:
-#line 14181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2376:
-#line 14182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2377:
-#line 14183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2378:
-#line 14184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2379:
-#line 14185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37900 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2380:
-#line 14186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2381:
-#line 14187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2382:
-#line 14188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2383:
-#line 14189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2384:
-#line 14190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2385:
-#line 14191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2386:
-#line 14192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2387:
-#line 14193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2388:
-#line 14194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2389:
-#line 14195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2390:
-#line 14196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2391:
-#line 14197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2392:
-#line 14198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2393:
-#line 14199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2394:
-#line 14200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2395:
-#line 14201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 37995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 37996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2396:
-#line 14202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2397:
-#line 14203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2398:
-#line 14204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2399:
-#line 14205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2400:
-#line 14206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2401:
-#line 14207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2402:
-#line 14208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2403:
-#line 14209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2404:
-#line 14210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2405:
-#line 14211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2406:
-#line 14212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2407:
-#line 14213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2408:
-#line 14214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2409:
-#line 14215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2410:
-#line 14216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2411:
-#line 14217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2412:
-#line 14218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2413:
-#line 14219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2414:
-#line 14220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2415:
-#line 14221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2416:
-#line 14222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2417:
-#line 14223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2418:
-#line 14224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38134 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2419:
-#line 14225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2420:
-#line 14226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2421:
-#line 14227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2422:
-#line 14228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2423:
-#line 14229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2424:
-#line 14230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38170 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2425:
-#line 14231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38176 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2426:
-#line 14232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38182 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2427:
-#line 14233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2428:
-#line 14234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2429:
-#line 14235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2430:
-#line 14236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38206 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2431:
-#line 14237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2432:
-#line 14238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38218 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2433:
-#line 14239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2434:
-#line 14240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2435:
-#line 14241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2436:
-#line 14242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2437:
-#line 14243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2438:
-#line 14244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2439:
-#line 14245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2440:
-#line 14246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2441:
-#line 14247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38272 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2442:
-#line 14248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2443:
-#line 14249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2444:
-#line 14250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2445:
-#line 14251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2446:
-#line 14252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2447:
-#line 14253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38307 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2448:
-#line 14254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2449:
-#line 14255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2450:
-#line 14256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2451:
-#line 14257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2452:
-#line 14258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2453:
-#line 14259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2454:
-#line 14260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2455:
-#line 14261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14262 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2456:
-#line 14262 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2457:
-#line 14263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2458:
-#line 14264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2459:
-#line 14265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2460:
-#line 14266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2461:
-#line 14267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2462:
-#line 14268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2463:
-#line 14269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2464:
-#line 14270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2465:
-#line 14271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2466:
-#line 14272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2467:
-#line 14273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2468:
-#line 14274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2469:
-#line 14275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2470:
-#line 14276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2471:
-#line 14277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2472:
-#line 14278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38457 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2473:
-#line 14279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2474:
-#line 14280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38469 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2475:
-#line 14281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38475 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2476:
-#line 14282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2477:
-#line 14283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14284 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2478:
-#line 14284 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2479:
-#line 14285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2480:
-#line 14286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2481:
-#line 14287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2482:
-#line 14288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2483:
-#line 14289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2484:
-#line 14290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2485:
-#line 14291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2486:
-#line 14292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2487:
-#line 14293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2488:
-#line 14294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2489:
-#line 14295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2490:
-#line 14296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2491:
-#line 14297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2492:
-#line 14298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2493:
-#line 14299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2494:
-#line 14300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2495:
-#line 14301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2496:
-#line 14302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2497:
-#line 14303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2498:
-#line 14304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2499:
-#line 14305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38620 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2500:
-#line 14306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38625 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38626 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2501:
-#line 14307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14308 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38632 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2502:
-#line 14308 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38637 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38638 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2503:
-#line 14309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2504:
-#line 14310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2505:
-#line 14322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SET_OPTION;
@@ -38659,17 +38660,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->autocommit= 0;
sp_create_assignment_lex(thd, yychar == YYEMPTY);
}
-#line 38663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2506:
-#line 14332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2507:
-#line 14334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
mysql_init_select(lex);
@@ -38677,11 +38678,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_SET_OPTION;
lex->autocommit= 0;
}
-#line 38681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2508:
-#line 14342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14343 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->table_or_sp_used())
@@ -38689,177 +38690,177 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->stmt_var_list= lex->var_list;
lex->var_list.empty();
}
-#line 38693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38694 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2509:
-#line 14350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 38699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38700 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2512:
-#line 14365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (sp_create_assignment_instr(thd, yychar == YYEMPTY))
MYSQL_YYABORT;
}
-#line 38708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2514:
-#line 14371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->option_type= OPT_DEFAULT;
}
-#line 38716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2515:
-#line 14375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (sp_create_assignment_instr(thd, yychar == YYEMPTY))
MYSQL_YYABORT;
}
-#line 38725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2516:
-#line 14380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->option_type= (yyvsp[0].var_type);
}
-#line 38733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38734 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2518:
-#line 14390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (sp_create_assignment_instr(thd, yychar == YYEMPTY))
MYSQL_YYABORT;
}
-#line 38742 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2520:
-#line 14396 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (sp_create_assignment_instr(thd, yychar == YYEMPTY))
MYSQL_YYABORT;
}
-#line 38751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2523:
-#line 14410 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
sp_create_assignment_lex(thd, yychar == YYEMPTY);
}
-#line 38759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38760 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2524:
-#line 14414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (sp_create_assignment_instr(thd, yychar == YYEMPTY))
MYSQL_YYABORT;
}
-#line 38768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2525:
-#line 14419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
sp_create_assignment_lex(thd, yychar == YYEMPTY);
}
-#line 38776 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2526:
-#line 14423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (sp_create_assignment_instr(thd, yychar == YYEMPTY))
MYSQL_YYABORT;
}
-#line 38785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2527:
-#line 14432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->option_type= (yyvsp[0].var_type);
}
-#line 38793 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2530:
-#line 14440 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_GLOBAL; }
-#line 38799 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2531:
-#line 14441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_SESSION; }
-#line 38805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2532:
-#line 14442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_SESSION; }
-#line 38811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2533:
-#line 14446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_SESSION; }
-#line 38817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2534:
-#line 14447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14448 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_GLOBAL; }
-#line 38823 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2535:
-#line 14448 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_SESSION; }
-#line 38829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2536:
-#line 14449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14450 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_SESSION; }
-#line 38835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38836 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2537:
-#line 14453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14454 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_DEFAULT; }
-#line 38841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2538:
-#line 14454 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14455 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_GLOBAL; }
-#line 38847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2539:
-#line 14455 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_SESSION; }
-#line 38853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2540:
-#line 14456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.var_type)=OPT_SESSION; }
-#line 38859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2541:
-#line 14462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
@@ -38879,11 +38880,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 38883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2542:
-#line 14486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
@@ -38909,11 +38910,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 38913 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2543:
-#line 14512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Item_func_set_user_var *item;
item= new (thd->mem_root) Item_func_set_user_var(thd, (yyvsp[-2].lex_str), (yyvsp[0].item));
@@ -38924,11 +38925,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
Lex->var_list.push_back(var, thd->mem_root);
}
-#line 38928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2544:
-#line 14523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14524 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
struct sys_var_with_base tmp= (yyvsp[-2].variable);
if (tmp.var == trg_new_row_fake_var)
@@ -38945,11 +38946,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (set_system_variable(thd, &tmp, (yyvsp[-3].var_type), (yyvsp[0].item)))
MYSQL_YYABORT;
}
-#line 38949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2545:
-#line 14540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
CHARSET_INFO *cs2;
@@ -38963,11 +38964,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
lex->var_list.push_back(var, thd->mem_root);
}
-#line 38967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38968 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2546:
-#line 14554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
sp_pcontext *spc= lex->spcont;
@@ -38982,11 +38983,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
-#line 38986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 38987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2547:
-#line 14569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14570 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
CHARSET_INFO *cs2;
@@ -39005,11 +39006,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
lex->var_list.push_back(var, thd->mem_root);
}
-#line 39009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2548:
-#line 14588 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex = Lex;
LEX_USER *user;
@@ -39026,11 +39027,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (lex->sphead)
lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
}
-#line 39030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2549:
-#line 14605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex = Lex;
set_var_default_role *var= (new (thd->mem_root)
@@ -39042,11 +39043,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (lex->sphead)
lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
}
-#line 39046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2550:
-#line 14617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex = Lex;
set_var_role *var= new (thd->mem_root) set_var_role((yyvsp[0].lex_str));
@@ -39054,11 +39055,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
lex->var_list.push_back(var, thd->mem_root);
}
-#line 39058 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2551:
-#line 14625 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex = Lex;
set_var_password *var= (new (thd->mem_root)
@@ -39070,11 +39071,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (lex->sphead)
lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
}
-#line 39074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2552:
-#line 14641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
sp_pcontext *spc= thd->lex->spcont;
sp_variable *spv;
@@ -39100,11 +39101,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
(yyval.variable).base_name= (yyvsp[0].lex_str);
}
}
-#line 39104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2553:
-#line 14667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (check_reserved_words(&(yyvsp[-2].lex_str)))
@@ -39141,11 +39142,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
(yyval.variable).base_name= (yyvsp[-2].lex_str);
}
}
-#line 39145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2554:
-#line 14704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
sys_var *tmp=find_sys_var(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (!tmp)
@@ -39156,11 +39157,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
(yyval.variable).base_name.str= (char*) "default";
(yyval.variable).base_name.length= 7;
}
-#line 39160 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2559:
-#line 14725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].num));
@@ -39175,11 +39176,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
lex->var_list.push_back(var, thd->mem_root);
}
-#line 39179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2560:
-#line 14743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].tx_isolation));
@@ -39194,47 +39195,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
lex->var_list.push_back(var, thd->mem_root);
}
-#line 39198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2561:
-#line 14760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= true; }
-#line 39204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2562:
-#line 14761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= false; }
-#line 39210 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2563:
-#line 14765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; }
-#line 39216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2564:
-#line 14766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14767 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.tx_isolation)= ISO_READ_COMMITTED; }
-#line 39222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2565:
-#line 14767 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.tx_isolation)= ISO_REPEATABLE_READ; }
-#line 39228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2566:
-#line 14768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14769 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.tx_isolation)= ISO_SERIALIZABLE; }
-#line 39234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2567:
-#line 14773 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
sp_pcontext *spc= lex->spcont;
@@ -39248,82 +39249,82 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->definer->plugin= empty_lex_str;
lex->definer->auth= empty_lex_str;
}
-#line 39252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2568:
-#line 14786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->definer= (yyvsp[-1].lex_user); }
-#line 39258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2569:
-#line 14790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->definer->pwhash= (yyvsp[0].lex_str);}
-#line 39264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2570:
-#line 14791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->definer->pwtext= (yyvsp[-1].lex_str); }
-#line 39270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2571:
-#line 14793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14794 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->definer->pwtext= (yyvsp[-1].lex_str);
Lex->definer->pwhash.str= Item_func_password::alloc(thd,
(yyvsp[-1].lex_str).str, (yyvsp[-1].lex_str).length, Item_func_password::OLD);
Lex->definer->pwhash.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
}
-#line 39281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2572:
-#line 14802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item)=(yyvsp[0].item); }
-#line 39287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2573:
-#line 14803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.item)=0; }
-#line 39293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2574:
-#line 14805 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ON", 2);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 39303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2575:
-#line 14811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ALL", 3);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 39313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2576:
-#line 14817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.item)=new (thd->mem_root) Item_string_sys(thd, "binary", 6);
if ((yyval.item) == NULL)
MYSQL_YYABORT;
}
-#line 39323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2577:
-#line 14828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
@@ -39331,77 +39332,80 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "LOCK"));
lex->sql_command= SQLCOM_LOCK_TABLES;
}
-#line 39335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2578:
-#line 14836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2579:
-#line 14840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ }
-#line 39347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39348 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2580:
-#line 14841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ }
-#line 39353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2583:
-#line 14851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
thr_lock_type lock_type= (thr_lock_type) (yyvsp[0].num);
- bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE);
- if (!Select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[-1].lex_str_ptr), 0, lock_type,
- (lock_for_write ?
- lock_type == TL_WRITE_CONCURRENT_INSERT ?
- MDL_SHARED_WRITE :
- MDL_SHARED_NO_READ_WRITE :
- MDL_SHARED_READ)))
+ bool lock_for_write= lock_type >= TL_WRITE_ALLOW_WRITE;
+ ulong table_options= lock_for_write ? TL_OPTION_UPDATING : 0;
+ enum_mdl_type mdl_type= !lock_for_write
+ ? MDL_SHARED_READ
+ : lock_type == TL_WRITE_CONCURRENT_INSERT
+ ? MDL_SHARED_WRITE
+ : MDL_SHARED_NO_READ_WRITE;
+
+ if (!Select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[-1].lex_str_ptr), table_options,
+ lock_type, mdl_type))
MYSQL_YYABORT;
}
-#line 39369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2584:
-#line 14865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= TL_READ_NO_INSERT; }
-#line 39375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2585:
-#line 14866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= TL_WRITE_DEFAULT; }
-#line 39381 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2586:
-#line 14868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
-#line 39389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2587:
-#line 14872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= TL_WRITE_LOW_PRIORITY; }
-#line 39395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2588:
-#line 14873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= TL_READ; }
-#line 39401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2589:
-#line 14878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14882 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
@@ -39409,17 +39413,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "UNLOCK"));
lex->sql_command= SQLCOM_UNLOCK_TABLES;
}
-#line 39413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2590:
-#line 14886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2591:
-#line 14895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->sphead)
@@ -39428,11 +39432,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!lex->current_select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[0].lex_str_ptr), 0))
MYSQL_YYABORT;
}
-#line 39432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2592:
-#line 14904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->sphead)
@@ -39441,11 +39445,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0))
MYSQL_YYABORT;
}
-#line 39445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2593:
-#line 14913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (lex->sphead)
@@ -39462,11 +39466,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0))
MYSQL_YYABORT;
}
-#line 39466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2594:
-#line 14930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->expr_allows_subselect= TRUE;
/* Stored functions are not supported for HANDLER READ. */
@@ -39477,59 +39481,59 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
}
}
-#line 39481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2595:
-#line 14943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ident= null_lex_str; }
-#line 39487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2596:
-#line 14944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ident= (yyvsp[-1].lex_str); }
-#line 39493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2597:
-#line 14948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RFIRST; }
-#line 39499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2598:
-#line 14949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RNEXT; }
-#line 39505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2599:
-#line 14953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RFIRST; }
-#line 39511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2600:
-#line 14954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RNEXT; }
-#line 39517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2601:
-#line 14955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RPREV; }
-#line 39523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2602:
-#line 14956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->ha_read_mode = RLAST; }
-#line 39529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2603:
-#line 14958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->ha_read_mode = RKEY;
@@ -39537,63 +39541,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (!(lex->insert_list= new (thd->mem_root) List_item))
MYSQL_YYABORT;
}
-#line 39541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2604:
-#line 14966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39547 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2605:
-#line 14970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; }
-#line 39553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2606:
-#line 14971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
-#line 39559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2607:
-#line 14972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
-#line 39565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2608:
-#line 14973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; }
-#line 39571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2609:
-#line 14974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; }
-#line 39577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2610:
-#line 14981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2611:
-#line 14986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_REVOKE;
lex->type= 0;
}
-#line 39593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2612:
-#line 14992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 14996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->columns.elements)
@@ -39604,11 +39608,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_REVOKE;
lex->type= TYPE_ENUM_FUNCTION;
}
-#line 39608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2613:
-#line 15003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->columns.elements)
@@ -39619,68 +39623,68 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_REVOKE;
lex->type= TYPE_ENUM_PROCEDURE;
}
-#line 39623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2614:
-#line 15014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_REVOKE_ALL;
}
-#line 39631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2615:
-#line 15018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->users_list.push_front ((yyvsp[-2].lex_user));
lex->sql_command= SQLCOM_REVOKE;
lex->type= TYPE_ENUM_PROXY;
}
-#line 39642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2616:
-#line 15025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command= SQLCOM_REVOKE_ROLE;
if (Lex->users_list.push_front((yyvsp[-2].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 39652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39656 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2617:
-#line 15034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 39658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39662 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2618:
-#line 15036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 39664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2619:
-#line 15041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2620:
-#line 15047 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_GRANT;
lex->type= 0;
}
-#line 39680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2621:
-#line 15054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->columns.elements)
@@ -39691,11 +39695,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_GRANT;
lex->type= TYPE_ENUM_FUNCTION;
}
-#line 39695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2622:
-#line 15066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
if (lex->columns.elements)
@@ -39706,22 +39710,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_GRANT;
lex->type= TYPE_ENUM_PROCEDURE;
}
-#line 39710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2623:
-#line 15077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->users_list.push_front ((yyvsp[-3].lex_user));
lex->sql_command= SQLCOM_GRANT;
lex->type= TYPE_ENUM_PROXY;
}
-#line 39721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2624:
-#line 15084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_GRANT_ROLE;
@@ -39729,64 +39733,64 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (Lex->users_list.push_front((yyvsp[-3].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 39733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2625:
-#line 15095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->definer = 0; }
-#line 39739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2626:
-#line 15096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->definer = (yyvsp[0].lex_user); }
-#line 39745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2627:
-#line 15099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->with_admin_option= false; }
-#line 39751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2628:
-#line 15100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->with_admin_option= true; }
-#line 39757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2629:
-#line 15104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 39766 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2630:
-#line 15109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 39775 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2631:
-#line 15117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER))))
MYSQL_YYABORT;
(yyval.lex_user)->user= current_role;
(yyval.lex_user)->reset_auth();
}
-#line 39786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2632:
-#line 15127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
CHARSET_INFO *cs= system_charset_info;
/* trim end spaces (as they'll be lost in mysql.user anyway) */
@@ -39805,275 +39809,275 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
cs, 0))
MYSQL_YYABORT;
}
-#line 39809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2636:
-#line 15154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2637:
-#line 15156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->all_privileges= 1;
Lex->grant= GLOBAL_ACLS;
}
-#line 39824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39828 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2642:
-#line 15174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->which_columns = SELECT_ACL;}
-#line 39830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2643:
-#line 15175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39836 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39840 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2644:
-#line 15177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->which_columns = INSERT_ACL;}
-#line 39842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2645:
-#line 15178 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2646:
-#line 15180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->which_columns = UPDATE_ACL; }
-#line 39854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2647:
-#line 15181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2648:
-#line 15183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->which_columns = REFERENCES_ACL;}
-#line 39866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2649:
-#line 15184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39872 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2650:
-#line 15185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= DELETE_ACL;}
-#line 39878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2651:
-#line 15186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 39884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2652:
-#line 15187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= INDEX_ACL;}
-#line 39890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2653:
-#line 15188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= ALTER_ACL;}
-#line 39896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39900 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2654:
-#line 15189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_ACL;}
-#line 39902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2655:
-#line 15190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= DROP_ACL;}
-#line 39908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2656:
-#line 15191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= EXECUTE_ACL;}
-#line 39914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2657:
-#line 15192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= RELOAD_ACL;}
-#line 39920 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2658:
-#line 15193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= SHUTDOWN_ACL;}
-#line 39926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2659:
-#line 15194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= PROCESS_ACL;}
-#line 39932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2660:
-#line 15195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= FILE_ACL;}
-#line 39938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2661:
-#line 15196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= GRANT_ACL;}
-#line 39944 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2662:
-#line 15197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= SHOW_DB_ACL;}
-#line 39950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2663:
-#line 15198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= SUPER_ACL;}
-#line 39956 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2664:
-#line 15199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_TMP_ACL;}
-#line 39962 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2665:
-#line 15200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= LOCK_TABLES_ACL; }
-#line 39968 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2666:
-#line 15201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= REPL_SLAVE_ACL; }
-#line 39974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2667:
-#line 15202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= REPL_CLIENT_ACL; }
-#line 39980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2668:
-#line 15203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_VIEW_ACL; }
-#line 39986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2669:
-#line 15204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= SHOW_VIEW_ACL; }
-#line 39992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 39996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2670:
-#line 15205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_PROC_ACL; }
-#line 39998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2671:
-#line 15206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= ALTER_PROC_ACL; }
-#line 40004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2672:
-#line 15207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_USER_ACL; }
-#line 40010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2673:
-#line 15208 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= EVENT_ACL;}
-#line 40016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2674:
-#line 15209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= TRIGGER_ACL; }
-#line 40022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2675:
-#line 15210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= CREATE_TABLESPACE_ACL; }
-#line 40028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2676:
-#line 15214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2677:
-#line 15215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2680:
-#line 15225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (lex->x509_subject)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT"));
lex->x509_subject=(yyvsp[0].lex_str).str;
}
-#line 40051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2681:
-#line 15232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (lex->x509_issuer)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER"));
lex->x509_issuer=(yyvsp[0].lex_str).str;
}
-#line 40062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2682:
-#line 15239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (lex->ssl_cipher)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER"));
lex->ssl_cipher=(yyvsp[0].lex_str).str;
}
-#line 40073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2683:
-#line 15249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
size_t dummy;
@@ -40084,11 +40088,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
else if (lex->columns.elements)
my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
}
-#line 40088 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2684:
-#line 15260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->current_select->db = (yyvsp[-2].lex_str).str;
@@ -40097,11 +40101,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
else if (lex->columns.elements)
my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
}
-#line 40101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2685:
-#line 15269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->current_select->db = NULL;
@@ -40110,11 +40114,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
else if (lex->columns.elements)
my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
}
-#line 40114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2686:
-#line 15278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (!lex->current_select->add_table_to_list(thd, (yyvsp[0].table),NULL,
@@ -40123,120 +40127,120 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (lex->grant == GLOBAL_ACLS)
lex->grant = TABLE_ACLS & ~GRANT_ACL;
}
-#line 40127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2687:
-#line 15290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 40136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2688:
-#line 15295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 40145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2689:
-#line 15303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 40154 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2690:
-#line 15308 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 40163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2691:
-#line 15316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 40172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40176 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2692:
-#line 15321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root))
MYSQL_YYABORT;
}
-#line 40181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2697:
-#line 15332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_user)= (yyvsp[-3].lex_user);
(yyvsp[-3].lex_user)->pwtext= (yyvsp[0].lex_str);
if (Lex->sql_command == SQLCOM_REVOKE)
MYSQL_YYABORT;
}
-#line 40192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2698:
-#line 15339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15343 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_user)= (yyvsp[-4].lex_user);
(yyvsp[-4].lex_user)->pwhash= (yyvsp[0].lex_str);
}
-#line 40201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2699:
-#line 15344 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_user)= (yyvsp[-3].lex_user);
(yyvsp[-3].lex_user)->plugin= (yyvsp[0].lex_str);
(yyvsp[-3].lex_user)->auth= empty_lex_str;
}
-#line 40211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2700:
-#line 15350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.lex_user)= (yyvsp[-5].lex_user);
(yyvsp[-5].lex_user)->plugin= (yyvsp[-2].lex_str);
(yyvsp[-5].lex_user)->auth= (yyvsp[0].lex_str);
}
-#line 40221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2701:
-#line 15356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 40227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2702:
-#line 15361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->grant |= lex->which_columns;
}
-#line 40236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2706:
-#line 15375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
String *new_str= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,(yyvsp[0].lex_str).length,system_charset_info);
if (new_str == NULL)
@@ -40262,227 +40266,227 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->columns.push_back(col, thd->mem_root);
}
}
-#line 40266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2708:
-#line 15405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->ssl_type=SSL_TYPE_SPECIFIED;
}
-#line 40274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2709:
-#line 15409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->ssl_type=SSL_TYPE_ANY;
}
-#line 40282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40286 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2710:
-#line 15413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->ssl_type=SSL_TYPE_X509;
}
-#line 40290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2711:
-#line 15417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15421 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->ssl_type=SSL_TYPE_NONE;
}
-#line 40298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2712:
-#line 15423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2714:
-#line 15428 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2715:
-#line 15429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= GRANT_ACL;}
-#line 40316 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2716:
-#line 15433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40322 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2717:
-#line 15434 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40328 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2718:
-#line 15438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->grant |= GRANT_ACL;}
-#line 40334 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2719:
-#line 15440 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.questions=(yyvsp[0].ulong_num);
lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
}
-#line 40344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40348 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2720:
-#line 15446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15450 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.updates=(yyvsp[0].ulong_num);
lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
}
-#line 40354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2721:
-#line 15452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.conn_per_hour= (yyvsp[0].ulong_num);
lex->mqh.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
}
-#line 40364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2722:
-#line 15458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.user_conn= (yyvsp[0].num);
lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
}
-#line 40374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2723:
-#line 15464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->mqh.max_statement_time= (yyvsp[0].item_num)->val_real();
lex->mqh.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME;
}
-#line 40384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2724:
-#line 15473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_BEGIN;
lex->start_transaction_opt= 0;
}
-#line 40394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2725:
-#line 15478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2726:
-#line 15483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command= SQLCOM_COMPOUND;
Lex->sphead->set_stmt_end(thd);
Lex->sphead->restore_thd_mem_root(thd);
}
-#line 40410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2727:
-#line 15491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15495 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= 0; }
-#line 40416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2728:
-#line 15492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= 1; }
-#line 40422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2729:
-#line 15496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2730:
-#line 15497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2731:
-#line 15502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
-#line 40440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2732:
-#line 15503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_NO; }
-#line 40446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2733:
-#line 15504 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_YES; }
-#line 40452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2734:
-#line 15509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
-#line 40458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2735:
-#line 15510 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_YES; }
-#line 40464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2736:
-#line 15511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.m_yes_no_unk)= TVL_NO; }
-#line 40470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40474 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2737:
-#line 15515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2738:
-#line 15516 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2739:
-#line 15521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15525 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_COMMIT;
@@ -40491,11 +40495,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
lex->tx_release= (yyvsp[0].m_yes_no_unk);
}
-#line 40495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2740:
-#line 15533 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK;
@@ -40504,56 +40508,56 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
lex->tx_release= (yyvsp[0].m_yes_no_unk);
}
-#line 40508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2741:
-#line 15543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
lex->ident= (yyvsp[0].lex_str);
}
-#line 40518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2742:
-#line 15552 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SAVEPOINT;
lex->ident= (yyvsp[0].lex_str);
}
-#line 40528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2743:
-#line 15561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
lex->ident= (yyvsp[0].lex_str);
}
-#line 40538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2744:
-#line 15574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15578 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2746:
-#line 15580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15584 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), TRUE))
MYSQL_YYABORT;
}
-#line 40553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2747:
-#line 15585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
/*
Remove from the name resolution context stack the context of the
@@ -40561,29 +40565,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
*/
Lex->pop_context();
}
-#line 40565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2749:
-#line 15596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= 1; }
-#line 40571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2750:
-#line 15600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= 0; }
-#line 40577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2751:
-#line 15601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)= 1; }
-#line 40583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2752:
-#line 15605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15609 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
@@ -40597,80 +40601,80 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
thd->where= "global ORDER clause";
}
-#line 40601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2753:
-#line 15619 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15623 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
thd->lex->current_select->no_table_names_allowed= 0;
thd->where= "";
}
-#line 40610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2756:
-#line 15631 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)=1; }
-#line 40616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40620 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2757:
-#line 15632 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)=1; }
-#line 40622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40626 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2758:
-#line 15633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ (yyval.num)=0; }
-#line 40628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40632 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2759:
-#line 15639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15643 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.select_lex)= Lex->current_select->master_unit()->first_select();
}
-#line 40636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2760:
-#line 15644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15648 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.select_lex)= Lex->current_select->master_unit()->first_select();
}
-#line 40644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2762:
-#line 15653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15657 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (add_select_to_union_list(Lex, (bool)(yyvsp[0].num), FALSE))
MYSQL_YYABORT;
}
-#line 40653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2763:
-#line 15658 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->pop_context();
(yyval.select_lex)= (yyvsp[-4].select_lex);
}
-#line 40662 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40666 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2764:
-#line 15667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
(yyval.select_lex)= (yyvsp[-1].select_lex);
}
-#line 40670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2765:
-#line 15673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
if (!lex->expr_allows_subselect ||
@@ -40689,11 +40693,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if (mysql_new_select(Lex, 1))
MYSQL_YYABORT;
}
-#line 40693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2766:
-#line 15694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex=Lex;
@@ -40718,17 +40722,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
temp->select_n_having_items;
}
}
-#line 40722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2771:
-#line 15731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_STRAIGHT_JOIN; }
-#line 40728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2772:
-#line 15733 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (check_simple_select())
MYSQL_YYABORT;
@@ -40736,73 +40740,73 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
YYPS->m_mdl_type= MDL_SHARED_READ;
Select->options|= SELECT_HIGH_PRIORITY;
}
-#line 40740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40744 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2773:
-#line 15740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_DISTINCT; }
-#line 40746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2774:
-#line 15741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_SMALL_RESULT; }
-#line 40752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2775:
-#line 15742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_BIG_RESULT; }
-#line 40758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2776:
-#line 15744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (check_simple_select())
MYSQL_YYABORT;
Select->options|= OPTION_BUFFER_RESULT;
}
-#line 40768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2777:
-#line 15750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (check_simple_select())
MYSQL_YYABORT;
Select->options|= OPTION_FOUND_ROWS;
}
-#line 40778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2778:
-#line 15755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Select->options|= SELECT_ALL; }
-#line 40784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2779:
-#line 15766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2780:
-#line 15768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2781:
-#line 15770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2795:
-#line 15803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
/*
We have to distinguish missing DEFINER-clause from case when
@@ -40813,58 +40817,58 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
*/
thd->lex->definer= 0;
}
-#line 40817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2796:
-#line 15817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->definer= (yyvsp[0].lex_user);
Lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
Lex->ssl_cipher= Lex->x509_subject= Lex->x509_issuer= 0;
bzero(&(Lex->mqh), sizeof(Lex->mqh));
}
-#line 40828 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2797:
-#line 15833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_algorithm= DTYPE_ALGORITHM_UNDEFINED; }
-#line 40834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2798:
-#line 15835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_algorithm= VIEW_ALGORITHM_MERGE; }
-#line 40840 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2799:
-#line 15837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_algorithm= VIEW_ALGORITHM_TMPTABLE; }
-#line 40846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2800:
-#line 15842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_suid= VIEW_SUID_DEFAULT; }
-#line 40852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2801:
-#line 15844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_suid= VIEW_SUID_DEFINER; }
-#line 40858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2802:
-#line 15846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_suid= VIEW_SUID_INVOKER; }
-#line 40864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40868 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2803:
-#line 15851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
if (lex->add_create_options_with_check((yyvsp[-1].object_ddl_options)))
@@ -40878,37 +40882,37 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
}
-#line 40882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2805:
-#line 15869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 40888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2807:
-#line 15875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->view_list.push_back((LEX_STRING*)
thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)),
thd->mem_root);
}
-#line 40898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2808:
-#line 15881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->view_list.push_back((LEX_STRING*)
thd->memdup(&(yyvsp[0].lex_str), sizeof(LEX_STRING)),
thd->mem_root);
}
-#line 40908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2809:
-#line 15889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->parsing_options.allows_variable= FALSE;
@@ -40917,11 +40921,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->parsing_options.allows_derived= FALSE;
lex->create_view_select.str= (char *) YYLIP->get_cpp_ptr();
}
-#line 40921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40925 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2810:
-#line 15898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str;
@@ -40934,60 +40938,60 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->parsing_options.allows_select_procedure= TRUE;
lex->parsing_options.allows_derived= TRUE;
}
-#line 40938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2813:
-#line 15919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_check= VIEW_CHECK_NONE; }
-#line 40944 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2814:
-#line 15921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_check= VIEW_CHECK_CASCADED; }
-#line 40950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2815:
-#line 15923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_check= VIEW_CHECK_CASCADED; }
-#line 40956 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2816:
-#line 15925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->create_view_check= VIEW_CHECK_LOCAL; }
-#line 40962 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2817:
-#line 15938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->add_create_options_with_check((yyvsp[0].object_ddl_options)))
MYSQL_YYABORT;
}
-#line 40971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2818:
-#line 15947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $10 */
Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
}
-#line 40979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2819:
-#line 15953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $14 */
Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
}
-#line 40987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 40991 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2820:
-#line 15958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $17 */
LEX *lex= thd->lex;
Lex_input_stream *lip= YYLIP;
@@ -41005,11 +41009,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sphead->set_body_start(thd, lip->get_cpp_ptr());
}
-#line 41009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2821:
-#line 15976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 15980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $19 */
LEX *lex= Lex;
sp_head *sp= lex->sphead;
@@ -41033,23 +41037,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MDL_SHARED_NO_WRITE))
MYSQL_YYABORT;
}
-#line 41037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2822:
-#line 16008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ thd->lex->udf.type= UDFTYPE_AGGREGATE; }
-#line 41043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2823:
-#line 16009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ thd->lex->udf.type= UDFTYPE_FUNCTION; }
-#line 41049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2824:
-#line 16015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
if (lex->add_create_options_with_check((yyvsp[-5].object_ddl_options)))
@@ -41061,11 +41065,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->udf.returns= (Item_result) (yyvsp[-2].num);
lex->udf.dl= (yyvsp[0].lex_str).str;
}
-#line 41065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2825:
-#line 16033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $5 */
LEX *lex= Lex;
Lex_input_stream *lip= YYLIP;
@@ -41085,50 +41089,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
tmp_param_begin++;
lex->sphead->m_param_begin= tmp_param_begin;
}
-#line 41089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2826:
-#line 16054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $8 */
Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
}
-#line 41097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2827:
-#line 16058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $10 */
LEX *lex= Lex;
lex->init_last_field(&lex->sphead->m_return_field_def, NULL,
thd->variables.collation_database);
}
-#line 41107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2828:
-#line 16064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $12 */
if (Lex->sphead->fill_field_definition(thd, Lex, (yyvsp[0].field_type),
Lex->last_field))
MYSQL_YYABORT;
}
-#line 41117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2829:
-#line 16070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ /* $14 */
LEX *lex= thd->lex;
Lex_input_stream *lip= YYLIP;
lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
}
-#line 41128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2830:
-#line 16077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= thd->lex;
sp_head *sp= lex->sphead;
@@ -41177,11 +41181,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
}
sp->restore_thd_mem_root(thd);
}
-#line 41181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2831:
-#line 16129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
if (Lex->add_create_options_with_check((yyvsp[-1].object_ddl_options)))
MYSQL_YYABORT;
@@ -41193,11 +41197,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
MYSQL_YYABORT;
Lex->spname= (yyvsp[0].spname);
}
-#line 41197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2832:
-#line 16141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
const char* tmp_param_begin;
@@ -41205,27 +41209,27 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
tmp_param_begin++;
Lex->sphead->m_param_begin= tmp_param_begin;
}
-#line 41209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2833:
-#line 16150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
}
-#line 41217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2834:
-#line 16154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
-#line 41225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2835:
-#line 16158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
@@ -41234,209 +41238,209 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
lex->sql_command= SQLCOM_CREATE_PROCEDURE;
sp->restore_thd_mem_root(thd);
}
-#line 41238 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2836:
-#line 16172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_START;
}
-#line 41246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41250 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2837:
-#line 16176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_END;
}
-#line 41254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2838:
-#line 16180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_PREPARE;
}
-#line 41262 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2839:
-#line 16184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_COMMIT;
}
-#line 41270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2840:
-#line 16188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_ROLLBACK;
}
-#line 41278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2841:
-#line 16192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
Lex->sql_command = SQLCOM_XA_RECOVER;
}
-#line 41286 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2842:
-#line 16199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE);
if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
MYSQL_YYABORT;
Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0);
}
-#line 41297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2843:
-#line 16206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE);
if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
MYSQL_YYABORT;
Lex->xid->set(1L, (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length(), (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length());
}
-#line 41308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2844:
-#line 16213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE && (yyvsp[-2].string)->length() <= MAXBQUALSIZE);
if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID))))
MYSQL_YYABORT;
Lex->xid->set((yyvsp[0].ulong_num), (yyvsp[-4].string)->ptr(), (yyvsp[-4].string)->length(), (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length());
}
-#line 41319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2845:
-#line 16222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 41325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2846:
-#line 16223 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 41331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2847:
-#line 16227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_NONE; }
-#line 41337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2848:
-#line 16228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_JOIN; }
-#line 41343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2849:
-#line 16229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_RESUME; }
-#line 41349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2850:
-#line 16233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_NONE; }
-#line 41355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2851:
-#line 16234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_ONE_PHASE; }
-#line 41361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2852:
-#line 16239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_NONE; }
-#line 41367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2853:
-#line 16241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_SUSPEND; }
-#line 41373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2855:
-#line 16246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{}
-#line 41379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2856:
-#line 16247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{ Lex->xa_opt=XA_FOR_MIGRATE; }
-#line 41385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2857:
-#line 16252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_INSTALL_PLUGIN;
lex->comment= (yyvsp[-2].lex_str);
lex->ident= (yyvsp[0].lex_str);
}
-#line 41396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2858:
-#line 16259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_INSTALL_PLUGIN;
lex->comment= null_lex_str;
lex->ident= (yyvsp[0].lex_str);
}
-#line 41407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2859:
-#line 16269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
lex->comment= (yyvsp[0].lex_str);
}
-#line 41417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2860:
-#line 16275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
lex->comment= null_lex_str;
lex->ident= (yyvsp[0].lex_str);
}
-#line 41428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
case 2861:
-#line 16286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
+#line 16290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646 */
{
YYERROR;
}
-#line 41436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
break;
-#line 41440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
+#line 41444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index f98a7b7e47468741690f50972dc1f61d1a74ff90..ca30bc202cf088ad7c34b9ac7113d1bedd24a8ad 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -5671,7 +5671,7 @@ create_table_option:
from the global list.
*/
LEX *lex=Lex;
- lex->create_info.merge_list= lex->select_lex.table_list;
+ lex->create_info.merge_list= lex->select_lex.table_list.first;
lex->select_lex.table_list= lex->save_list;
/*
When excluding union list from the global list we assume that
@@ -5680,7 +5680,7 @@ create_table_option:
*/
TABLE_LIST *last_non_sel_table= lex->create_last_non_select_table;
DBUG_ASSERT(last_non_sel_table->next_global ==
- lex->create_info.merge_list.first);
+ lex->create_info.merge_list);
last_non_sel_table->next_global= 0;
Lex->query_tables_last= &last_non_sel_table->next_global;
@@ -8399,7 +8399,7 @@ opt_select_lock_type:
{
LEX *lex=Lex;
lex->current_select->lock_type= TL_WRITE;
- lex->current_select->set_lock_for_tables(TL_WRITE);
+ lex->current_select->set_lock_for_tables(TL_WRITE, false);
lex->safe_to_cache_query=0;
}
| LOCK_SYM IN_SYM SHARE_SYM MODE_SYM
@@ -8407,7 +8407,7 @@ opt_select_lock_type:
LEX *lex=Lex;
lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS;
lex->current_select->
- set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS);
+ set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
lex->safe_to_cache_query=0;
}
;
@@ -11781,7 +11781,7 @@ insert:
insert_lock_option
opt_ignore insert2
{
- Select->set_lock_for_tables($3);
+ Select->set_lock_for_tables($3, true);
Lex->current_select= &Lex->select_lex;
}
insert_field_spec opt_insert_update
@@ -11798,7 +11798,7 @@ replace:
}
replace_lock_option insert2
{
- Select->set_lock_for_tables($3);
+ Select->set_lock_for_tables($3, true);
Lex->current_select= &Lex->select_lex;
}
insert_field_spec
@@ -11975,14 +11975,14 @@ update:
opt_low_priority opt_ignore join_table_list
SET update_list
{
- LEX *lex= Lex;
- if (lex->select_lex.table_list.elements > 1)
- lex->sql_command= SQLCOM_UPDATE_MULTI;
- else if (lex->select_lex.get_table_list()->derived)
+ SELECT_LEX *slex= &Lex->select_lex;
+ if (slex->table_list.elements > 1)
+ Lex->sql_command= SQLCOM_UPDATE_MULTI;
+ else if (slex->get_table_list()->derived)
{
/* it is single table update and it is update of derived table */
my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
- lex->select_lex.get_table_list()->alias, "UPDATE");
+ slex->get_table_list()->alias, "UPDATE");
MYSQL_YYABORT;
}
/*
@@ -11990,7 +11990,7 @@ update:
be too pessimistic. We will decrease lock level if possible in
mysql_multi_update().
*/
- Select->set_lock_for_tables($3);
+ slex->set_lock_for_tables($3, slex->table_list.elements == 1);
}
opt_where_clause opt_order_clause delete_limit_clause {}
;
@@ -12994,6 +12994,7 @@ load:
LOAD data_or_xml
{
LEX *lex= thd->lex;
+ mysql_init_select(lex);
if (lex->sphead)
{
@@ -14850,13 +14851,16 @@ table_lock:
table_ident opt_table_alias lock_option
{
thr_lock_type lock_type= (thr_lock_type) $3;
- bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE);
- if (!Select->add_table_to_list(thd, $1, $2, 0, lock_type,
- (lock_for_write ?
- lock_type == TL_WRITE_CONCURRENT_INSERT ?
- MDL_SHARED_WRITE :
- MDL_SHARED_NO_READ_WRITE :
- MDL_SHARED_READ)))
+ bool lock_for_write= lock_type >= TL_WRITE_ALLOW_WRITE;
+ ulong table_options= lock_for_write ? TL_OPTION_UPDATING : 0;
+ enum_mdl_type mdl_type= !lock_for_write
+ ? MDL_SHARED_READ
+ : lock_type == TL_WRITE_CONCURRENT_INSERT
+ ? MDL_SHARED_WRITE
+ : MDL_SHARED_NO_READ_WRITE;
+
+ if (!Select->add_table_to_list(thd, $1, $2, table_options,
+ lock_type, mdl_type))
MYSQL_YYABORT;
}
;
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index d1db14d7b359c5540e6e14d546d59198e241e432..223015e81c24dc39a897d5b54eaab873cc2a7e9e 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -345,13 +345,56 @@ static Sys_var_long Sys_pfs_connect_attrs_size(
#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
+#ifdef WITH_WSREP
+
+/*
+ We need to keep the original values set by the user, as they will
+ be lost if wsrep_auto_increment_control set to 'ON':
+*/
+static bool update_auto_increment_increment (sys_var *self, THD *thd, enum_var_type type)
+{
+ if (type == OPT_GLOBAL)
+ global_system_variables.saved_auto_increment_increment=
+ global_system_variables.auto_increment_increment;
+ else
+ thd->variables.saved_auto_increment_increment=
+ thd->variables.auto_increment_increment;
+ return false;
+}
+
+#endif /* WITH_WSREP */
+
static Sys_var_ulong Sys_auto_increment_increment(
"auto_increment_increment",
"Auto-increment columns are incremented by this",
SESSION_VAR(auto_increment_increment),
CMD_LINE(OPT_ARG),
VALID_RANGE(1, 65535), DEFAULT(1), BLOCK_SIZE(1),
+#ifdef WITH_WSREP
+ NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(0),
+ ON_UPDATE(update_auto_increment_increment));
+#else
NO_MUTEX_GUARD, IN_BINLOG);
+#endif /* WITH_WSREP */
+
+#ifdef WITH_WSREP
+
+/*
+ We need to keep the original values set by the user, as they will
+ be lost if wsrep_auto_increment_control set to 'ON':
+*/
+static bool update_auto_increment_offset (sys_var *self, THD *thd, enum_var_type type)
+{
+ if (type == OPT_GLOBAL)
+ global_system_variables.saved_auto_increment_offset=
+ global_system_variables.auto_increment_offset;
+ else
+ thd->variables.saved_auto_increment_offset=
+ thd->variables.auto_increment_offset;
+ return false;
+}
+
+#endif /* WITH_WSREP */
static Sys_var_ulong Sys_auto_increment_offset(
"auto_increment_offset",
@@ -360,7 +403,12 @@ static Sys_var_ulong Sys_auto_increment_offset(
SESSION_VAR(auto_increment_offset),
CMD_LINE(OPT_ARG),
VALID_RANGE(1, 65535), DEFAULT(1), BLOCK_SIZE(1),
+#ifdef WITH_WSREP
+ NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(0),
+ ON_UPDATE(update_auto_increment_offset));
+#else
NO_MUTEX_GUARD, IN_BINLOG);
+#endif /* WITH_WSREP */
static Sys_var_mybool Sys_automatic_sp_privileges(
"automatic_sp_privileges",
@@ -4851,11 +4899,54 @@ static Sys_var_ulong Sys_wsrep_retry_autocommit(
SESSION_VAR(wsrep_retry_autocommit), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, 10000), DEFAULT(1), BLOCK_SIZE(1));
+static bool update_wsrep_auto_increment_control (sys_var *self, THD *thd, enum_var_type type)
+{
+ if (wsrep_auto_increment_control)
+ {
+ /*
+ The variables that control auto increment shall be calculated
+ automaticaly based on the size of the cluster. This usually done
+ within the wsrep_view_handler_cb callback. However, if the user
+ manually sets the value of wsrep_auto_increment_control to 'ON',
+ then we should to re-calculate these variables again (because
+ these values may be required before wsrep_view_handler_cb will
+ be re-invoked, which is rarely invoked if the cluster stays in
+ the stable state):
+ */
+ global_system_variables.auto_increment_increment=
+ wsrep_cluster_size ? wsrep_cluster_size : 1;
+ global_system_variables.auto_increment_offset=
+ wsrep_local_index >= 0 ? wsrep_local_index + 1 : 1;
+ thd->variables.auto_increment_increment=
+ global_system_variables.auto_increment_increment;
+ thd->variables.auto_increment_offset=
+ global_system_variables.auto_increment_offset;
+ }
+ else
+ {
+ /*
+ We must restore the last values of the variables that
+ are explicitly specified by the user:
+ */
+ global_system_variables.auto_increment_increment=
+ global_system_variables.saved_auto_increment_increment;
+ global_system_variables.auto_increment_offset=
+ global_system_variables.saved_auto_increment_offset;
+ thd->variables.auto_increment_increment=
+ thd->variables.saved_auto_increment_increment;
+ thd->variables.auto_increment_offset=
+ thd->variables.saved_auto_increment_offset;
+ }
+ return false;
+}
+
static Sys_var_mybool Sys_wsrep_auto_increment_control(
"wsrep_auto_increment_control", "To automatically control the "
"assignment of autoincrement variables",
GLOBAL_VAR(wsrep_auto_increment_control),
- CMD_LINE(OPT_ARG), DEFAULT(TRUE));
+ CMD_LINE(OPT_ARG), DEFAULT(TRUE),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
+ ON_UPDATE(update_wsrep_auto_increment_control));
static Sys_var_mybool Sys_wsrep_drupal_282555_workaround(
"wsrep_drupal_282555_workaround", "Enable a workaround to handle the "
diff --git a/sql/table.cc b/sql/table.cc
index 31f0d2558475f0b3fe380c6af8e3c0727b50dfde..8373f6735dcb7864e38176323b7738df366af649 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -5553,7 +5553,8 @@ const char *Field_iterator_table_ref::get_table_name()
return natural_join_it.column_ref()->table_name();
DBUG_ASSERT(!strcmp(table_ref->table_name,
- table_ref->table->s->table_name.str));
+ table_ref->table->s->table_name.str) ||
+ table_ref->schema_table);
return table_ref->table_name;
}
diff --git a/sql/table.h b/sql/table.h
index de10a966d1bb564b080a2294797f686b26705e2b..e7d3c95713ef0f10ebeeca22b75dadb1551ba97c 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -789,6 +789,8 @@ struct TABLE_SHARE
/** Instrumentation for this table share. */
PSI_table_share *m_psi;
+ inline void reset() { bzero((void*)this, sizeof(*this)); }
+
/*
Set share's table cache key and update its db and table name appropriately.
@@ -1337,6 +1339,7 @@ struct TABLE
bool histograms_are_read;
MDL_ticket *mdl_ticket;
+ inline void reset() { bzero((void*)this, sizeof(*this)); }
void init(THD *thd, TABLE_LIST *tl);
bool fill_item_list(List
- *item_list) const;
void reset_item_list(List
- *item_list) const;
@@ -1763,6 +1766,7 @@ struct TABLE_LIST
Prepare TABLE_LIST that consists of one table instance to use in
open_and_lock_tables
*/
+ inline void reset() { bzero((void*)this, sizeof(*this)); }
inline void init_one_table(const char *db_name_arg,
size_t db_length_arg,
const char *table_name_arg,
@@ -1778,13 +1782,14 @@ struct TABLE_LIST
else
mdl_type= MDL_SHARED_READ;
- bzero((char*) this, sizeof(*this));
+ reset();
db= (char*) db_name_arg;
db_length= db_length_arg;
table_name= (char*) table_name_arg;
table_name_length= table_name_length_arg;
alias= (char*) (alias_arg ? alias_arg : table_name_arg);
lock_type= lock_type_arg;
+ updating= lock_type >= TL_WRITE_ALLOW_WRITE;
mdl_request.init(MDL_key::TABLE, db, table_name, mdl_type, MDL_TRANSACTION);
}
@@ -2272,8 +2277,7 @@ struct TABLE_LIST
@sa check_and_update_table_version()
*/
- inline
- bool is_table_ref_id_equal(TABLE_SHARE *s) const
+ inline bool is_table_ref_id_equal(TABLE_SHARE *s) const
{
return (m_table_ref_type == s->get_table_ref_type() &&
m_table_ref_version == s->get_table_ref_version());
@@ -2285,12 +2289,10 @@ struct TABLE_LIST
@sa check_and_update_table_version()
*/
- inline
- void set_table_ref_id(TABLE_SHARE *s)
+ inline void set_table_ref_id(TABLE_SHARE *s)
{ set_table_ref_id(s->get_table_ref_type(), s->get_table_ref_version()); }
- inline
- void set_table_ref_id(enum_table_ref_type table_ref_type_arg,
+ inline void set_table_ref_id(enum_table_ref_type table_ref_type_arg,
ulong table_ref_version_arg)
{
m_table_ref_type= table_ref_type_arg;
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 279d599046047bc40386973ed192a701f7328030..60a3ceafe0af361174b26efbe5918e964af35988 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1537,16 +1537,11 @@ my_offset_tzs_get_key(Time_zone_offset *entry,
static void
tz_init_table_list(TABLE_LIST *tz_tabs)
{
- bzero(tz_tabs, sizeof(TABLE_LIST) * MY_TZ_TABLES_COUNT);
-
for (int i= 0; i < MY_TZ_TABLES_COUNT; i++)
{
- tz_tabs[i].alias= tz_tabs[i].table_name= tz_tables_names[i].str;
- tz_tabs[i].table_name_length= tz_tables_names[i].length;
- tz_tabs[i].db= tz_tables_db_name.str;
- tz_tabs[i].db_length= tz_tables_db_name.length;
- tz_tabs[i].lock_type= TL_READ;
-
+ tz_tabs[i].init_one_table(tz_tables_db_name.str, tz_tables_db_name.length,
+ tz_tables_names[i].str, tz_tables_names[i].length,
+ NULL, TL_READ);
if (i != MY_TZ_TABLES_COUNT - 1)
tz_tabs[i].next_global= tz_tabs[i].next_local= &tz_tabs[i+1];
if (i != 0)
diff --git a/sql/win_tzname_data.h b/sql/win_tzname_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..28a14ab7c117374937009defc433cf1c96b942ef
--- /dev/null
+++ b/sql/win_tzname_data.h
@@ -0,0 +1,136 @@
+/* This file was generated using gen_win_tzname_data.ps1 */
+{L"Dateline Standard Time","Etc/GMT+12"},
+{L"UTC-11","Etc/GMT+11"},
+{L"Aleutian Standard Time","America/Adak"},
+{L"Hawaiian Standard Time","Pacific/Honolulu"},
+{L"Marquesas Standard Time","Pacific/Marquesas"},
+{L"Alaskan Standard Time","America/Anchorage"},
+{L"UTC-09","Etc/GMT+9"},
+{L"Pacific Standard Time (Mexico)","America/Tijuana"},
+{L"UTC-08","Etc/GMT+8"},
+{L"Pacific Standard Time","America/Los_Angeles"},
+{L"US Mountain Standard Time","America/Phoenix"},
+{L"Mountain Standard Time (Mexico)","America/Chihuahua"},
+{L"Mountain Standard Time","America/Denver"},
+{L"Central America Standard Time","America/Guatemala"},
+{L"Central Standard Time","America/Chicago"},
+{L"Easter Island Standard Time","Pacific/Easter"},
+{L"Central Standard Time (Mexico)","America/Mexico_City"},
+{L"Canada Central Standard Time","America/Regina"},
+{L"SA Pacific Standard Time","America/Bogota"},
+{L"Eastern Standard Time (Mexico)","America/Cancun"},
+{L"Eastern Standard Time","America/New_York"},
+{L"Haiti Standard Time","America/Port-au-Prince"},
+{L"Cuba Standard Time","America/Havana"},
+{L"US Eastern Standard Time","America/Indianapolis"},
+{L"Paraguay Standard Time","America/Asuncion"},
+{L"Atlantic Standard Time","America/Halifax"},
+{L"Venezuela Standard Time","America/Caracas"},
+{L"Central Brazilian Standard Time","America/Cuiaba"},
+{L"SA Western Standard Time","America/La_Paz"},
+{L"Pacific SA Standard Time","America/Santiago"},
+{L"Turks And Caicos Standard Time","America/Grand_Turk"},
+{L"Newfoundland Standard Time","America/St_Johns"},
+{L"Tocantins Standard Time","America/Araguaina"},
+{L"E. South America Standard Time","America/Sao_Paulo"},
+{L"SA Eastern Standard Time","America/Cayenne"},
+{L"Argentina Standard Time","America/Buenos_Aires"},
+{L"Greenland Standard Time","America/Godthab"},
+{L"Montevideo Standard Time","America/Montevideo"},
+{L"Magallanes Standard Time","America/Punta_Arenas"},
+{L"Saint Pierre Standard Time","America/Miquelon"},
+{L"Bahia Standard Time","America/Bahia"},
+{L"UTC-02","Etc/GMT+2"},
+{L"Azores Standard Time","Atlantic/Azores"},
+{L"Cape Verde Standard Time","Atlantic/Cape_Verde"},
+{L"UTC","Etc/GMT"},
+{L"GMT Standard Time","Europe/London"},
+{L"Greenwich Standard Time","Atlantic/Reykjavik"},
+{L"W. Europe Standard Time","Europe/Berlin"},
+{L"Central Europe Standard Time","Europe/Budapest"},
+{L"Romance Standard Time","Europe/Paris"},
+{L"Morocco Standard Time","Africa/Casablanca"},
+{L"Sao Tome Standard Time","Africa/Sao_Tome"},
+{L"Central European Standard Time","Europe/Warsaw"},
+{L"W. Central Africa Standard Time","Africa/Lagos"},
+{L"Jordan Standard Time","Asia/Amman"},
+{L"GTB Standard Time","Europe/Bucharest"},
+{L"Middle East Standard Time","Asia/Beirut"},
+{L"Egypt Standard Time","Africa/Cairo"},
+{L"E. Europe Standard Time","Europe/Chisinau"},
+{L"Syria Standard Time","Asia/Damascus"},
+{L"West Bank Standard Time","Asia/Hebron"},
+{L"South Africa Standard Time","Africa/Johannesburg"},
+{L"FLE Standard Time","Europe/Kiev"},
+{L"Israel Standard Time","Asia/Jerusalem"},
+{L"Kaliningrad Standard Time","Europe/Kaliningrad"},
+{L"Sudan Standard Time","Africa/Khartoum"},
+{L"Libya Standard Time","Africa/Tripoli"},
+{L"Namibia Standard Time","Africa/Windhoek"},
+{L"Arabic Standard Time","Asia/Baghdad"},
+{L"Turkey Standard Time","Europe/Istanbul"},
+{L"Arab Standard Time","Asia/Riyadh"},
+{L"Belarus Standard Time","Europe/Minsk"},
+{L"Russian Standard Time","Europe/Moscow"},
+{L"E. Africa Standard Time","Africa/Nairobi"},
+{L"Iran Standard Time","Asia/Tehran"},
+{L"Arabian Standard Time","Asia/Dubai"},
+{L"Astrakhan Standard Time","Europe/Astrakhan"},
+{L"Azerbaijan Standard Time","Asia/Baku"},
+{L"Russia Time Zone 3","Europe/Samara"},
+{L"Mauritius Standard Time","Indian/Mauritius"},
+{L"Saratov Standard Time","Europe/Saratov"},
+{L"Georgian Standard Time","Asia/Tbilisi"},
+{L"Caucasus Standard Time","Asia/Yerevan"},
+{L"Afghanistan Standard Time","Asia/Kabul"},
+{L"West Asia Standard Time","Asia/Tashkent"},
+{L"Ekaterinburg Standard Time","Asia/Yekaterinburg"},
+{L"Pakistan Standard Time","Asia/Karachi"},
+{L"India Standard Time","Asia/Calcutta"},
+{L"Sri Lanka Standard Time","Asia/Colombo"},
+{L"Nepal Standard Time","Asia/Katmandu"},
+{L"Central Asia Standard Time","Asia/Almaty"},
+{L"Bangladesh Standard Time","Asia/Dhaka"},
+{L"Omsk Standard Time","Asia/Omsk"},
+{L"Myanmar Standard Time","Asia/Rangoon"},
+{L"SE Asia Standard Time","Asia/Bangkok"},
+{L"Altai Standard Time","Asia/Barnaul"},
+{L"W. Mongolia Standard Time","Asia/Hovd"},
+{L"North Asia Standard Time","Asia/Krasnoyarsk"},
+{L"N. Central Asia Standard Time","Asia/Novosibirsk"},
+{L"Tomsk Standard Time","Asia/Tomsk"},
+{L"China Standard Time","Asia/Shanghai"},
+{L"North Asia East Standard Time","Asia/Irkutsk"},
+{L"Singapore Standard Time","Asia/Singapore"},
+{L"W. Australia Standard Time","Australia/Perth"},
+{L"Taipei Standard Time","Asia/Taipei"},
+{L"Ulaanbaatar Standard Time","Asia/Ulaanbaatar"},
+{L"Aus Central W. Standard Time","Australia/Eucla"},
+{L"Transbaikal Standard Time","Asia/Chita"},
+{L"Tokyo Standard Time","Asia/Tokyo"},
+{L"North Korea Standard Time","Asia/Pyongyang"},
+{L"Korea Standard Time","Asia/Seoul"},
+{L"Yakutsk Standard Time","Asia/Yakutsk"},
+{L"Cen. Australia Standard Time","Australia/Adelaide"},
+{L"AUS Central Standard Time","Australia/Darwin"},
+{L"E. Australia Standard Time","Australia/Brisbane"},
+{L"AUS Eastern Standard Time","Australia/Sydney"},
+{L"West Pacific Standard Time","Pacific/Port_Moresby"},
+{L"Tasmania Standard Time","Australia/Hobart"},
+{L"Vladivostok Standard Time","Asia/Vladivostok"},
+{L"Lord Howe Standard Time","Australia/Lord_Howe"},
+{L"Bougainville Standard Time","Pacific/Bougainville"},
+{L"Russia Time Zone 10","Asia/Srednekolymsk"},
+{L"Magadan Standard Time","Asia/Magadan"},
+{L"Norfolk Standard Time","Pacific/Norfolk"},
+{L"Sakhalin Standard Time","Asia/Sakhalin"},
+{L"Central Pacific Standard Time","Pacific/Guadalcanal"},
+{L"Russia Time Zone 11","Asia/Kamchatka"},
+{L"New Zealand Standard Time","Pacific/Auckland"},
+{L"UTC+12","Etc/GMT-12"},
+{L"Fiji Standard Time","Pacific/Fiji"},
+{L"Chatham Islands Standard Time","Pacific/Chatham"},
+{L"UTC+13","Etc/GMT-13"},
+{L"Tonga Standard Time","Pacific/Tongatapu"},
+{L"Samoa Standard Time","Pacific/Apia"},
+{L"Line Islands Standard Time","Pacific/Kiritimati"},
diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc
index c7674cd0169cd076363481d4b6ab11588e7c8d93..39c77133f02bf0bc8f133caba29a52f356346412 100644
--- a/sql/wsrep_binlog.cc
+++ b/sql/wsrep_binlog.cc
@@ -506,7 +506,6 @@ void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf,
if (init_io_cache(&cache, file, 0, WRITE_CACHE, 0, 0, MYF(MY_WME | MY_NABP)))
{
- mysql_file_close(file, MYF(MY_WME));
goto cleanup2;
}
diff --git a/sql/wsrep_dummy.cc b/sql/wsrep_dummy.cc
index 5837ab4bed50d39b5b26aa0ee88783e0852443e4..795e2d192524399c010960f6491a7dc2c1c4c5e4 100644
--- a/sql/wsrep_dummy.cc
+++ b/sql/wsrep_dummy.cc
@@ -125,6 +125,14 @@ longlong wsrep_thd_trx_seqno(THD *)
struct wsrep_ws_handle* wsrep_thd_ws_handle(THD *)
{ return 0; }
+void wsrep_thd_auto_increment_variables(THD *thd,
+ unsigned long long *offset,
+ unsigned long long *increment)
+{
+ *offset= thd->variables.auto_increment_offset;
+ *increment= thd->variables.auto_increment_increment;
+}
+
int wsrep_trx_is_aborting(THD *)
{ return 0; }
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index e2c55583594ef9862f3bfe5f50155602f9ad200d..a54b96a4aa2c0c07e4bf18661b560f01475b8147 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -184,8 +184,6 @@ bool wsrep_sst_donor_update (sys_var *self, THD* thd, enum_var_type type)
return 0;
}
-static wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED;
-
bool wsrep_before_SE()
{
return (wsrep_provider != NULL
@@ -231,7 +229,7 @@ bool wsrep_sst_wait ()
total_wtime += difftime(end_time, start_time);
WSREP_DEBUG("Waiting for SST to complete. current seqno: %" PRId64 " waited %f secs.", local_seqno, total_wtime);
service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL,
- "WSREP state transfer ongoing, current seqno: %ld waited %f secs", local_seqno, total_wtime);
+ "WSREP state transfer ongoing, current seqno: %" PRId64 " waited %f secs", local_seqno, total_wtime);
}
}
@@ -294,9 +292,8 @@ void wsrep_sst_received (wsrep_t* const wsrep,
}
else if (local_seqno > seqno)
{
- WSREP_WARN("SST postion is in the past: %lld, current: %lld. "
- "Can't continue.",
- (long long)seqno, (long long)local_seqno);
+ WSREP_WARN("SST postion is in the past: %" PRId64 ", current: %" PRId64
+ ". Can't continue.", seqno, local_seqno);
unireg_abort(1);
}
@@ -1416,7 +1413,7 @@ void wsrep_SE_init_wait()
total_wtime += difftime(end_time, start_time);
WSREP_DEBUG("Waiting for SST to complete. current seqno: %" PRId64 " waited %f secs.", local_seqno, total_wtime);
service_manager_extend_timeout(WSREP_EXTEND_TIMEOUT_INTERVAL,
- "WSREP state transfer ongoing, current seqno: %ld waited %f secs", local_seqno, total_wtime);
+ "WSREP state transfer ongoing, current seqno: %" PRId64 " waited %f secs", local_seqno, total_wtime);
}
}
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index eb26da6128273d01a08d99dd04a6fb53619ee253..551e710cfeb790f9fdf8bb7597067f03fb13bdb0 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -676,3 +676,24 @@ bool wsrep_thd_has_explicit_locks(THD *thd)
assert(thd);
return thd->mdl_context.has_explicit_locks();
}
+
+/*
+ Get auto increment variables for THD. Use global settings for
+ applier threads.
+ */
+void wsrep_thd_auto_increment_variables(THD* thd,
+ unsigned long long* offset,
+ unsigned long long* increment)
+{
+ if (thd->wsrep_exec_mode == REPL_RECV &&
+ thd->wsrep_conflict_state != REPLAYING)
+ {
+ *offset= global_system_variables.auto_increment_offset;
+ *increment= global_system_variables.auto_increment_increment;
+ }
+ else
+ {
+ *offset= thd->variables.auto_increment_offset;
+ *increment= thd->variables.auto_increment_increment;
+ }
+}
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index d70757e8142a9f1e3b3db06268ceed0e8064dc77..e985f75d646a9d6e4afadb500a39b71d49dadb50 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -1650,7 +1650,6 @@ void ha_archive::update_create_info(HA_CREATE_INFO *create_info)
DBUG_VOID_RETURN;
}
-
/*
Hints for optimizer, see ha_tina for more information
*/
@@ -1658,22 +1657,7 @@ int ha_archive::info(uint flag)
{
DBUG_ENTER("ha_archive::info");
- mysql_mutex_lock(&share->mutex);
- if (share->dirty)
- {
- DBUG_PRINT("ha_archive", ("archive flushing out rows for scan"));
- DBUG_ASSERT(share->archive_write_open);
- azflush(&(share->archive_write), Z_SYNC_FLUSH);
- share->dirty= FALSE;
- }
-
- /*
- This should be an accurate number now, though bulk and delayed inserts can
- cause the number to be inaccurate.
- */
- stats.records= share->rows_recorded;
- mysql_mutex_unlock(&share->mutex);
-
+ flush_and_clear_pending_writes();
stats.deleted= 0;
DBUG_PRINT("ha_archive", ("Stats rows is %d\n", (int)stats.records));
@@ -1716,6 +1700,38 @@ int ha_archive::info(uint flag)
}
+int ha_archive::external_lock(THD *thd, int lock_type)
+{
+ if (lock_type == F_RDLCK)
+ {
+ // We are going to read from the table. Flush any pending writes that we
+ // may have
+ flush_and_clear_pending_writes();
+ }
+ return 0;
+}
+
+
+void ha_archive::flush_and_clear_pending_writes()
+{
+ mysql_mutex_lock(&share->mutex);
+ if (share->dirty)
+ {
+ DBUG_PRINT("ha_archive", ("archive flushing out rows for scan"));
+ DBUG_ASSERT(share->archive_write_open);
+ azflush(&(share->archive_write), Z_SYNC_FLUSH);
+ share->dirty= FALSE;
+ }
+
+ /*
+ This should be an accurate number now, though bulk and delayed inserts can
+ cause the number to be inaccurate.
+ */
+ stats.records= share->rows_recorded;
+ mysql_mutex_unlock(&share->mutex);
+}
+
+
/*
This method tells us that a bulk insert operation is about to occur. We set
a flag which will keep write_row from saying that its data is dirty. This in
diff --git a/storage/archive/ha_archive.h b/storage/archive/ha_archive.h
index 56ff566db8ce075da77407d02b8912d4120b85c4..a74374a340f8ebd51afb848e9b6f6b1108211368 100644
--- a/storage/archive/ha_archive.h
+++ b/storage/archive/ha_archive.h
@@ -169,5 +169,8 @@ class ha_archive: public handler
int unpack_row(azio_stream *file_to_read, uchar *record);
unsigned int pack_row(uchar *record, azio_stream *writer);
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
+ int external_lock(THD *thd, int lock_type);
+private:
+ void flush_and_clear_pending_writes();
};
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 0ca794df23088f8a08b2dc80f566cb7caf8d0c81..e524088623d78ea137f11e5e3a4f397357df2721 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -40,6 +40,10 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h)
add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS)
add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT )
+macro(DISABLE_WARNING W)
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=${W}")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-${W}" DEBUG)
+endmacro()
#
# OS specific C flags, definitions and source files.
@@ -47,14 +51,15 @@ add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT )
IF(UNIX)
MY_CHECK_AND_SET_COMPILER_FLAG("-Wall -Wmissing-declarations")
if(NOT WITH_WARNINGS)
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-function")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-variable")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-value")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-parentheses")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-misleading-indentation")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-format-truncation")
- MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough")
+ DISABLE_WARNING("unused-function")
+ DISABLE_WARNING("unused-variable")
+ DISABLE_WARNING("unused-value")
+ DISABLE_WARNING("parentheses")
+ DISABLE_WARNING("strict-aliasing")
+ DISABLE_WARNING("misleading-indentation")
+ DISABLE_WARNING("format-truncation")
+ DISABLE_WARNING("implicit-fallthrough")
+ DISABLE_WARNING("type-limits")
endif(NOT WITH_WARNINGS)
add_definitions( -DUNIX -DLINUX -DUBUNTU )
@@ -125,7 +130,6 @@ IF(WIN32)
OPTION(CONNECT_WITH_MSXML "Compile CONNECT storage engine with MSXML support" ON)
IF(CONNECT_WITH_MSXML)
add_definitions(-DMSX6 -DDOMDOC_SUPPORT)
- message(STATUS "MSXML library version: msxml6")
SET(MSXML_FOUND 1)
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp domdoc.h)
ENDIF(CONNECT_WITH_MSXML)
@@ -165,7 +169,8 @@ IF(CONNECT_WITH_ODBC)
# the library 'libiodbc' gets compiled with 'sql'h.
# This will also need changes in the sources (e.g. #include
).
- find_path(ODBC_INCLUDE_DIR sql.h
+ find_file(ODBC_INCLUDES sql.h
+ PATHS
/usr/include
/usr/include/odbc
/usr/local/include
@@ -175,7 +180,7 @@ IF(CONNECT_WITH_ODBC)
#"C:/Program Files/Microsoft SDKs/Windows/v7.0A/include"
#"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include"
#"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/include"
- DOC "Specify the directory containing sql.h."
+ DOC "Specify the path to sql.h."
)
find_library(ODBC_LIBRARY
@@ -194,9 +199,10 @@ IF(CONNECT_WITH_ODBC)
DOC "Specify the ODBC driver manager library here."
)
- mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDE_DIR)
+ mark_as_advanced(ODBC_LIBRARY ODBC_INCLUDES)
- IF(ODBC_INCLUDE_DIR AND ODBC_LIBRARY)
+ IF(ODBC_INCLUDES AND ODBC_LIBRARY)
+ get_filename_component(ODBC_INCLUDE_DIR "${ODBC_INCLUDES}" PATH)
set(CMAKE_REQUIRED_LIBRARIES ${ODBC_LIBRARY})
set(CMAKE_REQUIRED_INCLUDES ${ODBC_INCLUDE_DIR})
CHECK_CXX_SOURCE_COMPILES(
@@ -231,7 +237,7 @@ ENDIF(CONNECT_WITH_ODBC)
#
# JDBC with MongoDB Java Driver included but disabled if without MONGO
#
-#OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON)
+OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON)
OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON)
IF(CONNECT_WITH_JDBC)
@@ -286,7 +292,7 @@ IF(CONNECT_WITH_MONGO)
C:/mongo-c-driver/lib
D:/mongo-c-driver/lib)
ENDIF(WIN32)
- FIND_PACKAGE(libmongoc-1.0 1.7)
+ FIND_PACKAGE(libmongoc-1.0 1.7 QUIET)
IF (libmongoc-1.0_FOUND)
INCLUDE_DIRECTORIES(${MONGOC_INCLUDE_DIRS})
SET(MONGOC_LIBRARY ${MONGOC_LIBRARIES})
diff --git a/storage/connect/filter.h b/storage/connect/filter.h
index c6ab8fddd35cb6a7d93ad9dae071a5996b7fad01..b0fea3d69e0487f57a519d85c7437917435fcc78 100644
--- a/storage/connect/filter.h
+++ b/storage/connect/filter.h
@@ -48,6 +48,7 @@ class DllExport FILTER : public XOBJECT { /* Filter description block */
PVAL &Val(int i) {return Test[i].Value;}
bool &Conv(int i) {return Test[i].Conv;}
void SetNext(PFIL filp) {Next = filp;}
+ bool MakeSelector(PGLOBAL g, PSTRG s);
// Methods
virtual void Reset(void);
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 135e51e0ac14f063f3a4db60e216309fac5b65c0..8838bb7e696e1926725c5bbf84422b9ef783f61d 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -170,9 +170,9 @@
#define JSONMAX 10 // JSON Default max grp size
extern "C" {
- char version[]= "Version 1.06.0008 October 06, 2018";
+ char version[]= "Version 1.06.0009 January 27, 2019";
#if defined(__WIN__)
- char compver[]= "Version 1.06.0008 " __DATE__ " " __TIME__;
+ char compver[]= "Version 1.06.0009 " __DATE__ " " __TIME__;
char slash= '\\';
#else // !__WIN__
char slash= '/';
@@ -204,6 +204,26 @@ pthread_mutex_t parmut;
pthread_mutex_t usrmut;
pthread_mutex_t tblmut;
+#if defined(DEVELOPMENT)
+char *GetUserVariable(PGLOBAL g, const uchar *varname);
+
+char *GetUserVariable(PGLOBAL g, const uchar *varname)
+{
+ char buf[1024];
+ bool b;
+ THD *thd = current_thd;
+ CHARSET_INFO *cs = system_charset_info;
+ String *str = NULL, tmp(buf, sizeof(buf), cs);
+ HASH uvars = thd->user_vars;
+ user_var_entry *uvar = (user_var_entry*)my_hash_search(&uvars, varname, 0);
+
+ if (uvar)
+ str = uvar->val_str(&b, &tmp, NOT_FIXED_DEC);
+
+ return str ? PlugDup(g, str->ptr()) : NULL;
+}; // end of GetUserVariable
+#endif // DEVELOPMENT
+
/***********************************************************************/
/* Utility functions. */
/***********************************************************************/
@@ -1795,7 +1815,9 @@ PCSZ ha_connect::GetDBName(PCSZ name)
const char *ha_connect::GetTableName(void)
{
- return tshp ? tshp->table_name.str : table_share->table_name.str;
+ const char *path= tshp ? tshp->path.str : table_share->path.str;
+ const char *name= strrchr(path, slash);
+ return name ? name+1 : path;
} // end of GetTableName
char *ha_connect::GetPartName(void)
@@ -1914,9 +1936,11 @@ int ha_connect::OpenTable(PGLOBAL g, bool del)
break;
} // endswitch xmode
- if (xmod != MODE_INSERT || tdbp->GetAmType() == TYPE_AM_MYSQL
- || tdbp->GetAmType() == TYPE_AM_ODBC
- || tdbp->GetAmType() == TYPE_AM_JDBC) {
+ // g->More is 1 when executing commands from triggers
+ if (!g->More && (xmod != MODE_INSERT
+ || tdbp->GetAmType() == TYPE_AM_MYSQL
+ || tdbp->GetAmType() == TYPE_AM_ODBC
+ || tdbp->GetAmType() == TYPE_AM_JDBC)) {
// Get the list of used fields (columns)
char *p;
unsigned int k1, k2, n1, n2;
@@ -4631,7 +4655,9 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
break;
case SQLCOM_CREATE_VIEW:
case SQLCOM_DROP_VIEW:
- newmode= MODE_ANY;
+ case SQLCOM_CREATE_TRIGGER:
+ case SQLCOM_DROP_TRIGGER:
+ newmode= MODE_ANY;
break;
case SQLCOM_ALTER_TABLE:
*chk= true;
@@ -4701,8 +4727,24 @@ int ha_connect::start_stmt(THD *thd, thr_lock_type lock_type)
break;
} // endswitch mode
- xmod= CheckMode(g, thd, newmode, &chk, &cras);
- DBUG_RETURN((xmod == MODE_ERROR) ? HA_ERR_INTERNAL_ERROR : 0);
+ if (newmode == MODE_ANY) {
+ if (CloseTable(g)) {
+ // Make error a warning to avoid crash
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message);
+ rc = 0;
+ } // endif Close
+
+ locked = 0;
+ xmod = MODE_ANY; // For info commands
+ DBUG_RETURN(rc);
+ } // endif MODE_ANY
+
+ newmode = CheckMode(g, thd, newmode, &chk, &cras);
+
+ if (newmode == MODE_ERROR)
+ DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
+
+ DBUG_RETURN(check_stmt(g, newmode, cras));
} // end of start_stmt
/**
@@ -4884,21 +4926,16 @@ int ha_connect::external_lock(THD *thd, int lock_type)
// Make it a warning to avoid crash
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message);
rc= 0;
- //my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
- //rc = HA_ERR_INTERNAL_ERROR;
} // endif Close
locked= 0;
-// m_lock_type= lock_type;
xmod= MODE_ANY; // For info commands
DBUG_RETURN(rc);
- } // endif MODE_ANY
- else
- if (check_privileges(thd, options, table->s->db.str)) {
- strcpy(g->Message, "This operation requires the FILE privilege");
- htrc("%s\n", g->Message);
- DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
- } // endif check_privileges
+ } else if (check_privileges(thd, options, table->s->db.str)) {
+ strcpy(g->Message, "This operation requires the FILE privilege");
+ htrc("%s\n", g->Message);
+ DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
+ } // endif check_privileges
DBUG_ASSERT(table && table->s);
@@ -4909,43 +4946,31 @@ int ha_connect::external_lock(THD *thd, int lock_type)
if (newmode == MODE_ERROR)
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
- // If this is the start of a new query, cleanup the previous one
+ DBUG_RETURN(check_stmt(g, newmode, cras));
+} // end of external_lock
+
+
+int ha_connect::check_stmt(PGLOBAL g, MODE newmode, bool cras)
+{
+ int rc = 0;
+ DBUG_ENTER("ha_connect::check_stmt");
+
+ // If this is the start of a new query, cleanup the previous one
if (xp->CheckCleanup()) {
tdbp= NULL;
valid_info= false;
- } // endif CheckCleanup
-
-#if 0
- if (xcheck) {
- // This must occur after CheckCleanup
- if (!g->Xchk) {
- g->Xchk= new(g) XCHK;
- ((PCHK)g->Xchk)->oldsep= GetBooleanOption("Sepindex", false);
- ((PCHK)g->Xchk)->oldpix= GetIndexInfo();
- } // endif Xchk
-
- } else
- g->Xchk= NULL;
-#endif // 0
+ } // endif CheckCleanup
if (cras)
g->Createas= 1; // To tell external tables of a multi-table command
- if (trace(1)) {
-#if 0
- htrc("xcheck=%d cras=%d\n", xcheck, cras);
-
- if (xcheck)
- htrc("oldsep=%d oldpix=%p\n",
- ((PCHK)g->Xchk)->oldsep, ((PCHK)g->Xchk)->oldpix);
-#endif // 0
- htrc("Calling CntCheckDB db=%s cras=%d\n", GetDBName(NULL), cras);
- } // endif trace
+ if (trace(1))
+ htrc("Calling CntCheckDB db=%s cras=%d\n", GetDBName(NULL), cras);
// Set or reset the good database environment
if (CntCheckDB(g, this, GetDBName(NULL))) {
- htrc("%p external_lock: %s\n", this, g->Message);
- rc= HA_ERR_INTERNAL_ERROR;
+ htrc("%p check_stmt: %s\n", this, g->Message);
+ rc= HA_ERR_INTERNAL_ERROR;
// This can NOT be called without open called first, but
// the table can have been closed since then
} else if (!tdbp || xp->CheckQuery(valid_query_id) || xmod != newmode) {
@@ -4965,10 +4990,10 @@ int ha_connect::external_lock(THD *thd, int lock_type)
} // endif tdbp
if (trace(1))
- htrc("external_lock: rc=%d\n", rc);
+ htrc("check_stmt: rc=%d\n", rc);
DBUG_RETURN(rc);
-} // end of external_lock
+} // end of check_stmt
/**
@@ -7310,7 +7335,7 @@ maria_declare_plugin(connect)
0x0106, /* version number (1.06) */
NULL, /* status variables */
connect_system_variables, /* system variables */
- "1.06.0008", /* string version */
+ "1.06.0009", /* string version */
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}
maria_declare_plugin_end;
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h
index 07b1c2d2e7d148185a6de4f48a97294741bbe7db..de61f868038e211dbe4bb7c35447ecd485b11d32 100644
--- a/storage/connect/ha_connect.h
+++ b/storage/connect/ha_connect.h
@@ -32,6 +32,10 @@
/****************************************************************************/
#include "mycat.h"
+#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT)
+bool MongoEnabled(void);
+#endif // JAVA_SUPPORT || CMGO_SUPPORT
+
/****************************************************************************/
/* Structures used to pass info between CONNECT and ha_connect. */
/****************************************************************************/
@@ -507,7 +511,8 @@ int index_prev(uchar *buf);
protected:
bool check_privileges(THD *thd, PTOS options, char *dbn, bool quick=false);
MODE CheckMode(PGLOBAL g, THD *thd, MODE newmode, bool *chk, bool *cras);
- char *GetDBfromName(const char *name);
+ int check_stmt(PGLOBAL g, MODE newmode, bool cras);
+ char *GetDBfromName(const char *name);
// Members
static ulong num; // Tracable handler number
diff --git a/storage/connect/jmgoconn.cpp b/storage/connect/jmgoconn.cpp
index bd1ddadd80d5ae795bc5365a1465de30c453f657..c786e78a081d39ca1e37160ab5c9d55edde170ca 100644
--- a/storage/connect/jmgoconn.cpp
+++ b/storage/connect/jmgoconn.cpp
@@ -272,7 +272,7 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options,
if (MakeSelector(g, filp, s)) {
strcpy(g->Message, "Failed making selector");
- return NULL;
+ return true;
} else
s->Append('}');
@@ -340,7 +340,7 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options,
if (MakeSelector(g, filp, s)) {
strcpy(g->Message, "Failed making selector");
- return NULL;
+ return true;
} // endif Selector
tdbp->SetFilter(NULL); // Not needed anymore
diff --git a/storage/connect/json.h b/storage/connect/json.h
index cc394401cc3d53b5963fbae661623fdd628a4963..1d058ad575fc76d828cc7e5c36bf3fc235a7382e 100644
--- a/storage/connect/json.h
+++ b/storage/connect/json.h
@@ -299,4 +299,3 @@ class JVALUE : public JSON {
PJVAL Next; // Next value in array
bool Del; // True when deleted
}; // end of class JVALUE
-
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index d5a3a840173112a6276aab4c459342772a11ce62..df9c72004167f0d9b5f6db70046ebef19c202c2c 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -1666,7 +1666,8 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
if (args->arg_count > (unsigned)i) {
int j = 0, n = args->attribute_lengths[i];
my_bool b; // true if attribute is zero terminated
- PSZ p, s = args->attributes[i];
+ PSZ p;
+ PCSZ s = args->attributes[i];
if (s && *s && (n || *s == '\'')) {
if ((b = (!n || !s[n])))
@@ -5805,6 +5806,52 @@ char *envar(UDF_INIT *initid, UDF_ARGS *args, char *result,
return str;
} // end of envar
+#if defined(DEVELOPMENT)
+extern char *GetUserVariable(PGLOBAL g, const uchar *varname);
+
+/*********************************************************************************/
+/* Utility function returning a user variable value. */
+/*********************************************************************************/
+my_bool uvar_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
+{
+ unsigned long reslen, memlen;
+
+ if (args->arg_count != 1) {
+ strcpy(message, "Unique argument must be a user variable name");
+ return true;
+ } else
+ CalcLen(args, false, reslen, memlen, true);
+
+ initid->maybe_null = true;
+ return JsonInit(initid, args, message, true, reslen, memlen, 2048);
+} // end of uvar_init
+
+char *uvar(UDF_INIT *initid, UDF_ARGS *args, char *result,
+ unsigned long *res_length, char *is_null, char *)
+{
+ char *str, varname[256];
+ PGLOBAL g = (PGLOBAL)initid->ptr;
+ int n = MY_MIN(args->lengths[0], sizeof(varname) - 1);
+
+ PlugSubSet(g->Sarea, g->Sarea_Size);
+ memcpy(varname, args->args[0], n);
+ varname[n] = 0;
+
+ if (!(str = GetUserVariable(g, (const uchar*)&varname))) {
+ *res_length = 0;
+ *is_null = 1;
+ } else
+ *res_length = strlen(str);
+
+ return str;
+} // end of uvar
+
+void uvar_deinit(UDF_INIT* initid)
+{
+ JsonFreeMem((PGLOBAL)initid->ptr);
+} // end of uvar_deinit
+#endif // DEVELOPMENT
+
/*********************************************************************************/
/* Returns the distinct number of B occurences in A. */
/*********************************************************************************/
@@ -5851,4 +5898,3 @@ long long countin(UDF_INIT *initid, UDF_ARGS *args, char *result,
free(str2);
return n;
} // end of countin
-
diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc
index cc5675db5c8eddb7216da78625b3b9cd48180a65..131245929e03415b44082708740250809911d469 100644
--- a/storage/connect/mycat.cc
+++ b/storage/connect/mycat.cc
@@ -102,10 +102,6 @@
extern "C" HINSTANCE s_hModule; // Saved module handle
#endif // !__WIN__
-#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT)
-bool MongoEnabled(void);
-#endif // JAVA_SUPPORT || CMGO_SUPPORT
-
PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info);
/***********************************************************************/
@@ -549,15 +545,6 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am)
case TAB_PIVOT: tdp= new(g) PIVOTDEF; break;
case TAB_VIR: tdp= new(g) VIRDEF; break;
case TAB_JSON: tdp= new(g) JSONDEF; break;
-#if defined(MONGO_SUPPORT)
- case TAB_MONGO:
-// if (MongoEnabled())
- tdp = new(g) MGODEF;
-// else
-// strcpy(g->Message, "MONGO type not enabled");
-
- break;
-#endif // MONGO_SUPPORT
#if defined(ZIP_SUPPORT)
case TAB_ZIP: tdp = new(g) ZIPDEF; break;
#endif // ZIP_SUPPORT
diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp
index 048f00be75fa0736974f4fe2991ceaa061aec345..6790e7eb45c061646f162636c410c604dd97050b 100644
--- a/storage/connect/plugutil.cpp
+++ b/storage/connect/plugutil.cpp
@@ -526,7 +526,7 @@ BOOL PlugSubSet(void *memp, uint size)
/***********************************************************************/
/* Use it to export a function that do throwing. */
/***********************************************************************/
-void *DoThrow(int n)
+static void *DoThrow(int n)
{
throw n;
} /* end of DoThrow */
diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp
index 29cbbb35765b71f0040f6bb2411c3d9d57d527fd..4f6e2c81744b3b879d397bcae1fe908de7477d22 100644
--- a/storage/connect/tabdos.cpp
+++ b/storage/connect/tabdos.cpp
@@ -1,11 +1,11 @@
/************* TabDos C++ Program Source Code File (.CPP) **************/
/* PROGRAM NAME: TABDOS */
/* ------------- */
-/* Version 4.9.3 */
+/* Version 4.9.4 */
/* */
/* COPYRIGHT: */
/* ---------- */
-/* (C) Copyright to the author Olivier BERTRAND 1998-2017 */
+/* (C) Copyright to the author Olivier BERTRAND 1998-2019 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -2492,8 +2492,10 @@ bool DOSCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check)
} // endif's Value, Buf_Type
// Allocate the buffer used in WriteColumn for numeric columns
- if (!Buf && IsTypeNum(Buf_Type))
- Buf = (char*)PlugSubAlloc(g, NULL, MY_MAX(32, Long + Dcm + 1));
+ if (!Buf && IsTypeNum(Buf_Type))
+ Buf = (char*)PlugSubAlloc(g, NULL, MY_MAX(64, Long + 1));
+ else // Text columns do not need additional buffer
+ Buf = (char*)Value->GetTo_Val();
// Because Colblk's have been made from a copy of the original TDB in
// case of Update, we must reset them to point to the original one.
@@ -2603,8 +2605,8 @@ void DOSCOL::ReadColumn(PGLOBAL g)
/***********************************************************************/
void DOSCOL::WriteColumn(PGLOBAL g)
{
- char *p, *p2, fmt[32];
- int i, k, len, field;
+ char *p, fmt[32];
+ int i, k, n, len, field;
PTDBDOS tdbp = (PTDBDOS)To_Tdb;
if (trace(2))
@@ -2679,8 +2681,8 @@ void DOSCOL::WriteColumn(PGLOBAL g)
case TYPE_DOUBLE:
case TYPE_DECIM:
strcpy(fmt, (Ldz) ? "%0*.*lf" : "%*.*lf");
- sprintf(Buf, fmt, field + ((Nod && Dcm) ? 1 : 0),
- Dcm, Value->GetFloatValue());
+ len = field + ((Nod && Dcm) ? 1 : 0);
+ snprintf(Buf, len, fmt, len, Dcm, Value->GetFloatValue());
len = strlen(Buf);
if (Nod && Dcm)
@@ -2699,35 +2701,37 @@ void DOSCOL::WriteColumn(PGLOBAL g)
throw 31;
} // endswitch BufType
- p2 = Buf;
+ n = strlen(Buf);
} else // Standard CONNECT format
- p2 = Value->ShowValue(Buf, field);
+ n = Value->ShowValue(Buf, field);
if (trace(1))
- htrc("new length(%p)=%d\n", p2, strlen(p2));
+ htrc("new length(%p)=%d\n", Buf, n);
- if ((len = strlen(p2)) > field) {
- sprintf(g->Message, MSG(VALUE_TOO_LONG), p2, Name, field);
+ if ((len = n) > field) {
+ char *p = Value->GetCharString(Buf);
+
+ sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, field);
throw 31;
} else if (Dsp)
for (i = 0; i < len; i++)
- if (p2[i] == '.')
- p2[i] = Dsp;
+ if (Buf[i] == '.')
+ Buf[i] = Dsp;
if (trace(2))
- htrc("buffer=%s\n", p2);
+ htrc("buffer=%s\n", Buf);
/*******************************************************************/
/* Updating must be done only when not in checking pass. */
/*******************************************************************/
if (Status) {
memset(p, ' ', field);
- memcpy(p, p2, len);
+ memcpy(p, Buf, len);
if (trace(2))
htrc(" col write: '%.*s'\n", len, p);
- } // endif Use
+ } // endif Status
} else // BIN compressed table
/*******************************************************************/
@@ -2738,7 +2742,7 @@ void DOSCOL::WriteColumn(PGLOBAL g)
sprintf(g->Message, MSG(BIN_F_TOO_LONG),
Name, Value->GetSize(), Long);
throw 31;
- } // endif
+ } // endif
} // end of WriteColumn
diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp
index f2d5eb0e69db42fb508c34d86032d0280cf5451c..e9c7b2490d8eaf782f1e4722d10c02122a1e3b87 100644
--- a/storage/connect/tabext.cpp
+++ b/storage/connect/tabext.cpp
@@ -1,7 +1,7 @@
/************* Tabext C++ Functions Source Code File (.CPP) ************/
-/* Name: TABEXT.CPP Version 1.0 */
+/* Name: TABEXT.CPP Version 1.1 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2017 */
+/* (C) Copyright to the author Olivier BERTRAND 2017 - 2019 */
/* */
/* This file contains the TBX, TDB and OPJOIN classes functions. */
/***********************************************************************/
@@ -445,6 +445,43 @@ bool TDBEXT::MakeSQL(PGLOBAL g, bool cnt)
return false;
} // end of MakeSQL
+/***********************************************************************/
+/* Remove the NAME_CONST functions that are added by procedures. */
+/***********************************************************************/
+void TDBEXT::RemoveConst(PGLOBAL g, char *stmt)
+{
+ char *p, *p2;
+ char val[1025], nval[1025];
+ int n, nc;
+
+ while ((p = strstr(stmt, "NAME_CONST")))
+ if ((n = sscanf(p, "%*[^,],%1024[^)])%n", val, &nc))) {
+ if (trace(33))
+ htrc("p=%s\nn=%d val=%s nc=%d\n", p, n, val, nc);
+
+ *p = 0;
+
+ if ((p2 = strstr(val, "'"))) {
+ if ((n = sscanf(p2, "%*['\\]%1024[^'\\]", nval))) {
+ if (trace(33))
+ htrc("p2=%s\nn=%d nval=%s\n", p2, n, nval);
+
+ strcat(strcat(strcat(strcat(stmt, "'"), nval), "'"), p + nc);
+ } else
+ break;
+
+ } else
+ strcat(strcat(strcat(strcat(stmt, "("), val), ")"), p + nc);
+
+ if (trace(33))
+ htrc("stmt=%s\n", stmt);
+
+ } else
+ break;
+
+ return;
+} // end of RemoveConst
+
/***********************************************************************/
/* MakeCommand: make the Update or Delete statement to send to the */
/* MySQL server. Limited to remote values and filtering. */
@@ -524,6 +561,8 @@ bool TDBEXT::MakeCommand(PGLOBAL g)
stmt[i++] = (Qrystr[k] == '`') ? q : Qrystr[k];
} while (Qrystr[k++]);
+ RemoveConst(g, stmt);
+
if (body)
strcat(stmt, body);
diff --git a/storage/connect/tabext.h b/storage/connect/tabext.h
index 6b67c2ab5edfff12b577a00723c2f9b004a4605d..5fef1b9ece0a3d5a3f450ec23c917c54ed2bb472 100644
--- a/storage/connect/tabext.h
+++ b/storage/connect/tabext.h
@@ -1,7 +1,7 @@
/*************** Tabext H Declares Source Code File (.H) ***************/
-/* Name: TABEXT.H Version 1.0 */
+/* Name: TABEXT.H Version 1.1 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2017 */
+/* (C) Copyright to the author Olivier BERTRAND 2017 - 2019 */
/* */
/* This is the EXTDEF, TABEXT and EXTCOL classes definitions. */
/***********************************************************************/
@@ -130,6 +130,7 @@ class DllExport TDBEXT : public TDB {
virtual bool MakeSQL(PGLOBAL g, bool cnt);
//virtual bool MakeInsert(PGLOBAL g);
virtual bool MakeCommand(PGLOBAL g);
+ void RemoveConst(PGLOBAL g, char *stmt);
int Decode(PCSZ utf, char *buf, size_t n);
// Members
diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp
index 63fa2a636688be2be20bb358efc2496bb4dfa89f..02720a3089adfecabca010e0d22b9e9d42719533 100644
--- a/storage/connect/tabfmt.cpp
+++ b/storage/connect/tabfmt.cpp
@@ -1485,8 +1485,8 @@ void CSVCOL::ReadColumn(PGLOBAL g)
/***********************************************************************/
void CSVCOL::WriteColumn(PGLOBAL g)
{
- char *p, buf[64];
- int flen;
+ char *p;
+ int n, flen;
PTDBCSV tdbp = (PTDBCSV)To_Tdb;
if (trace(2))
@@ -1508,13 +1508,14 @@ void CSVCOL::WriteColumn(PGLOBAL g)
/*********************************************************************/
/* Get the string representation of the column value. */
/*********************************************************************/
- p = Value->ShowValue(buf);
+ p = Value->GetCharString(Buf);
+ n = strlen(p);
if (trace(2))
- htrc("new length(%p)=%d\n", p, strlen(p));
+ htrc("new length(%p)=%d\n", p, n);
- if ((signed)strlen(p) > flen) {
- sprintf(g->Message, MSG(BAD_FLD_LENGTH), Name, p, flen,
+ if (n > flen) {
+ sprintf(g->Message, MSG(BAD_FLD_LENGTH), Name, p, n,
tdbp->RowNumber(g), tdbp->GetFile(g));
throw 34;
} else if (Dsp)
diff --git a/storage/connect/tabjdbc.cpp b/storage/connect/tabjdbc.cpp
index adb3fc4fb51f8bb54b8e2c02b6ab04d442852209..c6b2802c1f62fbcf49d6bbcd992060254fadc6be 100644
--- a/storage/connect/tabjdbc.cpp
+++ b/storage/connect/tabjdbc.cpp
@@ -1,11 +1,11 @@
/************* TabJDBC C++ Program Source Code File (.CPP) *************/
/* PROGRAM NAME: TABJDBC */
/* ------------- */
-/* Version 1.2 */
+/* Version 1.3 */
/* */
/* COPYRIGHT: */
/* ---------- */
-/* (C) Copyright to the author Olivier BERTRAND 2016-2017 */
+/* (C) Copyright to the author Olivier BERTRAND 2016-2019 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -185,10 +185,10 @@ int JDBCDEF::ParseURL(PGLOBAL g, char *url, bool b)
} else // host is a URL
Url = PlugDup(g, server->host);
- if (server->username)
+ if (!Username && server->username)
Username = PlugDup(g, server->username);
- if (server->password)
+ if (!Password && server->password)
Password = PlugDup(g, server->password);
return RC_NF;
@@ -558,33 +558,42 @@ bool TDBJDBC::OpenDB(PGLOBAL g)
this, Tdb_No, Use, Mode);
if (Use == USE_OPEN) {
- /*******************************************************************/
- /* Table already open, just replace it at its beginning. */
- /*******************************************************************/
- if (Memory == 1) {
- if ((Qrp = Jcp->AllocateResult(g, this)))
- Memory = 2; // Must be filled
- else
- Memory = 0; // Allocation failed, don't use it
-
- } else if (Memory == 2)
- Memory = 3; // Ok to use memory result
-
- if (Memory < 3) {
- // Method will depend on cursor type
- if ((Rbuf = Query ? Jcp->Rewind(Query->GetStr()) : 0) < 0)
- if (Mode != MODE_READX) {
- Jcp->Close();
- return true;
- } else
- Rbuf = 0;
+ if (Mode == MODE_READ || Mode == MODE_READX) {
+ /*****************************************************************/
+ /* Table already open, just replace it at its beginning. */
+ /*****************************************************************/
+ if (Memory == 1) {
+ if ((Qrp = Jcp->AllocateResult(g, this)))
+ Memory = 2; // Must be filled
+ else
+ Memory = 0; // Allocation failed, don't use it
- } else
- Rbuf = Qrp->Nblin;
+ } else if (Memory == 2)
+ Memory = 3; // Ok to use memory result
+
+ if (Memory < 3) {
+ // Method will depend on cursor type
+ if ((Rbuf = Query ? Jcp->Rewind(Query->GetStr()) : 0) < 0)
+ if (Mode != MODE_READX) {
+ Jcp->Close();
+ return true;
+ } else
+ Rbuf = 0;
+
+ } else
+ Rbuf = Qrp->Nblin;
+
+ CurNum = 0;
+ Fpos = 0;
+ Curpos = 1;
+ } else if (Mode == MODE_UPDATE || Mode == MODE_DELETE) {
+ // new update coming from a trigger or procedure
+ Query = NULL;
+ SetCondFil(NULL);
+ Qrystr = To_Def->GetStringCatInfo(g, "Query_String", "?");
+ } else { //if (Mode == MODE_INSERT)
+ } // endif Mode
- CurNum = 0;
- Fpos = 0;
- Curpos = 1;
return false;
} // endif use
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp
index c0d36efcf42db5c252b4f85a0b213a04b3196ca7..afab52aa282530ca6c156a8e42e3a26fc7e02498 100644
--- a/storage/connect/tabjson.cpp
+++ b/storage/connect/tabjson.cpp
@@ -1,6 +1,6 @@
/************* tabjson C++ Program Source Code File (.CPP) *************/
-/* PROGRAM NAME: tabjson Version 1.6 */
-/* (C) Copyright to the author Olivier BERTRAND 2014 - 2018 */
+/* PROGRAM NAME: tabjson Version 1.7 */
+/* (C) Copyright to the author Olivier BERTRAND 2014 - 2019 */
/* This program are the JSON class DB execution routines. */
/***********************************************************************/
@@ -110,8 +110,8 @@ PQRYRES JSONColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt, bool info)
buftyp, fldtyp, length, false, false);
crp = qrp->Colresp->Next->Next->Next->Next->Next->Next;
- crp->Name = "Nullable";
- crp->Next->Name = "Jpath";
+ crp->Name = PlugDup(g, "Nullable");
+ crp->Next->Name = PlugDup(g, "Jpath");
if (info || !qrp)
return qrp;
diff --git a/storage/connect/user_connect.cc b/storage/connect/user_connect.cc
index a2a8faf9b38b51c38bdb4002d5931113df9825f6..d366e0222df5d740d167c816d08685a93ac9a6dd 100644
--- a/storage/connect/user_connect.cc
+++ b/storage/connect/user_connect.cc
@@ -177,7 +177,8 @@ bool user_connect::CheckCleanup(bool force)
g->Createas = 0;
g->Alchecked = 0;
g->Mrr = 0;
- last_query_id= thdp->query_id;
+ g->More = 0;
+ last_query_id= thdp->query_id;
if (trace(65) && !force)
printf("=====> Begin new query %llu\n", last_query_id);
diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp
index e159efaa989235937c3ed62682159b1ae0d1c21f..d9330a68a15783dad2874346788b8a02c5f40571 100644
--- a/storage/connect/value.cpp
+++ b/storage/connect/value.cpp
@@ -1,7 +1,7 @@
/************* Value C++ Functions Source Code File (.CPP) *************/
-/* Name: VALUE.CPP Version 2.8 */
+/* Name: VALUE.CPP Version 2.9 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2001-2017 */
+/* (C) Copyright to the author Olivier BERTRAND 2001-2019 */
/* */
/* This file contains the VALUE and derived classes family functions. */
/* These classes contain values of different types. They are used so */
@@ -882,18 +882,16 @@ bool TYPVAL::GetBinValue(void *buf, int buflen, bool go)
/* TYPVAL ShowValue: get string representation of a typed value. */
/***********************************************************************/
template
-char *TYPVAL::ShowValue(char *buf, int len)
+int TYPVAL::ShowValue(char *buf, int len)
{
- sprintf(buf, Xfmt, len, Tval);
- return buf;
+ return snprintf(buf, len + 1, Xfmt, len, Tval);
} // end of ShowValue
template <>
-char *TYPVAL::ShowValue(char *buf, int len)
+int TYPVAL::ShowValue(char *buf, int len)
{
- // TODO: use snprintf to avoid possible overflow
- sprintf(buf, Xfmt, len, Prec, Tval);
- return buf;
+ // TODO: use a more appropriate format to avoid possible truncation
+ return snprintf(buf, len + 1, Xfmt, len, Prec, Tval);
} // end of ShowValue
/***********************************************************************/
@@ -1588,10 +1586,17 @@ bool TYPVAL::GetBinValue(void *buf, int buflen, bool go)
/***********************************************************************/
/* STRING ShowValue: get string representation of a char value. */
/***********************************************************************/
-char *TYPVAL::ShowValue(char *, int)
- {
- return Strp;
- } // end of ShowValue
+int TYPVAL::ShowValue(char *buf, int buflen)
+{
+ int len = (Null) ? 0 : strlen(Strp);
+
+ if (buf && buf != Strp) {
+ memset(buf, ' ', buflen + 1);
+ memcpy(buf, Strp, MY_MIN(len, buflen));
+ } // endif buf
+
+ return len;
+} // end of ShowValue
/***********************************************************************/
/* STRING GetCharString: get string representation of a char value. */
@@ -1800,10 +1805,9 @@ void DECVAL::Reset(void)
/***********************************************************************/
/* DECIMAL ShowValue: get string representation right justified. */
/***********************************************************************/
-char *DECVAL::ShowValue(char *buf, int len)
+int DECVAL::ShowValue(char *buf, int len)
{
- sprintf(buf, Xfmt, len, Strp);
- return buf;
+ return snprintf(buf, len + 1, Xfmt, len, Strp);
} // end of ShowValue
/***********************************************************************/
@@ -1868,14 +1872,13 @@ int DECVAL::CompareValue(PVAL vp)
BINVAL::BINVAL(PGLOBAL g, void *p, int cl, int n) : VALUE(TYPE_BIN)
{
assert(g);
-//Len = n;
- Len = (g) ? n : (p) ? strlen((char*)p) : 0;
+ Len = n;
Clen = cl;
Binp = PlugSubAlloc(g, NULL, Clen + 1);
memset(Binp, 0, Clen + 1);
if (p)
- memcpy(Binp, p, Len);
+ memcpy(Binp, p, MY_MIN(Len,Clen));
Chrp = NULL;
} // end of BINVAL constructor
@@ -2264,14 +2267,12 @@ bool BINVAL::GetBinValue(void *buf, int buflen, bool go)
/***********************************************************************/
/* BINVAL ShowValue: get string representation of a binary value. */
/***********************************************************************/
-char *BINVAL::ShowValue(char *buf, int len)
- {
- //int n = MY_MIN(Len, len / 2);
-
- //sprintf(buf, GetXfmt(), n, Binp);
- //return buf;
- return (char*)Binp;
- } // end of ShowValue
+int BINVAL::ShowValue(char *buf, int len)
+{
+ memset(buf, 0, len + 1);
+ memcpy(buf, Binp, MY_MIN(len, Len));
+ return Len;
+} // end of ShowValue
/***********************************************************************/
/* BINVAL GetCharString: get string representation of a binary value. */
@@ -2749,43 +2750,33 @@ char *DTVAL::GetCharString(char *p)
/***********************************************************************/
/* DTVAL ShowValue: get string representation of a date value. */
/***********************************************************************/
-char *DTVAL::ShowValue(char *buf, int len)
- {
- if (Pdtp) {
- char *p;
+int DTVAL::ShowValue(char *buf, int len)
+{
+ int rv = 0;
+ if (Pdtp) {
if (!Null) {
- size_t m, n = 0;
+ size_t n = 0, m = len + 1;
struct tm tm, *ptm = GetGmTime(&tm);
-
-
-
- if (Len < len) {
- p = buf;
- m = len;
- } else {
- p = Sdate;
- m = Len + 1;
- } // endif Len
if (ptm)
- n = strftime(p, m, Pdtp->OutFmt, ptm);
+ n = strftime(buf, m, Pdtp->OutFmt, ptm);
if (!n) {
- *p = '\0';
- strncat(p, "Error", m);
- } // endif n
+ *buf = '\0';
+ strncat(buf, "Error", m);
+ rv = 5;
+ } else
+ rv = (int)n;
- } else {
- p = buf;
- *p = '\0'; // DEFAULT VALUE ???
- } // endif Null
+ } else
+ *buf = '\0'; // DEFAULT VALUE ???
- return p;
} else
- return TYPVAL::ShowValue(buf, len);
+ rv = TYPVAL::ShowValue(buf, len);
- } // end of ShowValue
+ return rv;
+} // end of ShowValue
#if 0 // Not used by CONNECT
/***********************************************************************/
diff --git a/storage/connect/value.h b/storage/connect/value.h
index 6613e25100a594f1bd4326cdf44f70dae11ee818..4f7d9a440fa955d5f033c306e8ea9816243a1af1 100644
--- a/storage/connect/value.h
+++ b/storage/connect/value.h
@@ -1,7 +1,7 @@
/**************** Value H Declares Source Code File (.H) ***************/
-/* Name: VALUE.H Version 2.3 */
+/* Name: VALUE.H Version 2.4 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2001-2017 */
+/* (C) Copyright to the author Olivier BERTRAND 2001-2019 */
/* */
/* This file contains the VALUE and derived classes declares. */
/***********************************************************************/
@@ -117,7 +117,7 @@ class DllExport VALUE : public BLOCK {
virtual void SetValue_pvblk(PVBLK blk, int n) = 0;
virtual void SetBinValue(void *p) = 0;
virtual bool GetBinValue(void *buf, int buflen, bool go) = 0;
- virtual char *ShowValue(char *buf, int len = 0) = 0;
+ virtual int ShowValue(char *buf, int len) = 0;
virtual char *GetCharString(char *p) = 0;
virtual bool IsEqual(PVAL vp, bool chktype) = 0;
virtual bool Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op);
@@ -229,7 +229,7 @@ class DllExport TYPVAL : public VALUE {
virtual void SetValue_pvblk(PVBLK blk, int n);
virtual void SetBinValue(void *p);
virtual bool GetBinValue(void *buf, int buflen, bool go);
- virtual char *ShowValue(char *buf, int);
+ virtual int ShowValue(char *buf, int len);
virtual char *GetCharString(char *p);
virtual bool IsEqual(PVAL vp, bool chktype);
virtual bool Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op);
@@ -302,7 +302,7 @@ class DllExport TYPVAL: public VALUE {
virtual void SetBinValue(void *p);
virtual int CompareValue(PVAL vp);
virtual bool GetBinValue(void *buf, int buflen, bool go);
- virtual char *ShowValue(char *buf, int);
+ virtual int ShowValue(char *buf, int len);
virtual char *GetCharString(char *p);
virtual bool IsEqual(PVAL vp, bool chktype);
virtual bool Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op);
@@ -334,7 +334,7 @@ class DllExport DECVAL: public TYPVAL {
// Methods
virtual bool GetBinValue(void *buf, int buflen, bool go);
- virtual char *ShowValue(char *buf, int);
+ virtual int ShowValue(char *buf, int len);
virtual bool IsEqual(PVAL vp, bool chktype);
virtual int CompareValue(PVAL vp);
@@ -387,7 +387,7 @@ class DllExport BINVAL: public VALUE {
virtual void SetBinValue(void *p);
virtual bool GetBinValue(void *buf, int buflen, bool go);
virtual int CompareValue(PVAL) {assert(false); return 0;}
- virtual char *ShowValue(char *buf, int);
+ virtual int ShowValue(char *buf, int len);
virtual char *GetCharString(char *p);
virtual bool IsEqual(PVAL vp, bool chktype);
virtual bool FormatValue(PVAL vp, PCSZ fmt);
@@ -415,7 +415,7 @@ class DllExport DTVAL : public TYPVAL {
virtual void SetValue_psz(PCSZ s);
virtual void SetValue_pvblk(PVBLK blk, int n);
virtual char *GetCharString(char *p);
- virtual char *ShowValue(char *buf, int);
+ virtual int ShowValue(char *buf, int len);
virtual bool FormatValue(PVAL vp, PCSZ fmt);
bool SetFormat(PGLOBAL g, PCSZ fmt, int len, int year = 0);
bool SetFormat(PGLOBAL g, PVAL valp);
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index d234aa03edab50128cae616e7e2511da697eb392..a0b2cb1ab3a354029bc056b80eb8f017bbb04199 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -408,7 +408,6 @@ static const int bulk_padding= 64; // bytes "overhead" in packet
/* Variables used when chopping off trailing characters */
static const uint sizeof_trailing_comma= sizeof(", ") - 1;
-static const uint sizeof_trailing_closeparen= sizeof(") ") - 1;
static const uint sizeof_trailing_and= sizeof(" AND ") - 1;
static const uint sizeof_trailing_where= sizeof(" WHERE ") - 1;
diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h
index a23375cbe58ebe94e1590456e79e71521b3847af..78f959634dad9ccf6371fe4bd1b34b92abf1d596 100644
--- a/storage/federated/ha_federated.h
+++ b/storage/federated/ha_federated.h
@@ -89,7 +89,6 @@ class ha_federated: public handler
*/
DYNAMIC_ARRAY results;
bool position_called, table_will_be_deleted;
- uint fetch_num; // stores the fetch num
MYSQL_ROW_OFFSET current_position; // Current position used by ::position()
int remote_error_number;
char remote_error_buf[FEDERATED_QUERY_BUFFER_SIZE];
diff --git a/storage/federatedx/federatedx_io.cc b/storage/federatedx/federatedx_io.cc
index 1e0348e3bf8248e57c46abf5664e084146eb926f..5baec617cda858ebf6e7c8a6d8e412a40337f7e5 100644
--- a/storage/federatedx/federatedx_io.cc
+++ b/storage/federatedx/federatedx_io.cc
@@ -54,8 +54,6 @@ static const io_schemes_st federated_io_schemes[] =
{ "null", instantiate_io_null } /* must be last element */
};
-const uint federated_io_schemes_count= array_elements(federated_io_schemes);
-
federatedx_io::federatedx_io(FEDERATEDX_SERVER *aserver)
: server(aserver), owner_ptr(0), txn_next(0), idle_next(0),
active(FALSE), busy(FALSE), readonly(TRUE)
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index 50be6575a83c5acd7d183a36eb6a9697595f86ef..0c3d39c1ab545445bb45c87938d4ecf45324f2bb 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -337,7 +337,6 @@ static const int bulk_padding= 64; // bytes "overhead" in packet
/* Variables used when chopping off trailing characters */
static const uint sizeof_trailing_comma= sizeof(", ") - 1;
-static const uint sizeof_trailing_closeparen= sizeof(") ") - 1;
static const uint sizeof_trailing_and= sizeof(" AND ") - 1;
static const uint sizeof_trailing_where= sizeof(" WHERE ") - 1;
diff --git a/storage/federatedx/ha_federatedx.h b/storage/federatedx/ha_federatedx.h
index f3af725862314c454a7a1e40b1ff45cdc114f6ee..56c34d9ef370f7542d66bc4ce612b1ec521c13bf 100644
--- a/storage/federatedx/ha_federatedx.h
+++ b/storage/federatedx/ha_federatedx.h
@@ -270,7 +270,6 @@ class ha_federatedx: public handler
*/
DYNAMIC_ARRAY results;
bool position_called;
- uint fetch_num; // stores the fetch num
int remote_error_number;
char remote_error_buf[FEDERATEDX_QUERY_BUFFER_SIZE];
bool ignore_duplicates, replace_duplicates;
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index 2a45f05c463605767f6b6c1d09d2564e5b6a69a5..c873e77f6ac3e2cda182e3f9f6b7bbdd5b00e804 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -1,4 +1,5 @@
# Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2019, MariaDB Corporation.
#
# 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
@@ -84,7 +85,14 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DUNIV_DEBUG -DUNIV_SYNC_DEB
CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU)
+MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-class-memaccess")
+
IF(NOT MSVC)
+ # Work around MDEV-18417, MDEV-18656, MDEV-18417
+ IF(WITH_ASAN AND CMAKE_COMPILER_IS_GNUCC AND
+ CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
+ SET_SOURCE_FILES_PROPERTIES(trx/trx0rec.cc PROPERTIES COMPILE_FLAGS -O1)
+ ENDIF()
CHECK_FUNCTION_EXISTS(posix_memalign HAVE_POSIX_MEMALIGN)
IF(HAVE_POSIX_MEMALIGN)
diff --git a/storage/innobase/btr/btr0scrub.cc b/storage/innobase/btr/btr0scrub.cc
index 2e667e64d0b5d242f127f8bfac8d7f65b4d5d87b..0e7c0d5b0618b2f8a6383d3db5b1d7ab9bfac86f 100644
--- a/storage/innobase/btr/btr0scrub.cc
+++ b/storage/innobase/btr/btr0scrub.cc
@@ -145,10 +145,10 @@ btr_scrub_lock_dict_func(ulint space_id, bool lock_to_close_table,
time_t now = time(0);
if (now >= last + 30) {
fprintf(stderr,
- "WARNING: %s:%u waited " TIMETPF " seconds for"
+ "WARNING: %s:%u waited %ld seconds for"
" dict_sys lock, space: %lu"
" lock_to_close_table: %d\n",
- file, line, now - start, space_id,
+ file, line, (long)(now - start), space_id,
lock_to_close_table);
last = now;
diff --git a/storage/innobase/buf/buf0buddy.cc b/storage/innobase/buf/buf0buddy.cc
index c8c39e0caaf89ebd2d767e4211a8147372fca2ac..d11a5cf9873335d7ba04b057c7d4816986363c0f 100644
--- a/storage/innobase/buf/buf0buddy.cc
+++ b/storage/innobase/buf/buf0buddy.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2019, MariaDB Corporation.
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
@@ -480,7 +480,6 @@ buf_buddy_alloc_low(
{
buf_block_t* block;
- ut_ad(lru);
ut_ad(buf_pool_mutex_own(buf_pool));
ut_ad(!mutex_own(&buf_pool->zip_mutex));
ut_ad(i >= buf_buddy_get_slot(UNIV_ZIP_SIZE_MIN));
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 621433c1c5cf3bbe1973c368217fa4d00a50f389..78200198e62d723bbb182a0a6ccd1c9f9a53b43e 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -946,18 +946,31 @@ buf_page_is_corrupted(
#error "FIL_PAGE_LSN must be 64 bit aligned"
#endif
- /* declare empty pages non-corrupted */
- if (checksum_field1 == 0 && checksum_field2 == 0
- && *reinterpret_cast(read_buf +
- FIL_PAGE_LSN) == 0) {
- /* make sure that the page is really empty */
- for (ulint i = 0; i < UNIV_PAGE_SIZE; i++) {
- if (read_buf[i] != 0) {
- return(true);
+ /* A page filled with NUL bytes is considered not corrupted.
+ The FIL_PAGE_FILE_FLUSH_LSN field may be written nonzero for
+ the first page of each file of the system tablespace.
+ Ignore it for the system tablespace. */
+ if (!checksum_field1 && !checksum_field2) {
+ ulint i = 0;
+ do {
+ if (read_buf[i]) {
+ return true;
}
- }
+ } while (++i < FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
- return(false);
+#ifndef UNIV_INNOCHECKSUM
+ if (!space || !space->id) {
+ /* Skip FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
+ in the system tablespace. */
+ i += 8;
+ }
+#endif
+ do {
+ if (read_buf[i]) {
+ return true;
+ }
+ } while (++i < srv_page_size);
+ return false;
}
switch (curr_algo) {
diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc
index 593af089b005a6fafae4878fee80147a8fbd0f95..cda27de173670b75950eb170145831f8dc7c65e7 100644
--- a/storage/innobase/data/data0data.cc
+++ b/storage/innobase/data/data0data.cc
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -106,8 +107,6 @@ dtuple_set_n_fields(
dtuple_t* tuple, /*!< in: tuple */
ulint n_fields) /*!< in: number of fields */
{
- ut_ad(tuple);
-
tuple->n_fields = n_fields;
tuple->n_fields_cmp = n_fields;
}
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 2a37db4e0764a4b5070ddb142fe90901cd843cbf..1e9d9f8d74e5760ac6ea510d3f80150719cc5c72 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -940,7 +940,6 @@ dict_index_get_nth_field_pos(
ulint n_fields;
ulint pos;
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
field2 = dict_index_get_nth_field(index2, n);
@@ -1038,8 +1037,6 @@ dict_table_col_in_clustered_key(
ulint pos;
ulint n_fields;
- ut_ad(table);
-
col = dict_table_get_nth_col(table, n);
index = dict_table_get_first_index(table);
@@ -1214,7 +1211,6 @@ dict_table_add_system_columns(
dict_table_t* table, /*!< in/out: table */
mem_heap_t* heap) /*!< in: temporary heap */
{
- ut_ad(table);
ut_ad(table->n_def == table->n_cols - DATA_N_SYS_COLS);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
ut_ad(!table->cached);
@@ -1626,15 +1622,8 @@ dict_table_rename_in_cache(
ut_ad(mutex_own(&(dict_sys->mutex)));
/* store the old/current name to an automatic variable */
- if (strlen(table->name) + 1 <= sizeof(old_name)) {
- memcpy(old_name, table->name, strlen(table->name) + 1);
- } else {
- ut_print_timestamp(stderr);
- fprintf(stderr, "InnoDB: too long table name: '%s', "
- "max length is %d\n", table->name,
- MAX_FULL_NAME_LEN);
- ut_error;
- }
+ ut_a(strlen(table->name) < sizeof old_name);
+ strcpy(old_name, table->name);
fold = ut_fold_string(new_name);
@@ -1845,7 +1834,7 @@ dict_table_rename_in_cache(
ulint db_len;
char* old_id;
- char old_name_cs_filename[MAX_TABLE_NAME_LEN+20];
+ char old_name_cs_filename[MAX_FULL_NAME_LEN+1];
uint errors = 0;
/* All table names are internally stored in charset
@@ -1862,7 +1851,8 @@ dict_table_rename_in_cache(
in old_name_cs_filename */
strncpy(old_name_cs_filename, old_name,
- MAX_TABLE_NAME_LEN);
+ MAX_FULL_NAME_LEN);
+ old_name_cs_filename[MAX_FULL_NAME_LEN] = '\0';
if (strstr(old_name, TEMP_TABLE_PATH_PREFIX) == NULL) {
innobase_convert_to_system_charset(
@@ -1884,7 +1874,9 @@ dict_table_rename_in_cache(
/* Old name already in
my_charset_filename */
strncpy(old_name_cs_filename, old_name,
- MAX_TABLE_NAME_LEN);
+ MAX_FULL_NAME_LEN);
+ old_name_cs_filename[MAX_FULL_NAME_LEN]
+ = '\0';
}
}
@@ -1910,7 +1902,7 @@ dict_table_rename_in_cache(
/* This is a generated >= 4.0.18 format id */
- char table_name[MAX_TABLE_NAME_LEN] = "";
+ char table_name[MAX_TABLE_NAME_LEN + 1];
uint errors = 0;
if (strlen(table->name) > strlen(old_name)) {
@@ -1924,6 +1916,7 @@ dict_table_rename_in_cache(
/* Convert the table name to UTF-8 */
strncpy(table_name, table->name,
MAX_TABLE_NAME_LEN);
+ table_name[MAX_TABLE_NAME_LEN] = '\0';
innobase_convert_to_system_charset(
strchr(table_name, '/') + 1,
strchr(table->name, '/') + 1,
@@ -1933,9 +1926,10 @@ dict_table_rename_in_cache(
/* Table name could not be converted
from charset my_charset_filename to
UTF-8. This means that the table name
- is already in UTF-8 (#mysql#50). */
+ is already in UTF-8 (#mysql50#). */
strncpy(table_name, table->name,
MAX_TABLE_NAME_LEN);
+ table_name[MAX_TABLE_NAME_LEN] = '\0';
}
/* Replace the prefix 'databasename/tablename'
@@ -2026,8 +2020,7 @@ dict_table_change_id_in_cache(
dict_table_t* table, /*!< in/out: table object already in cache */
table_id_t new_id) /*!< in: new id to set */
{
- ut_ad(table);
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
/* Remove the table from the hash table of id's */
@@ -2053,7 +2046,6 @@ dict_table_remove_from_cache_low(
dict_foreign_t* foreign;
dict_index_t* index;
- ut_ad(table);
ut_ad(dict_lru_validate());
ut_a(table->n_ref_count == 0);
ut_a(table->n_rec_locks == 0);
@@ -2498,8 +2490,7 @@ dict_index_add_to_cache(
ulint n_ord;
ulint i;
- ut_ad(index);
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(index->n_def == index->n_fields);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(!dict_index_is_online_ddl(index));
@@ -4396,7 +4387,6 @@ dict_create_foreign_constraints_low(
const char* create_table_name;
const char* orig;
char create_name[MAX_TABLE_NAME_LEN + 1];
- char operation[8];
ut_ad(!srv_read_only_mode);
ut_ad(mutex_own(&(dict_sys->mutex)));
@@ -4407,41 +4397,33 @@ dict_create_foreign_constraints_low(
orig = ptr;
ptr = dict_accept(cs, ptr, "ALTER", &success);
- strcpy((char *)operation, success ? "Alter " : "Create ");
+ const char* const operation = success ? "Alter " : "Create ";
if (!success) {
orig = ptr;
ptr = dict_scan_to(ptr, "CREATE");
ptr = dict_scan_to(ptr, "TABLE");
ptr = dict_accept(cs, ptr, "TABLE", &success);
+ create_table_name = NULL;
if (success) {
ptr = dict_scan_table_name(cs, ptr, &table_to_create, name,
- &success, heap, &create_table_name);
- }
-
- if (success) {
- char *bufend;
- bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN,
- create_table_name, strlen(create_table_name),
- trx->mysql_thd, TRUE);
- create_name[bufend-create_name]='\0';
- ptr = orig;
- } else {
- char *bufend;
- ptr = orig;
- bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN,
- name, strlen(name), trx->mysql_thd, TRUE);
- create_name[bufend-create_name]='\0';
+ &success, heap, &create_table_name);
}
- goto loop;
+ ptr = orig;
+ const char* n = create_table_name ? create_table_name : name;
+ char *bufend = innobase_convert_name(create_name, MAX_TABLE_NAME_LEN,
+ n, strlen(n), trx->mysql_thd, TRUE);
+ create_name[bufend-create_name] = '\0';
+ } else {
+ strncpy(create_name, name, sizeof create_name);
+ create_name[(sizeof create_name) - 1] = '\0';
}
if (table == NULL) {
mutex_enter(&dict_foreign_err_mutex);
dict_foreign_error_report_low(ef, create_name);
- dict_foreign_error_report_low(ef, create_name);
fprintf(ef, "%s table %s with foreign key constraint"
" failed. Table %s not found from data dictionary."
" Error close to %s.\n",
@@ -4463,11 +4445,19 @@ dict_create_foreign_constraints_low(
}
orig = ptr;
- ptr = dict_accept(cs, ptr, "TABLE", &success);
-
- if (!success) {
-
- goto loop;
+ for (;;) {
+ ptr = dict_accept(cs, ptr, "TABLE", &success);
+ if (success) {
+ break;
+ }
+ ptr = dict_accept(cs, ptr, "ONLINE", &success);
+ if (success) {
+ continue;
+ }
+ ptr = dict_accept(cs, ptr, "IGNORE", &success);
+ if (!success) {
+ goto loop;
+ }
}
/* We are doing an ALTER TABLE: scan the table name we are altering */
@@ -4476,19 +4466,13 @@ dict_create_foreign_constraints_low(
ptr = dict_scan_table_name(cs, ptr, &table_to_alter, name,
&success, heap, &referenced_table_name);
- if (table_to_alter) {
- char *bufend;
- bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN,
- table_to_alter->name, strlen(table_to_alter->name),
- trx->mysql_thd, TRUE);
- create_name[bufend-create_name]='\0';
- } else {
- char *bufend;
- bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN,
- referenced_table_name, strlen(referenced_table_name),
- trx->mysql_thd, TRUE);
+ {
+ const char* n = table_to_alter
+ ? table_to_alter->name : referenced_table_name;
+ char* bufend = innobase_convert_name(
+ create_name, MAX_TABLE_NAME_LEN, n, strlen(n),
+ trx->mysql_thd, TRUE);
create_name[bufend-create_name]='\0';
-
}
if (!success) {
@@ -5298,7 +5282,6 @@ dict_foreign_parse_drop_constraints(
const char* id;
struct charset_info_st* cs;
- ut_a(trx);
ut_a(trx->mysql_thd);
cs = innobase_get_charset(trx->mysql_thd);
@@ -5471,9 +5454,8 @@ dict_index_check_search_tuple(
const dict_index_t* index, /*!< in: index tree */
const dtuple_t* tuple) /*!< in: tuple used in a search */
{
- ut_a(index);
- ut_a(dtuple_get_n_fields_cmp(tuple)
- <= dict_index_get_n_unique_in_tree(index));
+ ut_ad(dtuple_get_n_fields_cmp(tuple)
+ <= dict_index_get_n_unique_in_tree(index));
return(TRUE);
}
#endif /* UNIV_DEBUG */
@@ -7137,8 +7119,6 @@ dict_index_zip_success(
/*===================*/
dict_index_t* index) /*!< in/out: index to be updated. */
{
- ut_ad(index);
-
ulint zip_threshold = zip_failure_threshold_pct;
if (!zip_threshold) {
/* Disabled by user. */
@@ -7160,8 +7140,6 @@ dict_index_zip_failure(
/*===================*/
dict_index_t* index) /*!< in/out: index to be updated. */
{
- ut_ad(index);
-
ulint zip_threshold = zip_failure_threshold_pct;
if (!zip_threshold) {
/* Disabled by user. */
@@ -7189,8 +7167,6 @@ dict_index_zip_pad_optimal_page_size(
ulint min_sz;
ulint sz;
- ut_ad(index);
-
if (!zip_failure_threshold_pct) {
/* Disabled by user. */
return(UNIV_PAGE_SIZE);
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc
index c67e581621eca2e116bb220fcfcf0555a2d09103..015518858bcced33f6bb18aa9612e4098c1e20c9 100644
--- a/storage/innobase/dict/dict0mem.cc
+++ b/storage/innobase/dict/dict0mem.cc
@@ -2,7 +2,7 @@
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
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
@@ -275,7 +275,6 @@ dict_mem_table_add_col(
dict_col_t* col;
ulint i;
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
ut_ad(!heap == !name);
@@ -320,7 +319,8 @@ dict_mem_table_col_rename_low(
ut_ad(to_len <= NAME_LEN);
char from[NAME_LEN + 1];
- strncpy(from, s, NAME_LEN + 1);
+ strncpy(from, s, sizeof from - 1);
+ from[sizeof from - 1] = '\0';
if (from_len == to_len) {
/* The easy case: simply replace the column name in
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index 364add4791df210340023375783cb09b649eada9..063646891731e222d030cbacc0cf33d0ed8d0254 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2009, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2009, 2019, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -2499,7 +2499,6 @@ dict_stats_report_error(
return (err);
}
-
/** Save the table's statistics into the persistent statistics storage.
@param[in] table_orig table whose stats to save
@param[in] only_for_index if this is non-NULL, then stats for indexes
@@ -3208,6 +3207,8 @@ dict_stats_update_for_index(
if (dict_stats_persistent_storage_check(false)) {
dict_table_stats_lock(index->table, RW_X_LATCH);
dict_stats_analyze_index(index);
+ index->table->stat_sum_of_other_index_sizes
+ += index->stat_index_size;
dict_table_stats_unlock(index->table, RW_X_LATCH);
dict_stats_save(index->table, &index->id);
DBUG_VOID_RETURN;
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index fb84b5703bfc52d9ffbed69e5e5ea2ce0172e005..296096e44d0101e9d1e8f22bf7dff8d614a6a496 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -2453,9 +2453,9 @@ fil_space_crypt_close_tablespace(
if (now >= last + 30) {
ib_logf(IB_LOG_LEVEL_WARN,
- "Waited " TIMETPF " seconds to drop space: %s (" ULINTPF
+ "Waited %ld seconds to drop space: %s (" ULINTPF
") active threads %u flushing=%d.",
- now - start, space->name, space->id, cnt, flushing);
+ (long)(now - start), space->name, space->id, cnt, flushing);
last = now;
}
}
diff --git a/storage/innobase/fts/fts0blex.cc b/storage/innobase/fts/fts0blex.cc
index 2d71934fa0ef65323b976c4b8610f39038d92fa6..84811050e887d2aaf85a7e25e12a07d4beb44742 100644
--- a/storage/innobase/fts/fts0blex.cc
+++ b/storage/innobase/fts/fts0blex.cc
@@ -1,4 +1,3 @@
-#include "univ.i"
#line 2 "fts0blex.cc"
#line 4 "fts0blex.cc"
@@ -9,12 +8,222 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define fts0b_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer fts0b_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define fts0b_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer fts0b_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define fts0b_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer fts0b_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define fts0b_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string fts0b_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define fts0b_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes fts0b_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define fts0b_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer fts0b_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define fts0b_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer fts0b_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define fts0b_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state fts0b_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define fts0b_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer fts0b_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define fts0bpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state fts0bpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define fts0bpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state fts0bpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define fts0bensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack fts0bensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define fts0blex_ALREADY_DEFINED
+#else
+#define yylex fts0blex
+#endif
+
+#ifdef yyrestart
+#define fts0brestart_ALREADY_DEFINED
+#else
+#define yyrestart fts0brestart
+#endif
+
+#ifdef yylex_init
+#define fts0blex_init_ALREADY_DEFINED
+#else
+#define yylex_init fts0blex_init
+#endif
+
+#ifdef yylex_init_extra
+#define fts0blex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra fts0blex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define fts0blex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy fts0blex_destroy
+#endif
+
+#ifdef yyget_debug
+#define fts0bget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug fts0bget_debug
+#endif
+
+#ifdef yyset_debug
+#define fts0bset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug fts0bset_debug
+#endif
+
+#ifdef yyget_extra
+#define fts0bget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra fts0bget_extra
+#endif
+
+#ifdef yyset_extra
+#define fts0bset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra fts0bset_extra
+#endif
+
+#ifdef yyget_in
+#define fts0bget_in_ALREADY_DEFINED
+#else
+#define yyget_in fts0bget_in
+#endif
+
+#ifdef yyset_in
+#define fts0bset_in_ALREADY_DEFINED
+#else
+#define yyset_in fts0bset_in
+#endif
+
+#ifdef yyget_out
+#define fts0bget_out_ALREADY_DEFINED
+#else
+#define yyget_out fts0bget_out
+#endif
+
+#ifdef yyset_out
+#define fts0bset_out_ALREADY_DEFINED
+#else
+#define yyset_out fts0bset_out
+#endif
+
+#ifdef yyget_leng
+#define fts0bget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng fts0bget_leng
+#endif
+
+#ifdef yyget_text
+#define fts0bget_text_ALREADY_DEFINED
+#else
+#define yyget_text fts0bget_text
+#endif
+
+#ifdef yyget_lineno
+#define fts0bget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno fts0bget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define fts0bset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno fts0bset_lineno
+#endif
+
+#ifdef yyget_column
+#define fts0bget_column_ALREADY_DEFINED
+#else
+#define yyget_column fts0bget_column
+#endif
+
+#ifdef yyset_column
+#define fts0bset_column_ALREADY_DEFINED
+#else
+#define yyset_column fts0bset_column
+#endif
+
+#ifdef yywrap
+#define fts0bwrap_ALREADY_DEFINED
+#else
+#define yywrap fts0bwrap
+#endif
+
+#ifdef yyalloc
+#define fts0balloc_ALREADY_DEFINED
+#else
+#define yyalloc fts0balloc
+#endif
+
+#ifdef yyrealloc
+#define fts0brealloc_ALREADY_DEFINED
+#else
+#define yyrealloc fts0brealloc
+#endif
+
+#ifdef yyfree
+#define fts0bfree_ALREADY_DEFINED
+#else
+#define yyfree fts0bfree
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -35,7 +244,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -52,7 +261,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -85,40 +294,32 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
+/* begin standard C++ headers. */
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -142,20 +343,16 @@ typedef void* yyscan_t;
* definition of BEGIN.
*/
#define BEGIN yyg->yy_start = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE fts0brestart(yyin ,yyscanner )
-
+#define YY_NEW_FILE yyrestart( yyin , yyscanner )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -180,33 +377,33 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
-#define YY_LESS_LINENO(n)
-
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = yyg->yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -219,7 +416,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -245,8 +442,8 @@ struct yy_buffer_state
*/
int yy_at_bol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
@@ -264,7 +461,7 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via fts0brestart()), so that the user can continue scanning by
+ * (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -281,84 +478,77 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-void fts0brestart (FILE *input_file ,yyscan_t yyscanner );
-void fts0b_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void fts0b_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0b_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void fts0bpop_buffer_state (yyscan_t yyscanner );
+void yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void yypop_buffer_state ( yyscan_t yyscanner );
-static void fts0bensure_buffer_stack (yyscan_t yyscanner );
-static void fts0b_load_buffer_state (yyscan_t yyscanner );
-static void fts0b_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
+static void yyensure_buffer_stack ( yyscan_t yyscanner );
+static void yy_load_buffer_state ( yyscan_t yyscanner );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
-#define YY_FLUSH_BUFFER fts0b_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-
-void *fts0balloc (yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-void *fts0brealloc (void *,yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-void fts0bfree (void * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-
-#define yy_new_buffer fts0b_create_buffer
+void *yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void yyfree ( void * , yyscan_t yyscanner );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- fts0bensure_buffer_stack (yyscanner); \
+ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- fts0b_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- fts0bensure_buffer_stack (yyscanner); \
+ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- fts0b_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
-#define fts0bwrap(n) 1
+#define fts0bwrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
typedef int yy_state_type;
#define yytext_ptr yytext_r
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
+static int yy_get_next_buffer ( yyscan_t yyscanner );
+static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = static_cast(yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-
#define YY_NUM_RULES 7
#define YY_END_OF_BUFFER 8
/* This struct is not used in this scanner,
@@ -368,13 +558,13 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[19] =
+static const flex_int16_t yy_accept[19] =
{ 0,
4, 4, 8, 4, 1, 6, 1, 7, 7, 2,
3, 4, 1, 1, 0, 5, 3, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -406,26 +596,26 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[9] =
+static const YY_CHAR yy_meta[9] =
{ 0,
1, 2, 3, 4, 5, 5, 5, 1
} ;
-static yyconst flex_int16_t yy_base[22] =
+static const flex_int16_t yy_base[22] =
{ 0,
0, 0, 22, 0, 7, 23, 0, 14, 23, 23,
7, 0, 0, 0, 5, 23, 0, 23, 11, 12,
16
} ;
-static yyconst flex_int16_t yy_def[22] =
+static const flex_int16_t yy_def[22] =
{ 0,
18, 1, 18, 19, 19, 18, 20, 21, 18, 18,
19, 19, 5, 20, 21, 18, 11, 0, 18, 18,
18
} ;
-static yyconst flex_int16_t yy_nxt[32] =
+static const flex_int16_t yy_nxt[32] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 13, 16,
14, 12, 12, 14, 17, 14, 15, 15, 16, 15,
@@ -433,7 +623,7 @@ static yyconst flex_int16_t yy_nxt[32] =
18
} ;
-static yyconst flex_int16_t yy_chk[32] =
+static const flex_int16_t yy_chk[32] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 5, 15,
5, 19, 19, 20, 11, 20, 21, 21, 8, 21,
@@ -451,7 +641,7 @@ static yyconst flex_int16_t yy_chk[32] =
#line 1 "fts0blex.l"
/*****************************************************************************
-Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 2014, 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
@@ -480,8 +670,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
/* Required for reentrant parser */
#define YY_DECL int fts_blexer(YYSTYPE* val, yyscan_t yyscanner)
+#line 674 "fts0blex.cc"
#define YY_NO_INPUT 1
-#line 484 "fts0blex.cc"
+#line 676 "fts0blex.cc"
#define INITIAL 0
@@ -499,72 +690,76 @@ this program; if not, write to the Free Software Foundation, Inc.,
/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
-{
+ {
- /* User-defined. Not touched by flex. */
- YY_EXTRA_TYPE yyextra_r;
+ /* User-defined. Not touched by flex. */
+ YY_EXTRA_TYPE yyextra_r;
- /* The rest are the same as the globals declared in the non-reentrant scanner. */
- FILE *yyin_r, *yyout_r;
- size_t yy_buffer_stack_top; /**< index of top of stack. */
- size_t yy_buffer_stack_max; /**< capacity of stack. */
- YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
- char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
- char *yy_c_buf_p;
- int yy_init;
- int yy_start;
- int yy_did_buffer_switch_on_eof;
- int yy_start_stack_ptr;
- int yy_start_stack_depth;
- int *yy_start_stack;
- yy_state_type yy_last_accepting_state;
- char* yy_last_accepting_cpos;
+ /* The rest are the same as the globals declared in the non-reentrant scanner. */
+ FILE *yyin_r, *yyout_r;
+ size_t yy_buffer_stack_top; /**< index of top of stack. */
+ size_t yy_buffer_stack_max; /**< capacity of stack. */
+ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
+ char yy_hold_char;
+ int yy_n_chars;
+ int yyleng_r;
+ char *yy_c_buf_p;
+ int yy_init;
+ int yy_start;
+ int yy_did_buffer_switch_on_eof;
+ int yy_start_stack_ptr;
+ int yy_start_stack_depth;
+ int *yy_start_stack;
+ yy_state_type yy_last_accepting_state;
+ char* yy_last_accepting_cpos;
- int yylineno_r;
- int yy_flex_debug_r;
+ int yylineno_r;
+ int yy_flex_debug_r;
- char *yytext_r;
- int yy_more_flag;
- int yy_more_len;
+ char *yytext_r;
+ int yy_more_flag;
+ int yy_more_len;
-}; /* end struct yyguts_t */
+ }; /* end struct yyguts_t */
-static int yy_init_globals (yyscan_t yyscanner );
+static int yy_init_globals ( yyscan_t yyscanner );
-int fts0blex_init (yyscan_t* scanner);
+int yylex_init (yyscan_t* scanner);
-int fts0blex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int fts0blex_destroy (yyscan_t yyscanner );
+int yylex_destroy ( yyscan_t yyscanner );
+
+int yyget_debug ( yyscan_t yyscanner );
-int fts0bget_debug (yyscan_t yyscanner );
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-void fts0bset_debug (int debug_flag ,yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0bget_extra (yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-void fts0bset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-FILE *fts0bget_in (yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-void fts0bset_in (FILE * in_str ,yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-FILE *fts0bget_out (yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-void fts0bset_out (FILE * out_str ,yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-int fts0bget_leng (yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-char *fts0bget_text (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-int fts0bget_lineno (yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
-void fts0bset_lineno (int line_number ,yyscan_t yyscanner );
+int yyget_column ( yyscan_t yyscanner );
+
+void yyset_column ( int _column_no , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -572,26 +767,29 @@ void fts0bset_lineno (int line_number ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int fts0bwrap (yyscan_t yyscanner );
+extern "C" int yywrap ( yyscan_t yyscanner );
#else
-extern int fts0bwrap (yyscan_t yyscanner );
+extern int yywrap ( yyscan_t yyscanner );
#endif
#endif
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
+static int yyinput ( yyscan_t yyscanner );
#else
-static int input (yyscan_t yyscanner );
+static int input ( yyscan_t yyscanner );
#endif
#endif
@@ -611,7 +809,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -623,7 +821,7 @@ static int input (yyscan_t yyscanner );
{ \
int c = '*'; \
int n; \
- for ( n = 0; n < static_cast(max_size) && \
+ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
@@ -635,8 +833,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
- while ( (result = static_cast(fread(buf, 1, max_size, yyin))) \
- == 0 && ferror(yyin) ) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -677,9 +874,9 @@ static int input (yyscan_t yyscanner );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int fts0blex (yyscan_t yyscanner);
+extern int yylex (yyscan_t yyscanner);
-#define YY_DECL int fts0blex (yyscan_t yyscanner)
+#define YY_DECL int yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
@@ -691,7 +888,7 @@ extern int fts0blex (yyscan_t yyscanner);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -701,15 +898,10 @@ extern int fts0blex (yyscan_t yyscanner);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-#line 43 "fts0blex.l"
-
-
-#line 712 "fts0blex.cc"
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( !yyg->yy_init )
{
@@ -729,15 +921,21 @@ YY_DECL
yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- fts0bensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- fts0b_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
- fts0b_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+#line 43 "fts0blex.l"
+
+
+#line 937 "fts0blex.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
@@ -753,7 +951,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -763,9 +961,9 @@ YY_DECL
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 19 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 18 );
@@ -840,7 +1038,7 @@ YY_RULE_SETUP
#line 73 "fts0blex.l"
ECHO;
YY_BREAK
-#line 843 "fts0blex.cc"
+#line 1042 "fts0blex.cc"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -858,7 +1056,7 @@ case YY_STATE_EOF(INITIAL):
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
- * fts0blex(). If so, then we have to assure
+ * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
@@ -919,7 +1117,7 @@ case YY_STATE_EOF(INITIAL):
{
yyg->yy_did_buffer_switch_on_eof = 0;
- if ( fts0bwrap(yyscanner ) )
+ if ( yywrap( yyscanner ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -972,7 +1170,8 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of fts0blex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -983,10 +1182,10 @@ case YY_STATE_EOF(INITIAL):
*/
static int yy_get_next_buffer (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1015,7 +1214,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1028,21 +1227,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = static_cast(b->yy_buf_size * 2);
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1051,11 +1250,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- fts0brealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -1063,8 +1263,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
}
@@ -1073,7 +1273,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read);
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1083,7 +1283,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- fts0brestart(yyin ,yyscanner);
+ yyrestart( yyin , yyscanner);
}
else
@@ -1097,12 +1297,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fts0brealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
yyg->yy_n_chars += number_to_move;
@@ -1116,17 +1319,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* yy_get_previous_state - get the state just before the EOB char was reached */
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yy_state_type yy_current_state;
+ char *yy_cp;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1136,9 +1339,9 @@ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 19 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -1149,13 +1352,13 @@ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
-static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
- register int yy_is_jam;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
- register char *yy_cp = yyg->yy_c_buf_p;
+ int yy_is_jam;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1165,24 +1368,29 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 19 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 18);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
- static int yyinput (yyscan_t yyscanner)
+ static int yyinput (yyscan_t yyscanner)
#else
- static int input (yyscan_t yyscanner)
+ static int input (yyscan_t yyscanner)
#endif
{
int c;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
*yyg->yy_c_buf_p = yyg->yy_hold_char;
@@ -1198,7 +1406,7 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1215,14 +1423,14 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
*/
/* Reset buffer status. */
- fts0brestart(yyin ,yyscanner);
+ yyrestart( yyin , yyscanner);
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( fts0bwrap(yyscanner ) )
- return EOF;
+ if ( yywrap( yyscanner ) )
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -1253,34 +1461,34 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
* @param yyscanner The scanner object.
* @note This function does not reset the start condition to @c INITIAL .
*/
-void fts0brestart (FILE * input_file , yyscan_t yyscanner)
+ void yyrestart (FILE * input_file , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! YY_CURRENT_BUFFER ){
- fts0bensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- fts0b_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
- fts0b_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
- fts0b_load_buffer_state(yyscanner );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
+ yy_load_buffer_state( yyscanner );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
* @param yyscanner The scanner object.
*/
-void fts0b_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body
* with
- * fts0bpop_buffer_state();
- * fts0bpush_buffer_state(new_buffer);
- */
- fts0bensure_buffer_stack (yyscanner);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1293,19 +1501,19 @@ void fts0b_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- fts0b_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
/* We don't actually know whether we did this switch during
- * EOF (fts0bwrap()) processing, but the only time this flag
- * is looked at is after fts0bwrap() is called, so it's safe
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yyg->yy_did_buffer_switch_on_eof = 1;
}
-static void fts0b_load_buffer_state (yyscan_t yyscanner)
+static void yy_load_buffer_state (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
@@ -1318,37 +1526,37 @@ static void fts0b_load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the allocated buffer state.
*/
-YY_BUFFER_STATE fts0b_create_buffer (FILE * file, int size , yyscan_t yyscanner)
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) fts0balloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in fts0b_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) fts0balloc(b->yy_buf_size + 2 ,yyscanner );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in fts0b_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- fts0b_init_buffer(b,file ,yyscanner);
+ yy_init_buffer( b, file , yyscanner);
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with fts0b_create_buffer()
+ * @param b a buffer created with yy_create_buffer()
* @param yyscanner The scanner object.
*/
-void fts0b_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -1357,37 +1565,37 @@ void fts0b_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- fts0bfree((void *) b->yy_ch_buf ,yyscanner );
+ yyfree( (void *) b->yy_ch_buf , yyscanner );
- fts0bfree((void *) b ,yyscanner );
+ yyfree( (void *) b , yyscanner );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a fts0brestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
-static void fts0b_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
{
int oerrno = errno;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- fts0b_flush_buffer(b ,yyscanner);
+ yy_flush_buffer( b , yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then fts0b_init_buffer was _probably_
- * called from fts0brestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
-
- b->yy_is_interactive = 0;
-
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = 0;
+
errno = oerrno;
}
@@ -1395,9 +1603,9 @@ static void fts0b_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yysca
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
* @param yyscanner The scanner object.
*/
-void fts0b_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -1416,7 +1624,7 @@ void fts0b_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- fts0b_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -1425,15 +1633,15 @@ void fts0b_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
* @param new_buffer The new state.
* @param yyscanner The scanner object.
*/
-void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL)
return;
- fts0bensure_buffer_stack(yyscanner);
+ yyensure_buffer_stack(yyscanner);
- /* This block is copied from fts0b_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -1447,8 +1655,8 @@ void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
yyg->yy_buffer_stack_top++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from fts0b_switch_to_buffer. */
- fts0b_load_buffer_state(yyscanner );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
@@ -1456,19 +1664,19 @@ void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
* The next element becomes the new top.
* @param yyscanner The scanner object.
*/
-void fts0bpop_buffer_state (yyscan_t yyscanner)
+void yypop_buffer_state (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER)
return;
- fts0b_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
+ yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
YY_CURRENT_BUFFER_LVALUE = NULL;
if (yyg->yy_buffer_stack_top > 0)
--yyg->yy_buffer_stack_top;
if (YY_CURRENT_BUFFER) {
- fts0b_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
}
@@ -1476,23 +1684,23 @@ void fts0bpop_buffer_state (yyscan_t yyscanner)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void fts0bensure_buffer_stack (yyscan_t yyscanner)
+static void yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yy_size_t num_to_alloc;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
- */
- num_to_alloc = 1;
- yyg->yy_buffer_stack = (struct yy_buffer_state**)fts0balloc
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in fts0bensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -1504,15 +1712,15 @@ static void fts0bensure_buffer_stack (yyscan_t yyscanner)
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
- num_to_alloc = static_cast(yyg->yy_buffer_stack_max + grow_size);
- yyg->yy_buffer_stack = (struct yy_buffer_state**)fts0brealloc
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in fts0bensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -1526,76 +1734,77 @@ static void fts0bensure_buffer_stack (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE fts0b_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) fts0balloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in fts0b_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = static_cast(b->yy_buf_size);
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- fts0b_switch_to_buffer(b ,yyscanner );
+ yy_switch_to_buffer( b , yyscanner );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to fts0blex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * fts0b_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE fts0b_scan_string (yyconst char * yystr , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
{
- return fts0b_scan_bytes(yystr,static_cast(strlen(yystr)), yyscanner);
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
}
-/** Setup the input buffer state to scan the given bytes. The next call to fts0blex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE fts0b_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) fts0balloc(n ,yyscanner );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n , yyscanner );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in fts0b_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = fts0b_scan_buffer(buf,n ,yyscanner);
+ b = yy_scan_buffer( buf, n , yyscanner);
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in fts0b_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -1609,9 +1818,11 @@ YY_BUFFER_STATE fts0b_scan_bytes (yyconst char * yybytes, int _yybytes_len , y
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
{
- (void) fprintf( stderr, "%s\n", msg );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -1622,8 +1833,8 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = yyg->yy_hold_char; \
yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
yyg->yy_hold_char = *yyg->yy_c_buf_p; \
@@ -1637,272 +1848,268 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
-YY_EXTRA_TYPE fts0bget_extra (yyscan_t yyscanner)
+YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyextra;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyextra;
}
/** Get the current line number.
* @param yyscanner The scanner object.
*/
-int fts0bget_lineno (yyscan_t yyscanner)
+int yyget_lineno (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- if (! YY_CURRENT_BUFFER)
- return 0;
-
- return yylineno;
+ if (! YY_CURRENT_BUFFER)
+ return 0;
+
+ return yylineno;
}
/** Get the current column number.
* @param yyscanner The scanner object.
*/
-int fts0bget_column (yyscan_t yyscanner)
+int yyget_column (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- if (! YY_CURRENT_BUFFER)
- return 0;
-
- return yycolumn;
+ if (! YY_CURRENT_BUFFER)
+ return 0;
+
+ return yycolumn;
}
/** Get the input stream.
* @param yyscanner The scanner object.
*/
-FILE *fts0bget_in (yyscan_t yyscanner)
+FILE *yyget_in (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyin;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyin;
}
/** Get the output stream.
* @param yyscanner The scanner object.
*/
-FILE *fts0bget_out (yyscan_t yyscanner)
+FILE *yyget_out (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyout;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyout;
}
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int fts0bget_leng (yyscan_t yyscanner)
+int yyget_leng (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyleng;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyleng;
}
/** Get the current token.
* @param yyscanner The scanner object.
*/
-char *fts0bget_text (yyscan_t yyscanner)
+char *yyget_text (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yytext;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yytext;
}
/** Set the user-defined data. This data is never touched by the scanner.
* @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object.
*/
-void fts0bset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
+void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyextra = user_defined ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyextra = user_defined ;
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
* @param yyscanner The scanner object.
*/
-void fts0bset_lineno (int line_number , yyscan_t yyscanner)
+void yyset_lineno (int _line_number , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* lineno is only valid if an input buffer exists. */
- if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "fts0bset_lineno called with no buffer" , yyscanner);
-
- yylineno = line_number;
+ /* lineno is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
+
+ yylineno = _line_number;
}
/** Set the current column.
- * @param line_number
+ * @param _column_no column number
* @param yyscanner The scanner object.
*/
-void fts0bset_column (int column_no , yyscan_t yyscanner)
+void yyset_column (int _column_no , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- /* column is only valid if an input buffer exists. */
- if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "fts0bset_column called with no buffer" , yyscanner);
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yycolumn = column_no;
+ /* column is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ YY_FATAL_ERROR( "yyset_column called with no buffer" );
+
+ yycolumn = _column_no;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
* @param yyscanner The scanner object.
- * @see fts0b_switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void fts0bset_in (FILE * in_str , yyscan_t yyscanner)
+void yyset_in (FILE * _in_str , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyin = _in_str ;
}
-void fts0bset_out (FILE * out_str , yyscan_t yyscanner)
+void yyset_out (FILE * _out_str , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyout = _out_str ;
}
-int fts0bget_debug (yyscan_t yyscanner)
+int yyget_debug (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yy_flex_debug;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yy_flex_debug;
}
-void fts0bset_debug (int bdebug , yyscan_t yyscanner)
+void yyset_debug (int _bdebug , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yy_flex_debug = _bdebug ;
}
/* Accessor methods for yylval and yylloc */
/* User-visible API */
-/* fts0blex_init is special because it creates the scanner itself, so it is
+/* yylex_init is special because it creates the scanner itself, so it is
* the ONLY reentrant function that doesn't take the scanner as the last argument.
* That's why we explicitly handle the declaration, instead of using our macros.
*/
-
-int fts0blex_init(yyscan_t* ptr_yy_globals)
-
+int yylex_init(yyscan_t* ptr_yy_globals)
{
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
- *ptr_yy_globals = (yyscan_t) fts0balloc ( sizeof( struct yyguts_t ), NULL );
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
- if (*ptr_yy_globals == NULL){
- errno = ENOMEM;
- return 1;
- }
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
- /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+ /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
- return yy_init_globals ( *ptr_yy_globals );
+ return yy_init_globals ( *ptr_yy_globals );
}
-/* fts0blex_init_extra has the same functionality as fts0blex_init, but follows the
+/* yylex_init_extra has the same functionality as yylex_init, but follows the
* convention of taking the scanner as the last argument. Note however, that
* this is a *pointer* to a scanner, as it will be allocated by this call (and
* is the reason, too, why this function also must handle its own declaration).
- * The user defined value in the first argument will be available to fts0balloc in
+ * The user defined value in the first argument will be available to yyalloc in
* the yyextra field.
*/
-
-int fts0blex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
-
+int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
{
- struct yyguts_t dummy_yyguts;
+ struct yyguts_t dummy_yyguts;
- fts0bset_extra (yy_user_defined, &dummy_yyguts);
+ yyset_extra (yy_user_defined, &dummy_yyguts);
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
- *ptr_yy_globals = (yyscan_t) fts0balloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
- if (*ptr_yy_globals == NULL){
- errno = ENOMEM;
- return 1;
- }
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
- /* By setting to 0xAA, we expose bugs in
- yy_init_globals. Leave at 0x00 for releases. */
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+ /* By setting to 0xAA, we expose bugs in
+ yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
- fts0bset_extra (yy_user_defined, *ptr_yy_globals);
+ yyset_extra (yy_user_defined, *ptr_yy_globals);
- return yy_init_globals ( *ptr_yy_globals );
+ return yy_init_globals ( *ptr_yy_globals );
}
static int yy_init_globals (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* Initialization is the same as for the non-reentrant scanner.
- * This function is called from fts0blex_destroy(), so don't allocate here.
- */
-
- yyg->yy_buffer_stack = 0;
- yyg->yy_buffer_stack_top = 0;
- yyg->yy_buffer_stack_max = 0;
- yyg->yy_c_buf_p = (char *) 0;
- yyg->yy_init = 0;
- yyg->yy_start = 0;
-
- yyg->yy_start_stack_ptr = 0;
- yyg->yy_start_stack_depth = 0;
- yyg->yy_start_stack = NULL;
-
- /* Defined in main.c */
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ yyg->yy_buffer_stack = NULL;
+ yyg->yy_buffer_stack_top = 0;
+ yyg->yy_buffer_stack_max = 0;
+ yyg->yy_c_buf_p = NULL;
+ yyg->yy_init = 0;
+ yyg->yy_start = 0;
+
+ yyg->yy_start_stack_ptr = 0;
+ yyg->yy_start_stack_depth = 0;
+ yyg->yy_start_stack = NULL;
+
+/* Defined in main.c */
#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
- /* For future reference: Set errno on error, since we are called by
- * fts0blex_init()
- */
- return 0;
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
}
-/* fts0blex_destroy is for both reentrant and non-reentrant scanners. */
-int fts0blex_destroy (yyscan_t yyscanner)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* Pop the buffer stack, destroying each element. */
+ /* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- fts0b_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
+ yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
- fts0bpop_buffer_state(yyscanner);
+ yypop_buffer_state(yyscanner);
}
/* Destroy the stack itself. */
- fts0bfree(yyg->yy_buffer_stack ,yyscanner);
+ yyfree(yyg->yy_buffer_stack , yyscanner);
yyg->yy_buffer_stack = NULL;
- /* Destroy the start condition stack. */
- fts0bfree(yyg->yy_start_stack ,yyscanner );
- yyg->yy_start_stack = NULL;
+ /* Destroy the start condition stack. */
+ yyfree( yyg->yy_start_stack , yyscanner );
+ yyg->yy_start_stack = NULL;
- /* Reset the globals. This is important in a non-reentrant scanner so the next time
- * fts0blex() is called, initialization will occur. */
- yy_init_globals( yyscanner);
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( yyscanner);
- /* Destroy the main struct (reentrant only). */
- fts0bfree ( yyscanner , yyscanner );
- yyscanner = NULL;
- return 0;
+ /* Destroy the main struct (reentrant only). */
+ yyfree ( yyscanner , yyscanner );
+ yyscanner = NULL;
+ return 0;
}
/*
@@ -1910,18 +2117,21 @@ int fts0blex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
{
- register int i;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -1929,13 +2139,18 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_A
}
#endif
-void *fts0balloc (yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void *yyalloc (yy_size_t size , yyscan_t yyscanner)
{
- return (void *) malloc( size );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ return malloc(size);
}
-void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -1943,15 +2158,18 @@ void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void fts0bfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void yyfree (void * ptr , yyscan_t yyscanner)
{
- free( (char *) ptr ); /* see fts0brealloc() for (char *) cast */
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
#line 73 "fts0blex.l"
+
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index 75258bb861096e79beb4e2277c3a45dcccdd8111..1ea3a8d2c6002ef3aae9463d05cf319a61a25cde 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2018, MariaDB Corporation.
+Copyright (c) 2016, 2019, MariaDB Corporation.
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
@@ -736,6 +736,7 @@ fts_reset_get_doc(
memset(get_doc, 0x0, sizeof(*get_doc));
get_doc->index_cache = ind_cache;
+ get_doc->cache = cache;
}
ut_ad(ib_vector_size(cache->get_docs)
@@ -4801,8 +4802,9 @@ fts_tokenize_document(
ut_a(!doc->tokens);
ut_a(doc->charset);
- doc->tokens = rbt_create_arg_cmp(
- sizeof(fts_token_t), innobase_fts_text_cmp, (void*) doc->charset);
+ doc->tokens = rbt_create_arg_cmp(sizeof(fts_token_t),
+ innobase_fts_text_cmp,
+ (void*) doc->charset);
for (ulint i = 0; i < doc->text.f_len; i += inc) {
inc = fts_process_token(doc, result, i, 0);
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc
index 77293bc867a02ebbed8a39958302bb322fd076a2..28e704eb9a5851d8deafbb6698af5e28aa501678 100644
--- a/storage/innobase/fts/fts0opt.cc
+++ b/storage/innobase/fts/fts0opt.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2007, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, MariaDB Corporation. All Rights reserved.
+Copyright (c) 2016, 2019, MariaDB Corporation.
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
@@ -673,18 +673,17 @@ fts_fetch_index_words(
fts_zip_t* zip = static_cast(user_arg);
que_node_t* exp = sel_node->select_list;
dfield_t* dfield = que_node_get_val(exp);
- short len = static_cast(dfield_get_len(dfield));
+
+ ut_a(dfield_get_len(dfield) <= FTS_MAX_WORD_LEN);
+
+ uint16 len = uint16(dfield_get_len(dfield));
void* data = dfield_get_data(dfield);
/* Skip the duplicate words. */
- if (zip->word.f_len == static_cast(len)
- && !memcmp(zip->word.f_str, data, len)) {
-
+ if (zip->word.f_len == len && !memcmp(zip->word.f_str, data, len)) {
return(TRUE);
}
- ut_a(len <= FTS_MAX_WORD_LEN);
-
memcpy(zip->word.f_str, data, len);
zip->word.f_len = len;
@@ -692,6 +691,9 @@ fts_fetch_index_words(
ut_a(zip->zp->next_in == NULL);
/* The string is prefixed by len. */
+ /* FIXME: This is not byte order agnostic (InnoDB data files
+ with FULLTEXT INDEX are not portable between little-endian and
+ big-endian systems!) */
zip->zp->next_in = reinterpret_cast(&len);
zip->zp->avail_in = sizeof(len);
@@ -717,14 +719,13 @@ fts_fetch_index_words(
ut_a(len <= FTS_MAX_WORD_LEN);
len = 0;
}
- break;
+ continue;
case Z_STREAM_END:
case Z_BUF_ERROR:
case Z_STREAM_ERROR:
default:
ut_error;
- break;
}
}
diff --git a/storage/innobase/fts/fts0tlex.cc b/storage/innobase/fts/fts0tlex.cc
index d4d9b4c48d1b7a949d1aa03c933ea30d0922cabc..73c34a607ca7de3bfbfe7497b02def640144ff42 100644
--- a/storage/innobase/fts/fts0tlex.cc
+++ b/storage/innobase/fts/fts0tlex.cc
@@ -1,4 +1,3 @@
-#include "univ.i"
#line 2 "fts0tlex.cc"
#line 4 "fts0tlex.cc"
@@ -9,12 +8,222 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define fts0t_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer fts0t_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define fts0t_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer fts0t_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define fts0t_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer fts0t_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define fts0t_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string fts0t_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define fts0t_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes fts0t_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define fts0t_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer fts0t_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define fts0t_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer fts0t_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define fts0t_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state fts0t_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define fts0t_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer fts0t_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define fts0tpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state fts0tpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define fts0tpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state fts0tpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define fts0tensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack fts0tensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define fts0tlex_ALREADY_DEFINED
+#else
+#define yylex fts0tlex
+#endif
+
+#ifdef yyrestart
+#define fts0trestart_ALREADY_DEFINED
+#else
+#define yyrestart fts0trestart
+#endif
+
+#ifdef yylex_init
+#define fts0tlex_init_ALREADY_DEFINED
+#else
+#define yylex_init fts0tlex_init
+#endif
+
+#ifdef yylex_init_extra
+#define fts0tlex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra fts0tlex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define fts0tlex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy fts0tlex_destroy
+#endif
+
+#ifdef yyget_debug
+#define fts0tget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug fts0tget_debug
+#endif
+
+#ifdef yyset_debug
+#define fts0tset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug fts0tset_debug
+#endif
+
+#ifdef yyget_extra
+#define fts0tget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra fts0tget_extra
+#endif
+
+#ifdef yyset_extra
+#define fts0tset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra fts0tset_extra
+#endif
+
+#ifdef yyget_in
+#define fts0tget_in_ALREADY_DEFINED
+#else
+#define yyget_in fts0tget_in
+#endif
+
+#ifdef yyset_in
+#define fts0tset_in_ALREADY_DEFINED
+#else
+#define yyset_in fts0tset_in
+#endif
+
+#ifdef yyget_out
+#define fts0tget_out_ALREADY_DEFINED
+#else
+#define yyget_out fts0tget_out
+#endif
+
+#ifdef yyset_out
+#define fts0tset_out_ALREADY_DEFINED
+#else
+#define yyset_out fts0tset_out
+#endif
+
+#ifdef yyget_leng
+#define fts0tget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng fts0tget_leng
+#endif
+
+#ifdef yyget_text
+#define fts0tget_text_ALREADY_DEFINED
+#else
+#define yyget_text fts0tget_text
+#endif
+
+#ifdef yyget_lineno
+#define fts0tget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno fts0tget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define fts0tset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno fts0tset_lineno
+#endif
+
+#ifdef yyget_column
+#define fts0tget_column_ALREADY_DEFINED
+#else
+#define yyget_column fts0tget_column
+#endif
+
+#ifdef yyset_column
+#define fts0tset_column_ALREADY_DEFINED
+#else
+#define yyset_column fts0tset_column
+#endif
+
+#ifdef yywrap
+#define fts0twrap_ALREADY_DEFINED
+#else
+#define yywrap fts0twrap
+#endif
+
+#ifdef yyalloc
+#define fts0talloc_ALREADY_DEFINED
+#else
+#define yyalloc fts0talloc
+#endif
+
+#ifdef yyrealloc
+#define fts0trealloc_ALREADY_DEFINED
+#else
+#define yyrealloc fts0trealloc
+#endif
+
+#ifdef yyfree
+#define fts0tfree_ALREADY_DEFINED
+#else
+#define yyfree fts0tfree
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -35,7 +244,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -52,7 +261,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -85,40 +294,32 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
+/* begin standard C++ headers. */
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -142,20 +343,16 @@ typedef void* yyscan_t;
* definition of BEGIN.
*/
#define BEGIN yyg->yy_start = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE fts0trestart(yyin ,yyscanner )
-
+#define YY_NEW_FILE yyrestart( yyin , yyscanner )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -180,12 +377,18 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
-
+ #define YY_LINENO_REWIND_TO(ptr)
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -199,14 +402,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -219,7 +416,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -264,7 +461,7 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via fts0trestart()), so that the user can continue scanning by
+ * (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -281,84 +478,77 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-void fts0trestart (FILE *input_file ,yyscan_t yyscanner );
-void fts0t_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void fts0t_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0t_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void fts0tpop_buffer_state (yyscan_t yyscanner );
+void yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void yypop_buffer_state ( yyscan_t yyscanner );
-static void fts0tensure_buffer_stack (yyscan_t yyscanner );
-static void fts0t_load_buffer_state (yyscan_t yyscanner );
-static void fts0t_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
+static void yyensure_buffer_stack ( yyscan_t yyscanner );
+static void yy_load_buffer_state ( yyscan_t yyscanner );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
-#define YY_FLUSH_BUFFER fts0t_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-
-void *fts0talloc (yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-void *fts0trealloc (void *,yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-void fts0tfree (void * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-
-#define yy_new_buffer fts0t_create_buffer
+void *yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void yyfree ( void * , yyscan_t yyscanner );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- fts0tensure_buffer_stack (yyscanner); \
+ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- fts0t_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- fts0tensure_buffer_stack (yyscanner); \
+ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- fts0t_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
-#define fts0twrap(n) 1
+#define fts0twrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
typedef int yy_state_type;
#define yytext_ptr yytext_r
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
+static int yy_get_next_buffer ( yyscan_t yyscanner );
+static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = static_cast(yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-
#define YY_NUM_RULES 7
#define YY_END_OF_BUFFER 8
/* This struct is not used in this scanner,
@@ -368,13 +558,13 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[17] =
+static const flex_int16_t yy_accept[17] =
{ 0,
4, 4, 8, 4, 1, 6, 1, 5, 5, 2,
4, 1, 1, 0, 3, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -406,31 +596,31 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[8] =
+static const YY_CHAR yy_meta[8] =
{ 0,
1, 2, 3, 4, 5, 5, 1
} ;
-static yyconst flex_int16_t yy_base[20] =
+static const flex_int16_t yy_base[20] =
{ 0,
0, 0, 18, 0, 6, 21, 0, 9, 21, 0,
0, 0, 0, 4, 21, 21, 10, 11, 15
} ;
-static yyconst flex_int16_t yy_def[20] =
+static const flex_int16_t yy_def[20] =
{ 0,
16, 1, 16, 17, 17, 16, 18, 19, 16, 17,
17, 5, 18, 19, 16, 0, 16, 16, 16
} ;
-static yyconst flex_int16_t yy_nxt[29] =
+static const flex_int16_t yy_nxt[29] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 12, 15, 13,
11, 11, 13, 15, 13, 14, 14, 16, 14, 14,
3, 16, 16, 16, 16, 16, 16, 16
} ;
-static yyconst flex_int16_t yy_chk[29] =
+static const flex_int16_t yy_chk[29] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 5, 14, 5,
17, 17, 18, 8, 18, 19, 19, 3, 19, 19,
@@ -447,7 +637,7 @@ static yyconst flex_int16_t yy_chk[29] =
#line 1 "fts0tlex.l"
/*****************************************************************************
-Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 2014, 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
@@ -476,8 +666,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
/* Required for reentrant parser */
#define YY_DECL int fts_tlexer(YYSTYPE* val, yyscan_t yyscanner)
+#line 670 "fts0tlex.cc"
#define YY_NO_INPUT 1
-#line 480 "fts0tlex.cc"
+#line 672 "fts0tlex.cc"
#define INITIAL 0
@@ -527,40 +718,44 @@ struct yyguts_t
}; /* end struct yyguts_t */
-static int yy_init_globals (yyscan_t yyscanner );
+static int yy_init_globals ( yyscan_t yyscanner );
-int fts0tlex_init (yyscan_t* scanner);
+int yylex_init (yyscan_t* scanner);
-int fts0tlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int fts0tlex_destroy (yyscan_t yyscanner );
+int yylex_destroy ( yyscan_t yyscanner );
+
+int yyget_debug ( yyscan_t yyscanner );
+
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-int fts0tget_debug (yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-void fts0tset_debug (int debug_flag ,yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-void fts0tset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-FILE *fts0tget_in (yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-void fts0tset_in (FILE * in_str ,yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-FILE *fts0tget_out (yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-void fts0tset_out (FILE * out_str ,yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-int fts0tget_leng (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-char *fts0tget_text (yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
-int fts0tget_lineno (yyscan_t yyscanner );
+int yyget_column ( yyscan_t yyscanner );
-void fts0tset_lineno (int line_number ,yyscan_t yyscanner );
+void yyset_column ( int _column_no , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -568,26 +763,29 @@ void fts0tset_lineno (int line_number ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int fts0twrap (yyscan_t yyscanner );
+extern "C" int yywrap ( yyscan_t yyscanner );
#else
-extern int fts0twrap (yyscan_t yyscanner );
+extern int yywrap ( yyscan_t yyscanner );
#endif
#endif
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
+static int yyinput ( yyscan_t yyscanner );
#else
-static int input (yyscan_t yyscanner );
+static int input ( yyscan_t yyscanner );
#endif
#endif
@@ -607,7 +805,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -619,7 +817,7 @@ static int input (yyscan_t yyscanner );
{ \
int c = '*'; \
int n; \
- for ( n = 0; n < static_cast(max_size) && \
+ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
@@ -631,8 +829,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
- while ( (result = static_cast(fread(buf, 1, max_size, yyin)))==0 \
- && ferror(yyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -673,9 +870,9 @@ static int input (yyscan_t yyscanner );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int fts0tlex (yyscan_t yyscanner);
+extern int yylex (yyscan_t yyscanner);
-#define YY_DECL int fts0tlex (yyscan_t yyscanner)
+#define YY_DECL int yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
@@ -687,7 +884,7 @@ extern int fts0tlex (yyscan_t yyscanner);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -697,16 +894,11 @@ extern int fts0tlex (yyscan_t yyscanner);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 44 "fts0tlex.l"
-
-
-#line 707 "fts0tlex.cc"
-
if ( !yyg->yy_init )
{
yyg->yy_init = 1;
@@ -725,15 +917,21 @@ YY_DECL
yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- fts0tensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- fts0t_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
- fts0t_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+#line 44 "fts0tlex.l"
+
+
+#line 933 "fts0tlex.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
@@ -749,7 +947,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -759,9 +957,9 @@ YY_DECL
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 17 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 16 );
@@ -832,7 +1030,7 @@ YY_RULE_SETUP
#line 68 "fts0tlex.l"
ECHO;
YY_BREAK
-#line 834 "fts0tlex.cc"
+#line 1034 "fts0tlex.cc"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -850,7 +1048,7 @@ case YY_STATE_EOF(INITIAL):
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
- * fts0tlex(). If so, then we have to assure
+ * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
@@ -911,7 +1109,7 @@ case YY_STATE_EOF(INITIAL):
{
yyg->yy_did_buffer_switch_on_eof = 0;
- if ( fts0twrap(yyscanner ) )
+ if ( yywrap( yyscanner ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -964,7 +1162,8 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of fts0tlex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -976,9 +1175,9 @@ case YY_STATE_EOF(INITIAL):
static int yy_get_next_buffer (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1007,7 +1206,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1020,21 +1219,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = static_cast(b->yy_buf_size * 2);
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1043,11 +1242,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- fts0trealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -1055,8 +1255,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
}
@@ -1065,7 +1265,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read);
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1075,7 +1275,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- fts0trestart(yyin ,yyscanner);
+ yyrestart( yyin , yyscanner);
}
else
@@ -1089,12 +1289,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fts0trealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
yyg->yy_n_chars += number_to_move;
@@ -1110,15 +1313,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1128,9 +1331,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 17 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -1143,11 +1346,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
- register int yy_is_jam;
+ int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
- register char *yy_cp = yyg->yy_c_buf_p;
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1157,14 +1360,19 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 17 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 16);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner)
@@ -1190,7 +1398,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1207,14 +1415,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
/* Reset buffer status. */
- fts0trestart(yyin ,yyscanner);
+ yyrestart( yyin , yyscanner);
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( fts0twrap(yyscanner ) )
- return EOF;
+ if ( yywrap( yyscanner ) )
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -1245,34 +1453,34 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @note This function does not reset the start condition to @c INITIAL .
*/
- void fts0trestart (FILE * input_file , yyscan_t yyscanner)
+ void yyrestart (FILE * input_file , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! YY_CURRENT_BUFFER ){
- fts0tensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- fts0t_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
- fts0t_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
- fts0t_load_buffer_state(yyscanner );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
+ yy_load_buffer_state( yyscanner );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
* @param yyscanner The scanner object.
*/
- void fts0t_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body
* with
- * fts0tpop_buffer_state();
- * fts0tpush_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- fts0tensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1285,17 +1493,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- fts0t_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
/* We don't actually know whether we did this switch during
- * EOF (fts0twrap()) processing, but the only time this flag
- * is looked at is after fts0twrap() is called, so it's safe
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yyg->yy_did_buffer_switch_on_eof = 1;
}
-static void fts0t_load_buffer_state (yyscan_t yyscanner)
+static void yy_load_buffer_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
@@ -1310,35 +1518,35 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE fts0t_create_buffer (FILE * file, int size , yyscan_t yyscanner)
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) fts0talloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in fts0t_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) fts0talloc(b->yy_buf_size + 2 ,yyscanner );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in fts0t_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- fts0t_init_buffer(b,file ,yyscanner);
+ yy_init_buffer( b, file , yyscanner);
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with fts0t_create_buffer()
+ * @param b a buffer created with yy_create_buffer()
* @param yyscanner The scanner object.
*/
- void fts0t_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -1349,28 +1557,28 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- fts0tfree((void *) b->yy_ch_buf ,yyscanner );
+ yyfree( (void *) b->yy_ch_buf , yyscanner );
- fts0tfree((void *) b ,yyscanner );
+ yyfree( (void *) b , yyscanner );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a fts0trestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
- static void fts0t_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
{
int oerrno = errno;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- fts0t_flush_buffer(b ,yyscanner);
+ yy_flush_buffer( b , yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then fts0t_init_buffer was _probably_
- * called from fts0trestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -1379,7 +1587,7 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
}
b->yy_is_interactive = 0;
-
+
errno = oerrno;
}
@@ -1387,7 +1595,7 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
* @param yyscanner The scanner object.
*/
- void fts0t_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
@@ -1408,7 +1616,7 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- fts0t_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -1417,15 +1625,15 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
* @param new_buffer The new state.
* @param yyscanner The scanner object.
*/
-void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL)
return;
- fts0tensure_buffer_stack(yyscanner);
+ yyensure_buffer_stack(yyscanner);
- /* This block is copied from fts0t_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -1439,8 +1647,8 @@ void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
yyg->yy_buffer_stack_top++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from fts0t_switch_to_buffer. */
- fts0t_load_buffer_state(yyscanner );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
@@ -1448,19 +1656,19 @@ void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
* The next element becomes the new top.
* @param yyscanner The scanner object.
*/
-void fts0tpop_buffer_state (yyscan_t yyscanner)
+void yypop_buffer_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER)
return;
- fts0t_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
+ yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
YY_CURRENT_BUFFER_LVALUE = NULL;
if (yyg->yy_buffer_stack_top > 0)
--yyg->yy_buffer_stack_top;
if (YY_CURRENT_BUFFER) {
- fts0t_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
}
@@ -1468,9 +1676,9 @@ void fts0tpop_buffer_state (yyscan_t yyscanner)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void fts0tensure_buffer_stack (yyscan_t yyscanner)
+static void yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -1479,12 +1687,12 @@ static void fts0tensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
- yyg->yy_buffer_stack = (struct yy_buffer_state**)fts0talloc
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in fts0tensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -1496,15 +1704,15 @@ static void fts0tensure_buffer_stack (yyscan_t yyscanner)
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
- num_to_alloc = static_cast(yyg->yy_buffer_stack_max + grow_size);
- yyg->yy_buffer_stack = (struct yy_buffer_state**)fts0trealloc
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in fts0tensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -1518,77 +1726,77 @@ static void fts0tensure_buffer_stack (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE fts0t_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) fts0talloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in fts0t_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = static_cast(b->yy_buf_size);
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- fts0t_switch_to_buffer(b ,yyscanner );
+ yy_switch_to_buffer( b , yyscanner );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to fts0tlex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * fts0t_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE fts0t_scan_string (yyconst char * yystr , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
{
-
- return fts0t_scan_bytes(yystr,static_cast(strlen(yystr)) ,yyscanner);
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
}
-/** Setup the input buffer state to scan the given bytes. The next call to fts0tlex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE fts0t_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) fts0talloc(n ,yyscanner );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n , yyscanner );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in fts0t_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = fts0t_scan_buffer(buf,n ,yyscanner);
+ b = yy_scan_buffer( buf, n , yyscanner);
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in fts0t_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -1602,9 +1810,11 @@ YY_BUFFER_STATE fts0t_scan_bytes (yyconst char * yybytes, int _yybytes_len , y
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
{
- (void) fprintf( stderr, "%s\n", msg );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -1630,7 +1840,7 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
-YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner)
+YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyextra;
@@ -1639,33 +1849,33 @@ YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner)
/** Get the current line number.
* @param yyscanner The scanner object.
*/
-int fts0tget_lineno (yyscan_t yyscanner)
+int yyget_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yylineno;
}
/** Get the current column number.
* @param yyscanner The scanner object.
*/
-int fts0tget_column (yyscan_t yyscanner)
+int yyget_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yycolumn;
}
/** Get the input stream.
* @param yyscanner The scanner object.
*/
-FILE *fts0tget_in (yyscan_t yyscanner)
+FILE *yyget_in (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyin;
@@ -1674,7 +1884,7 @@ FILE *fts0tget_in (yyscan_t yyscanner)
/** Get the output stream.
* @param yyscanner The scanner object.
*/
-FILE *fts0tget_out (yyscan_t yyscanner)
+FILE *yyget_out (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyout;
@@ -1683,7 +1893,7 @@ FILE *fts0tget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int fts0tget_leng (yyscan_t yyscanner)
+int yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
@@ -1693,7 +1903,7 @@ int fts0tget_leng (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
-char *fts0tget_text (yyscan_t yyscanner)
+char *yyget_text (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yytext;
@@ -1703,90 +1913,88 @@ char *fts0tget_text (yyscan_t yyscanner)
* @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object.
*/
-void fts0tset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
+void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyextra = user_defined ;
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
* @param yyscanner The scanner object.
*/
-void fts0tset_lineno (int line_number , yyscan_t yyscanner)
+void yyset_lineno (int _line_number , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "fts0tset_lineno called with no buffer" , yyscanner);
-
- yylineno = line_number;
+ YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
+
+ yylineno = _line_number;
}
/** Set the current column.
- * @param line_number
+ * @param _column_no column number
* @param yyscanner The scanner object.
*/
-void fts0tset_column (int column_no , yyscan_t yyscanner)
+void yyset_column (int _column_no , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "fts0tset_column called with no buffer" , yyscanner);
-
- yycolumn = column_no;
+ YY_FATAL_ERROR( "yyset_column called with no buffer" );
+
+ yycolumn = _column_no;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
* @param yyscanner The scanner object.
- * @see fts0t_switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void fts0tset_in (FILE * in_str , yyscan_t yyscanner)
+void yyset_in (FILE * _in_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
+ yyin = _in_str ;
}
-void fts0tset_out (FILE * out_str , yyscan_t yyscanner)
+void yyset_out (FILE * _out_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
+ yyout = _out_str ;
}
-int fts0tget_debug (yyscan_t yyscanner)
+int yyget_debug (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yy_flex_debug;
}
-void fts0tset_debug (int bdebug , yyscan_t yyscanner)
+void yyset_debug (int _bdebug , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
/* Accessor methods for yylval and yylloc */
/* User-visible API */
-/* fts0tlex_init is special because it creates the scanner itself, so it is
+/* yylex_init is special because it creates the scanner itself, so it is
* the ONLY reentrant function that doesn't take the scanner as the last argument.
* That's why we explicitly handle the declaration, instead of using our macros.
*/
-
-int fts0tlex_init(yyscan_t* ptr_yy_globals)
-
+int yylex_init(yyscan_t* ptr_yy_globals)
{
if (ptr_yy_globals == NULL){
errno = EINVAL;
return 1;
}
- *ptr_yy_globals = (yyscan_t) fts0talloc ( sizeof( struct yyguts_t ), NULL );
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
@@ -1799,27 +2007,25 @@ int fts0tlex_init(yyscan_t* ptr_yy_globals)
return yy_init_globals ( *ptr_yy_globals );
}
-/* fts0tlex_init_extra has the same functionality as fts0tlex_init, but follows the
+/* yylex_init_extra has the same functionality as yylex_init, but follows the
* convention of taking the scanner as the last argument. Note however, that
* this is a *pointer* to a scanner, as it will be allocated by this call (and
* is the reason, too, why this function also must handle its own declaration).
- * The user defined value in the first argument will be available to fts0talloc in
+ * The user defined value in the first argument will be available to yyalloc in
* the yyextra field.
*/
-
-int fts0tlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
-
+int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
{
struct yyguts_t dummy_yyguts;
- fts0tset_extra (yy_user_defined, &dummy_yyguts);
+ yyset_extra (yy_user_defined, &dummy_yyguts);
if (ptr_yy_globals == NULL){
errno = EINVAL;
return 1;
}
- *ptr_yy_globals = (yyscan_t) fts0talloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
@@ -1830,7 +2036,7 @@ int fts0tlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
- fts0tset_extra (yy_user_defined, *ptr_yy_globals);
+ yyset_extra (yy_user_defined, *ptr_yy_globals);
return yy_init_globals ( *ptr_yy_globals );
}
@@ -1839,13 +2045,13 @@ static int yy_init_globals (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from fts0tlex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
- yyg->yy_buffer_stack = 0;
+ yyg->yy_buffer_stack = NULL;
yyg->yy_buffer_stack_top = 0;
yyg->yy_buffer_stack_max = 0;
- yyg->yy_c_buf_p = (char *) 0;
+ yyg->yy_c_buf_p = NULL;
yyg->yy_init = 0;
yyg->yy_start = 0;
@@ -1858,42 +2064,42 @@ static int yy_init_globals (yyscan_t yyscanner)
yyin = stdin;
yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
- * fts0tlex_init()
+ * yylex_init()
*/
return 0;
}
-/* fts0tlex_destroy is for both reentrant and non-reentrant scanners. */
-int fts0tlex_destroy (yyscan_t yyscanner)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- fts0t_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
+ yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
- fts0tpop_buffer_state(yyscanner);
+ yypop_buffer_state(yyscanner);
}
/* Destroy the stack itself. */
- fts0tfree(yyg->yy_buffer_stack ,yyscanner);
+ yyfree(yyg->yy_buffer_stack , yyscanner);
yyg->yy_buffer_stack = NULL;
/* Destroy the start condition stack. */
- fts0tfree(yyg->yy_start_stack ,yyscanner );
+ yyfree( yyg->yy_start_stack , yyscanner );
yyg->yy_start_stack = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * fts0tlex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( yyscanner);
/* Destroy the main struct (reentrant only). */
- fts0tfree ( yyscanner , yyscanner );
+ yyfree ( yyscanner , yyscanner );
yyscanner = NULL;
return 0;
}
@@ -1903,18 +2109,21 @@ int fts0tlex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
{
- register int i;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -1922,13 +2131,18 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_A
}
#endif
-void *fts0talloc (yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void *yyalloc (yy_size_t size , yyscan_t yyscanner)
{
- return (void *) malloc( size );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ return malloc(size);
}
-void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -1936,12 +2150,14 @@ void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void fts0tfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void yyfree (void * ptr , yyscan_t yyscanner)
{
- free( (char *) ptr ); /* see fts0trealloc() for (char *) cast */
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
@@ -1949,4 +2165,3 @@ void fts0tfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)
#line 68 "fts0tlex.l"
-
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 472fb86288fb90629be03e5b27964d93394a900e..cd605b6b7914295cb0ab9f234e6a39958fd3bceb 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -4,7 +4,7 @@ Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -686,9 +686,25 @@ static int mysql_tmpfile_path(const char *path, const char *prefix)
static void innodb_remember_check_sysvar_funcs();
mysql_var_check_func check_sysvar_enum;
+/** Update callback for SET [SESSION] innodb_default_encryption_key_id */
+static void
+innodb_default_encryption_key_id_update(THD* thd, st_mysql_sys_var* var,
+ void* var_ptr, const void *save)
+{
+ uint key_id = *static_cast(save);
+ if (key_id != FIL_DEFAULT_ENCRYPTION_KEY
+ && !encryption_key_id_exists(key_id)) {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "innodb_default_encryption_key=%u"
+ " is not available", key_id);
+ }
+ *static_cast(var_ptr) = key_id;
+}
+
static MYSQL_THDVAR_UINT(default_encryption_key_id, PLUGIN_VAR_RQCMDARG,
"Default encryption key id used for table encryption.",
- NULL, NULL,
+ NULL, innodb_default_encryption_key_id_update,
FIL_DEFAULT_ENCRYPTION_KEY, 1, UINT_MAX32, 0);
/**
@@ -8324,8 +8340,8 @@ ha_innobase::write_row(
/* We need the upper limit of the col type to check for
whether we update the table autoinc counter or not. */
- col_max_value = innobase_get_int_col_max_value(
- table->next_number_field);
+ col_max_value =
+ table->next_number_field->get_max_int_value();
/* Get the value that MySQL attempted to store in the table.*/
auto_inc = table->next_number_field->val_uint();
@@ -8402,15 +8418,33 @@ ha_innobase::write_row(
/* This should filter out the negative
values set explicitly by the user. */
if (auto_inc <= col_max_value) {
- ut_a(prebuilt->autoinc_increment > 0);
ulonglong offset;
ulonglong increment;
dberr_t err;
- offset = prebuilt->autoinc_offset;
- increment = prebuilt->autoinc_increment;
-
+#ifdef WITH_WSREP
+ /* Applier threads which are processing
+ ROW events and don't go through server
+ level autoinc processing, therefore
+ prebuilt autoinc values don't get
+ properly assigned. Fetch values from
+ server side. */
+ if (wsrep_on(user_thd) &&
+ wsrep_thd_exec_mode(user_thd) == REPL_RECV)
+ {
+ wsrep_thd_auto_increment_variables(
+ user_thd, &offset, &increment);
+ }
+ else
+ {
+#endif /* WITH_WSREP */
+ ut_a(prebuilt->autoinc_increment > 0);
+ offset = prebuilt->autoinc_offset;
+ increment = prebuilt->autoinc_increment;
+#ifdef WITH_WSREP
+ }
+#endif /* WITH_WSREP */
auto_inc = innobase_next_autoinc(
auto_inc,
1, increment, offset,
@@ -8925,17 +8959,35 @@ ha_innobase::update_row(
/* We need the upper limit of the col type to check for
whether we update the table autoinc counter or not. */
- col_max_value = innobase_get_int_col_max_value(
- table->next_number_field);
+ col_max_value =
+ table->next_number_field->get_max_int_value();
if (auto_inc <= col_max_value && auto_inc != 0) {
ulonglong offset;
ulonglong increment;
- offset = prebuilt->autoinc_offset;
- increment = prebuilt->autoinc_increment;
-
+#ifdef WITH_WSREP
+ /* Applier threads which are processing
+ ROW events and don't go through server
+ level autoinc processing, therefore
+ prebuilt autoinc values don't get
+ properly assigned. Fetch values from
+ server side. */
+ if (wsrep_on(user_thd) &&
+ wsrep_thd_exec_mode(user_thd) == REPL_RECV)
+ {
+ wsrep_thd_auto_increment_variables(
+ user_thd, &offset, &increment);
+ }
+ else
+ {
+#endif /* WITH_WSREP */
+ offset = prebuilt->autoinc_offset;
+ increment = prebuilt->autoinc_increment;
+#ifdef WITH_WSREP
+ }
+#endif /* WITH_WSREP */
auto_inc = innobase_next_autoinc(
auto_inc, 1, increment, offset, col_max_value);
@@ -10468,7 +10520,7 @@ wsrep_append_foreign_key(
key_type,
copy);
if (rcode) {
- DBUG_PRINT("wsrep", ("row key failed: %zu", rcode));
+ DBUG_PRINT("wsrep", ("row key failed: %lu", rcode));
WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu",
(wsrep_thd_query(thd)) ?
wsrep_thd_query(thd) : "void", rcode);
@@ -10826,8 +10878,7 @@ create_table_def(
const char* remote_path, /*!< in: Remote path or zero length-string */
ulint flags, /*!< in: table flags */
ulint flags2, /*!< in: table flags2 */
- fil_encryption_t mode, /*!< in: encryption mode */
- ulint key_id) /*!< in: encryption key_id */
+ const ha_table_option_struct*options)
{
THD* thd = trx->mysql_thd;
dict_table_t* table;
@@ -11017,7 +11068,9 @@ create_table_def(
fts_add_doc_id_column(table, heap);
}
- err = row_create_table_for_mysql(table, trx, false, mode, key_id);
+ err = row_create_table_for_mysql(table, trx, false,
+ fil_encryption_t(options->encryption),
+ options->encryption_key_id);
mem_heap_free(heap);
@@ -11851,21 +11904,47 @@ ha_innobase::check_table_options(
enum row_type row_format = table->s->row_type;
ha_table_option_struct *options= table->s->option_struct;
atomic_writes_t awrites = (atomic_writes_t)options->atomic_writes;
- fil_encryption_t encrypt = (fil_encryption_t)options->encryption;
- if (encrypt != FIL_ENCRYPTION_DEFAULT && !use_tablespace) {
+ switch (options->encryption) {
+ case FIL_ENCRYPTION_OFF:
+ if (options->encryption_key_id != FIL_DEFAULT_ENCRYPTION_KEY) {
+ push_warning(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ HA_WRONG_CREATE_OPTION,
+ "InnoDB: ENCRYPTED=NO implies"
+ " ENCRYPTION_KEY_ID=1");
+ compile_time_assert(FIL_DEFAULT_ENCRYPTION_KEY == 1);
+ }
+ if (srv_encrypt_tables != 2) {
+ break;
+ }
push_warning(
thd, Sql_condition::WARN_LEVEL_WARN,
HA_WRONG_CREATE_OPTION,
- "InnoDB: ENCRYPTED requires innodb_file_per_table");
+ "InnoDB: ENCRYPTED=NO cannot be used with"
+ " innodb_encrypt_tables=FORCE");
return "ENCRYPTED";
- }
+ case FIL_ENCRYPTION_DEFAULT:
+ if (!srv_encrypt_tables) {
+ break;
+ }
+ /* fall through */
+ case FIL_ENCRYPTION_ON:
+ if (!encryption_key_id_exists(options->encryption_key_id)) {
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ HA_WRONG_CREATE_OPTION,
+ "InnoDB: ENCRYPTION_KEY_ID %u not available",
+ options->encryption_key_id);
+ return "ENCRYPTION_KEY_ID";
+ }
+ }
- if (encrypt == FIL_ENCRYPTION_OFF && srv_encrypt_tables == 2) {
- push_warning(
- thd, Sql_condition::WARN_LEVEL_WARN,
- HA_WRONG_CREATE_OPTION,
- "InnoDB: ENCRYPTED=OFF cannot be used when innodb_encrypt_tables=FORCE");
+ if (!use_tablespace && options->encryption != FIL_ENCRYPTION_DEFAULT) {
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+ HA_WRONG_CREATE_OPTION,
+ "InnoDB: ENCRYPTED requires"
+ " innodb_file_per_table");
return "ENCRYPTED";
}
@@ -11941,46 +12020,6 @@ ha_innobase::check_table_options(
}
}
- /* If encryption is set up make sure that used key_id is found */
- if (encrypt == FIL_ENCRYPTION_ON ||
- (encrypt == FIL_ENCRYPTION_DEFAULT && srv_encrypt_tables)) {
- if (!encryption_key_id_exists((unsigned int)options->encryption_key_id)) {
- push_warning_printf(
- thd, Sql_condition::WARN_LEVEL_WARN,
- HA_WRONG_CREATE_OPTION,
- "InnoDB: ENCRYPTION_KEY_ID %u not available",
- (uint)options->encryption_key_id
- );
- return "ENCRYPTION_KEY_ID";
- }
- }
-
- /* Ignore nondefault key_id if encryption is set off */
- if (encrypt == FIL_ENCRYPTION_OFF &&
- options->encryption_key_id != THDVAR(thd, default_encryption_key_id)) {
- push_warning_printf(
- thd, Sql_condition::WARN_LEVEL_WARN,
- HA_WRONG_CREATE_OPTION,
- "InnoDB: Ignored ENCRYPTION_KEY_ID %u when encryption is disabled",
- (uint)options->encryption_key_id
- );
- options->encryption_key_id = FIL_DEFAULT_ENCRYPTION_KEY;
- }
-
- /* If default encryption is used and encryption is disabled, you may
- not use nondefault encryption_key_id as it is not stored anywhere. */
- if (encrypt == FIL_ENCRYPTION_DEFAULT
- && !srv_encrypt_tables
- && options->encryption_key_id != FIL_DEFAULT_ENCRYPTION_KEY) {
- compile_time_assert(FIL_DEFAULT_ENCRYPTION_KEY == 1);
- push_warning_printf(
- thd, Sql_condition::WARN_LEVEL_WARN,
- HA_WRONG_CREATE_OPTION,
- "InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1"
- );
- return "ENCRYPTION_KEY_ID";
- }
-
/* Check atomic writes requirements */
if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) {
@@ -12038,10 +12077,6 @@ ha_innobase::create(
const char* stmt;
size_t stmt_len;
- /* Cache table options */
- ha_table_option_struct *options= form->s->option_struct;
- fil_encryption_t encrypt = (fil_encryption_t)options->encryption;
- uint key_id = (uint)options->encryption_key_id;
DBUG_ENTER("ha_innobase::create");
@@ -12064,7 +12099,7 @@ ha_innobase::create(
/* Validate create options if innodb_strict_mode is set. */
if (create_options_are_invalid(
- thd, form, create_info, use_tablespace)) {
+ thd, form, create_info, use_tablespace)) {
DBUG_RETURN(HA_WRONG_CREATE_OPTION);
}
@@ -12134,7 +12169,8 @@ ha_innobase::create(
row_mysql_lock_data_dictionary(trx);
error = create_table_def(trx, form, norm_name, temp_path,
- remote_path, flags, flags2, encrypt, key_id);
+ remote_path, flags, flags2,
+ form->s->option_struct);
if (error) {
goto cleanup;
}
@@ -16040,12 +16076,11 @@ ha_innobase::get_auto_increment(
current, autoinc);
if (!wsrep_on(ha_thd()))
{
- current = autoinc - prebuilt->autoinc_increment;
+ current = autoinc - prebuilt->autoinc_increment;
+ current = innobase_next_autoinc(
+ current, 1, increment, offset, col_max_value);
}
- current = innobase_next_autoinc(
- current, 1, increment, offset, col_max_value);
-
dict_table_autoinc_initialize(prebuilt->table, current);
*first_value = current;
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 7e8a8334a4d799128d05c972fe64b6549f10fd7b..0d0982fa498d9f50bc77f75ac2a33b14c84d0eb4 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2018, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2019, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -328,7 +328,7 @@ ha_innobase::check_if_supported_inplace_alter(
NULL to a NOT NULL value. */
if ((ha_alter_info->handler_flags
& Alter_inplace_info::ALTER_COLUMN_NOT_NULLABLE)
- && !thd_is_strict_mode(user_thd)) {
+ && (ha_alter_info->ignore || !thd_is_strict_mode(user_thd))) {
ha_alter_info->unsupported_reason = innobase_get_err_msg(
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL);
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
@@ -1513,8 +1513,8 @@ innobase_check_index_keys(
index
@param[in] altered_table MySQL table that is being altered
@param[in] key_part MySQL key definition
-@param[out] index_field index field defition for key_part */
-static MY_ATTRIBUTE((nonnull(2,3)))
+@param[out] index_field index field definition for key_part */
+static MY_ATTRIBUTE((nonnull))
void
innobase_create_index_field_def(
bool new_clustered,
@@ -1529,10 +1529,6 @@ innobase_create_index_field_def(
DBUG_ENTER("innobase_create_index_field_def");
- ut_ad(key_part);
- ut_ad(index_field);
- ut_ad(altered_table);
-
/* Virtual columns are not stored in InnoDB data dictionary, thus
if there is virtual columns we need to skip them to find the
correct field. */
@@ -1596,8 +1592,6 @@ innobase_create_index_def(
DBUG_ENTER("innobase_create_index_def");
DBUG_ASSERT(!key_clustered || new_clustered);
- ut_ad(altered_table);
-
index->fields = static_cast(
mem_heap_alloc(heap, n_fields * sizeof *index->fields));
index->ind_type = 0;
@@ -2184,6 +2178,23 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
@return whether the table will be rebuilt */
bool need_rebuild () const { return(old_table != new_table); }
+ /** Share context between partitions.
+ @param[in] ctx context from another partition of the table */
+ void set_shared_data(const inplace_alter_handler_ctx& ctx)
+ {
+ if (add_autoinc != ULINT_UNDEFINED) {
+ const ha_innobase_inplace_ctx& ha_ctx =
+ static_cast
+ (ctx);
+ /* When adding an AUTO_INCREMENT column to a
+ partitioned InnoDB table, we must share the
+ sequence for all partitions. */
+ ut_ad(ha_ctx.add_autoinc == add_autoinc);
+ ut_ad(ha_ctx.sequence.last());
+ sequence = ha_ctx.sequence;
+ }
+ }
+
private:
// Disable copying
ha_innobase_inplace_ctx(const ha_innobase_inplace_ctx&);
@@ -2727,7 +2738,7 @@ prepare_inplace_alter_table_dict(
(ha_alter_info->handler_ctx);
DBUG_ASSERT((ctx->add_autoinc != ULINT_UNDEFINED)
- == (ctx->sequence.m_max_value > 0));
+ == (ctx->sequence.max_value() > 0));
DBUG_ASSERT(!ctx->num_to_drop_index == !ctx->drop_index);
DBUG_ASSERT(!ctx->num_to_drop_fk == !ctx->drop_fk);
DBUG_ASSERT(!add_fts_doc_id || add_fts_doc_id_idx);
@@ -3090,10 +3101,18 @@ prepare_inplace_alter_table_dict(
/* Create the indexes in SYS_INDEXES and load into dictionary. */
for (ulint a = 0; a < ctx->num_to_add_index; a++) {
-
+ DBUG_EXECUTE_IF(
+ "create_index_metadata_fail",
+ if (a + 1 == ctx->num_to_add_index) {
+ ctx->trx->error_state = DB_OUT_OF_FILE_SPACE;
+ ctx->add_index[a] = NULL;
+ goto index_created;
+ });
ctx->add_index[a] = row_merge_create_index(
ctx->trx, ctx->new_table, &index_defs[a]);
-
+#ifndef DBUG_OFF
+index_created:
+#endif
add_key_nums[a] = index_defs[a].key_number;
if (!ctx->add_index[a]) {
@@ -4821,7 +4840,6 @@ innobase_rename_columns_try(
ha_alter_info->alter_info->create_list);
uint i = 0;
- DBUG_ASSERT(ctx);
DBUG_ASSERT(ha_alter_info->handler_flags
& Alter_inplace_info::ALTER_COLUMN_NAME);
@@ -5005,7 +5023,6 @@ innobase_update_foreign_try(
ulint i;
DBUG_ENTER("innobase_update_foreign_try");
- DBUG_ASSERT(ctx);
foreign_id = dict_table_get_highest_foreign_id(ctx->new_table);
@@ -6163,7 +6180,6 @@ ha_innobase::commit_inplace_alter_table(
if (!commit_cache_norebuild(ctx, table, trx)) {
fk_fail = true;
- ut_ad(!prebuilt->trx->check_foreigns);
}
innobase_rename_columns_cache(ha_alter_info, table,
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index 5b471c8cd05bebea5171458a8b225d463a2cc513..8ea6fca63a42c2b93ee4159a1301ab1af8f29e75 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2019, MariaDB Corporation.
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
@@ -8506,15 +8506,6 @@ static ST_FIELD_INFO innodb_tablespaces_scrubbing_fields_info[] =
STRUCT_FLD(old_name, ""),
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-#define TABLESPACES_ENCRYPTION_ROTATING_OR_FLUSHING 9
- {STRUCT_FLD(field_name, "ROTATING_OR_FLUSHING"),
- STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
- STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
- STRUCT_FLD(value, 0),
- STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
- STRUCT_FLD(old_name, ""),
- STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
-
END_OF_ST_FIELD_INFO
};
@@ -8819,78 +8810,105 @@ i_s_innodb_mutexes_fill_table(
DBUG_RETURN(0);
}
- mutex_enter(&mutex_list_mutex);
+ {
+ struct Locking
+ {
+ Locking() { mutex_enter(&mutex_list_mutex); }
+ ~Locking() { mutex_exit(&mutex_list_mutex); }
+ } locking;
+
+ for (mutex = UT_LIST_GET_FIRST(mutex_list); mutex != NULL;
+ mutex = UT_LIST_GET_NEXT(list, mutex)) {
+ if (mutex->count_os_wait == 0) {
+ continue;
+ }
- for (mutex = UT_LIST_GET_FIRST(mutex_list); mutex != NULL;
- mutex = UT_LIST_GET_NEXT(list, mutex)) {
- if (mutex->count_os_wait == 0) {
- continue;
- }
+ if (buf_pool_is_block_mutex(mutex)) {
+ block_mutex = mutex;
+ block_mutex_oswait_count
+ += mutex->count_os_wait;
+ continue;
+ }
- if (buf_pool_is_block_mutex(mutex)) {
- block_mutex = mutex;
- block_mutex_oswait_count += mutex->count_os_wait;
- continue;
+ OK(field_store_string(fields[MUTEXES_NAME],
+ mutex->cmutex_name));
+ OK(field_store_string(
+ fields[MUTEXES_CREATE_FILE],
+ innobase_basename(mutex->cfile_name)));
+ OK(field_store_ulint(fields[MUTEXES_CREATE_LINE],
+ mutex->cline));
+ OK(field_store_ulint(fields[MUTEXES_OS_WAITS],
+ mutex->count_os_wait));
+ OK(schema_table_store_record(thd, tables->table));
}
- OK(field_store_string(fields[MUTEXES_NAME], mutex->cmutex_name));
- OK(field_store_string(fields[MUTEXES_CREATE_FILE], innobase_basename(mutex->cfile_name)));
- OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], mutex->cline));
- OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)mutex->count_os_wait));
- OK(schema_table_store_record(thd, tables->table));
- }
-
- if (block_mutex) {
- char buf1[IO_SIZE];
-
- my_snprintf(buf1, sizeof buf1, "combined %s",
- innobase_basename(block_mutex->cfile_name));
-
- OK(field_store_string(fields[MUTEXES_NAME], block_mutex->cmutex_name));
- OK(field_store_string(fields[MUTEXES_CREATE_FILE], buf1));
- OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], block_mutex->cline));
- OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)block_mutex_oswait_count));
- OK(schema_table_store_record(thd, tables->table));
+ if (block_mutex) {
+ char buf1[IO_SIZE];
+
+ my_snprintf(buf1, sizeof buf1, "combined %s",
+ innobase_basename(block_mutex->cfile_name));
+
+ OK(field_store_string(fields[MUTEXES_NAME],
+ block_mutex->cmutex_name));
+ OK(field_store_string(fields[MUTEXES_CREATE_FILE],
+ buf1));
+ OK(field_store_ulint(fields[MUTEXES_CREATE_LINE],
+ block_mutex->cline));
+ OK(field_store_ulint(fields[MUTEXES_OS_WAITS],
+ block_mutex_oswait_count));
+ OK(schema_table_store_record(thd, tables->table));
+ }
}
- mutex_exit(&mutex_list_mutex);
+ {
+ struct Locking
+ {
+ Locking() { mutex_enter(&rw_lock_list_mutex); }
+ ~Locking() { mutex_exit(&rw_lock_list_mutex); }
+ } locking;
+
+ for (lock = UT_LIST_GET_FIRST(rw_lock_list); lock != NULL;
+ lock = UT_LIST_GET_NEXT(list, lock)) {
+ if (lock->count_os_wait == 0) {
+ continue;
+ }
- mutex_enter(&rw_lock_list_mutex);
+ if (buf_pool_is_block_lock(lock)) {
+ block_lock = lock;
+ block_lock_oswait_count += lock->count_os_wait;
+ continue;
+ }
- for (lock = UT_LIST_GET_FIRST(rw_lock_list); lock != NULL;
- lock = UT_LIST_GET_NEXT(list, lock)) {
- if (lock->count_os_wait == 0) {
- continue;
+ OK(field_store_string(fields[MUTEXES_NAME],
+ lock->lock_name));
+ OK(field_store_string(
+ fields[MUTEXES_CREATE_FILE],
+ innobase_basename(lock->cfile_name)));
+ OK(field_store_ulint(fields[MUTEXES_CREATE_LINE],
+ lock->cline));
+ OK(field_store_ulint(fields[MUTEXES_OS_WAITS],
+ lock->count_os_wait));
+ OK(schema_table_store_record(thd, tables->table));
}
- if (buf_pool_is_block_lock(lock)) {
- block_lock = lock;
- block_lock_oswait_count += lock->count_os_wait;
- continue;
+ if (block_lock) {
+ char buf1[IO_SIZE];
+
+ my_snprintf(buf1, sizeof buf1, "combined %s",
+ innobase_basename(block_lock->cfile_name));
+
+ OK(field_store_string(fields[MUTEXES_NAME],
+ block_lock->lock_name));
+ OK(field_store_string(fields[MUTEXES_CREATE_FILE],
+ buf1));
+ OK(field_store_ulint(fields[MUTEXES_CREATE_LINE],
+ block_lock->cline));
+ OK(field_store_ulint(fields[MUTEXES_OS_WAITS],
+ block_lock_oswait_count));
+ OK(schema_table_store_record(thd, tables->table));
}
-
- OK(field_store_string(fields[MUTEXES_NAME], lock->lock_name));
- OK(field_store_string(fields[MUTEXES_CREATE_FILE], innobase_basename(lock->cfile_name)));
- OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], lock->cline));
- OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)lock->count_os_wait));
- OK(schema_table_store_record(thd, tables->table));
}
- if (block_lock) {
- char buf1[IO_SIZE];
-
- my_snprintf(buf1, sizeof buf1, "combined %s",
- innobase_basename(block_lock->cfile_name));
-
- OK(field_store_string(fields[MUTEXES_NAME], block_lock->lock_name));
- OK(field_store_string(fields[MUTEXES_CREATE_FILE], buf1));
- OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], block_lock->cline));
- OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)block_lock_oswait_count));
- OK(schema_table_store_record(thd, tables->table));
- }
-
- mutex_exit(&rw_lock_list_mutex);
-
DBUG_RETURN(0);
}
diff --git a/storage/innobase/include/data0data.ic b/storage/innobase/include/data0data.ic
index 11499ab928c26e95852ab234e7cdcc9f8bde191d..deac969a03d7a5711377c772f37c02a945b7303b 100644
--- a/storage/innobase/include/data0data.ic
+++ b/storage/innobase/include/data0data.ic
@@ -1,6 +1,7 @@
/*****************************************************************************
-Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -41,8 +42,6 @@ dfield_get_type(
/*============*/
const dfield_t* field) /*!< in: SQL data field */
{
- ut_ad(field);
-
return((dtype_t*) &(field->type));
}
#endif /* UNIV_DEBUG */
@@ -72,7 +71,6 @@ dfield_get_data(
/*============*/
const dfield_t* field) /*!< in: field */
{
- ut_ad(field);
ut_ad((field->len == UNIV_SQL_NULL)
|| (field->data != &data_error));
@@ -89,7 +87,6 @@ dfield_get_len(
/*===========*/
const dfield_t* field) /*!< in: field */
{
- ut_ad(field);
ut_ad((field->len == UNIV_SQL_NULL)
|| (field->data != &data_error));
@@ -105,7 +102,6 @@ dfield_set_len(
dfield_t* field, /*!< in: field */
ulint len) /*!< in: length or UNIV_SQL_NULL */
{
- ut_ad(field);
#ifdef UNIV_VALGRIND_DEBUG
if (len != UNIV_SQL_NULL) UNIV_MEM_ASSERT_RW(field->data, len);
#endif /* UNIV_VALGRIND_DEBUG */
@@ -123,8 +119,6 @@ dfield_is_null(
/*===========*/
const dfield_t* field) /*!< in: field */
{
- ut_ad(field);
-
return(field->len == UNIV_SQL_NULL);
}
@@ -137,8 +131,6 @@ dfield_is_ext(
/*==========*/
const dfield_t* field) /*!< in: field */
{
- ut_ad(field);
-
return(field->ext);
}
@@ -150,8 +142,6 @@ dfield_set_ext(
/*===========*/
dfield_t* field) /*!< in/out: field */
{
- ut_ad(field);
-
field->ext = 1;
}
@@ -165,8 +155,6 @@ dfield_set_data(
const void* data, /*!< in: data */
ulint len) /*!< in: length or UNIV_SQL_NULL */
{
- ut_ad(field);
-
#ifdef UNIV_VALGRIND_DEBUG
if (len != UNIV_SQL_NULL) UNIV_MEM_ASSERT_RW(data, len);
#endif /* UNIV_VALGRIND_DEBUG */
@@ -286,8 +274,6 @@ dtuple_get_info_bits(
/*=================*/
const dtuple_t* tuple) /*!< in: tuple */
{
- ut_ad(tuple);
-
return(tuple->info_bits);
}
@@ -300,8 +286,6 @@ dtuple_set_info_bits(
dtuple_t* tuple, /*!< in: tuple */
ulint info_bits) /*!< in: info bits */
{
- ut_ad(tuple);
-
tuple->info_bits = info_bits;
}
@@ -314,8 +298,6 @@ dtuple_get_n_fields_cmp(
/*====================*/
const dtuple_t* tuple) /*!< in: tuple */
{
- ut_ad(tuple);
-
return(tuple->n_fields_cmp);
}
@@ -329,9 +311,7 @@ dtuple_set_n_fields_cmp(
ulint n_fields_cmp) /*!< in: number of fields used in
comparisons in rem0cmp.* */
{
- ut_ad(tuple);
ut_ad(n_fields_cmp <= tuple->n_fields);
-
tuple->n_fields_cmp = n_fields_cmp;
}
@@ -344,8 +324,6 @@ dtuple_get_n_fields(
/*================*/
const dtuple_t* tuple) /*!< in: tuple */
{
- ut_ad(tuple);
-
return(tuple->n_fields);
}
@@ -483,7 +461,6 @@ dtuple_get_data_size(
ulint i;
ulint sum = 0;
- ut_ad(tuple);
ut_ad(dtuple_check_typed(tuple));
ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N);
@@ -517,7 +494,6 @@ dtuple_get_n_ext(
ulint n_fields = tuple->n_fields;
ulint i;
- ut_ad(tuple);
ut_ad(dtuple_check_typed(tuple));
ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N);
diff --git a/storage/innobase/include/dict0crea.ic b/storage/innobase/include/dict0crea.ic
index 1cbaa47032b55e90f240a888c81313c8f63aec86..3eb3ddfa84efe3aa89bb3acf88ca7e058c776e2e 100644
--- a/storage/innobase/include/dict0crea.ic
+++ b/storage/innobase/include/dict0crea.ic
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -65,11 +66,11 @@ dict_create_add_foreign_id(
sprintf(id, "%s_ibfk_%lu", name,
(ulong) (*id_nr)++);
} else {
- char table_name[MAX_TABLE_NAME_LEN + 20] = "";
+ char table_name[MAX_TABLE_NAME_LEN + 21];
uint errors = 0;
- strncpy(table_name, name,
- MAX_TABLE_NAME_LEN + 20);
+ strncpy(table_name, name, (sizeof table_name) - 1);
+ table_name[(sizeof table_name) - 1] = '\0';
innobase_convert_to_system_charset(
strchr(table_name, '/') + 1,
@@ -78,7 +79,8 @@ dict_create_add_foreign_id(
if (errors) {
strncpy(table_name, name,
- MAX_TABLE_NAME_LEN + 20);
+ (sizeof table_name) - 1);
+ table_name[(sizeof table_name) - 1] = '\0';
}
/* no overflow if number < 1e13 */
diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic
index bc72d44108169526fa20dc1d53596f77298d45ec..60c33fc067965121e39b141b1e070c752d2928bd 100644
--- a/storage/innobase/include/dict0dict.ic
+++ b/storage/innobase/include/dict0dict.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
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
@@ -85,9 +85,6 @@ dict_col_type_assert_equal(
const dict_col_t* col, /*!< in: column */
const dtype_t* type) /*!< in: data type */
{
- ut_ad(col);
- ut_ad(type);
-
ut_ad(col->mtype == type->mtype);
ut_ad(col->prtype == type->prtype);
//ut_ad(col->len == type->len);
@@ -161,8 +158,6 @@ dict_col_get_no(
/*============*/
const dict_col_t* col) /*!< in: column */
{
- ut_ad(col);
-
return(col->ind);
}
@@ -177,8 +172,6 @@ dict_col_get_clust_pos(
{
ulint i;
- ut_ad(col);
- ut_ad(clust_index);
ut_ad(dict_index_is_clust(clust_index));
for (i = 0; i < clust_index->n_def; i++) {
@@ -203,7 +196,6 @@ dict_table_get_first_index(
/*=======================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
return(UT_LIST_GET_FIRST(((dict_table_t*) table)->indexes));
@@ -218,9 +210,7 @@ dict_table_get_last_index(
/*=======================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
-
return(UT_LIST_GET_LAST((const_cast(table))
->indexes));
}
@@ -234,9 +224,7 @@ dict_table_get_next_index(
/*======================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(UT_LIST_GET_NEXT(indexes, (dict_index_t*) index));
}
#endif /* UNIV_DEBUG */
@@ -252,7 +240,6 @@ dict_index_is_clust(
const dict_index_t* index) /*!< in: index */
{
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->type & DICT_CLUSTERED);
}
/********************************************************************//**
@@ -265,7 +252,6 @@ dict_index_is_unique(
const dict_index_t* index) /*!< in: index */
{
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->type & DICT_UNIQUE);
}
@@ -279,7 +265,6 @@ dict_index_is_ibuf(
const dict_index_t* index) /*!< in: index */
{
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->type & DICT_IBUF);
}
@@ -292,9 +277,7 @@ dict_index_is_univ(
/*===============*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->type & DICT_UNIVERSAL);
}
@@ -423,7 +406,6 @@ dict_table_get_nth_col(
const dict_table_t* table, /*!< in: table */
ulint pos) /*!< in: position of column */
{
- ut_ad(table);
ut_ad(pos < table->n_def);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
@@ -465,7 +447,6 @@ dict_table_get_sys_col_no(
const dict_table_t* table, /*!< in: table */
ulint sys) /*!< in: DATA_ROW_ID, ... */
{
- ut_ad(table);
ut_ad(sys < DATA_N_SYS_COLS);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
@@ -499,8 +480,6 @@ dict_table_has_fts_index(
/* out: TRUE if table has an FTS index */
dict_table_t* table) /* in: table */
{
- ut_ad(table);
-
return(DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS));
}
@@ -1049,8 +1028,7 @@ dict_table_x_lock_indexes(
{
dict_index_t* index;
- ut_a(table);
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys->mutex));
/* Loop through each index of the table and lock them */
for (index = dict_table_get_first_index(table);
@@ -1091,8 +1069,7 @@ dict_table_x_unlock_indexes(
{
dict_index_t* index;
- ut_a(table);
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys->mutex));
for (index = dict_table_get_first_index(table);
index != NULL;
@@ -1114,9 +1091,7 @@ dict_index_get_n_fields(
representation of index (in
the dictionary cache) */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->n_fields);
}
@@ -1133,10 +1108,8 @@ dict_index_get_n_unique(
const dict_index_t* index) /*!< in: an internal representation
of index (in the dictionary cache) */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(index->cached);
-
return(index->n_uniq);
}
@@ -1152,7 +1125,6 @@ dict_index_get_n_unique_in_tree(
const dict_index_t* index) /*!< in: an internal representation
of index (in the dictionary cache) */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(index->cached);
@@ -1191,7 +1163,6 @@ dict_index_get_nth_field(
const dict_index_t* index, /*!< in: index */
ulint pos) /*!< in: position of field */
{
- ut_ad(index);
ut_ad(pos < index->n_def);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
@@ -1209,7 +1180,6 @@ dict_index_get_sys_col_pos(
const dict_index_t* index, /*!< in: index */
ulint type) /*!< in: DATA_ROW_ID, ... */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(!dict_index_is_univ(index));
@@ -1234,8 +1204,6 @@ dict_field_get_col(
/*===============*/
const dict_field_t* field) /*!< in: index field */
{
- ut_ad(field);
-
return(field->col);
}
@@ -1341,7 +1309,6 @@ dict_index_get_page(
/*================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(index->page);
@@ -1356,7 +1323,6 @@ dict_index_get_lock(
/*================*/
dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(&(index->lock));
@@ -1533,9 +1499,7 @@ dict_table_is_corrupted(
/*====================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
-
return(table->corrupted);
}
diff --git a/storage/innobase/include/fts0blex.h b/storage/innobase/include/fts0blex.h
index d0e4cae067871804c03702ec41d186b2bd4c6b29..10dc314d5d4df13e9d97b0f20be66ba1e2719622 100644
--- a/storage/innobase/include/fts0blex.h
+++ b/storage/innobase/include/fts0blex.h
@@ -12,12 +12,222 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define fts0b_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer fts0b_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define fts0b_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer fts0b_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define fts0b_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer fts0b_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define fts0b_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string fts0b_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define fts0b_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes fts0b_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define fts0b_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer fts0b_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define fts0b_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer fts0b_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define fts0b_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state fts0b_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define fts0b_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer fts0b_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define fts0bpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state fts0bpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define fts0bpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state fts0bpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define fts0bensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack fts0bensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define fts0blex_ALREADY_DEFINED
+#else
+#define yylex fts0blex
+#endif
+
+#ifdef yyrestart
+#define fts0brestart_ALREADY_DEFINED
+#else
+#define yyrestart fts0brestart
+#endif
+
+#ifdef yylex_init
+#define fts0blex_init_ALREADY_DEFINED
+#else
+#define yylex_init fts0blex_init
+#endif
+
+#ifdef yylex_init_extra
+#define fts0blex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra fts0blex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define fts0blex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy fts0blex_destroy
+#endif
+
+#ifdef yyget_debug
+#define fts0bget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug fts0bget_debug
+#endif
+
+#ifdef yyset_debug
+#define fts0bset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug fts0bset_debug
+#endif
+
+#ifdef yyget_extra
+#define fts0bget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra fts0bget_extra
+#endif
+
+#ifdef yyset_extra
+#define fts0bset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra fts0bset_extra
+#endif
+
+#ifdef yyget_in
+#define fts0bget_in_ALREADY_DEFINED
+#else
+#define yyget_in fts0bget_in
+#endif
+
+#ifdef yyset_in
+#define fts0bset_in_ALREADY_DEFINED
+#else
+#define yyset_in fts0bset_in
+#endif
+
+#ifdef yyget_out
+#define fts0bget_out_ALREADY_DEFINED
+#else
+#define yyget_out fts0bget_out
+#endif
+
+#ifdef yyset_out
+#define fts0bset_out_ALREADY_DEFINED
+#else
+#define yyset_out fts0bset_out
+#endif
+
+#ifdef yyget_leng
+#define fts0bget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng fts0bget_leng
+#endif
+
+#ifdef yyget_text
+#define fts0bget_text_ALREADY_DEFINED
+#else
+#define yyget_text fts0bget_text
+#endif
+
+#ifdef yyget_lineno
+#define fts0bget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno fts0bget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define fts0bset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno fts0bset_lineno
+#endif
+
+#ifdef yyget_column
+#define fts0bget_column_ALREADY_DEFINED
+#else
+#define yyget_column fts0bget_column
+#endif
+
+#ifdef yyset_column
+#define fts0bset_column_ALREADY_DEFINED
+#else
+#define yyset_column fts0bset_column
+#endif
+
+#ifdef yywrap
+#define fts0bwrap_ALREADY_DEFINED
+#else
+#define yywrap fts0bwrap
+#endif
+
+#ifdef yyalloc
+#define fts0balloc_ALREADY_DEFINED
+#else
+#define yyalloc fts0balloc
+#endif
+
+#ifdef yyrealloc
+#define fts0brealloc_ALREADY_DEFINED
+#else
+#define yyrealloc fts0brealloc
+#endif
+
+#ifdef yyfree
+#define fts0bfree_ALREADY_DEFINED
+#else
+#define yyfree fts0bfree
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -88,29 +298,23 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+/* begin standard C++ headers. */
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* An opaque pointer. */
@@ -165,7 +369,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -193,7 +397,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -204,25 +408,25 @@ struct yy_buffer_state
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-void fts0brestart (FILE *input_file ,yyscan_t yyscanner );
-void fts0b_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void fts0b_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0b_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void fts0bpop_buffer_state (yyscan_t yyscanner );
+void yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void yypop_buffer_state ( yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-void *fts0balloc (yy_size_t ,yyscan_t yyscanner );
-void *fts0brealloc (void *,yy_size_t ,yyscan_t yyscanner );
-void fts0bfree (void * ,yyscan_t yyscanner );
+void *yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void yyfree ( void * , yyscan_t yyscanner );
/* Begin user sect3 */
-#define fts0bwrap(n) 1
+#define fts0bwrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
@@ -244,38 +448,42 @@ void fts0bfree (void * ,yyscan_t yyscanner );
#define YY_EXTRA_TYPE void *
#endif
-int fts0blex_init (yyscan_t* scanner);
+int yylex_init (yyscan_t* scanner);
-int fts0blex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int fts0blex_destroy (yyscan_t yyscanner );
+int yylex_destroy ( yyscan_t yyscanner );
-int fts0bget_debug (yyscan_t yyscanner );
+int yyget_debug ( yyscan_t yyscanner );
-void fts0bset_debug (int debug_flag ,yyscan_t yyscanner );
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0bget_extra (yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-void fts0bset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-FILE *fts0bget_in (yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-void fts0bset_in (FILE * in_str ,yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-FILE *fts0bget_out (yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-void fts0bset_out (FILE * out_str ,yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-int fts0bget_leng (yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-char *fts0bget_text (yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-int fts0bget_lineno (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-void fts0bset_lineno (int line_number ,yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
+
+int yyget_column ( yyscan_t yyscanner );
+
+void yyset_column ( int _column_no , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -283,18 +491,18 @@ void fts0bset_lineno (int line_number ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int fts0bwrap (yyscan_t yyscanner );
+extern "C" int yywrap ( yyscan_t yyscanner );
#else
-extern int fts0bwrap (yyscan_t yyscanner );
+extern int yywrap ( yyscan_t yyscanner );
#endif
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
@@ -322,9 +530,9 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int fts0blex (yyscan_t yyscanner);
+extern int yylex (yyscan_t yyscanner);
-#define YY_DECL int fts0blex (yyscan_t yyscanner)
+#define YY_DECL int yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* yy_get_previous_state - get the state just before the EOB char was reached */
@@ -341,9 +549,154 @@ extern int fts0blex (yyscan_t yyscanner);
#undef YY_DECL
#endif
+#ifndef fts0b_create_buffer_ALREADY_DEFINED
+#undef yy_create_buffer
+#endif
+#ifndef fts0b_delete_buffer_ALREADY_DEFINED
+#undef yy_delete_buffer
+#endif
+#ifndef fts0b_scan_buffer_ALREADY_DEFINED
+#undef yy_scan_buffer
+#endif
+#ifndef fts0b_scan_string_ALREADY_DEFINED
+#undef yy_scan_string
+#endif
+#ifndef fts0b_scan_bytes_ALREADY_DEFINED
+#undef yy_scan_bytes
+#endif
+#ifndef fts0b_init_buffer_ALREADY_DEFINED
+#undef yy_init_buffer
+#endif
+#ifndef fts0b_flush_buffer_ALREADY_DEFINED
+#undef yy_flush_buffer
+#endif
+#ifndef fts0b_load_buffer_state_ALREADY_DEFINED
+#undef yy_load_buffer_state
+#endif
+#ifndef fts0b_switch_to_buffer_ALREADY_DEFINED
+#undef yy_switch_to_buffer
+#endif
+#ifndef fts0bpush_buffer_state_ALREADY_DEFINED
+#undef yypush_buffer_state
+#endif
+#ifndef fts0bpop_buffer_state_ALREADY_DEFINED
+#undef yypop_buffer_state
+#endif
+#ifndef fts0bensure_buffer_stack_ALREADY_DEFINED
+#undef yyensure_buffer_stack
+#endif
+#ifndef fts0blex_ALREADY_DEFINED
+#undef yylex
+#endif
+#ifndef fts0brestart_ALREADY_DEFINED
+#undef yyrestart
+#endif
+#ifndef fts0blex_init_ALREADY_DEFINED
+#undef yylex_init
+#endif
+#ifndef fts0blex_init_extra_ALREADY_DEFINED
+#undef yylex_init_extra
+#endif
+#ifndef fts0blex_destroy_ALREADY_DEFINED
+#undef yylex_destroy
+#endif
+#ifndef fts0bget_debug_ALREADY_DEFINED
+#undef yyget_debug
+#endif
+#ifndef fts0bset_debug_ALREADY_DEFINED
+#undef yyset_debug
+#endif
+#ifndef fts0bget_extra_ALREADY_DEFINED
+#undef yyget_extra
+#endif
+#ifndef fts0bset_extra_ALREADY_DEFINED
+#undef yyset_extra
+#endif
+#ifndef fts0bget_in_ALREADY_DEFINED
+#undef yyget_in
+#endif
+#ifndef fts0bset_in_ALREADY_DEFINED
+#undef yyset_in
+#endif
+#ifndef fts0bget_out_ALREADY_DEFINED
+#undef yyget_out
+#endif
+#ifndef fts0bset_out_ALREADY_DEFINED
+#undef yyset_out
+#endif
+#ifndef fts0bget_leng_ALREADY_DEFINED
+#undef yyget_leng
+#endif
+#ifndef fts0bget_text_ALREADY_DEFINED
+#undef yyget_text
+#endif
+#ifndef fts0bget_lineno_ALREADY_DEFINED
+#undef yyget_lineno
+#endif
+#ifndef fts0bset_lineno_ALREADY_DEFINED
+#undef yyset_lineno
+#endif
+#ifndef fts0bget_column_ALREADY_DEFINED
+#undef yyget_column
+#endif
+#ifndef fts0bset_column_ALREADY_DEFINED
+#undef yyset_column
+#endif
+#ifndef fts0bwrap_ALREADY_DEFINED
+#undef yywrap
+#endif
+#ifndef fts0bget_lval_ALREADY_DEFINED
+#undef yyget_lval
+#endif
+#ifndef fts0bset_lval_ALREADY_DEFINED
+#undef yyset_lval
+#endif
+#ifndef fts0bget_lloc_ALREADY_DEFINED
+#undef yyget_lloc
+#endif
+#ifndef fts0bset_lloc_ALREADY_DEFINED
+#undef yyset_lloc
+#endif
+#ifndef fts0balloc_ALREADY_DEFINED
+#undef yyalloc
+#endif
+#ifndef fts0brealloc_ALREADY_DEFINED
+#undef yyrealloc
+#endif
+#ifndef fts0bfree_ALREADY_DEFINED
+#undef yyfree
+#endif
+#ifndef fts0btext_ALREADY_DEFINED
+#undef yytext
+#endif
+#ifndef fts0bleng_ALREADY_DEFINED
+#undef yyleng
+#endif
+#ifndef fts0bin_ALREADY_DEFINED
+#undef yyin
+#endif
+#ifndef fts0bout_ALREADY_DEFINED
+#undef yyout
+#endif
+#ifndef fts0b_flex_debug_ALREADY_DEFINED
+#undef yy_flex_debug
+#endif
+#ifndef fts0blineno_ALREADY_DEFINED
+#undef yylineno
+#endif
+#ifndef fts0btables_fload_ALREADY_DEFINED
+#undef yytables_fload
+#endif
+#ifndef fts0btables_destroy_ALREADY_DEFINED
+#undef yytables_destroy
+#endif
+#ifndef fts0bTABLES_NAME_ALREADY_DEFINED
+#undef yyTABLES_NAME
+#endif
+
#line 73 "fts0blex.l"
-#line 348 "../include/fts0blex.h"
+#line 701 "../include/fts0blex.h"
#undef fts0bIN_HEADER
#endif /* fts0bHEADER_H */
diff --git a/storage/innobase/include/fts0tlex.h b/storage/innobase/include/fts0tlex.h
index f91533803e82cd707641676f3db32c160cdb8557..038cbb8858d0884a47711f423a99d6df7188031b 100644
--- a/storage/innobase/include/fts0tlex.h
+++ b/storage/innobase/include/fts0tlex.h
@@ -12,12 +12,222 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define fts0t_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer fts0t_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define fts0t_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer fts0t_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define fts0t_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer fts0t_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define fts0t_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string fts0t_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define fts0t_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes fts0t_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define fts0t_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer fts0t_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define fts0t_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer fts0t_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define fts0t_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state fts0t_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define fts0t_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer fts0t_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define fts0tpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state fts0tpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define fts0tpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state fts0tpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define fts0tensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack fts0tensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define fts0tlex_ALREADY_DEFINED
+#else
+#define yylex fts0tlex
+#endif
+
+#ifdef yyrestart
+#define fts0trestart_ALREADY_DEFINED
+#else
+#define yyrestart fts0trestart
+#endif
+
+#ifdef yylex_init
+#define fts0tlex_init_ALREADY_DEFINED
+#else
+#define yylex_init fts0tlex_init
+#endif
+
+#ifdef yylex_init_extra
+#define fts0tlex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra fts0tlex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define fts0tlex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy fts0tlex_destroy
+#endif
+
+#ifdef yyget_debug
+#define fts0tget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug fts0tget_debug
+#endif
+
+#ifdef yyset_debug
+#define fts0tset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug fts0tset_debug
+#endif
+
+#ifdef yyget_extra
+#define fts0tget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra fts0tget_extra
+#endif
+
+#ifdef yyset_extra
+#define fts0tset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra fts0tset_extra
+#endif
+
+#ifdef yyget_in
+#define fts0tget_in_ALREADY_DEFINED
+#else
+#define yyget_in fts0tget_in
+#endif
+
+#ifdef yyset_in
+#define fts0tset_in_ALREADY_DEFINED
+#else
+#define yyset_in fts0tset_in
+#endif
+
+#ifdef yyget_out
+#define fts0tget_out_ALREADY_DEFINED
+#else
+#define yyget_out fts0tget_out
+#endif
+
+#ifdef yyset_out
+#define fts0tset_out_ALREADY_DEFINED
+#else
+#define yyset_out fts0tset_out
+#endif
+
+#ifdef yyget_leng
+#define fts0tget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng fts0tget_leng
+#endif
+
+#ifdef yyget_text
+#define fts0tget_text_ALREADY_DEFINED
+#else
+#define yyget_text fts0tget_text
+#endif
+
+#ifdef yyget_lineno
+#define fts0tget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno fts0tget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define fts0tset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno fts0tset_lineno
+#endif
+
+#ifdef yyget_column
+#define fts0tget_column_ALREADY_DEFINED
+#else
+#define yyget_column fts0tget_column
+#endif
+
+#ifdef yyset_column
+#define fts0tset_column_ALREADY_DEFINED
+#else
+#define yyset_column fts0tset_column
+#endif
+
+#ifdef yywrap
+#define fts0twrap_ALREADY_DEFINED
+#else
+#define yywrap fts0twrap
+#endif
+
+#ifdef yyalloc
+#define fts0talloc_ALREADY_DEFINED
+#else
+#define yyalloc fts0talloc
+#endif
+
+#ifdef yyrealloc
+#define fts0trealloc_ALREADY_DEFINED
+#else
+#define yyrealloc fts0trealloc
+#endif
+
+#ifdef yyfree
+#define fts0tfree_ALREADY_DEFINED
+#else
+#define yyfree fts0tfree
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -88,29 +298,23 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+/* begin standard C++ headers. */
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* An opaque pointer. */
@@ -165,7 +369,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -193,7 +397,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -204,25 +408,25 @@ struct yy_buffer_state
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-void fts0trestart (FILE *input_file ,yyscan_t yyscanner );
-void fts0t_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void fts0t_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0t_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void fts0tpop_buffer_state (yyscan_t yyscanner );
+void yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void yypop_buffer_state ( yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-void *fts0talloc (yy_size_t ,yyscan_t yyscanner );
-void *fts0trealloc (void *,yy_size_t ,yyscan_t yyscanner );
-void fts0tfree (void * ,yyscan_t yyscanner );
+void *yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void yyfree ( void * , yyscan_t yyscanner );
/* Begin user sect3 */
-#define fts0twrap(n) 1
+#define fts0twrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
@@ -244,38 +448,42 @@ void fts0tfree (void * ,yyscan_t yyscanner );
#define YY_EXTRA_TYPE void *
#endif
-int fts0tlex_init (yyscan_t* scanner);
+int yylex_init (yyscan_t* scanner);
-int fts0tlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int fts0tlex_destroy (yyscan_t yyscanner );
+int yylex_destroy ( yyscan_t yyscanner );
-int fts0tget_debug (yyscan_t yyscanner );
+int yyget_debug ( yyscan_t yyscanner );
-void fts0tset_debug (int debug_flag ,yyscan_t yyscanner );
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-void fts0tset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-FILE *fts0tget_in (yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-void fts0tset_in (FILE * in_str ,yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-FILE *fts0tget_out (yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-void fts0tset_out (FILE * out_str ,yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-int fts0tget_leng (yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-char *fts0tget_text (yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-int fts0tget_lineno (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-void fts0tset_lineno (int line_number ,yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
+
+int yyget_column ( yyscan_t yyscanner );
+
+void yyset_column ( int _column_no , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -283,18 +491,18 @@ void fts0tset_lineno (int line_number ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int fts0twrap (yyscan_t yyscanner );
+extern "C" int yywrap ( yyscan_t yyscanner );
#else
-extern int fts0twrap (yyscan_t yyscanner );
+extern int yywrap ( yyscan_t yyscanner );
#endif
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
@@ -322,9 +530,9 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int fts0tlex (yyscan_t yyscanner);
+extern int yylex (yyscan_t yyscanner);
-#define YY_DECL int fts0tlex (yyscan_t yyscanner)
+#define YY_DECL int yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* yy_get_previous_state - get the state just before the EOB char was reached */
@@ -341,9 +549,154 @@ extern int fts0tlex (yyscan_t yyscanner);
#undef YY_DECL
#endif
+#ifndef fts0t_create_buffer_ALREADY_DEFINED
+#undef yy_create_buffer
+#endif
+#ifndef fts0t_delete_buffer_ALREADY_DEFINED
+#undef yy_delete_buffer
+#endif
+#ifndef fts0t_scan_buffer_ALREADY_DEFINED
+#undef yy_scan_buffer
+#endif
+#ifndef fts0t_scan_string_ALREADY_DEFINED
+#undef yy_scan_string
+#endif
+#ifndef fts0t_scan_bytes_ALREADY_DEFINED
+#undef yy_scan_bytes
+#endif
+#ifndef fts0t_init_buffer_ALREADY_DEFINED
+#undef yy_init_buffer
+#endif
+#ifndef fts0t_flush_buffer_ALREADY_DEFINED
+#undef yy_flush_buffer
+#endif
+#ifndef fts0t_load_buffer_state_ALREADY_DEFINED
+#undef yy_load_buffer_state
+#endif
+#ifndef fts0t_switch_to_buffer_ALREADY_DEFINED
+#undef yy_switch_to_buffer
+#endif
+#ifndef fts0tpush_buffer_state_ALREADY_DEFINED
+#undef yypush_buffer_state
+#endif
+#ifndef fts0tpop_buffer_state_ALREADY_DEFINED
+#undef yypop_buffer_state
+#endif
+#ifndef fts0tensure_buffer_stack_ALREADY_DEFINED
+#undef yyensure_buffer_stack
+#endif
+#ifndef fts0tlex_ALREADY_DEFINED
+#undef yylex
+#endif
+#ifndef fts0trestart_ALREADY_DEFINED
+#undef yyrestart
+#endif
+#ifndef fts0tlex_init_ALREADY_DEFINED
+#undef yylex_init
+#endif
+#ifndef fts0tlex_init_extra_ALREADY_DEFINED
+#undef yylex_init_extra
+#endif
+#ifndef fts0tlex_destroy_ALREADY_DEFINED
+#undef yylex_destroy
+#endif
+#ifndef fts0tget_debug_ALREADY_DEFINED
+#undef yyget_debug
+#endif
+#ifndef fts0tset_debug_ALREADY_DEFINED
+#undef yyset_debug
+#endif
+#ifndef fts0tget_extra_ALREADY_DEFINED
+#undef yyget_extra
+#endif
+#ifndef fts0tset_extra_ALREADY_DEFINED
+#undef yyset_extra
+#endif
+#ifndef fts0tget_in_ALREADY_DEFINED
+#undef yyget_in
+#endif
+#ifndef fts0tset_in_ALREADY_DEFINED
+#undef yyset_in
+#endif
+#ifndef fts0tget_out_ALREADY_DEFINED
+#undef yyget_out
+#endif
+#ifndef fts0tset_out_ALREADY_DEFINED
+#undef yyset_out
+#endif
+#ifndef fts0tget_leng_ALREADY_DEFINED
+#undef yyget_leng
+#endif
+#ifndef fts0tget_text_ALREADY_DEFINED
+#undef yyget_text
+#endif
+#ifndef fts0tget_lineno_ALREADY_DEFINED
+#undef yyget_lineno
+#endif
+#ifndef fts0tset_lineno_ALREADY_DEFINED
+#undef yyset_lineno
+#endif
+#ifndef fts0tget_column_ALREADY_DEFINED
+#undef yyget_column
+#endif
+#ifndef fts0tset_column_ALREADY_DEFINED
+#undef yyset_column
+#endif
+#ifndef fts0twrap_ALREADY_DEFINED
+#undef yywrap
+#endif
+#ifndef fts0tget_lval_ALREADY_DEFINED
+#undef yyget_lval
+#endif
+#ifndef fts0tset_lval_ALREADY_DEFINED
+#undef yyset_lval
+#endif
+#ifndef fts0tget_lloc_ALREADY_DEFINED
+#undef yyget_lloc
+#endif
+#ifndef fts0tset_lloc_ALREADY_DEFINED
+#undef yyset_lloc
+#endif
+#ifndef fts0talloc_ALREADY_DEFINED
+#undef yyalloc
+#endif
+#ifndef fts0trealloc_ALREADY_DEFINED
+#undef yyrealloc
+#endif
+#ifndef fts0tfree_ALREADY_DEFINED
+#undef yyfree
+#endif
+#ifndef fts0ttext_ALREADY_DEFINED
+#undef yytext
+#endif
+#ifndef fts0tleng_ALREADY_DEFINED
+#undef yyleng
+#endif
+#ifndef fts0tin_ALREADY_DEFINED
+#undef yyin
+#endif
+#ifndef fts0tout_ALREADY_DEFINED
+#undef yyout
+#endif
+#ifndef fts0t_flex_debug_ALREADY_DEFINED
+#undef yy_flex_debug
+#endif
+#ifndef fts0tlineno_ALREADY_DEFINED
+#undef yylineno
+#endif
+#ifndef fts0ttables_fload_ALREADY_DEFINED
+#undef yytables_fload
+#endif
+#ifndef fts0ttables_destroy_ALREADY_DEFINED
+#undef yytables_destroy
+#endif
+#ifndef fts0tTABLES_NAME_ALREADY_DEFINED
+#undef yyTABLES_NAME
+#endif
+
#line 68 "fts0tlex.l"
-#line 348 "../include/fts0tlex.h"
+#line 701 "../include/fts0tlex.h"
#undef fts0tIN_HEADER
#endif /* fts0tHEADER_H */
diff --git a/storage/innobase/include/handler0alter.h b/storage/innobase/include/handler0alter.h
index 3dd6c99eb6d8bda91ccd7991494c694795533af4..63379ad93716be302a0680c7495d10d665449f5e 100644
--- a/storage/innobase/include/handler0alter.h
+++ b/storage/innobase/include/handler0alter.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -96,9 +97,13 @@ struct ib_sequence_t {
return(m_next_value);
}
- /** Maximum calumn value if adding an AUTOINC column else 0. Once
- we reach the end of the sequence it will be set to ~0. */
- const ulonglong m_max_value;
+ /** @return maximum column value
+ @retval 0 if not adding AUTO_INCREMENT column */
+ ulonglong max_value() const { return m_max_value; }
+
+private:
+ /** Maximum value if adding an AUTO_INCREMENT column, else 0 */
+ ulonglong m_max_value;
/** Value of auto_increment_increment */
ulong m_increment;
diff --git a/storage/innobase/include/pars0pars.h b/storage/innobase/include/pars0pars.h
index 73585c78a6aff024a97fa5044c90572c1883c8c1..313380a40b454a1ab8ff6c8a8743a029ff7b2097 100644
--- a/storage/innobase/include/pars0pars.h
+++ b/storage/innobase/include/pars0pars.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -109,11 +110,11 @@ pars_sql(
Retrieves characters to the lexical analyzer.
@return number of characters copied or 0 on EOF */
UNIV_INTERN
-int
+size_t
pars_get_lex_chars(
/*===============*/
char* buf, /*!< in/out: buffer where to copy */
- int max_size); /*!< in: maximum number of characters which fit
+ size_t max_size); /*!< in: maximum number of characters which fit
in the buffer */
/*************************************************************//**
Called by yyparse on error. */
diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic
index 89f6902059dcb63f66e7e33ad9cfb136095cd073..122ea733065a1768b7ac8f8ca1a4ce445c35373a 100644
--- a/storage/innobase/include/rem0rec.ic
+++ b/storage/innobase/include/rem0rec.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -373,15 +373,9 @@ rec_set_next_offs_old(
rec_t* rec, /*!< in: old-style physical record */
ulint next) /*!< in: offset of the next record */
{
- ut_ad(rec);
- ut_ad(UNIV_PAGE_SIZE > next);
-#if REC_NEXT_MASK != 0xFFFFUL
-# error "REC_NEXT_MASK != 0xFFFFUL"
-#endif
-#if REC_NEXT_SHIFT
-# error "REC_NEXT_SHIFT != 0"
-#endif
-
+ ut_ad(srv_page_size > next);
+ compile_time_assert(REC_NEXT_MASK == 0xFFFFUL);
+ compile_time_assert(REC_NEXT_SHIFT == 0);
mach_write_to_2(rec - REC_NEXT, next);
}
@@ -397,8 +391,7 @@ rec_set_next_offs_new(
{
ulint field_value;
- ut_ad(rec);
- ut_ad(UNIV_PAGE_SIZE > next);
+ ut_ad(srv_page_size > next);
if (!next) {
field_value = 0;
@@ -921,7 +914,6 @@ rec_offs_set_n_alloc(
must be allocated */
ulint n_alloc) /*!< in: number of elements */
{
- ut_ad(offsets);
ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
UNIV_MEM_ALLOC(offsets, n_alloc * sizeof *offsets);
offsets[0] = n_alloc;
@@ -1039,7 +1031,6 @@ rec_get_nth_field_offs(
ulint offs;
ulint length;
ut_ad(n < rec_offs_n_fields(offsets));
- ut_ad(len);
if (n == 0) {
offs = 0;
@@ -1387,7 +1378,6 @@ rec_set_nth_field(
byte* data2;
ulint len2;
- ut_ad(rec);
ut_ad(rec_offs_validate(rec, NULL, offsets));
if (len == UNIV_SQL_NULL) {
@@ -1589,8 +1579,6 @@ rec_get_converted_size(
ulint data_size;
ulint extra_size;
- ut_ad(index);
- ut_ad(dtuple);
ut_ad(dtuple_check_typed(dtuple));
ut_ad(dict_index_is_univ(index)
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index fe16b8272b81790d37d97fed124de35984c42b0b..165ebe82df84a265a7078cf76cd4e18ff50b8a44 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2019, MariaDB Corporation.
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
@@ -526,7 +526,7 @@ non-locking select */
ut_ad(!trx_is_autocommit_non_locking((t))); \
switch ((t)->state) { \
case TRX_STATE_PREPARED: \
- /* fall through */ \
+ case TRX_STATE_PREPARED_RECOVERED: \
case TRX_STATE_ACTIVE: \
case TRX_STATE_COMMITTED_IN_MEMORY: \
continue; \
@@ -719,6 +719,7 @@ struct trx_t{
TRX_STATE_NOT_STARTED
TRX_STATE_ACTIVE
TRX_STATE_PREPARED
+ TRX_STATE_PREPARED_RECOVERED (special case of TRX_STATE_PREPARED)
TRX_STATE_COMMITTED_IN_MEMORY (alias below COMMITTED)
Valid state transitions are:
diff --git a/storage/innobase/include/trx0trx.ic b/storage/innobase/include/trx0trx.ic
index fa30e6229a33f896e7c2ec6bee1246a76b690bf1..0011f2ca74bf4c025f1c49a6368f78124f80174f 100644
--- a/storage/innobase/include/trx0trx.ic
+++ b/storage/innobase/include/trx0trx.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, MariaDB Corporation. All Rights Reserved.
+Copyright (c) 2016, 2019, MariaDB Corporation.
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
@@ -49,6 +49,7 @@ trx_state_eq(
#ifdef UNIV_DEBUG
switch (trx->state) {
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
ut_ad(!trx_is_autocommit_non_locking(trx));
return(trx->state == state);
diff --git a/storage/innobase/include/trx0types.h b/storage/innobase/include/trx0types.h
index 7ca95131328853541692816cd6c15a57bab895e9..a0b398fffa1b99666d5ee3018073c08290a3121e 100644
--- a/storage/innobase/include/trx0types.h
+++ b/storage/innobase/include/trx0types.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -48,7 +49,11 @@ enum trx_que_t {
enum trx_state_t {
TRX_STATE_NOT_STARTED,
TRX_STATE_ACTIVE,
- TRX_STATE_PREPARED, /* Support for 2PC/XA */
+ /** XA PREPARE has been executed; only XA COMMIT or XA ROLLBACK
+ are possible */
+ TRX_STATE_PREPARED,
+ /** XA PREPARE transaction that was returned to ha_recover() */
+ TRX_STATE_PREPARED_RECOVERED,
TRX_STATE_COMMITTED_IN_MEMORY
};
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 8807e2bf9e96f99db6fb75d47de91051b33b54a8..e056f0f4bb08e61cfcb0ec0abb3a0a9da5bb5ce7 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 43
+#define INNODB_VERSION_BUGFIX 44
/* The following is the InnoDB version as shown in
SELECT plugin_version FROM information_schema.plugins;
@@ -454,7 +454,6 @@ macro ULINTPF. */
# define INT64PF "%lld"
# define UINT64PF "%llu"
# define UINT64PFx "%016llx"
-# define TIMETPF "%ld"
typedef __int64 ib_int64_t;
typedef unsigned __int64 ib_uint64_t;
typedef unsigned __int32 ib_uint32_t;
@@ -464,7 +463,6 @@ typedef unsigned __int32 ib_uint32_t;
# define INT64PF "%" PRId64
# define UINT64PF "%" PRIu64
# define UINT64PFx "%016" PRIx64
-# define TIMETPF "%" PRIdFAST32
typedef int64_t ib_int64_t;
typedef uint64_t ib_uint64_t;
typedef uint32_t ib_uint32_t;
diff --git a/storage/innobase/include/ut0dbg.h b/storage/innobase/include/ut0dbg.h
index 3f5baef0a3c988d798ab6650dd61665f03ad0075..b4c941bc16394fb8e69264535c817f8c714424df 100644
--- a/storage/innobase/include/ut0dbg.h
+++ b/storage/innobase/include/ut0dbg.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, MariaDB Corporation.
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 +85,7 @@ ut_dbg_assertion_failed(
/** Debug assertion. Does nothing unless UNIV_DEBUG is defined. */
#define ut_ad(EXPR) ut_a(EXPR)
/** Debug statement. Does nothing unless UNIV_DEBUG is defined. */
-#define ut_d(EXPR) do {EXPR;} while (0)
+#define ut_d(EXPR) EXPR
#else
/** Debug assertion. Does nothing unless UNIV_DEBUG is defined. */
#define ut_ad(EXPR)
diff --git a/storage/innobase/include/ut0wqueue.h b/storage/innobase/include/ut0wqueue.h
index 479301454264d8d680eb17c343689d5d0af53921..dcd3feabe724940f53c7edcc01b356eac833f8f7 100644
--- a/storage/innobase/include/ut0wqueue.h
+++ b/storage/innobase/include/ut0wqueue.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2006, 2009, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation. All Rights Reserved.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -67,15 +67,10 @@ ib_wqueue_add(
mem_heap_t* heap); /*!< in: memory heap to use for allocating the
list node */
-/********************************************************************
-Check if queue is empty. */
-
-ibool
-ib_wqueue_is_empty(
-/*===============*/
- /* out: TRUE if queue empty
- else FALSE */
- const ib_wqueue_t* wq); /* in: work queue */
+/** Check if queue is empty.
+@param wq wait queue
+@return whether the queue is empty */
+bool ib_wqueue_is_empty(ib_wqueue_t* wq);
/****************************************************************//**
Wait for a work item to appear in the queue.
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 3970a559a4c2796b6933c986283ad0b75f0c1cf2..1ad5b9881b10d23a920951d329261ebd588bbff9 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2019, MariaDB Corporation.
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
@@ -5350,7 +5350,7 @@ lock_table(
lock_mutex_enter();
DBUG_EXECUTE_IF("fatal-semaphore-timeout",
- { os_thread_sleep(3600000000); });
+ { os_thread_sleep(3600000000U); });
/* We have to check if the new lock is compatible with any locks
other transactions have in the table lock queue. */
@@ -7908,7 +7908,8 @@ lock_trx_release_locks(
{
assert_trx_in_list(trx);
- if (trx_state_eq(trx, TRX_STATE_PREPARED)) {
+ if (trx_state_eq(trx, TRX_STATE_PREPARED)
+ || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)) {
mutex_enter(&trx_sys->mutex);
ut_a(trx_sys->n_prepared_trx > 0);
trx_sys->n_prepared_trx--;
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 5aa9b6040f89abc1504b5d99d5c7f1809f993d6f..a417de1261f4e10ff3b9af03d84b9a2c988aea3a 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -6183,7 +6183,7 @@ os_file_trim(
size_t len = slot->len;
size_t trim_len = slot->page_size - len;
- os_offset_t off = slot->offset + len;
+ os_offset_t off __attribute__((unused)) = slot->offset + len;
size_t bsize = slot->file_block_size;
#ifdef UNIV_TRIM_DEBUG
diff --git a/storage/innobase/pars/lexyy.cc b/storage/innobase/pars/lexyy.cc
index bfa8e2ea9506ece3db783d41771a604716302245..33de48e7b2f0f81f3dacdb04570cb67320fade4a 100644
--- a/storage/innobase/pars/lexyy.cc
+++ b/storage/innobase/pars/lexyy.cc
@@ -9,8 +9,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -35,7 +35,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -52,7 +52,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -85,60 +85,48 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+/* begin standard C++ headers. */
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -168,16 +156,17 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t yyleng;
-extern FILE *yyin, *yyout;
+
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
-
+ #define YY_LINENO_REWIND_TO(ptr)
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -191,7 +180,6 @@ extern FILE *yyin, *yyout;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -206,12 +194,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -262,7 +250,7 @@ struct yy_buffer_state
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
@@ -273,7 +261,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
@@ -281,11 +268,11 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t yyleng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+static int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
@@ -294,85 +281,81 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart (FILE *input_file );
-MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
-void yy_delete_buffer (YY_BUFFER_STATE b );
-void yy_flush_buffer (YY_BUFFER_STATE b );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state (void );
+static void yyrestart ( FILE *input_file );
+MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+static YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+static void yy_delete_buffer ( YY_BUFFER_STATE b );
+static void yy_flush_buffer ( YY_BUFFER_STATE b );
+MY_ATTRIBUTE((unused)) static void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+MY_ATTRIBUTE((unused)) static void yypop_buffer_state ( void );
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
-
-void *yyalloc (yy_size_t );
-void *yyrealloc (void *,yy_size_t );
-void yyfree (void * );
+static void *yyalloc ( yy_size_t );
+static void *yyrealloc ( void *, yy_size_t );
+static void yyfree ( void * );
#define yy_new_buffer yy_create_buffer
-
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
-#define yywrap(n) 1
+#define yywrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+static FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-extern int yylineno;
-int yylineno = 1;
+static int yylineno = 1;
-extern char *yytext;
+
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-
#define YY_NUM_RULES 124
#define YY_END_OF_BUFFER 125
/* This struct is not used in this scanner,
@@ -382,7 +365,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[425] =
+static const flex_int16_t yy_accept[425] =
{ 0,
0, 0, 119, 119, 0, 0, 0, 0, 125, 123,
122, 122, 8, 123, 114, 5, 103, 109, 112, 110,
@@ -433,7 +416,7 @@ static yyconst flex_int16_t yy_accept[425] =
96, 96, 62, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -465,7 +448,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[57] =
+static const YY_CHAR yy_meta[57] =
{ 0,
1, 1, 1, 2, 3, 1, 1, 4, 1, 1,
5, 1, 1, 1, 1, 6, 7, 1, 1, 1,
@@ -475,7 +458,7 @@ static yyconst flex_int32_t yy_meta[57] =
9, 9, 9, 9, 1, 1
} ;
-static yyconst flex_int16_t yy_base[438] =
+static const flex_int16_t yy_base[438] =
{ 0,
0, 0, 293, 287, 284, 281, 272, 256, 254, 1357,
55, 57, 1357, 0, 1357, 1357, 1357, 1357, 1357, 1357,
@@ -527,7 +510,7 @@ static yyconst flex_int16_t yy_base[438] =
1306, 1315, 1324, 1333, 1340, 1344, 1347
} ;
-static yyconst flex_int16_t yy_def[438] =
+static const flex_int16_t yy_def[438] =
{ 0,
424, 1, 425, 425, 426, 426, 427, 427, 424, 424,
424, 424, 424, 428, 424, 424, 424, 424, 424, 424,
@@ -579,7 +562,7 @@ static yyconst flex_int16_t yy_def[438] =
424, 424, 424, 424, 424, 424, 424
} ;
-static yyconst flex_int16_t yy_nxt[1414] =
+static const flex_int16_t yy_nxt[1414] =
{ 0,
10, 11, 12, 13, 10, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
@@ -739,7 +722,7 @@ static yyconst flex_int16_t yy_nxt[1414] =
424, 424, 424
} ;
-static yyconst flex_int16_t yy_chk[1414] =
+static const flex_int16_t yy_chk[1414] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -902,8 +885,8 @@ static yyconst flex_int16_t yy_chk[1414] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
+
+static int yy_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -912,11 +895,12 @@ int yy_flex_debug = 0;
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+static char *yytext;
#line 1 "pars0lex.l"
/*****************************************************************************
-Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -951,7 +935,7 @@ Created 12/14/1997 Heikki Tuuri
*******************************************************/
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
-#line 53 "pars0lex.l"
+#line 54 "pars0lex.l"
#define YYSTYPE que_node_t*
#include "univ.i"
@@ -966,9 +950,8 @@ Created 12/14/1997 Heikki Tuuri
#define realloc(P, A) ut_realloc(P, A)
#define exit(A) ut_error
-/* Note: We cast &result to int* from yysize_t* */
#define YY_INPUT(buf, result, max_size) \
- (result = pars_get_lex_chars(buf, max_size))
+ result = pars_get_lex_chars(buf, max_size)
/* String buffer for removing quotes */
static ulint stringbuf_len_alloc = 0; /* Allocated length */
@@ -1000,10 +983,9 @@ string_append(
stringbuf_len += len;
}
+#line 986 "lexyy.cc"
-
-
-#line 1006 "lexyy.cc"
+#line 988 "lexyy.cc"
#define INITIAL 0
#define comment 1
@@ -1022,36 +1004,36 @@ string_append(
#define YY_EXTRA_TYPE void *
#endif
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-MY_ATTRIBUTE((unused)) static int yylex_destroy (void );
+MY_ATTRIBUTE((unused)) static int yylex_destroy ( void );
+
+MY_ATTRIBUTE((unused)) static int yyget_debug ( void );
-int yyget_debug (void );
+MY_ATTRIBUTE((unused)) static void yyset_debug ( int debug_flag );
-void yyset_debug (int debug_flag );
+YY_EXTRA_TYPE yyget_extra ( void );
-YY_EXTRA_TYPE yyget_extra (void );
-void yyset_extra (YY_EXTRA_TYPE user_defined );
-FILE *yyget_in (void );
+MY_ATTRIBUTE((unused)) static FILE *yyget_in ( void );
-void yyset_in (FILE * in_str );
+MY_ATTRIBUTE((unused)) static void yyset_in ( FILE * _in_str );
-FILE *yyget_out (void );
+MY_ATTRIBUTE((unused)) static FILE *yyget_out ( void );
-void yyset_out (FILE * out_str );
+MY_ATTRIBUTE((unused)) static void yyset_out ( FILE * _out_str );
-yy_size_t yyget_leng (void );
+ MY_ATTRIBUTE((unused)) static int yyget_leng ( void );
-char *yyget_text (void );
+MY_ATTRIBUTE((unused)) static char *yyget_text ( void );
-int yyget_lineno (void );
+MY_ATTRIBUTE((unused)) static int yyget_lineno ( void );
-void yyset_lineno (int line_number );
+MY_ATTRIBUTE((unused)) static void yyset_lineno ( int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1059,26 +1041,29 @@ void yyset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int yywrap ( void );
#else
-extern int yywrap (void );
+extern int yywrap ( void );
#endif
#endif
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
#endif
@@ -1098,7 +1083,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1109,7 +1094,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1122,7 +1107,7 @@ static int input (void );
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -1177,7 +1162,7 @@ extern int yylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -1187,15 +1172,10 @@ extern int yylex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
-#line 112 "pars0lex.l"
-
-
-#line 1197 "lexyy.cc"
-
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -1216,13 +1196,19 @@ YY_DECL
if ( ! YY_CURRENT_BUFFER ) {
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+#line 112 "pars0lex.l"
+
+
+#line 1209 "lexyy.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
@@ -1238,7 +1224,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1248,9 +1234,9 @@ YY_DECL
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 425 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 424 );
@@ -2234,7 +2220,7 @@ YY_RULE_SETUP
#line 691 "pars0lex.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 2237 "lexyy.cc"
+#line 2223 "lexyy.cc"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(comment):
case YY_STATE_EOF(quoted):
@@ -2316,7 +2302,7 @@ case YY_STATE_EOF(id):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -2369,6 +2355,7 @@ case YY_STATE_EOF(id):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
@@ -2380,9 +2367,9 @@ case YY_STATE_EOF(id):
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -2411,7 +2398,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -2424,21 +2411,21 @@ static int yy_get_next_buffer (void)
else
{
- int num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = static_cast(b->yy_buf_size * 2);
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2447,11 +2434,12 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -2459,9 +2447,8 @@ static int yy_get_next_buffer (void)
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size
- - number_to_move - 1);
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
}
@@ -2470,7 +2457,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
+ (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -2480,7 +2467,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart(yyin );
+ yyrestart( yyin );
}
else
@@ -2494,12 +2481,15 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -2513,16 +2503,16 @@ static int yy_get_next_buffer (void)
/* yy_get_previous_state - get the state just before the EOB char was reached */
- yy_state_type yy_get_previous_state (void)
+ static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
+ yy_state_type yy_current_state;
+ char *yy_cp;
+
yy_current_state = (yy_start);
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -2532,9 +2522,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 425 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -2545,12 +2535,12 @@ static int yy_get_next_buffer (void)
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -2560,14 +2550,18 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 425 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 424);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -2577,7 +2571,7 @@ static int yy_get_next_buffer (void)
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -2592,7 +2586,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (int)((yy_c_buf_p) - (yytext_ptr));
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -2609,14 +2603,14 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
- return EOF;
+ if ( yywrap( ) )
+ return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -2644,29 +2638,29 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
- *
+ *
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyrestart (FILE * input_file )
+ static void yyrestart (FILE * input_file )
{
-
+
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
- yy_load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
- *
+ *
*/
MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
-
+
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
@@ -2685,7 +2679,7 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
@@ -2706,14 +2700,14 @@ static void yy_load_buffer_state (void)
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
+ *
* @return the allocated buffer state.
*/
static YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -2722,24 +2716,24 @@ static void yy_load_buffer_state (void)
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
- *
+ *
*/
- void yy_delete_buffer (YY_BUFFER_STATE b )
+ static void yy_delete_buffer (YY_BUFFER_STATE b )
{
-
+
if ( ! b )
return;
@@ -2747,21 +2741,21 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- yyfree((void *) b );
+ yyfree( (void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
*/
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
-
- yy_flush_buffer(b );
+
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
@@ -2776,15 +2770,15 @@ static void yy_load_buffer_state (void)
}
b->yy_is_interactive = 0;
-
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
+ *
*/
- void yy_flush_buffer (YY_BUFFER_STATE b )
+ static void yy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -2804,16 +2798,16 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
- *
+ *
*/
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+MY_ATTRIBUTE((unused)) static void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
@@ -2835,15 +2829,15 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
- *
+ *
*/
-void yypop_buffer_state (void)
+MY_ATTRIBUTE((unused)) static void yypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
@@ -2854,7 +2848,7 @@ void yypop_buffer_state (void)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -2864,15 +2858,15 @@ void yypop_buffer_state (void)
*/
static void yyensure_buffer_stack (void)
{
- int num_to_alloc;
-
+ yy_size_t num_to_alloc;
+
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
@@ -2889,10 +2883,9 @@ static void yyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
- num_to_alloc = static_cast(
- (yy_buffer_stack_max) + grow_size);
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
@@ -2910,9 +2903,9 @@ static void yyensure_buffer_stack (void)
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -2936,81 +2929,81 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
- *
+ *
*/
-int yyget_lineno (void)
+MY_ATTRIBUTE((unused)) static int yyget_lineno (void)
{
-
+
return yylineno;
}
/** Get the input stream.
- *
+ *
*/
-FILE *yyget_in (void)
+MY_ATTRIBUTE((unused)) static FILE *yyget_in (void)
{
return yyin;
}
/** Get the output stream.
- *
+ *
*/
-FILE *yyget_out (void)
+MY_ATTRIBUTE((unused)) static FILE *yyget_out (void)
{
return yyout;
}
/** Get the length of the current token.
- *
+ *
*/
-yy_size_t yyget_leng (void)
+MY_ATTRIBUTE((unused)) static int yyget_leng (void)
{
return yyleng;
}
/** Get the current token.
- *
+ *
*/
-char *yyget_text (void)
+MY_ATTRIBUTE((unused)) static char *yyget_text (void)
{
return yytext;
}
/** Set the current line number.
- * @param line_number
- *
+ * @param _line_number line number
+ *
*/
-void yyset_lineno (int line_number )
+MY_ATTRIBUTE((unused)) static void yyset_lineno (int _line_number )
{
-
- yylineno = line_number;
+
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
- *
+ * @param _in_str A readable stream.
+ *
* @see yy_switch_to_buffer
*/
-void yyset_in (FILE * in_str )
+MY_ATTRIBUTE((unused)) static void yyset_in (FILE * _in_str )
{
- yyin = in_str ;
+ yyin = _in_str ;
}
-void yyset_out (FILE * out_str )
+MY_ATTRIBUTE((unused)) static void yyset_out (FILE * _out_str )
{
- yyout = out_str ;
+ yyout = _out_str ;
}
-int yyget_debug (void)
+MY_ATTRIBUTE((unused)) static int yyget_debug (void)
{
return yy_flex_debug;
}
-void yyset_debug (int bdebug )
+MY_ATTRIBUTE((unused)) static void yyset_debug (int _bdebug )
{
- yy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
static int yy_init_globals (void)
@@ -3019,10 +3012,10 @@ static int yy_init_globals (void)
* This function is called from yylex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
@@ -3031,8 +3024,8 @@ static int yy_init_globals (void)
yyin = stdin;
yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
@@ -3044,10 +3037,10 @@ static int yy_init_globals (void)
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
MY_ATTRIBUTE((unused)) static int yylex_destroy (void)
{
-
+
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
yypop_buffer_state();
}
@@ -3068,18 +3061,19 @@ MY_ATTRIBUTE((unused)) static int yylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
- register int i;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -3087,13 +3081,14 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *yyalloc (yy_size_t size )
+static void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
-void *yyrealloc (void * ptr, yy_size_t size )
+static void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -3101,12 +3096,12 @@ void *yyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void yyfree (void * ptr )
+static void yyfree (void * ptr )
{
- free( (char*) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
@@ -3114,7 +3109,6 @@ void yyfree (void * ptr )
#line 691 "pars0lex.l"
-
/**********************************************************************
Release any resources used by the lexer. */
UNIV_INTERN
diff --git a/storage/innobase/pars/make_flex.sh b/storage/innobase/pars/make_flex.sh
index c3db8aea29838b5bbebe986126615d3b98a496d8..54aebb259d991e2152d487fa31c42ee6c43fc4ed 100755
--- a/storage/innobase/pars/make_flex.sh
+++ b/storage/innobase/pars/make_flex.sh
@@ -1,6 +1,7 @@
#!/bin/bash
#
# Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 2017, 2019, MariaDB Corporation.
#
# 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
@@ -31,6 +32,7 @@ echo '#include "univ.i"' > $OUTFILE
# a warning on Win64. Add the cast. Also define some symbols as static.
sed -e '
s/'"$TMPFILE"'/'"$OUTFILE"'/;
+s/^void *yyset_extra *( *YY_EXTRA_TYPE *user_defined *) *;//
s/\(int offset = \)\((yy_c_buf_p) - (yytext_ptr)\);/\1(int)(\2);/;
s/\(void yy\(restart\|_\(delete\|flush\)_buffer\)\)/static \1/;
s/\(void yy_switch_to_buffer\)/MY_ATTRIBUTE((unused)) static \1/;
@@ -38,11 +40,12 @@ s/\(void yy\(push\|pop\)_buffer_state\)/MY_ATTRIBUTE((unused)) static \1/;
s/\(YY_BUFFER_STATE yy_create_buffer\)/static \1/;
s/\(\(int\|void\) yy[gs]et_\)/MY_ATTRIBUTE((unused)) static \1/;
s/\(void \*\?yy\(\(re\)\?alloc\|free\)\)/static \1/;
-s/\(extern \)\?\(int yy\(leng\|lineno\|_flex_debug\)\)/static \2/;
+s/extern int yy\(leng\|_flex_debug\|lineno\);//;
+s/\(int yy\(leng\|lineno\|_flex_debug\)\)/static \1/;
s/\(int yylex_destroy\)/MY_ATTRIBUTE((unused)) static \1/;
-s/\(extern \)\?\(int yylex \)/UNIV_INTERN \2/;
s/^\(\(FILE\|char\) *\* *yyget\)/MY_ATTRIBUTE((unused)) static \1/;
-s/^\(extern \)\?\(\(FILE\|char\) *\* *yy\)/static \2/;
+s/^extern \(\(FILE\|char\) *\* *yy\).*//;
+s/^\(FILE\|char\) *\* *yy/static &/;
' < $TMPFILE >> $OUTFILE
rm $TMPFILE
diff --git a/storage/innobase/pars/pars0lex.l b/storage/innobase/pars/pars0lex.l
index 83c3af4b6c5f7d2ce9a6755fc9068e0e42a0121b..60756413c0a48315f007687c971958fc3e6d2a51 100644
--- a/storage/innobase/pars/pars0lex.l
+++ b/storage/innobase/pars/pars0lex.l
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -64,9 +65,8 @@ Created 12/14/1997 Heikki Tuuri
#define realloc(P, A) ut_realloc(P, A)
#define exit(A) ut_error
-/* Note: We cast &result to int* from yysize_t* */
#define YY_INPUT(buf, result, max_size) \
- pars_get_lex_chars(buf, (int*) &result, max_size)
+ result = pars_get_lex_chars(buf, max_size)
/* String buffer for removing quotes */
static ulint stringbuf_len_alloc = 0; /* Allocated length */
diff --git a/storage/innobase/pars/pars0pars.cc b/storage/innobase/pars/pars0pars.cc
index ce61d6e1e3bc65b525de2ac2359e20559eb52173..24bbeb1d36dd0d0bbf5a007e7605fdb88aa85039 100644
--- a/storage/innobase/pars/pars0pars.cc
+++ b/storage/innobase/pars/pars0pars.cc
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -2153,16 +2154,14 @@ pars_stored_procedure_call(
/*************************************************************//**
Retrieves characters to the lexical analyzer. */
UNIV_INTERN
-int
+size_t
pars_get_lex_chars(
/*===============*/
char* buf, /*!< in/out: buffer where to copy */
- int max_size) /*!< in: maximum number of characters which fit
+ size_t max_size) /*!< in: maximum number of characters which fit
in the buffer */
{
- int len;
-
- len = static_cast(
+ size_t len = size_t(
pars_sym_tab_global->string_len
- pars_sym_tab_global->next_char_pos);
if (len == 0) {
diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc
index af32d0519e2f16d50ee7f29a0505d3928b7351c0..0b01bddb5d7b3ed7832721885c1375a541494eb8 100644
--- a/storage/innobase/rem/rem0rec.cc
+++ b/storage/innobase/rem/rem0rec.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2019, MariaDB Corporation.
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
@@ -556,10 +556,6 @@ rec_get_offsets_func(
ulint n;
ulint size;
- ut_ad(rec);
- ut_ad(index);
- ut_ad(heap);
-
if (dict_table_is_comp(index->table)) {
switch (UNIV_EXPECT(rec_get_status(rec),
REC_STATUS_ORDINARY)) {
@@ -637,9 +633,6 @@ rec_get_offsets_reverse(
ulint null_mask;
ulint n_node_ptr_field;
- ut_ad(extra);
- ut_ad(index);
- ut_ad(offsets);
ut_ad(dict_table_is_comp(index->table));
if (UNIV_UNLIKELY(node_ptr)) {
@@ -748,8 +741,6 @@ rec_get_nth_field_offs_old(
ulint os;
ulint next_os;
- ut_ad(len);
- ut_a(rec);
ut_a(n < rec_get_n_fields_old(rec));
if (rec_get_1byte_offs_flag(rec)) {
@@ -1713,7 +1704,6 @@ rec_validate(
ulint sum = 0;
ulint i;
- ut_a(rec);
n_fields = rec_offs_n_fields(offsets);
if ((n_fields == 0) || (n_fields > REC_MAX_N_FIELDS)) {
@@ -1777,8 +1767,6 @@ rec_print_old(
ulint n;
ulint i;
- ut_ad(rec);
-
n = rec_get_n_fields_old(rec);
fprintf(file, "PHYSICAL RECORD: n_fields %lu;"
@@ -1872,8 +1860,6 @@ rec_print_new(
const rec_t* rec, /*!< in: physical record */
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
{
- ut_ad(rec);
- ut_ad(offsets);
ut_ad(rec_offs_validate(rec, NULL, offsets));
if (!rec_offs_comp(offsets)) {
@@ -1900,8 +1886,6 @@ rec_print(
const rec_t* rec, /*!< in: physical record */
const dict_index_t* index) /*!< in: record descriptor */
{
- ut_ad(index);
-
if (!dict_table_is_comp(index->table)) {
rec_print_old(file, rec);
return;
diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc
index 7e6e92ed849fc456e9bc602ff07beabeb68fc49c..6af93fb83fbb7ec25ebbaef6a9ba5a19a7297c63 100644
--- a/storage/innobase/row/row0ftsort.cc
+++ b/storage/innobase/row/row0ftsort.cc
@@ -99,7 +99,7 @@ row_merge_create_fts_sort_index(
field->name = NULL;
field->prefix_len = 0;
field->col = static_cast(
- mem_heap_alloc(new_index->heap, sizeof(dict_col_t)));
+ mem_heap_zalloc(new_index->heap, sizeof(dict_col_t)));
field->col->prtype = idx_field->col->prtype | DATA_NOT_NULL;
field->col->mtype = charset == &my_charset_latin1
? DATA_VARCHAR : DATA_VARMYSQL;
@@ -114,7 +114,7 @@ row_merge_create_fts_sort_index(
field->name = NULL;
field->prefix_len = 0;
field->col = static_cast(
- mem_heap_alloc(new_index->heap, sizeof(dict_col_t)));
+ mem_heap_zalloc(new_index->heap, sizeof(dict_col_t)));
field->col->mtype = DATA_INT;
*opt_doc_id_size = FALSE;
@@ -148,21 +148,16 @@ row_merge_create_fts_sort_index(
field->col->prtype = DATA_NOT_NULL | DATA_BINARY_TYPE;
- field->col->mbminlen = 0;
- field->col->mbmaxlen = 0;
-
/* The third field is on the word's position in the original doc */
field = dict_index_get_nth_field(new_index, 2);
field->name = NULL;
field->prefix_len = 0;
field->col = static_cast(
- mem_heap_alloc(new_index->heap, sizeof(dict_col_t)));
+ mem_heap_zalloc(new_index->heap, sizeof(dict_col_t)));
field->col->mtype = DATA_INT;
field->col->len = 4 ;
field->fixed_len = 4;
field->col->prtype = DATA_NOT_NULL;
- field->col->mbminlen = 0;
- field->col->mbmaxlen = 0;
return(new_index);
}
@@ -1420,9 +1415,6 @@ row_fts_merge_insert(
ulint count_diag = 0;
ulint space;
- ut_ad(index);
- ut_ad(table);
-
/* We use the insert query graph as the dummy graph
needed in the row module call */
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 65a27ebeb3738cdde602b158e5de0cfecd8da129..14b52f21e6838ec5dfa727cf043e21f36a920750 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -489,8 +489,6 @@ row_ins_cascade_calc_update_vec(
ulint doc_id_pos = 0;
doc_id_t new_doc_id = FTS_NULL_DOC_ID;
- ut_a(node);
- ut_a(foreign);
ut_a(cascade);
ut_a(table);
ut_a(index);
@@ -985,11 +983,6 @@ row_ins_foreign_check_on_constraint(
doc_id_t doc_id = FTS_NULL_DOC_ID;
ibool fts_col_affacted = FALSE;
- ut_a(thr);
- ut_a(foreign);
- ut_a(pcur);
- ut_a(mtr);
-
trx = thr_get_trx(thr);
/* Since we are going to delete or update a row, we have to invalidate
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 356eec8e7ee074ff92b4afa2ad2981e21e115625..4d836cebd6a1a2a561ef700ec287da3a6a789447 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2019, MariaDB Corporation.
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
@@ -3468,7 +3468,6 @@ row_merge_rename_index_to_add(
"WHERE TABLE_ID = :tableid AND ID = :indexid;\n"
"END;\n";
- ut_ad(trx);
ut_a(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
@@ -3525,7 +3524,6 @@ row_merge_rename_index_to_drop(
"WHERE TABLE_ID = :tableid AND ID = :indexid;\n"
"END;\n";
- ut_ad(trx);
ut_a(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
@@ -3702,7 +3700,7 @@ row_merge_create_index_graph(
/*=========================*/
trx_t* trx, /*!< in: trx */
dict_table_t* table, /*!< in: table */
- dict_index_t* index) /*!< in: index */
+ dict_index_t*& index) /*!< in,out: index */
{
ind_node_t* node; /*!< Index creation node */
mem_heap_t* heap; /*!< Memory heap */
@@ -3726,6 +3724,8 @@ row_merge_create_index_graph(
err = trx->error_state;
+ index = node->index;
+
que_graph_free((que_t*) que_node_get_parent(thr));
return(err);
@@ -3767,20 +3767,21 @@ row_merge_create_index(
ifield->prefix_len);
}
+ ut_d(const dict_index_t* const index_template = index);
/* Add the index to SYS_INDEXES, using the index prototype. */
err = row_merge_create_index_graph(trx, table, index);
if (err == DB_SUCCESS) {
-
- index = dict_table_get_index_on_name(table, index_def->name);
-
- ut_a(index);
-
+ ut_ad(index != index_template);
/* Note the id of the transaction that created this
index, we use it to restrict readers from accessing
this index, to ensure read consistency. */
ut_ad(index->trx_id == trx->id);
} else {
+ ut_ad(!index || index == index_template);
+ if (index) {
+ dict_mem_index_free(index);
+ }
index = NULL;
}
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index 2a9ade1da2cfd8e42495b06c6c1c74458d190cfb..47e0368e7873a11bf7f53279c772b40dce5f94ef 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -624,8 +624,7 @@ row_mysql_handle_errors(
switch (err) {
case DB_LOCK_WAIT_TIMEOUT:
if (row_rollback_on_timeout) {
- trx_rollback_to_savepoint(trx, NULL);
- break;
+ goto rollback;
}
/* fall through */
case DB_DUPLICATE_KEY:
@@ -644,6 +643,7 @@ row_mysql_handle_errors(
case DB_DICT_CHANGED:
case DB_TABLE_NOT_FOUND:
case DB_DECRYPTION_FAILED:
+ rollback_to_savept:
if (savept) {
/* Roll back the latest, possibly incomplete insertion
or update */
@@ -667,6 +667,7 @@ row_mysql_handle_errors(
case DB_DEADLOCK:
case DB_LOCK_TABLE_FULL:
+ rollback:
/* Roll back the whole transaction; this resolution was added
to version 3.23.43 */
@@ -696,14 +697,14 @@ row_mysql_handle_errors(
"InnoDB: you dump the tables, look at\n"
"InnoDB: " REFMAN "forcing-innodb-recovery.html"
" for help.\n", stderr);
- break;
+ goto rollback_to_savept;
case DB_FOREIGN_EXCEED_MAX_CASCADE:
fprintf(stderr, "InnoDB: Cannot delete/update rows with"
" cascading foreign key constraints that exceed max"
" depth of %lu\n"
"Please drop excessive foreign constraints"
" and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD);
- break;
+ goto rollback_to_savept;
default:
fprintf(stderr, "InnoDB: unknown error code %lu\n",
(ulong) err);
@@ -3234,7 +3235,6 @@ row_mysql_lock_table(
dberr_t err;
sel_node_t* node;
- ut_ad(trx);
ut_ad(mode == LOCK_X || mode == LOCK_S);
heap = mem_heap_create(512);
@@ -3315,17 +3315,17 @@ fil_wait_crypt_bg_threads(
time_t now = time(0);
if (now >= last + 30) {
fprintf(stderr,
- "WARNING: waited " TIMETPF " seconds "
+ "WARNING: waited %ld seconds "
"for ref-count on table: %s space: %u\n",
- now - start, table->name, table->space);
+ (long)(now - start), table->name, table->space);
last = now;
}
if (now >= start + 300) {
fprintf(stderr,
- "WARNING: after " TIMETPF " seconds, gave up waiting "
+ "WARNING: after %ld seconds, gave up waiting "
"for ref-count on table: %s space: %u\n",
- now - start, table->name, table->space);
+ (long)(now - start), table->name, table->space);
break;
}
}
@@ -5173,11 +5173,12 @@ row_rename_table_for_mysql(
if (!new_is_tmp) {
/* Rename all constraints. */
- char new_table_name[MAX_TABLE_NAME_LEN] = "";
- char old_table_utf8[MAX_TABLE_NAME_LEN] = "";
+ char new_table_name[MAX_TABLE_NAME_LEN + 1];
+ char old_table_utf8[MAX_TABLE_NAME_LEN + 1];
uint errors = 0;
strncpy(old_table_utf8, old_name, MAX_TABLE_NAME_LEN);
+ old_table_utf8[MAX_TABLE_NAME_LEN] = '\0';
innobase_convert_to_system_charset(
strchr(old_table_utf8, '/') + 1,
strchr(old_name, '/') +1,
@@ -5188,6 +5189,7 @@ row_rename_table_for_mysql(
my_charset_filename to UTF-8. This means that the
table name is already in UTF-8 (#mysql#50). */
strncpy(old_table_utf8, old_name, MAX_TABLE_NAME_LEN);
+ old_table_utf8[MAX_TABLE_NAME_LEN] = '\0';
}
info = pars_info_create();
@@ -5198,6 +5200,7 @@ row_rename_table_for_mysql(
old_table_utf8);
strncpy(new_table_name, new_name, MAX_TABLE_NAME_LEN);
+ new_table_name[MAX_TABLE_NAME_LEN] = '\0';
innobase_convert_to_system_charset(
strchr(new_table_name, '/') + 1,
strchr(new_name, '/') +1,
@@ -5208,6 +5211,7 @@ row_rename_table_for_mysql(
my_charset_filename to UTF-8. This means that the
table name is already in UTF-8 (#mysql#50). */
strncpy(new_table_name, new_name, MAX_TABLE_NAME_LEN);
+ new_table_name[MAX_TABLE_NAME_LEN] = '\0';
}
pars_info_add_str_literal(info, "new_table_utf8", new_table_name);
diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc
index 98504b1e9730ccf4ef992c730e7c514d0a3e7e1a..4cc3a71a5fadd58e7fa32341094917766b3bc288 100644
--- a/storage/innobase/row/row0purge.cc
+++ b/storage/innobase/row/row0purge.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -968,8 +968,6 @@ row_purge_step(
{
purge_node_t* node;
- ut_ad(thr);
-
node = static_cast(thr->run_node);
node->table = NULL;
diff --git a/storage/innobase/row/row0row.cc b/storage/innobase/row/row0row.cc
index 9bf9e7182ca670118405508a974def4ec80487a7..884bf52af340f038dcf6f736a5e6697195cfe535 100644
--- a/storage/innobase/row/row0row.cc
+++ b/storage/innobase/row/row0row.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2019, MariaDB Corporation.
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
@@ -639,9 +639,6 @@ row_build_row_ref_in_tuple(
ulint offsets_[REC_OFFS_NORMAL_SIZE];
rec_offs_init(offsets_);
- ut_a(ref);
- ut_a(index);
- ut_a(rec);
ut_ad(!dict_index_is_clust(index));
if (UNIV_UNLIKELY(!index->table)) {
diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc
index 33f46882651447e192c81ab04506f4040d875628..5f304b12e701090700f470bc6961959844aee38f 100644
--- a/storage/innobase/row/row0upd.cc
+++ b/storage/innobase/row/row0upd.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2019, MariaDB Corporation.
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
@@ -2202,7 +2202,6 @@ row_upd_clust_rec_by_insert(
rec_t* rec;
ulint* offsets = NULL;
- ut_ad(node);
ut_ad(dict_index_is_clust(index));
trx = thr_get_trx(thr);
@@ -2348,7 +2347,6 @@ row_upd_clust_rec(
dberr_t err;
const dtuple_t* rebuilt_old_pk = NULL;
- ut_ad(node);
ut_ad(dict_index_is_clust(index));
pcur = node->pcur;
@@ -2513,7 +2511,6 @@ row_upd_del_mark_clust_rec(
trx_t* trx = thr_get_trx(thr) ;
#endif /* WITH_WSREP */
- ut_ad(node);
ut_ad(dict_index_is_clust(index));
ut_ad(node->is_delete);
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 4ce3ea6672d3268d992f21e00665f246758a64cb..b300724e2a90d9931940cc7102e32a64bf4027e4 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -3,7 +3,7 @@
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2017, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -3354,9 +3354,8 @@ srv_get_meta_data_filename(
if (strncmp(suffix, ".cfg", suffix_len) == 0) {
strcpy(filename, path);
} else {
- ut_ad(strncmp(suffix, ".ibd", suffix_len) == 0);
-
- strncpy(filename, path, len - suffix_len);
+ ut_ad(!strcmp(suffix, ".ibd"));
+ memcpy(filename, path, len - suffix_len);
suffix = filename + (len - suffix_len);
strcpy(suffix, ".cfg");
}
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
index b9edac35c4d97f0f092c52b18ea5468147f23ecf..5c7146fd730bafb344ad1cc1e8e0eee4a3e6fa86 100644
--- a/storage/innobase/trx/trx0purge.cc
+++ b/storage/innobase/trx/trx0purge.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -989,7 +989,7 @@ trx_purge_attach_undo_recs(
i = 0;
- for (;;) {
+ while (UNIV_LIKELY(srv_undo_sources) || !srv_fast_shutdown) {
purge_node_t* node;
trx_purge_rec_t* purge_rec;
diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc
index cd5e51d4973789f26b8ed1a1c26626d81dfb0c7a..f70f8a613881e4085ea5393b3436391f139681ac 100644
--- a/storage/innobase/trx/trx0rec.cc
+++ b/storage/innobase/trx/trx0rec.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -1087,10 +1087,6 @@ trx_undo_rec_get_partial_row(
const byte* end_ptr;
ulint row_len;
- ut_ad(index);
- ut_ad(ptr);
- ut_ad(row);
- ut_ad(heap);
ut_ad(dict_index_is_clust(index));
row_len = dict_table_get_n_cols(index->table);
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc
index 3fd71aff23ad9ed5a7bca0a0d16acc981aca0a01..af17cfe6be586a64a3d5351e6082bba33274d922 100644
--- a/storage/innobase/trx/trx0roll.cc
+++ b/storage/innobase/trx/trx0roll.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2018, MariaDB Corporation.
+Copyright (c) 2016, 2019, MariaDB Corporation.
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
@@ -203,6 +203,7 @@ trx_rollback_for_mysql(
return(trx_rollback_for_mysql_low(trx));
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
ut_ad(!trx_is_autocommit_non_locking(trx));
return(trx_rollback_for_mysql_low(trx));
@@ -255,6 +256,7 @@ trx_rollback_last_sql_stat_for_mysql(
return(err);
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
/* The statement rollback is only allowed on an ACTIVE
transaction, not a PREPARED or COMMITTED one. */
@@ -421,6 +423,7 @@ trx_rollback_to_savepoint_for_mysql(
return(trx_rollback_to_savepoint_for_mysql_low(
trx, savep, mysql_binlog_cache_pos));
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
/* The savepoint rollback is only allowed on an ACTIVE
transaction, not a PREPARED or COMMITTED one. */
@@ -710,6 +713,7 @@ trx_rollback_resurrected(
}
return(FALSE);
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
goto func_exit;
case TRX_STATE_NOT_STARTED:
break;
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index f36aabba8b4fb09deabd6dde64f6dd0de5e152e7..4175777cc61c17f0dc51826adfaca085c9a194c0 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2019, MariaDB Corporation.
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
@@ -314,6 +314,7 @@ trx_free_prepared(
trx_t* trx) /*!< in, own: trx object */
{
ut_a(trx_state_eq(trx, TRX_STATE_PREPARED)
+ || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)
|| (trx->is_recovered
&& (trx_state_eq(trx, TRX_STATE_ACTIVE)
|| trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY))
@@ -568,8 +569,7 @@ trx_resurrect_insert(
/* trx_start_low() is not called with resurrect, so need to initialize
start time here.*/
- if (trx->state == TRX_STATE_ACTIVE
- || trx->state == TRX_STATE_PREPARED) {
+ if (trx->state != TRX_STATE_COMMITTED_IN_MEMORY) {
trx->start_time = ut_time();
}
@@ -1536,6 +1536,7 @@ trx_commit_or_rollback_prepare(
/* fall through */
case TRX_STATE_ACTIVE:
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
/* If the trx is in a lock wait state, moves the waiting
query thread to the suspended state */
@@ -1661,6 +1662,7 @@ trx_commit_for_mysql(
/* fall through */
case TRX_STATE_ACTIVE:
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
trx->op_info = "committing";
trx_commit(trx);
MONITOR_DEC(MONITOR_TRX_ACTIVE);
@@ -1706,6 +1708,7 @@ trx_mark_sql_stat_end(
switch (trx->state) {
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
break;
case TRX_STATE_NOT_STARTED:
@@ -1764,6 +1767,7 @@ trx_print_low(
(ulong) difftime(time(NULL), trx->start_time));
goto state_ok;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
fprintf(f, ", ACTIVE (PREPARED) %lu sec",
(ulong) difftime(time(NULL), trx->start_time));
goto state_ok;
@@ -1908,6 +1912,7 @@ wsrep_trx_print_locking(
(ulong) difftime(time(NULL), trx->start_time));
goto state_ok;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
fprintf(f, ", ACTIVE (PREPARED) %lu sec",
(ulong) difftime(time(NULL), trx->start_time));
goto state_ok;
@@ -2035,6 +2040,7 @@ trx_assert_started(
switch (trx->state) {
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
return(TRUE);
case TRX_STATE_ACTIVE:
@@ -2200,7 +2206,7 @@ trx_recover_for_mysql(
XID* xid_list, /*!< in/out: prepared transactions */
ulint len) /*!< in: number of slots in xid_list */
{
- const trx_t* trx;
+ trx_t* trx;
ulint count = 0;
ut_ad(xid_list);
@@ -2222,6 +2228,7 @@ trx_recover_for_mysql(
trx_sys->mutex. It may change to PREPARED, but not if
trx->is_recovered. It may also change to COMMITTED. */
if (trx_state_eq(trx, TRX_STATE_PREPARED)) {
+ trx->state = TRX_STATE_PREPARED_RECOVERED;
xid_list[count] = trx->xid;
if (count == 0) {
@@ -2246,11 +2253,22 @@ trx_recover_for_mysql(
count++;
if (count == len) {
- break;
+ goto partial;
}
}
}
+ /* After returning the full list, reset the state, because
+ there will be a second call to recover the transactions. */
+ for (trx = UT_LIST_GET_FIRST(trx_sys->rw_trx_list);
+ trx != NULL;
+ trx = UT_LIST_GET_NEXT(trx_list, trx)) {
+ if (trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)) {
+ trx->state = TRX_STATE_PREPARED;
+ }
+ }
+
+partial:
mutex_exit(&trx_sys->mutex);
if (count > 0){
@@ -2293,7 +2311,8 @@ trx_get_trx_by_xid_low(
the same */
if (trx->is_recovered
- && trx_state_eq(trx, TRX_STATE_PREPARED)
+ && (trx_state_eq(trx, TRX_STATE_PREPARED)
+ || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED))
&& !trx->xid.is_null()
&& xid->gtrid_length == trx->xid.gtrid_length
&& xid->bqual_length == trx->xid.bqual_length
@@ -2373,6 +2392,7 @@ trx_start_if_not_started_xa_low(
case TRX_STATE_ACTIVE:
return;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
break;
}
@@ -2395,6 +2415,7 @@ trx_start_if_not_started_low(
case TRX_STATE_ACTIVE:
return;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
break;
}
@@ -2436,6 +2457,7 @@ trx_start_for_ddl_low(
ut_ad(trx->will_lock > 0);
return;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
break;
}
diff --git a/storage/innobase/ut/ut0wqueue.cc b/storage/innobase/ut/ut0wqueue.cc
index 1607e535a946ee9cb724d58ced02cc803be92b92..fce39bd817ef4798ace8003cee7f2800182404be 100644
--- a/storage/innobase/ut/ut0wqueue.cc
+++ b/storage/innobase/ut/ut0wqueue.cc
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -193,17 +194,15 @@ ib_wqueue_nowait(
return (node ? node->data : NULL);
}
-/********************************************************************
-Check if queue is empty. */
-
-ibool
-ib_wqueue_is_empty(
-/*===============*/
- /* out: TRUE if queue empty
- else FALSE */
- const ib_wqueue_t* wq) /* in: work queue */
+/** Check if queue is empty.
+@param wq wait queue
+@return whether the queue is empty */
+bool ib_wqueue_is_empty(ib_wqueue_t* wq)
{
- return(ib_list_is_empty(wq->items));
+ mutex_enter(&wq->mutex);
+ bool is_empty = ib_list_is_empty(wq->items);
+ mutex_exit(&wq->mutex);
+ return is_empty;
}
/********************************************************************
diff --git a/storage/maria/ma_delete.c b/storage/maria/ma_delete.c
index 7921ab59a8f5b446b7855918ac5b698bab327bd7..5d66015b9ac6bc58d8dbb9bac4ecc0a76e6109d8 100644
--- a/storage/maria/ma_delete.c
+++ b/storage/maria/ma_delete.c
@@ -695,9 +695,7 @@ static int del(MARIA_HA *info, MARIA_KEY *key,
key_start= keypos;
if (tmp_key.flag & (SEARCH_USER_KEY_HAS_TRANSID |
SEARCH_PAGE_KEY_HAS_TRANSID))
- {
_ma_mark_page_with_transid(share, anc_page);
- }
/* Save pointer to next leaf on parent page */
if (!(*keyinfo->get_key)(&ret_key, page_flag, share->base.key_reflength,
diff --git a/storage/maria/ma_test3.c b/storage/maria/ma_test3.c
index f81d5363c6b374f08fa1215c85b438a50bd0688d..604c2b676a42337d04e6c88e6b81e1ff0f665787 100644
--- a/storage/maria/ma_test3.c
+++ b/storage/maria/ma_test3.c
@@ -362,7 +362,7 @@ int test_write(MARIA_HA *file,int id,int lock_type)
maria_extra(file,HA_EXTRA_WRITE_CACHE,0);
}
- sprintf((char*) record.id,"%7ld", (long) getpid());
+ my_snprintf((char*) record.id, sizeof(record.id), "%7ld", (long) getpid());
strnmov((char*) record.text,"Testing...", sizeof(record.text));
tries=(uint) rnd(100)+10;
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c
index 52954aded4f4251d646933213ad6959660125d99..1a720101a40c87be84d8feb09820bdfeff5cbd74 100644
--- a/storage/maria/ma_write.c
+++ b/storage/maria/ma_write.c
@@ -843,9 +843,8 @@ int _ma_insert(register MARIA_HA *info, MARIA_KEY *key,
a_length+=t_length;
if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID))
- {
_ma_mark_page_with_transid(share, anc_page);
- }
+
anc_page->size= a_length;
page_store_size(share, anc_page);
@@ -1676,14 +1675,15 @@ static int keys_compare(bulk_insert_param *param, uchar *key1, uchar *key2)
}
-static int keys_free(uchar *key, TREE_FREE mode, bulk_insert_param *param)
+static void keys_free(void* key_arg, TREE_FREE mode, void *param_arg)
{
/*
Probably I can use info->lastkey here, but I'm not sure,
and to be safe I'd better use local lastkey.
*/
+ bulk_insert_param *param= (bulk_insert_param*)param_arg;
MARIA_SHARE *share= param->info->s;
- uchar lastkey[MARIA_MAX_KEY_BUFF];
+ uchar lastkey[MARIA_MAX_KEY_BUFF], *key= (uchar*)key_arg;
uint keylen;
MARIA_KEYDEF *keyinfo= share->keyinfo + param->keynr;
MARIA_KEY tmp_key;
@@ -1695,7 +1695,7 @@ static int keys_free(uchar *key, TREE_FREE mode, bulk_insert_param *param)
mysql_rwlock_wrlock(&keyinfo->root_lock);
keyinfo->version++;
}
- return 0;
+ return;
case free_free:
/* Note: keylen doesn't contain transid lengths */
keylen= _ma_keylength(keyinfo, key);
@@ -1710,13 +1710,14 @@ static int keys_free(uchar *key, TREE_FREE mode, bulk_insert_param *param)
copying middle key up if tree is growing
*/
memcpy(lastkey, key, tmp_key.data_length + tmp_key.ref_length);
- return _ma_ck_write_btree(param->info, &tmp_key);
+ _ma_ck_write_btree(param->info, &tmp_key);
+ return;
case free_end:
if (share->lock_key_trees)
mysql_rwlock_unlock(&keyinfo->root_lock);
- return 0;
+ return;
}
- return 1;
+ return;
}
@@ -1772,8 +1773,7 @@ int maria_init_bulk_insert(MARIA_HA *info, size_t cache_size, ha_rows rows)
init_tree(&info->bulk_insert[i],
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
- (qsort_cmp2)keys_compare,
- (tree_element_free) keys_free, (void *)params++, MYF(0));
+ (qsort_cmp2) keys_compare, keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c
index d03c50891df1dbd8c3b76931e902067890d71be8..76edacee964e42063880b61d0bd83f40763f8729 100644
--- a/storage/maria/maria_chk.c
+++ b/storage/maria/maria_chk.c
@@ -1699,8 +1699,8 @@ static void descript(HA_CHECK *param, register MARIA_HA *info, char *name)
null_bit[0]=null_pos[0]=0;
if (keyseg->null_bit)
{
- sprintf(null_bit,"%d",keyseg->null_bit);
- sprintf(null_pos,"%ld",(long) keyseg->null_pos+1);
+ my_snprintf(null_bit, sizeof(null_bit), "%d", keyseg->null_bit);
+ my_snprintf(null_pos, sizeof(null_pos), "%ld", (long) keyseg->null_pos+1);
}
printf("%-7ld%-5d%-9s%-10s%-30s\n",
(long) keyseg->start+1,keyseg->length,
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h
index 128e78da32b045316eb249c2257042581fdf4ed5..eeb5625cb7e1820d438f82bc6174f15a95d89b10 100644
--- a/storage/maria/maria_def.h
+++ b/storage/maria/maria_def.h
@@ -777,8 +777,8 @@ struct st_maria_handler
transid_korr((buff) + LSN_STORE_SIZE)
#define _ma_store_keypage_flag(share,x,flag) x[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (flag)
#define _ma_mark_page_with_transid(share, page) \
- (page)->flag|= KEYPAGE_FLAG_HAS_TRANSID; \
- (page)->buff[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (page)->flag;
+ do { (page)->flag|= KEYPAGE_FLAG_HAS_TRANSID; \
+ (page)->buff[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (page)->flag; } while (0)
#define KEYPAGE_KEY_VERSION(share, x) ((x) + \
(share)->keypage_header - \
diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp
index 02213f0f1798d4edd3b8b1456d68406c2952bbe2..8b7dd52c8b58304b4dda5901a7f47e654ca42b99 100644
--- a/storage/mroonga/ha_mroonga.cpp
+++ b/storage/mroonga/ha_mroonga.cpp
@@ -2982,9 +2982,9 @@ int ha_mroonga::create_share_for_create() const
TABLE_LIST *table_list = MRN_LEX_GET_TABLE_LIST(lex);
MRN_DBUG_ENTER_METHOD();
wrap_handler_for_create = NULL;
- memset(&table_for_create, 0, sizeof(TABLE));
+ table_for_create.reset();
+ table_share_for_create.reset();
memset(&share_for_create, 0, sizeof(MRN_SHARE));
- memset(&table_share_for_create, 0, sizeof(TABLE_SHARE));
if (table_share) {
table_share_for_create.comment = table_share->comment;
table_share_for_create.connect_string = table_share->connect_string;
@@ -14535,8 +14535,8 @@ enum_alter_inplace_result ha_mroonga::wrapper_check_if_supported_inplace_alter(
) {
DBUG_RETURN(HA_ALTER_ERROR);
}
- memcpy(wrap_altered_table, altered_table, sizeof(TABLE));
- memcpy(wrap_altered_table_share, altered_table->s, sizeof(TABLE_SHARE));
+ *wrap_altered_table= *altered_table;
+ *wrap_altered_table_share= *altered_table->s;
mrn_init_sql_alloc(ha_thd(), &(wrap_altered_table_share->mem_root));
n_keys = ha_alter_info->index_drop_count;
diff --git a/storage/mroonga/lib/mrn_context_pool.cpp b/storage/mroonga/lib/mrn_context_pool.cpp
index d297ee9a33893243e74749ca52e0542a067b52ce..a26005b16c08581e5ddc2343da09d66fd588a8d1 100644
--- a/storage/mroonga/lib/mrn_context_pool.cpp
+++ b/storage/mroonga/lib/mrn_context_pool.cpp
@@ -77,7 +77,7 @@ namespace mrn {
}
private:
- static const unsigned int CLEAR_THREATHOLD_IN_SECONDS = 60 * 5;
+ static const int CLEAR_THREATHOLD_IN_SECONDS = 60 * 5;
mysql_mutex_t *mutex_;
LIST *pool_;
diff --git a/storage/myisam/mi_test3.c b/storage/myisam/mi_test3.c
index e05398f7c4a5c96a1e610691e1378cb8a0c2585d..86a639ad2b021e1893be1ae281c9e197fe3457a6 100644
--- a/storage/myisam/mi_test3.c
+++ b/storage/myisam/mi_test3.c
@@ -364,7 +364,7 @@ int test_write(MI_INFO *file,int id,int lock_type)
mi_extra(file,HA_EXTRA_WRITE_CACHE,0);
}
- sprintf((char*) record.id,"%7ld",(long) getpid());
+ my_snprintf((char*) record.id, sizeof(record.id), "%7ld", (long) getpid());
strnmov((char*) record.text,"Testing...", sizeof(record.text));
tries=(uint) rnd(100)+10;
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index ff96ee8751bcbac63f557725e2584d9b437c382e..896f1fdab1fcd8eae1c557ee02ce963b98a394f4 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -929,13 +929,14 @@ static int keys_compare(bulk_insert_param *param, uchar *key1, uchar *key2)
}
-static int keys_free(uchar *key, TREE_FREE mode, bulk_insert_param *param)
+static void keys_free(void* key_arg, TREE_FREE mode, void *param_arg)
{
/*
Probably I can use info->lastkey here, but I'm not sure,
and to be safe I'd better use local lastkey.
*/
- uchar lastkey[HA_MAX_KEY_BUFF];
+ bulk_insert_param *param= (bulk_insert_param*)param_arg;
+ uchar lastkey[HA_MAX_KEY_BUFF], *key= (uchar*)key_arg;
uint keylen;
MI_KEYDEF *keyinfo;
@@ -946,19 +947,20 @@ static int keys_free(uchar *key, TREE_FREE mode, bulk_insert_param *param)
mysql_rwlock_wrlock(¶m->info->s->key_root_lock[param->keynr]);
param->info->s->keyinfo[param->keynr].version++;
}
- return 0;
+ return;
case free_free:
keyinfo=param->info->s->keyinfo+param->keynr;
keylen=_mi_keylength(keyinfo, key);
memcpy(lastkey, key, keylen);
- return _mi_ck_write_btree(param->info,param->keynr,lastkey,
- keylen - param->info->s->rec_reflength);
+ _mi_ck_write_btree(param->info, param->keynr, lastkey,
+ keylen - param->info->s->rec_reflength);
+ return;
case free_end:
if (param->info->s->concurrent_insert)
mysql_rwlock_unlock(¶m->info->s->key_root_lock[param->keynr]);
- return 0;
+ return;
}
- return -1;
+ return;
}
@@ -1014,8 +1016,7 @@ int mi_init_bulk_insert(MI_INFO *info, size_t cache_size, ha_rows rows)
init_tree(&info->bulk_insert[i],
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
- (qsort_cmp2)keys_compare,
- (tree_element_free) keys_free, (void *)params++, MYF(0));
+ (qsort_cmp2)keys_compare, keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index dfff5720847cc704973c42d77c040dd62503ea87..74e29a7621f62fcdd57bdbdd8ff801b250d6b30e 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -1404,8 +1404,8 @@ static void descript(HA_CHECK *param, register MI_INFO *info, char * name)
null_bit[0]=null_pos[0]=0;
if (keyseg->null_bit)
{
- sprintf(null_bit,"%d",keyseg->null_bit);
- sprintf(null_pos,"%ld",(long) keyseg->null_pos+1);
+ my_snprintf(null_bit, sizeof(null_bit), "%d", keyseg->null_bit);
+ my_snprintf(null_pos, sizeof(null_pos), "%ld", (long) keyseg->null_pos+1);
}
printf("%-7ld%-5d%-9s%-10s%-30s\n",
(long) keyseg->start+1,keyseg->length,
diff --git a/storage/myisam/myisamlog.c b/storage/myisam/myisamlog.c
index 7ce03ca9485d0b81d31cb60a1d67652abcb7a933..f059d6f4c7017ec4d7717992fa713afc97070df2 100644
--- a/storage/myisam/myisamlog.c
+++ b/storage/myisam/myisamlog.c
@@ -63,7 +63,7 @@ static int test_if_open(struct file_info *key,element_count count,
static void fix_blob_pointers(MI_INFO *isam,uchar *record);
static int test_when_accessed(struct file_info *key,element_count count,
struct st_access_param *access_param);
-static void file_info_free(struct file_info *info);
+static void file_info_free(void*, TREE_FREE, void *);
static int close_some_file(TREE *tree);
static int reopen_closed_file(TREE *tree,struct file_info *file_info);
static int find_record_with_key(struct file_info *file_info,uchar *record);
@@ -330,8 +330,7 @@ static int examine_log(char * file_name, char **table_names)
init_io_cache(&cache,file,0,READ_CACHE,start_offset,0,MYF(0));
bzero((uchar*) com_count,sizeof(com_count));
init_tree(&tree,0,0,sizeof(file_info),(qsort_cmp2) file_info_compare,
- (tree_element_free) file_info_free, NULL,
- MYF(MY_TREE_WITH_DELETE));
+ file_info_free, NULL, MYF(MY_TREE_WITH_DELETE));
(void) init_key_cache(dflt_key_cache,KEY_CACHE_BLOCK_SIZE,KEY_CACHE_SIZE,
0, 0, 0, 0);
@@ -751,8 +750,9 @@ static int test_when_accessed (struct file_info *key,
}
-static void file_info_free(struct file_info *fileinfo)
+static void file_info_free(void* arg, TREE_FREE mode, void *unused)
{
+ struct file_info *fileinfo= arg;
DBUG_ENTER("file_info_free");
if (update)
{
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index bb2ba283f36f45b9a3ae79d3448a46ecbece799a..d1a3babdb2d522880184a5af9f304cf3c0f16eb2 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -1466,49 +1466,41 @@ void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info)
if (!(create_info->used_fields & HA_CREATE_USED_UNION))
{
- TABLE_LIST *child_table;
- THD *thd=current_thd;
-
- create_info->merge_list.next= &create_info->merge_list.first;
- create_info->merge_list.elements=0;
+ TABLE_LIST *child_table, *end= NULL;
+ THD *thd=ha_thd();
if (children_l != NULL)
{
- for (child_table= children_l;;
- child_table= child_table->next_global)
+ for (child_table= children_l;; child_table= child_table->next_global)
{
TABLE_LIST *ptr;
if (!(ptr= (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST))))
- goto err;
+ DBUG_VOID_RETURN;
if (!(ptr->table_name= thd->strmake(child_table->table_name,
child_table->table_name_length)))
- goto err;
- if (child_table->db && !(ptr->db= thd->strmake(child_table->db,
- child_table->db_length)))
- goto err;
+ DBUG_VOID_RETURN;
+ if (child_table->db &&
+ !(ptr->db= thd->strmake(child_table->db, child_table->db_length)))
+ DBUG_VOID_RETURN;
- create_info->merge_list.elements++;
- (*create_info->merge_list.next)= ptr;
- create_info->merge_list.next= &ptr->next_local;
+ if (create_info->merge_list)
+ end->next_local= ptr;
+ else
+ create_info->merge_list= ptr;
+ end= ptr;
if (&child_table->next_global == children_last_l)
break;
}
}
- *create_info->merge_list.next=0;
}
if (!(create_info->used_fields & HA_CREATE_USED_INSERT_METHOD))
{
create_info->merge_insert_method = file->merge_insert_method;
}
DBUG_VOID_RETURN;
-
-err:
- create_info->merge_list.elements=0;
- create_info->merge_list.first=0;
- DBUG_VOID_RETURN;
}
@@ -1516,18 +1508,21 @@ int ha_myisammrg::create_mrg(const char *name, HA_CREATE_INFO *create_info)
{
char buff[FN_REFLEN];
const char **table_names, **pos;
- TABLE_LIST *tables= create_info->merge_list.first;
- THD *thd= current_thd;
+ TABLE_LIST *tables= create_info->merge_list;
+ THD *thd= ha_thd();
size_t dirlgt= dirname_length(name);
+ uint ntables= 0;
DBUG_ENTER("ha_myisammrg::create_mrg");
+ for (tables= create_info->merge_list; tables; tables= tables->next_local)
+ ntables++;
+
/* Allocate a table_names array in thread mem_root. */
- if (!(table_names= (const char**)
- thd->alloc((create_info->merge_list.elements+1) * sizeof(char*))))
+ if (!(pos= table_names= (const char**) thd->alloc((ntables + 1) * sizeof(char*))))
DBUG_RETURN(HA_ERR_OUT_OF_MEM); /* purecov: inspected */
/* Create child path names. */
- for (pos= table_names; tables; tables= tables->next_local)
+ for (tables= create_info->merge_list; tables; tables= tables->next_local)
{
const char *table_name= buff;
diff --git a/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff b/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff
index c7372326fada13461f11b722b614cccaead9f0a6..243bbafe7fabe6c59d783a2363a11dd1425ace10 100644
--- a/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff
+++ b/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff
@@ -10,8 +10,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
--Warning 1906 The value specified for computed column 'b' in table 't1' ignored
--Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
@@ -27,8 +27,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
--Warning 1906 The value specified for computed column 'b' in table 't1' ignored
--Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
@@ -44,8 +44,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
--Warning 1906 The value specified for computed column 'b' in table 't1' ignored
--Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
@@ -61,8 +61,8 @@
-INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings:
--Warning 1906 The value specified for computed column 'b' in table 't1' ignored
--Warning 1906 The value specified for computed column 'b' in table 't1' ignored
+-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
+-Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
diff --git a/storage/perfschema/pfs_events.h b/storage/perfschema/pfs_events.h
index 97fb7e08d6335980c4cc9638bd0c09aaa27c8826..905d6f8590fdb3d4d75385ce693a6de3b19bb202 100644
--- a/storage/perfschema/pfs_events.h
+++ b/storage/perfschema/pfs_events.h
@@ -34,14 +34,8 @@ struct PFS_events
ulonglong m_event_id;
/** END_EVENT_ID. */
ulonglong m_end_event_id;
- /** (EVENT_TYPE) */
- enum_event_type m_event_type;
/** NESTING_EVENT_ID. */
ulonglong m_nesting_event_id;
- /** NESTING_EVENT_TYPE */
- enum_event_type m_nesting_event_type;
- /** Instrument metadata. */
- PFS_instr_class *m_class;
/**
Timer start.
This member is populated only if m_class->m_timed is true.
@@ -52,8 +46,14 @@ struct PFS_events
This member is populated only if m_class->m_timed is true.
*/
ulonglong m_timer_end;
+ /** Instrument metadata. */
+ PFS_instr_class *m_class;
/** Location of the instrumentation in the source code (file name). */
const char *m_source_file;
+ /** (EVENT_TYPE) */
+ enum_event_type m_event_type;
+ /** NESTING_EVENT_TYPE */
+ enum_event_type m_nesting_event_type;
/** Location of the instrumentation in the source code (line number). */
uint m_source_line;
};
diff --git a/storage/perfschema/pfs_events_waits.h b/storage/perfschema/pfs_events_waits.h
index a7f7a095b9f181f08b4dfb1d0c14ceb36f802094..52e2ef05ad3310d3d22a3d406d957ec65548c0af 100644
--- a/storage/perfschema/pfs_events_waits.h
+++ b/storage/perfschema/pfs_events_waits.h
@@ -54,6 +54,23 @@ enum events_waits_class
/** A wait event record. */
struct PFS_events_waits : public PFS_events
{
+ /** Executing thread. */
+ PFS_thread *m_thread;
+ /** Table share, for table operations only. */
+ PFS_table_share *m_weak_table_share;
+ /** File, for file operations only. */
+ PFS_file *m_weak_file;
+ /** Address in memory of the object instance waited on. */
+ const void *m_object_instance_addr;
+ /** Socket, for socket operations only. */
+ PFS_socket *m_weak_socket;
+ /**
+ Number of bytes read/written.
+ This member is populated for file READ/WRITE operations only.
+ */
+ size_t m_number_of_bytes;
+ /** Flags */
+ ulong m_flags;
/**
The type of wait.
Readers:
@@ -66,34 +83,17 @@ struct PFS_events_waits : public PFS_events
- TRUNCATE EVENTS_WAITS_HISTORY_LONG
*/
events_waits_class m_wait_class;
- /** Executing thread. */
- PFS_thread *m_thread;
/** Object type */
enum_object_type m_object_type;
- /** Table share, for table operations only. */
- PFS_table_share *m_weak_table_share;
- /** File, for file operations only. */
- PFS_file *m_weak_file;
- /** Socket, for socket operations only. */
- PFS_socket *m_weak_socket;
/** For weak pointers, target object version. */
uint32 m_weak_version;
- /** Address in memory of the object instance waited on. */
- const void *m_object_instance_addr;
/** Operation performed. */
enum_operation_type m_operation;
- /**
- Number of bytes read/written.
- This member is populated for file READ/WRITE operations only.
- */
- size_t m_number_of_bytes;
/**
Index used.
This member is populated for TABLE IO operations only.
*/
uint m_index;
- /** Flags */
- ulong m_flags;
};
/** TIMED bit in the state flags bitfield. */
diff --git a/storage/sequence/sequence.cc b/storage/sequence/sequence.cc
index 8d9465f08c5af5acbfcaec97d7eaee11facb761b..6a8625ce9b4104b91a2428b8d632d7a61e60173d 100644
--- a/storage/sequence/sequence.cc
+++ b/storage/sequence/sequence.cc
@@ -348,7 +348,9 @@ static int discover_table_existence(handlerton *hton, const char *db,
return !parse_table_name(table_name, strlen(table_name), &from, &to, &step);
}
-static int dummy_ret_int() { return 0; }
+static int dummy_commit_rollback(handlerton *, THD *, bool) { return 0; }
+
+static int dummy_savepoint(handlerton *, THD *, void *) { return 0; }
/*****************************************************************************
Example of a simple group by handler for queries like:
@@ -487,10 +489,9 @@ static int init(void *p)
hton->create= create_handler;
hton->discover_table= discover_table;
hton->discover_table_existence= discover_table_existence;
- hton->commit= hton->rollback=
- (int (*)(handlerton *, THD *, bool)) &dummy_ret_int;
+ hton->commit= hton->rollback= dummy_commit_rollback;
hton->savepoint_set= hton->savepoint_rollback= hton->savepoint_release=
- (int (*)(handlerton *, THD *, void *)) &dummy_ret_int;
+ dummy_savepoint;
hton->create_group_by= create_group_by_handler;
return 0;
}
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index 130edc5ee8a2b657436a0f5f41d0d2b10f091b9f..5f7e59b47da9cc6c4d57f22f0f5e13b277355bd6 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -7027,7 +7027,7 @@ int spider_get_sts(
int sts_sync_level,
uint flag
) {
- int get_type;
+ int get_type __attribute__ ((unused));
int error_num = 0;
DBUG_ENTER("spider_get_sts");
@@ -7149,7 +7149,7 @@ int spider_get_crd(
#endif
int crd_sync_level
) {
- int get_type;
+ int get_type __attribute__ ((unused));
int error_num = 0;
DBUG_ENTER("spider_get_crd");
@@ -8379,7 +8379,7 @@ int spider_discover_table_structure(
#ifdef WITH_PARTITION_STORAGE_ENGINE
partition_info *part_info = thd->work_part_info;
#endif
- uint str_len;
+ uint str_len __attribute__ ((unused));
char buf[MAX_FIELD_WIDTH];
spider_string str(buf, sizeof(buf), system_charset_info);
DBUG_ENTER("spider_discover_table_structure");
diff --git a/storage/tokudb/.clang-format b/storage/tokudb/.clang-format
new file mode 100644
index 0000000000000000000000000000000000000000..2ccc4b3fb24a5454890d957ca1173b94cd7ce568
--- /dev/null
+++ b/storage/tokudb/.clang-format
@@ -0,0 +1,40 @@
+# .clang-format file for Percona TokuDB
+# Minimum required version of clang-format is 5.0.1. Earlier versions will work
+# but may need removal of some parameters.
+Language: Cpp
+BasedOnStyle: Google
+
+# The following parameters are default for Google style,
+# but as they are important for our project they
+# are set explicitly here
+AlignAfterOpenBracket: Align
+BreakBeforeBinaryOperators: None
+ColumnLimit: 80
+PointerAlignment: Left
+SpaceAfterCStyleCast: false
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 2
+SpacesInAngles: false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+UseTab: Never
+
+# Non-default parameters
+NamespaceIndentation: All
+IndentWidth: 4
+TabWidth: 4
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+BinPackParameters: false
+BinPackArguments: false
+ExperimentalAutoDetectBinPacking: false
+AllowAllParametersOfDeclarationOnNextLine: false
+# not supported in 5.0.1
+#AlignConsecutiveAssignments: yes
+#AlignConsecutiveDeclarations: yes
+BreakStringLiterals: false
+ReflowComments: true
diff --git a/storage/tokudb/PerconaFT/ftcxx/tests/CMakeLists.txt b/storage/tokudb/PerconaFT/ftcxx/tests/CMakeLists.txt
index 6f9146ce5b231399b15f5d991c0f2f6f89dd66ff..b4db82ffff5129d5747bef34adb54a1fe0fc8d48 100644
--- a/storage/tokudb/PerconaFT/ftcxx/tests/CMakeLists.txt
+++ b/storage/tokudb/PerconaFT/ftcxx/tests/CMakeLists.txt
@@ -2,9 +2,9 @@ include_directories(..)
include_directories(../../src)
include_directories(../../src/tests)
-find_library(JEMALLOC_STATIC_LIBRARY libjemalloc.a)
-
if (BUILD_TESTING)
+ find_library(JEMALLOC_STATIC_LIBRARY libjemalloc.a)
+
## reference implementation with simple size-doubling buffer without
## jemalloc size tricks
add_library(doubling_buffer_ftcxx STATIC
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc
index 839e9907b56bdd07ac08b545c061f7d1003c79e2..3452373a1c5eca4d68b4d32f76d9f328cc649218 100644
--- a/storage/tokudb/ha_tokudb.cc
+++ b/storage/tokudb/ha_tokudb.cc
@@ -3368,15 +3368,17 @@ void ha_tokudb::start_bulk_insert(ha_rows rows) {
int ha_tokudb::bulk_insert_poll(void* extra, float progress) {
LOADER_CONTEXT context = (LOADER_CONTEXT)extra;
if (thd_killed(context->thd)) {
- sprintf(context->write_status_msg,
- "The process has been killed, aborting bulk load.");
+ snprintf(context->write_status_msg,
+ sizeof(context->write_status_msg),
+ "The process has been killed, aborting bulk load.");
return ER_ABORTING_CONNECTION;
}
float percentage = progress * 100;
- sprintf(context->write_status_msg,
- "Loading of data t %s about %.1f%% done",
- context->ha->share->full_table_name(),
- percentage);
+ snprintf(context->write_status_msg,
+ sizeof(context->write_status_msg),
+ "Loading of data t %s about %.1f%% done",
+ context->ha->share->full_table_name(),
+ percentage);
thd_proc_info(context->thd, context->write_status_msg);
#ifdef HA_TOKUDB_HAS_THD_PROGRESS
thd_progress_report(context->thd, (unsigned long long)percentage, 100);
@@ -8548,15 +8550,17 @@ int ha_tokudb::tokudb_add_index(
int ha_tokudb::tokudb_add_index_poll(void* extra, float progress) {
LOADER_CONTEXT context = (LOADER_CONTEXT)extra;
if (thd_killed(context->thd)) {
- sprintf(context->write_status_msg,
- "The process has been killed, aborting add index.");
+ snprintf(context->write_status_msg,
+ sizeof(context->write_status_msg),
+ "The process has been killed, aborting add index.");
return ER_ABORTING_CONNECTION;
}
float percentage = progress * 100;
- sprintf(context->write_status_msg,
- "Adding of indexes to %s about %.1f%% done",
- context->ha->share->full_table_name(),
- percentage);
+ snprintf(context->write_status_msg,
+ sizeof(context->write_status_msg),
+ "Adding of indexes to %s about %.1f%% done",
+ context->ha->share->full_table_name(),
+ percentage);
thd_proc_info(context->thd, context->write_status_msg);
#ifdef HA_TOKUDB_HAS_THD_PROGRESS
thd_progress_report(context->thd, (unsigned long long)percentage, 100);
diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h
index e322c3de18e59f82346e710d6e308518ae57f7cc..8012c0517201c3a518a97e7c90a480bcddf092e7 100644
--- a/storage/tokudb/ha_tokudb.h
+++ b/storage/tokudb/ha_tokudb.h
@@ -41,7 +41,7 @@ class ha_tokudb;
typedef struct loader_context {
THD* thd;
- char write_status_msg[200];
+ char write_status_msg[1024];
ha_tokudb* ha;
} *LOADER_CONTEXT;
diff --git a/storage/tokudb/ha_tokudb_mrr_mysql.cc b/storage/tokudb/ha_tokudb_mrr_mysql.cc
index 84b64009ef2f6d2302b60e2cb7d96617b24c9170..480ae23802b88b17313ff321b695ff798bfcf8ea 100644
--- a/storage/tokudb/ha_tokudb_mrr_mysql.cc
+++ b/storage/tokudb/ha_tokudb_mrr_mysql.cc
@@ -31,6 +31,7 @@ int ha_tokudb::multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,
uint n_ranges, uint mode,
HANDLER_BUFFER *buf)
{
+ ds_mrr.init(this, table);
return ds_mrr.dsmrr_init(this, seq, seq_init_param, n_ranges, mode, buf);
}
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result
index 59b05ea4dfba96a5161ccaeb82c4af4a571b56e0..c71dcadc32f11f1713f688ad94b571f41f46e7a4 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_tokudb_mixed_dml.result
@@ -681,6 +681,8 @@ DROP TRIGGER tr1;
GRANT EVENT ON *.* TO 'root'@'localhost';
INSERT INTO t1 VALUES(1, 'test1');
CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1;
+Warnings:
+Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
==========MASTER==========
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/PS-5158.result b/storage/tokudb/mysql-test/tokudb_bugs/r/PS-5158.result
new file mode 100644
index 0000000000000000000000000000000000000000..3dfbb95aed91b931a7d5ac73900251cf70ba4884
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/PS-5158.result
@@ -0,0 +1,6 @@
+CREATE DATABASE `new..............................................end`;
+USE `new..............................................end`;
+CREATE TABLE t1(a INT KEY,b INT)ENGINE=TokuDB;
+INSERT INTO t1 VALUES(1,11),(2,12),(3,13),(4,14),(5,15);
+USE test;
+DROP DATABASE `new..............................................end`;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/PS-5163.result b/storage/tokudb/mysql-test/tokudb_bugs/r/PS-5163.result
new file mode 100644
index 0000000000000000000000000000000000000000..a203787f11d9b1d8dbe4275c706c8d0e0f59c55a
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/PS-5163.result
@@ -0,0 +1,5 @@
+CREATE TABLE t1(c1 INT,c2 INT,c3 CHAR(10),c4 CHAR(10),c5 CHAR(10),PRIMARY KEY(c1),INDEX(c3,c4(1),c5(1)),INDEX(c2)) ENGINE=TokuDB;
+INSERT INTO t1 VALUES(),(),(),(),();
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+UPDATE t1 SET c1=1 WHERE c1=1 OR c2=1;
+DROP TABLE t1;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158-master.opt b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158-master.opt
new file mode 100644
index 0000000000000000000000000000000000000000..eb850c4bd78d476e59c51bffc4ae098f8fbc64ff
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158-master.opt
@@ -0,0 +1,2 @@
+--loose-tokudb_dir_per_db=ON
+
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158.test b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158.test
new file mode 100644
index 0000000000000000000000000000000000000000..e0235e7cebd975daa3f9d0ce6064982a5b59e255
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158.test
@@ -0,0 +1,27 @@
+# Test for PS-5163 : [PS8QA] handle_fatal_signal (sig=11) in DsMrr_impl::dsmrr_init
+# and PS-4828 : Inserting data into TokuDB database with name that contains non-alphanumerical characters can lead to the ZN9ha_tokudb16bulk_insert_pollEPvf assertion
+#
+# The cause is a buffer overrun in LOADER_CONTEXT where the char buffer used for
+# maintaining the proc info string was too small and no validation or prevention
+# was being done to ensure the string stayed within the limits of the buffer.
+# Normally this would have been difficult to hit, but, now with the combination
+# of tokudb_dir_per_db=ON and the expansion of the database name from latin1
+# (or whatever) to the fscs encoding the space required for a max length
+# db.table name could be quite larger than the buffer was originally sized.
+
+--source include/have_tokudb.inc
+
+if (`SELECT @@tokudb_dir_per_db != 1`) {
+ skip Requires tokudb_dir_per_db=1;
+}
+
+CREATE DATABASE `new..............................................end`;
+USE `new..............................................end`;
+CREATE TABLE t1(a INT KEY,b INT)ENGINE=TokuDB;
+
+#
+# TokuDB bulk_insert_poll would crash here
+#
+INSERT INTO t1 VALUES(1,11),(2,12),(3,13),(4,14),(5,15);
+USE test;
+DROP DATABASE `new..............................................end`;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5163.test b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5163.test
new file mode 100644
index 0000000000000000000000000000000000000000..5fc01bb5f0e0b621f7f693e009e59d89de413b98
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5163.test
@@ -0,0 +1,11 @@
+--source include/have_tokudb.inc
+
+CREATE TABLE t1(c1 INT,c2 INT,c3 CHAR(10),c4 CHAR(10),c5 CHAR(10),PRIMARY KEY(c1),INDEX(c3,c4(1),c5(1)),INDEX(c2)) ENGINE=TokuDB;
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES(),(),(),(),();
+
+# 8.0 asserts here down in data dictionary because ha_tokudb::ds_mrr did not
+# properly call ds_mrr.init(this, table)
+UPDATE t1 SET c1=1 WHERE c1=1 OR c2=1;
+
+DROP TABLE t1;
diff --git a/storage/xtradb/CMakeLists.txt b/storage/xtradb/CMakeLists.txt
index 96856a922391e7df1385bcd48e3b7e7adf0e7568..77fd2ba29afd23390e96fd7ddbb52d54d18bc2b8 100644
--- a/storage/xtradb/CMakeLists.txt
+++ b/storage/xtradb/CMakeLists.txt
@@ -89,6 +89,8 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DUNIV_DEBUG -DUNIV_SYNC_DEB
CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU)
+MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-class-memaccess")
+
IF(NOT MSVC)
CHECK_FUNCTION_EXISTS(posix_memalign HAVE_POSIX_MEMALIGN)
diff --git a/storage/xtradb/btr/btr0scrub.cc b/storage/xtradb/btr/btr0scrub.cc
index 2e667e64d0b5d242f127f8bfac8d7f65b4d5d87b..0e7c0d5b0618b2f8a6383d3db5b1d7ab9bfac86f 100644
--- a/storage/xtradb/btr/btr0scrub.cc
+++ b/storage/xtradb/btr/btr0scrub.cc
@@ -145,10 +145,10 @@ btr_scrub_lock_dict_func(ulint space_id, bool lock_to_close_table,
time_t now = time(0);
if (now >= last + 30) {
fprintf(stderr,
- "WARNING: %s:%u waited " TIMETPF " seconds for"
+ "WARNING: %s:%u waited %ld seconds for"
" dict_sys lock, space: %lu"
" lock_to_close_table: %d\n",
- file, line, now - start, space_id,
+ file, line, (long)(now - start), space_id,
lock_to_close_table);
last = now;
diff --git a/storage/xtradb/buf/buf0buddy.cc b/storage/xtradb/buf/buf0buddy.cc
index ee687efc9ec501c4b224c556cee54c7cc821fe7c..e058c69d4b3d5e9e3d7003c5a3f157808b27c283 100644
--- a/storage/xtradb/buf/buf0buddy.cc
+++ b/storage/xtradb/buf/buf0buddy.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2019, MariaDB Corporation.
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/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index f4ef3ca70154cad31eb3391d03ef247f19a64917..773b528b40d8b89d06a23f9db8c8111684f34067 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -945,18 +945,29 @@ buf_page_is_corrupted(
#error "FIL_PAGE_LSN must be 64 bit aligned"
#endif
- /* declare empty pages non-corrupted */
- if (checksum_field1 == 0 && checksum_field2 == 0
- && *reinterpret_cast(read_buf +
- FIL_PAGE_LSN) == 0) {
- /* make sure that the page is really empty */
- for (ulint i = 0; i < UNIV_PAGE_SIZE; i++) {
- if (read_buf[i] != 0) {
- return(true);
+ /* A page filled with NUL bytes is considered not corrupted.
+ The FIL_PAGE_FILE_FLUSH_LSN field may be written nonzero for
+ the first page of each file of the system tablespace.
+ Ignore it for the system tablespace. */
+ if (!checksum_field1 && !checksum_field2) {
+ ulint i = 0;
+ do {
+ if (read_buf[i]) {
+ return true;
}
- }
+ } while (++i < FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
- return(false);
+ if (!space || !space->id) {
+ /* Skip FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
+ in the system tablespace. */
+ i += 8;
+ }
+ do {
+ if (read_buf[i]) {
+ return true;
+ }
+ } while (++i < srv_page_size);
+ return false;
}
switch (curr_algo) {
diff --git a/storage/xtradb/data/data0data.cc b/storage/xtradb/data/data0data.cc
index 593af089b005a6fafae4878fee80147a8fbd0f95..cda27de173670b75950eb170145831f8dc7c65e7 100644
--- a/storage/xtradb/data/data0data.cc
+++ b/storage/xtradb/data/data0data.cc
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -106,8 +107,6 @@ dtuple_set_n_fields(
dtuple_t* tuple, /*!< in: tuple */
ulint n_fields) /*!< in: number of fields */
{
- ut_ad(tuple);
-
tuple->n_fields = n_fields;
tuple->n_fields_cmp = n_fields;
}
diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc
index 1eb0a53e0b0c5307ab35498127ac9244e141b1cd..344f58decd09485296ad4c49d0b5f15e8f78da60 100644
--- a/storage/xtradb/dict/dict0dict.cc
+++ b/storage/xtradb/dict/dict0dict.cc
@@ -946,7 +946,6 @@ dict_index_get_nth_field_pos(
ulint n_fields;
ulint pos;
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
field2 = dict_index_get_nth_field(index2, n);
@@ -1044,8 +1043,6 @@ dict_table_col_in_clustered_key(
ulint pos;
ulint n_fields;
- ut_ad(table);
-
col = dict_table_get_nth_col(table, n);
index = dict_table_get_first_index(table);
@@ -1220,7 +1217,6 @@ dict_table_add_system_columns(
dict_table_t* table, /*!< in/out: table */
mem_heap_t* heap) /*!< in: temporary heap */
{
- ut_ad(table);
ut_ad(table->n_def == table->n_cols - DATA_N_SYS_COLS);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
ut_ad(!table->cached);
@@ -1632,15 +1628,8 @@ dict_table_rename_in_cache(
ut_ad(mutex_own(&(dict_sys->mutex)));
/* store the old/current name to an automatic variable */
- if (strlen(table->name) + 1 <= sizeof(old_name)) {
- memcpy(old_name, table->name, strlen(table->name) + 1);
- } else {
- ut_print_timestamp(stderr);
- fprintf(stderr, "InnoDB: too long table name: '%s', "
- "max length is %d\n", table->name,
- MAX_FULL_NAME_LEN);
- ut_error;
- }
+ ut_a(strlen(table->name) < sizeof old_name);
+ strcpy(old_name, table->name);
fold = ut_fold_string(new_name);
@@ -1851,7 +1840,7 @@ dict_table_rename_in_cache(
ulint db_len;
char* old_id;
- char old_name_cs_filename[MAX_TABLE_NAME_LEN+20];
+ char old_name_cs_filename[MAX_FULL_NAME_LEN+1];
uint errors = 0;
/* All table names are internally stored in charset
@@ -1868,7 +1857,8 @@ dict_table_rename_in_cache(
in old_name_cs_filename */
strncpy(old_name_cs_filename, old_name,
- MAX_TABLE_NAME_LEN);
+ MAX_FULL_NAME_LEN);
+ old_name_cs_filename[MAX_FULL_NAME_LEN] = '\0';
if (strstr(old_name, TEMP_TABLE_PATH_PREFIX) == NULL) {
innobase_convert_to_system_charset(
@@ -1890,7 +1880,9 @@ dict_table_rename_in_cache(
/* Old name already in
my_charset_filename */
strncpy(old_name_cs_filename, old_name,
- MAX_TABLE_NAME_LEN);
+ MAX_FULL_NAME_LEN);
+ old_name_cs_filename[MAX_FULL_NAME_LEN]
+ = '\0';
}
}
@@ -1916,7 +1908,7 @@ dict_table_rename_in_cache(
/* This is a generated >= 4.0.18 format id */
- char table_name[MAX_TABLE_NAME_LEN] = "";
+ char table_name[MAX_TABLE_NAME_LEN + 1];
uint errors = 0;
if (strlen(table->name) > strlen(old_name)) {
@@ -1930,6 +1922,7 @@ dict_table_rename_in_cache(
/* Convert the table name to UTF-8 */
strncpy(table_name, table->name,
MAX_TABLE_NAME_LEN);
+ table_name[MAX_TABLE_NAME_LEN] = '\0';
innobase_convert_to_system_charset(
strchr(table_name, '/') + 1,
strchr(table->name, '/') + 1,
@@ -1939,9 +1932,10 @@ dict_table_rename_in_cache(
/* Table name could not be converted
from charset my_charset_filename to
UTF-8. This means that the table name
- is already in UTF-8 (#mysql#50). */
+ is already in UTF-8 (#mysql50#). */
strncpy(table_name, table->name,
MAX_TABLE_NAME_LEN);
+ table_name[MAX_TABLE_NAME_LEN] = '\0';
}
/* Replace the prefix 'databasename/tablename'
@@ -2032,8 +2026,7 @@ dict_table_change_id_in_cache(
dict_table_t* table, /*!< in/out: table object already in cache */
table_id_t new_id) /*!< in: new id to set */
{
- ut_ad(table);
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
/* Remove the table from the hash table of id's */
@@ -2059,7 +2052,6 @@ dict_table_remove_from_cache_low(
dict_foreign_t* foreign;
dict_index_t* index;
- ut_ad(table);
ut_ad(dict_lru_validate());
ut_a(table->n_ref_count == 0);
ut_a(table->n_rec_locks == 0);
@@ -2508,8 +2500,7 @@ dict_index_add_to_cache(
ulint n_ord;
ulint i;
- ut_ad(index);
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(index->n_def == index->n_fields);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(!dict_index_is_online_ddl(index));
@@ -4405,7 +4396,6 @@ dict_create_foreign_constraints_low(
const char* create_table_name;
const char* orig;
char create_name[MAX_TABLE_NAME_LEN + 1];
- char operation[8];
ut_ad(!srv_read_only_mode);
ut_ad(mutex_own(&(dict_sys->mutex)));
@@ -4416,41 +4406,33 @@ dict_create_foreign_constraints_low(
orig = ptr;
ptr = dict_accept(cs, ptr, "ALTER", &success);
- strcpy((char *)operation, success ? "Alter " : "Create ");
+ const char* const operation = success ? "Alter " : "Create ";
if (!success) {
orig = ptr;
ptr = dict_scan_to(ptr, "CREATE");
ptr = dict_scan_to(ptr, "TABLE");
ptr = dict_accept(cs, ptr, "TABLE", &success);
+ create_table_name = NULL;
if (success) {
ptr = dict_scan_table_name(cs, ptr, &table_to_create, name,
- &success, heap, &create_table_name);
- }
-
- if (success) {
- char *bufend;
- bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN,
- create_table_name, strlen(create_table_name),
- trx->mysql_thd, TRUE);
- create_name[bufend-create_name]='\0';
- ptr = orig;
- } else {
- char *bufend;
- ptr = orig;
- bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN,
- name, strlen(name), trx->mysql_thd, TRUE);
- create_name[bufend-create_name]='\0';
+ &success, heap, &create_table_name);
}
- goto loop;
+ ptr = orig;
+ const char* n = create_table_name ? create_table_name : name;
+ char *bufend = innobase_convert_name(create_name, MAX_TABLE_NAME_LEN,
+ n, strlen(n), trx->mysql_thd, TRUE);
+ create_name[bufend-create_name] = '\0';
+ } else {
+ strncpy(create_name, name, sizeof create_name);
+ create_name[(sizeof create_name) - 1] = '\0';
}
if (table == NULL) {
mutex_enter(&dict_foreign_err_mutex);
dict_foreign_error_report_low(ef, create_name);
- dict_foreign_error_report_low(ef, create_name);
fprintf(ef, "%s table %s with foreign key constraint"
" failed. Table %s not found from data dictionary."
" Error close to %s.\n",
@@ -4472,11 +4454,19 @@ dict_create_foreign_constraints_low(
}
orig = ptr;
- ptr = dict_accept(cs, ptr, "TABLE", &success);
-
- if (!success) {
-
- goto loop;
+ for (;;) {
+ ptr = dict_accept(cs, ptr, "TABLE", &success);
+ if (success) {
+ break;
+ }
+ ptr = dict_accept(cs, ptr, "ONLINE", &success);
+ if (success) {
+ continue;
+ }
+ ptr = dict_accept(cs, ptr, "IGNORE", &success);
+ if (!success) {
+ goto loop;
+ }
}
/* We are doing an ALTER TABLE: scan the table name we are altering */
@@ -4485,19 +4475,13 @@ dict_create_foreign_constraints_low(
ptr = dict_scan_table_name(cs, ptr, &table_to_alter, name,
&success, heap, &referenced_table_name);
- if (table_to_alter) {
- char *bufend;
- bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN,
- table_to_alter->name, strlen(table_to_alter->name),
- trx->mysql_thd, TRUE);
- create_name[bufend-create_name]='\0';
- } else {
- char *bufend;
- bufend = innobase_convert_name((char *)create_name, MAX_TABLE_NAME_LEN,
- referenced_table_name, strlen(referenced_table_name),
- trx->mysql_thd, TRUE);
+ {
+ const char* n = table_to_alter
+ ? table_to_alter->name : referenced_table_name;
+ char* bufend = innobase_convert_name(
+ create_name, MAX_TABLE_NAME_LEN, n, strlen(n),
+ trx->mysql_thd, TRUE);
create_name[bufend-create_name]='\0';
-
}
if (!success) {
@@ -5307,7 +5291,6 @@ dict_foreign_parse_drop_constraints(
const char* id;
struct charset_info_st* cs;
- ut_a(trx);
ut_a(trx->mysql_thd);
cs = innobase_get_charset(trx->mysql_thd);
@@ -5480,9 +5463,8 @@ dict_index_check_search_tuple(
const dict_index_t* index, /*!< in: index tree */
const dtuple_t* tuple) /*!< in: tuple used in a search */
{
- ut_a(index);
- ut_a(dtuple_get_n_fields_cmp(tuple)
- <= dict_index_get_n_unique_in_tree(index));
+ ut_ad(dtuple_get_n_fields_cmp(tuple)
+ <= dict_index_get_n_unique_in_tree(index));
return(TRUE);
}
#endif /* UNIV_DEBUG */
@@ -7139,8 +7121,6 @@ dict_index_zip_success(
/*===================*/
dict_index_t* index) /*!< in/out: index to be updated. */
{
- ut_ad(index);
-
ulint zip_threshold = zip_failure_threshold_pct;
if (!zip_threshold) {
/* Disabled by user. */
@@ -7162,8 +7142,6 @@ dict_index_zip_failure(
/*===================*/
dict_index_t* index) /*!< in/out: index to be updated. */
{
- ut_ad(index);
-
ulint zip_threshold = zip_failure_threshold_pct;
if (!zip_threshold) {
/* Disabled by user. */
@@ -7191,8 +7169,6 @@ dict_index_zip_pad_optimal_page_size(
ulint min_sz;
ulint sz;
- ut_ad(index);
-
if (!zip_failure_threshold_pct) {
/* Disabled by user. */
return(UNIV_PAGE_SIZE);
diff --git a/storage/xtradb/dict/dict0mem.cc b/storage/xtradb/dict/dict0mem.cc
index 4ef3d5df750d5833facdcc4309b5530c9fcf2181..7c8a09bd00a07e14f2ff8bf62fcd43c00d7e91d1 100644
--- a/storage/xtradb/dict/dict0mem.cc
+++ b/storage/xtradb/dict/dict0mem.cc
@@ -2,7 +2,7 @@
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
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
@@ -276,7 +276,6 @@ dict_mem_table_add_col(
dict_col_t* col;
ulint i;
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
ut_ad(!heap == !name);
@@ -321,7 +320,8 @@ dict_mem_table_col_rename_low(
ut_ad(to_len <= NAME_LEN);
char from[NAME_LEN + 1];
- strncpy(from, s, NAME_LEN + 1);
+ strncpy(from, s, sizeof from - 1);
+ from[sizeof from - 1] = '\0';
if (from_len == to_len) {
/* The easy case: simply replace the column name in
diff --git a/storage/xtradb/dict/dict0stats.cc b/storage/xtradb/dict/dict0stats.cc
index c1463e98ce087eb39cf51c3dd2ffb2cbfd191e55..063646891731e222d030cbacc0cf33d0ed8d0254 100644
--- a/storage/xtradb/dict/dict0stats.cc
+++ b/storage/xtradb/dict/dict0stats.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2009, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2009, 2019, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -3207,6 +3207,8 @@ dict_stats_update_for_index(
if (dict_stats_persistent_storage_check(false)) {
dict_table_stats_lock(index->table, RW_X_LATCH);
dict_stats_analyze_index(index);
+ index->table->stat_sum_of_other_index_sizes
+ += index->stat_index_size;
dict_table_stats_unlock(index->table, RW_X_LATCH);
dict_stats_save(index->table, &index->id);
DBUG_VOID_RETURN;
@@ -4006,7 +4008,6 @@ dict_stats_save_defrag_stats(
{
dberr_t ret;
-
if (index->is_readable()) {
} else {
return (dict_stats_report_error(index->table, true));
diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc
index fb84b5703bfc52d9ffbed69e5e5ea2ce0172e005..296096e44d0101e9d1e8f22bf7dff8d614a6a496 100644
--- a/storage/xtradb/fil/fil0crypt.cc
+++ b/storage/xtradb/fil/fil0crypt.cc
@@ -2453,9 +2453,9 @@ fil_space_crypt_close_tablespace(
if (now >= last + 30) {
ib_logf(IB_LOG_LEVEL_WARN,
- "Waited " TIMETPF " seconds to drop space: %s (" ULINTPF
+ "Waited %ld seconds to drop space: %s (" ULINTPF
") active threads %u flushing=%d.",
- now - start, space->name, space->id, cnt, flushing);
+ (long)(now - start), space->name, space->id, cnt, flushing);
last = now;
}
}
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index d6d2a6f887ce40a6dd583c58811f0da6fc51cbc8..01ebd98929f19044c7102e2507c36a570b1ef81d 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -4827,12 +4827,6 @@ fil_load_single_table_tablespace(
srv_force_recovery);
return;
}
-
- /* In mariabackup lets not crash. */
- if (IS_XTRABACKUP()) {
- return;
- }
-
abort();
}
diff --git a/storage/xtradb/fts/fts0blex.cc b/storage/xtradb/fts/fts0blex.cc
index a8f231268acc6d39c02d26be2ff4100be8d793cb..84811050e887d2aaf85a7e25e12a07d4beb44742 100644
--- a/storage/xtradb/fts/fts0blex.cc
+++ b/storage/xtradb/fts/fts0blex.cc
@@ -1,4 +1,3 @@
-#include "univ.i"
#line 2 "fts0blex.cc"
#line 4 "fts0blex.cc"
@@ -9,12 +8,222 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define fts0b_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer fts0b_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define fts0b_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer fts0b_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define fts0b_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer fts0b_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define fts0b_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string fts0b_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define fts0b_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes fts0b_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define fts0b_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer fts0b_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define fts0b_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer fts0b_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define fts0b_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state fts0b_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define fts0b_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer fts0b_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define fts0bpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state fts0bpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define fts0bpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state fts0bpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define fts0bensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack fts0bensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define fts0blex_ALREADY_DEFINED
+#else
+#define yylex fts0blex
+#endif
+
+#ifdef yyrestart
+#define fts0brestart_ALREADY_DEFINED
+#else
+#define yyrestart fts0brestart
+#endif
+
+#ifdef yylex_init
+#define fts0blex_init_ALREADY_DEFINED
+#else
+#define yylex_init fts0blex_init
+#endif
+
+#ifdef yylex_init_extra
+#define fts0blex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra fts0blex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define fts0blex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy fts0blex_destroy
+#endif
+
+#ifdef yyget_debug
+#define fts0bget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug fts0bget_debug
+#endif
+
+#ifdef yyset_debug
+#define fts0bset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug fts0bset_debug
+#endif
+
+#ifdef yyget_extra
+#define fts0bget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra fts0bget_extra
+#endif
+
+#ifdef yyset_extra
+#define fts0bset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra fts0bset_extra
+#endif
+
+#ifdef yyget_in
+#define fts0bget_in_ALREADY_DEFINED
+#else
+#define yyget_in fts0bget_in
+#endif
+
+#ifdef yyset_in
+#define fts0bset_in_ALREADY_DEFINED
+#else
+#define yyset_in fts0bset_in
+#endif
+
+#ifdef yyget_out
+#define fts0bget_out_ALREADY_DEFINED
+#else
+#define yyget_out fts0bget_out
+#endif
+
+#ifdef yyset_out
+#define fts0bset_out_ALREADY_DEFINED
+#else
+#define yyset_out fts0bset_out
+#endif
+
+#ifdef yyget_leng
+#define fts0bget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng fts0bget_leng
+#endif
+
+#ifdef yyget_text
+#define fts0bget_text_ALREADY_DEFINED
+#else
+#define yyget_text fts0bget_text
+#endif
+
+#ifdef yyget_lineno
+#define fts0bget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno fts0bget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define fts0bset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno fts0bset_lineno
+#endif
+
+#ifdef yyget_column
+#define fts0bget_column_ALREADY_DEFINED
+#else
+#define yyget_column fts0bget_column
+#endif
+
+#ifdef yyset_column
+#define fts0bset_column_ALREADY_DEFINED
+#else
+#define yyset_column fts0bset_column
+#endif
+
+#ifdef yywrap
+#define fts0bwrap_ALREADY_DEFINED
+#else
+#define yywrap fts0bwrap
+#endif
+
+#ifdef yyalloc
+#define fts0balloc_ALREADY_DEFINED
+#else
+#define yyalloc fts0balloc
+#endif
+
+#ifdef yyrealloc
+#define fts0brealloc_ALREADY_DEFINED
+#else
+#define yyrealloc fts0brealloc
+#endif
+
+#ifdef yyfree
+#define fts0bfree_ALREADY_DEFINED
+#else
+#define yyfree fts0bfree
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -35,7 +244,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -52,7 +261,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -85,40 +294,32 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
+/* begin standard C++ headers. */
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -142,20 +343,16 @@ typedef void* yyscan_t;
* definition of BEGIN.
*/
#define BEGIN yyg->yy_start = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE fts0brestart(yyin ,yyscanner )
-
+#define YY_NEW_FILE yyrestart( yyin , yyscanner )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -180,33 +377,33 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
-#define YY_LESS_LINENO(n)
-
+
+ #define YY_LESS_LINENO(n)
+ #define YY_LINENO_REWIND_TO(ptr)
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = yyg->yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -219,7 +416,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -245,8 +442,8 @@ struct yy_buffer_state
*/
int yy_at_bol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
@@ -264,7 +461,7 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via fts0brestart()), so that the user can continue scanning by
+ * (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -281,84 +478,77 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-void fts0brestart (FILE *input_file ,yyscan_t yyscanner );
-void fts0b_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void fts0b_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0b_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void fts0bpop_buffer_state (yyscan_t yyscanner );
+void yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void yypop_buffer_state ( yyscan_t yyscanner );
-static void fts0bensure_buffer_stack (yyscan_t yyscanner );
-static void fts0b_load_buffer_state (yyscan_t yyscanner );
-static void fts0b_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
+static void yyensure_buffer_stack ( yyscan_t yyscanner );
+static void yy_load_buffer_state ( yyscan_t yyscanner );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
-#define YY_FLUSH_BUFFER fts0b_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-
-void *fts0balloc (yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-void *fts0brealloc (void *,yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-void fts0bfree (void * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-
-#define yy_new_buffer fts0b_create_buffer
+void *yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void yyfree ( void * , yyscan_t yyscanner );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- fts0bensure_buffer_stack (yyscanner); \
+ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- fts0b_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- fts0bensure_buffer_stack (yyscanner); \
+ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- fts0b_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
-#define fts0bwrap(n) 1
+#define fts0bwrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
typedef int yy_state_type;
#define yytext_ptr yytext_r
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
+static int yy_get_next_buffer ( yyscan_t yyscanner );
+static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = static_cast(yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-
#define YY_NUM_RULES 7
#define YY_END_OF_BUFFER 8
/* This struct is not used in this scanner,
@@ -368,13 +558,13 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[19] =
+static const flex_int16_t yy_accept[19] =
{ 0,
4, 4, 8, 4, 1, 6, 1, 7, 7, 2,
3, 4, 1, 1, 0, 5, 3, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -406,26 +596,26 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[9] =
+static const YY_CHAR yy_meta[9] =
{ 0,
1, 2, 3, 4, 5, 5, 5, 1
} ;
-static yyconst flex_int16_t yy_base[22] =
+static const flex_int16_t yy_base[22] =
{ 0,
0, 0, 22, 0, 7, 23, 0, 14, 23, 23,
7, 0, 0, 0, 5, 23, 0, 23, 11, 12,
16
} ;
-static yyconst flex_int16_t yy_def[22] =
+static const flex_int16_t yy_def[22] =
{ 0,
18, 1, 18, 19, 19, 18, 20, 21, 18, 18,
19, 19, 5, 20, 21, 18, 11, 0, 18, 18,
18
} ;
-static yyconst flex_int16_t yy_nxt[32] =
+static const flex_int16_t yy_nxt[32] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 13, 16,
14, 12, 12, 14, 17, 14, 15, 15, 16, 15,
@@ -433,7 +623,7 @@ static yyconst flex_int16_t yy_nxt[32] =
18
} ;
-static yyconst flex_int16_t yy_chk[32] =
+static const flex_int16_t yy_chk[32] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 5, 15,
5, 19, 19, 20, 11, 20, 21, 21, 8, 21,
@@ -451,7 +641,7 @@ static yyconst flex_int16_t yy_chk[32] =
#line 1 "fts0blex.l"
/*****************************************************************************
-Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 2014, 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
@@ -480,8 +670,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
/* Required for reentrant parser */
#define YY_DECL int fts_blexer(YYSTYPE* val, yyscan_t yyscanner)
+#line 674 "fts0blex.cc"
#define YY_NO_INPUT 1
-#line 484 "fts0blex.cc"
+#line 676 "fts0blex.cc"
#define INITIAL 0
@@ -499,72 +690,76 @@ this program; if not, write to the Free Software Foundation, Inc.,
/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
-{
+ {
- /* User-defined. Not touched by flex. */
- YY_EXTRA_TYPE yyextra_r;
+ /* User-defined. Not touched by flex. */
+ YY_EXTRA_TYPE yyextra_r;
- /* The rest are the same as the globals declared in the non-reentrant scanner. */
- FILE *yyin_r, *yyout_r;
- size_t yy_buffer_stack_top; /**< index of top of stack. */
- size_t yy_buffer_stack_max; /**< capacity of stack. */
- YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
- char yy_hold_char;
- int yy_n_chars;
- int yyleng_r;
- char *yy_c_buf_p;
- int yy_init;
- int yy_start;
- int yy_did_buffer_switch_on_eof;
- int yy_start_stack_ptr;
- int yy_start_stack_depth;
- int *yy_start_stack;
- yy_state_type yy_last_accepting_state;
- char* yy_last_accepting_cpos;
+ /* The rest are the same as the globals declared in the non-reentrant scanner. */
+ FILE *yyin_r, *yyout_r;
+ size_t yy_buffer_stack_top; /**< index of top of stack. */
+ size_t yy_buffer_stack_max; /**< capacity of stack. */
+ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
+ char yy_hold_char;
+ int yy_n_chars;
+ int yyleng_r;
+ char *yy_c_buf_p;
+ int yy_init;
+ int yy_start;
+ int yy_did_buffer_switch_on_eof;
+ int yy_start_stack_ptr;
+ int yy_start_stack_depth;
+ int *yy_start_stack;
+ yy_state_type yy_last_accepting_state;
+ char* yy_last_accepting_cpos;
- int yylineno_r;
- int yy_flex_debug_r;
+ int yylineno_r;
+ int yy_flex_debug_r;
- char *yytext_r;
- int yy_more_flag;
- int yy_more_len;
+ char *yytext_r;
+ int yy_more_flag;
+ int yy_more_len;
-}; /* end struct yyguts_t */
+ }; /* end struct yyguts_t */
-static int yy_init_globals (yyscan_t yyscanner );
+static int yy_init_globals ( yyscan_t yyscanner );
-int fts0blex_init (yyscan_t* scanner);
+int yylex_init (yyscan_t* scanner);
-int fts0blex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int fts0blex_destroy (yyscan_t yyscanner );
+int yylex_destroy ( yyscan_t yyscanner );
+
+int yyget_debug ( yyscan_t yyscanner );
-int fts0bget_debug (yyscan_t yyscanner );
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-void fts0bset_debug (int debug_flag ,yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0bget_extra (yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-void fts0bset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-FILE *fts0bget_in (yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-void fts0bset_in (FILE * in_str ,yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-FILE *fts0bget_out (yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-void fts0bset_out (FILE * out_str ,yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-int fts0bget_leng (yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-char *fts0bget_text (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-int fts0bget_lineno (yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
-void fts0bset_lineno (int line_number ,yyscan_t yyscanner );
+int yyget_column ( yyscan_t yyscanner );
+
+void yyset_column ( int _column_no , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -572,26 +767,29 @@ void fts0bset_lineno (int line_number ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int fts0bwrap (yyscan_t yyscanner );
+extern "C" int yywrap ( yyscan_t yyscanner );
#else
-extern int fts0bwrap (yyscan_t yyscanner );
+extern int yywrap ( yyscan_t yyscanner );
#endif
#endif
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
+static int yyinput ( yyscan_t yyscanner );
#else
-static int input (yyscan_t yyscanner );
+static int input ( yyscan_t yyscanner );
#endif
#endif
@@ -611,7 +809,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -623,7 +821,7 @@ static int input (yyscan_t yyscanner );
{ \
int c = '*'; \
int n; \
- for ( n = 0; n < static_cast(max_size) && \
+ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
@@ -635,8 +833,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
- while ( (result = static_cast(fread(buf, 1, max_size, yyin))) \
- == 0 && ferror(yyin) ) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -677,9 +874,9 @@ static int input (yyscan_t yyscanner );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int fts0blex (yyscan_t yyscanner);
+extern int yylex (yyscan_t yyscanner);
-#define YY_DECL int fts0blex (yyscan_t yyscanner)
+#define YY_DECL int yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
@@ -691,7 +888,7 @@ extern int fts0blex (yyscan_t yyscanner);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -704,12 +901,7 @@ YY_DECL
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
int yy_act;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-#line 43 "fts0blex.l"
-
-
-#line 712 "fts0blex.cc"
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( !yyg->yy_init )
{
@@ -729,15 +921,21 @@ YY_DECL
yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- fts0bensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- fts0b_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
- fts0b_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+#line 43 "fts0blex.l"
+
+
+#line 937 "fts0blex.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
@@ -753,7 +951,7 @@ YY_DECL
yy_match:
do
{
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -763,9 +961,9 @@ YY_DECL
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 19 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 18 );
@@ -840,7 +1038,7 @@ YY_RULE_SETUP
#line 73 "fts0blex.l"
ECHO;
YY_BREAK
-#line 843 "fts0blex.cc"
+#line 1042 "fts0blex.cc"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -858,7 +1056,7 @@ case YY_STATE_EOF(INITIAL):
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
- * fts0blex(). If so, then we have to assure
+ * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
@@ -919,7 +1117,7 @@ case YY_STATE_EOF(INITIAL):
{
yyg->yy_did_buffer_switch_on_eof = 0;
- if ( fts0bwrap(yyscanner ) )
+ if ( yywrap( yyscanner ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -972,7 +1170,8 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of fts0blex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -983,7 +1182,7 @@ case YY_STATE_EOF(INITIAL):
*/
static int yy_get_next_buffer (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = yyg->yytext_ptr;
int number_to_move, i;
@@ -1015,7 +1214,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1028,21 +1227,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = static_cast(b->yy_buf_size * 2);
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1051,11 +1250,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- fts0brealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -1063,8 +1263,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
}
@@ -1073,7 +1273,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read);
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1083,7 +1283,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- fts0brestart(yyin ,yyscanner);
+ yyrestart( yyin , yyscanner);
}
else
@@ -1097,12 +1297,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fts0brealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
yyg->yy_n_chars += number_to_move;
@@ -1116,11 +1319,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* yy_get_previous_state - get the state just before the EOB char was reached */
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
yy_state_type yy_current_state;
char *yy_cp;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
@@ -1136,9 +1339,9 @@ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 19 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -1149,10 +1352,10 @@ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
-static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
int yy_is_jam;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
char *yy_cp = yyg->yy_c_buf_p;
YY_CHAR yy_c = 1;
@@ -1165,24 +1368,29 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 19 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 18);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
- static int yyinput (yyscan_t yyscanner)
+ static int yyinput (yyscan_t yyscanner)
#else
- static int input (yyscan_t yyscanner)
+ static int input (yyscan_t yyscanner)
#endif
{
int c;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
*yyg->yy_c_buf_p = yyg->yy_hold_char;
@@ -1198,7 +1406,7 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1215,14 +1423,14 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
*/
/* Reset buffer status. */
- fts0brestart(yyin ,yyscanner);
+ yyrestart( yyin , yyscanner);
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( fts0bwrap(yyscanner ) )
- return EOF;
+ if ( yywrap( yyscanner ) )
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -1253,34 +1461,34 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
* @param yyscanner The scanner object.
* @note This function does not reset the start condition to @c INITIAL .
*/
-void fts0brestart (FILE * input_file , yyscan_t yyscanner)
+ void yyrestart (FILE * input_file , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! YY_CURRENT_BUFFER ){
- fts0bensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- fts0b_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
- fts0b_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
- fts0b_load_buffer_state(yyscanner );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
+ yy_load_buffer_state( yyscanner );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
* @param yyscanner The scanner object.
*/
-void fts0b_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body
* with
- * fts0bpop_buffer_state();
- * fts0bpush_buffer_state(new_buffer);
- */
- fts0bensure_buffer_stack (yyscanner);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1293,19 +1501,19 @@ void fts0b_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- fts0b_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
/* We don't actually know whether we did this switch during
- * EOF (fts0bwrap()) processing, but the only time this flag
- * is looked at is after fts0bwrap() is called, so it's safe
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yyg->yy_did_buffer_switch_on_eof = 1;
}
-static void fts0b_load_buffer_state (yyscan_t yyscanner)
+static void yy_load_buffer_state (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
@@ -1318,37 +1526,37 @@ static void fts0b_load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the allocated buffer state.
*/
-YY_BUFFER_STATE fts0b_create_buffer (FILE * file, int size , yyscan_t yyscanner)
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) fts0balloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in fts0b_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) fts0balloc(b->yy_buf_size + 2 ,yyscanner );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in fts0b_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- fts0b_init_buffer(b,file ,yyscanner);
+ yy_init_buffer( b, file , yyscanner);
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with fts0b_create_buffer()
+ * @param b a buffer created with yy_create_buffer()
* @param yyscanner The scanner object.
*/
-void fts0b_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -1357,37 +1565,37 @@ void fts0b_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- fts0bfree((void *) b->yy_ch_buf ,yyscanner );
+ yyfree( (void *) b->yy_ch_buf , yyscanner );
- fts0bfree((void *) b ,yyscanner );
+ yyfree( (void *) b , yyscanner );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a fts0brestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
-static void fts0b_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
{
int oerrno = errno;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- fts0b_flush_buffer(b ,yyscanner);
+ yy_flush_buffer( b , yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then fts0b_init_buffer was _probably_
- * called from fts0brestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
-
- b->yy_is_interactive = 0;
-
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = 0;
+
errno = oerrno;
}
@@ -1395,9 +1603,9 @@ static void fts0b_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yysca
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
* @param yyscanner The scanner object.
*/
-void fts0b_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -1416,7 +1624,7 @@ void fts0b_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- fts0b_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -1425,15 +1633,15 @@ void fts0b_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
* @param new_buffer The new state.
* @param yyscanner The scanner object.
*/
-void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL)
return;
- fts0bensure_buffer_stack(yyscanner);
+ yyensure_buffer_stack(yyscanner);
- /* This block is copied from fts0b_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -1447,8 +1655,8 @@ void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
yyg->yy_buffer_stack_top++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from fts0b_switch_to_buffer. */
- fts0b_load_buffer_state(yyscanner );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
@@ -1456,19 +1664,19 @@ void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
* The next element becomes the new top.
* @param yyscanner The scanner object.
*/
-void fts0bpop_buffer_state (yyscan_t yyscanner)
+void yypop_buffer_state (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER)
return;
- fts0b_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
+ yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
YY_CURRENT_BUFFER_LVALUE = NULL;
if (yyg->yy_buffer_stack_top > 0)
--yyg->yy_buffer_stack_top;
if (YY_CURRENT_BUFFER) {
- fts0b_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
}
@@ -1476,23 +1684,23 @@ void fts0bpop_buffer_state (yyscan_t yyscanner)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void fts0bensure_buffer_stack (yyscan_t yyscanner)
+static void yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yy_size_t num_to_alloc;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
- */
- num_to_alloc = 1;
- yyg->yy_buffer_stack = (struct yy_buffer_state**)fts0balloc
+ */
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in fts0bensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -1504,15 +1712,15 @@ static void fts0bensure_buffer_stack (yyscan_t yyscanner)
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
- num_to_alloc = static_cast(yyg->yy_buffer_stack_max + grow_size);
- yyg->yy_buffer_stack = (struct yy_buffer_state**)fts0brealloc
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in fts0bensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -1526,76 +1734,77 @@ static void fts0bensure_buffer_stack (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE fts0b_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) fts0balloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in fts0b_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = static_cast(b->yy_buf_size);
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- fts0b_switch_to_buffer(b ,yyscanner );
+ yy_switch_to_buffer( b , yyscanner );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to fts0blex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * fts0b_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE fts0b_scan_string (yyconst char * yystr , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
{
- return fts0b_scan_bytes(yystr,static_cast(strlen(yystr)), yyscanner);
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
}
-/** Setup the input buffer state to scan the given bytes. The next call to fts0blex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE fts0b_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) fts0balloc(n ,yyscanner );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n , yyscanner );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in fts0b_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = fts0b_scan_buffer(buf,n ,yyscanner);
+ b = yy_scan_buffer( buf, n , yyscanner);
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in fts0b_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -1609,9 +1818,11 @@ YY_BUFFER_STATE fts0b_scan_bytes (yyconst char * yybytes, int _yybytes_len , y
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
{
- (void) fprintf( stderr, "%s\n", msg );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -1622,8 +1833,8 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = yyg->yy_hold_char; \
yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
yyg->yy_hold_char = *yyg->yy_c_buf_p; \
@@ -1637,272 +1848,268 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
-YY_EXTRA_TYPE fts0bget_extra (yyscan_t yyscanner)
+YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyextra;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyextra;
}
/** Get the current line number.
* @param yyscanner The scanner object.
*/
-int fts0bget_lineno (yyscan_t yyscanner)
+int yyget_lineno (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (! YY_CURRENT_BUFFER)
- return 0;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yylineno;
+ if (! YY_CURRENT_BUFFER)
+ return 0;
+
+ return yylineno;
}
/** Get the current column number.
* @param yyscanner The scanner object.
*/
-int fts0bget_column (yyscan_t yyscanner)
+int yyget_column (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (! YY_CURRENT_BUFFER)
- return 0;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yycolumn;
+ if (! YY_CURRENT_BUFFER)
+ return 0;
+
+ return yycolumn;
}
/** Get the input stream.
* @param yyscanner The scanner object.
*/
-FILE *fts0bget_in (yyscan_t yyscanner)
+FILE *yyget_in (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyin;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyin;
}
/** Get the output stream.
* @param yyscanner The scanner object.
*/
-FILE *fts0bget_out (yyscan_t yyscanner)
+FILE *yyget_out (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyout;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyout;
}
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int fts0bget_leng (yyscan_t yyscanner)
+int yyget_leng (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyleng;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyleng;
}
/** Get the current token.
* @param yyscanner The scanner object.
*/
-char *fts0bget_text (yyscan_t yyscanner)
+char *yyget_text (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yytext;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yytext;
}
/** Set the user-defined data. This data is never touched by the scanner.
* @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object.
*/
-void fts0bset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
+void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyextra = user_defined ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyextra = user_defined ;
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
* @param yyscanner The scanner object.
*/
-void fts0bset_lineno (int line_number , yyscan_t yyscanner)
+void yyset_lineno (int _line_number , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- /* lineno is only valid if an input buffer exists. */
- if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "fts0bset_lineno called with no buffer" , yyscanner);
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yylineno = line_number;
+ /* lineno is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
+
+ yylineno = _line_number;
}
/** Set the current column.
- * @param line_number
+ * @param _column_no column number
* @param yyscanner The scanner object.
*/
-void fts0bset_column (int column_no , yyscan_t yyscanner)
+void yyset_column (int _column_no , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* column is only valid if an input buffer exists. */
- if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "fts0bset_column called with no buffer" , yyscanner);
-
- yycolumn = column_no;
+ /* column is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ YY_FATAL_ERROR( "yyset_column called with no buffer" );
+
+ yycolumn = _column_no;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
* @param yyscanner The scanner object.
- * @see fts0b_switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void fts0bset_in (FILE * in_str , yyscan_t yyscanner)
+void yyset_in (FILE * _in_str , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyin = _in_str ;
}
-void fts0bset_out (FILE * out_str , yyscan_t yyscanner)
+void yyset_out (FILE * _out_str , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyout = _out_str ;
}
-int fts0bget_debug (yyscan_t yyscanner)
+int yyget_debug (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yy_flex_debug;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yy_flex_debug;
}
-void fts0bset_debug (int bdebug , yyscan_t yyscanner)
+void yyset_debug (int _bdebug , yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yy_flex_debug = _bdebug ;
}
/* Accessor methods for yylval and yylloc */
/* User-visible API */
-/* fts0blex_init is special because it creates the scanner itself, so it is
+/* yylex_init is special because it creates the scanner itself, so it is
* the ONLY reentrant function that doesn't take the scanner as the last argument.
* That's why we explicitly handle the declaration, instead of using our macros.
*/
-
-int fts0blex_init(yyscan_t* ptr_yy_globals)
-
+int yylex_init(yyscan_t* ptr_yy_globals)
{
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
- *ptr_yy_globals = (yyscan_t) fts0balloc ( sizeof( struct yyguts_t ), NULL );
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
- if (*ptr_yy_globals == NULL){
- errno = ENOMEM;
- return 1;
- }
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
- /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+ /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
- return yy_init_globals ( *ptr_yy_globals );
+ return yy_init_globals ( *ptr_yy_globals );
}
-/* fts0blex_init_extra has the same functionality as fts0blex_init, but follows the
+/* yylex_init_extra has the same functionality as yylex_init, but follows the
* convention of taking the scanner as the last argument. Note however, that
* this is a *pointer* to a scanner, as it will be allocated by this call (and
* is the reason, too, why this function also must handle its own declaration).
- * The user defined value in the first argument will be available to fts0balloc in
+ * The user defined value in the first argument will be available to yyalloc in
* the yyextra field.
*/
-
-int fts0blex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
-
+int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
{
- struct yyguts_t dummy_yyguts;
+ struct yyguts_t dummy_yyguts;
- fts0bset_extra (yy_user_defined, &dummy_yyguts);
+ yyset_extra (yy_user_defined, &dummy_yyguts);
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
- *ptr_yy_globals = (yyscan_t) fts0balloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
- if (*ptr_yy_globals == NULL){
- errno = ENOMEM;
- return 1;
- }
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
- /* By setting to 0xAA, we expose bugs in
- yy_init_globals. Leave at 0x00 for releases. */
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+ /* By setting to 0xAA, we expose bugs in
+ yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
- fts0bset_extra (yy_user_defined, *ptr_yy_globals);
+ yyset_extra (yy_user_defined, *ptr_yy_globals);
- return yy_init_globals ( *ptr_yy_globals );
+ return yy_init_globals ( *ptr_yy_globals );
}
static int yy_init_globals (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* Initialization is the same as for the non-reentrant scanner.
- * This function is called from fts0blex_destroy(), so don't allocate here.
- */
-
- yyg->yy_buffer_stack = 0;
- yyg->yy_buffer_stack_top = 0;
- yyg->yy_buffer_stack_max = 0;
- yyg->yy_c_buf_p = (char *) 0;
- yyg->yy_init = 0;
- yyg->yy_start = 0;
-
- yyg->yy_start_stack_ptr = 0;
- yyg->yy_start_stack_depth = 0;
- yyg->yy_start_stack = NULL;
-
- /* Defined in main.c */
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ yyg->yy_buffer_stack = NULL;
+ yyg->yy_buffer_stack_top = 0;
+ yyg->yy_buffer_stack_max = 0;
+ yyg->yy_c_buf_p = NULL;
+ yyg->yy_init = 0;
+ yyg->yy_start = 0;
+
+ yyg->yy_start_stack_ptr = 0;
+ yyg->yy_start_stack_depth = 0;
+ yyg->yy_start_stack = NULL;
+
+/* Defined in main.c */
#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
- /* For future reference: Set errno on error, since we are called by
- * fts0blex_init()
- */
- return 0;
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
}
-/* fts0blex_destroy is for both reentrant and non-reentrant scanners. */
-int fts0blex_destroy (yyscan_t yyscanner)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (yyscan_t yyscanner)
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* Pop the buffer stack, destroying each element. */
+ /* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- fts0b_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
+ yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
- fts0bpop_buffer_state(yyscanner);
+ yypop_buffer_state(yyscanner);
}
/* Destroy the stack itself. */
- fts0bfree(yyg->yy_buffer_stack ,yyscanner);
+ yyfree(yyg->yy_buffer_stack , yyscanner);
yyg->yy_buffer_stack = NULL;
- /* Destroy the start condition stack. */
- fts0bfree(yyg->yy_start_stack ,yyscanner );
- yyg->yy_start_stack = NULL;
+ /* Destroy the start condition stack. */
+ yyfree( yyg->yy_start_stack , yyscanner );
+ yyg->yy_start_stack = NULL;
- /* Reset the globals. This is important in a non-reentrant scanner so the next time
- * fts0blex() is called, initialization will occur. */
- yy_init_globals( yyscanner);
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( yyscanner);
- /* Destroy the main struct (reentrant only). */
- fts0bfree ( yyscanner , yyscanner );
- yyscanner = NULL;
- return 0;
+ /* Destroy the main struct (reentrant only). */
+ yyfree ( yyscanner , yyscanner );
+ yyscanner = NULL;
+ return 0;
}
/*
@@ -1910,8 +2117,11 @@ int fts0blex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
@@ -1919,7 +2129,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yys
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
{
int n;
for ( n = 0; s[n]; ++n )
@@ -1929,13 +2139,18 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_A
}
#endif
-void *fts0balloc (yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void *yyalloc (yy_size_t size , yyscan_t yyscanner)
{
- return (void *) malloc( size );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ return malloc(size);
}
-void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -1943,15 +2158,18 @@ void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void fts0bfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void yyfree (void * ptr , yyscan_t yyscanner)
{
- free( (char *) ptr ); /* see fts0brealloc() for (char *) cast */
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
#line 73 "fts0blex.l"
+
diff --git a/storage/xtradb/fts/fts0fts.cc b/storage/xtradb/fts/fts0fts.cc
index 02d81551e755db13f2a80772aad40996a13c8607..1ea3a8d2c6002ef3aae9463d05cf319a61a25cde 100644
--- a/storage/xtradb/fts/fts0fts.cc
+++ b/storage/xtradb/fts/fts0fts.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2018, MariaDB Corporation.
+Copyright (c) 2016, 2019, MariaDB Corporation.
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
@@ -567,7 +567,7 @@ fts_index_cache_init(
index_cache->words = rbt_create_arg_cmp(
sizeof(fts_tokenizer_word_t), innobase_fts_text_cmp,
- (void*)index_cache->charset);
+ (void*) index_cache->charset);
ut_a(index_cache->doc_stats == NULL);
@@ -736,6 +736,7 @@ fts_reset_get_doc(
memset(get_doc, 0x0, sizeof(*get_doc));
get_doc->index_cache = ind_cache;
+ get_doc->cache = cache;
}
ut_ad(ib_vector_size(cache->get_docs)
@@ -2004,7 +2005,8 @@ fts_create_one_index_table(
dict_mem_table_add_col(new_table, heap, "ilist", DATA_BLOB,
4130048, 0);
- error = row_create_table_for_mysql(new_table, trx, false, FIL_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY);
+ error = row_create_table_for_mysql(new_table, trx, false,
+ FIL_ENCRYPTION_DEFAULT, FIL_DEFAULT_ENCRYPTION_KEY);
if (error != DB_SUCCESS) {
trx->error_state = error;
@@ -4800,8 +4802,9 @@ fts_tokenize_document(
ut_a(!doc->tokens);
ut_a(doc->charset);
- doc->tokens = rbt_create_arg_cmp(
- sizeof(fts_token_t), innobase_fts_text_cmp, (void*) doc->charset);
+ doc->tokens = rbt_create_arg_cmp(sizeof(fts_token_t),
+ innobase_fts_text_cmp,
+ (void*) doc->charset);
for (ulint i = 0; i < doc->text.f_len; i += inc) {
inc = fts_process_token(doc, result, i, 0);
diff --git a/storage/xtradb/fts/fts0opt.cc b/storage/xtradb/fts/fts0opt.cc
index 77293bc867a02ebbed8a39958302bb322fd076a2..28e704eb9a5851d8deafbb6698af5e28aa501678 100644
--- a/storage/xtradb/fts/fts0opt.cc
+++ b/storage/xtradb/fts/fts0opt.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2007, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, MariaDB Corporation. All Rights reserved.
+Copyright (c) 2016, 2019, MariaDB Corporation.
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
@@ -673,18 +673,17 @@ fts_fetch_index_words(
fts_zip_t* zip = static_cast(user_arg);
que_node_t* exp = sel_node->select_list;
dfield_t* dfield = que_node_get_val(exp);
- short len = static_cast(dfield_get_len(dfield));
+
+ ut_a(dfield_get_len(dfield) <= FTS_MAX_WORD_LEN);
+
+ uint16 len = uint16(dfield_get_len(dfield));
void* data = dfield_get_data(dfield);
/* Skip the duplicate words. */
- if (zip->word.f_len == static_cast(len)
- && !memcmp(zip->word.f_str, data, len)) {
-
+ if (zip->word.f_len == len && !memcmp(zip->word.f_str, data, len)) {
return(TRUE);
}
- ut_a(len <= FTS_MAX_WORD_LEN);
-
memcpy(zip->word.f_str, data, len);
zip->word.f_len = len;
@@ -692,6 +691,9 @@ fts_fetch_index_words(
ut_a(zip->zp->next_in == NULL);
/* The string is prefixed by len. */
+ /* FIXME: This is not byte order agnostic (InnoDB data files
+ with FULLTEXT INDEX are not portable between little-endian and
+ big-endian systems!) */
zip->zp->next_in = reinterpret_cast(&len);
zip->zp->avail_in = sizeof(len);
@@ -717,14 +719,13 @@ fts_fetch_index_words(
ut_a(len <= FTS_MAX_WORD_LEN);
len = 0;
}
- break;
+ continue;
case Z_STREAM_END:
case Z_BUF_ERROR:
case Z_STREAM_ERROR:
default:
ut_error;
- break;
}
}
diff --git a/storage/xtradb/fts/fts0tlex.cc b/storage/xtradb/fts/fts0tlex.cc
index 28fac9bf704b394c46e018bfebd724e4a7fdeb8e..73c34a607ca7de3bfbfe7497b02def640144ff42 100644
--- a/storage/xtradb/fts/fts0tlex.cc
+++ b/storage/xtradb/fts/fts0tlex.cc
@@ -1,4 +1,3 @@
-#include "univ.i"
#line 2 "fts0tlex.cc"
#line 4 "fts0tlex.cc"
@@ -9,12 +8,222 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define fts0t_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer fts0t_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define fts0t_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer fts0t_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define fts0t_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer fts0t_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define fts0t_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string fts0t_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define fts0t_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes fts0t_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define fts0t_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer fts0t_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define fts0t_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer fts0t_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define fts0t_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state fts0t_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define fts0t_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer fts0t_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define fts0tpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state fts0tpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define fts0tpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state fts0tpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define fts0tensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack fts0tensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define fts0tlex_ALREADY_DEFINED
+#else
+#define yylex fts0tlex
+#endif
+
+#ifdef yyrestart
+#define fts0trestart_ALREADY_DEFINED
+#else
+#define yyrestart fts0trestart
+#endif
+
+#ifdef yylex_init
+#define fts0tlex_init_ALREADY_DEFINED
+#else
+#define yylex_init fts0tlex_init
+#endif
+
+#ifdef yylex_init_extra
+#define fts0tlex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra fts0tlex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define fts0tlex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy fts0tlex_destroy
+#endif
+
+#ifdef yyget_debug
+#define fts0tget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug fts0tget_debug
+#endif
+
+#ifdef yyset_debug
+#define fts0tset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug fts0tset_debug
+#endif
+
+#ifdef yyget_extra
+#define fts0tget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra fts0tget_extra
+#endif
+
+#ifdef yyset_extra
+#define fts0tset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra fts0tset_extra
+#endif
+
+#ifdef yyget_in
+#define fts0tget_in_ALREADY_DEFINED
+#else
+#define yyget_in fts0tget_in
+#endif
+
+#ifdef yyset_in
+#define fts0tset_in_ALREADY_DEFINED
+#else
+#define yyset_in fts0tset_in
+#endif
+
+#ifdef yyget_out
+#define fts0tget_out_ALREADY_DEFINED
+#else
+#define yyget_out fts0tget_out
+#endif
+
+#ifdef yyset_out
+#define fts0tset_out_ALREADY_DEFINED
+#else
+#define yyset_out fts0tset_out
+#endif
+
+#ifdef yyget_leng
+#define fts0tget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng fts0tget_leng
+#endif
+
+#ifdef yyget_text
+#define fts0tget_text_ALREADY_DEFINED
+#else
+#define yyget_text fts0tget_text
+#endif
+
+#ifdef yyget_lineno
+#define fts0tget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno fts0tget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define fts0tset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno fts0tset_lineno
+#endif
+
+#ifdef yyget_column
+#define fts0tget_column_ALREADY_DEFINED
+#else
+#define yyget_column fts0tget_column
+#endif
+
+#ifdef yyset_column
+#define fts0tset_column_ALREADY_DEFINED
+#else
+#define yyset_column fts0tset_column
+#endif
+
+#ifdef yywrap
+#define fts0twrap_ALREADY_DEFINED
+#else
+#define yywrap fts0twrap
+#endif
+
+#ifdef yyalloc
+#define fts0talloc_ALREADY_DEFINED
+#else
+#define yyalloc fts0talloc
+#endif
+
+#ifdef yyrealloc
+#define fts0trealloc_ALREADY_DEFINED
+#else
+#define yyrealloc fts0trealloc
+#endif
+
+#ifdef yyfree
+#define fts0tfree_ALREADY_DEFINED
+#else
+#define yyfree fts0tfree
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -35,7 +244,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -52,7 +261,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -85,40 +294,32 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
+/* begin standard C++ headers. */
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -142,20 +343,16 @@ typedef void* yyscan_t;
* definition of BEGIN.
*/
#define BEGIN yyg->yy_start = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE fts0trestart(yyin ,yyscanner )
-
+#define YY_NEW_FILE yyrestart( yyin , yyscanner )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -180,12 +377,18 @@ typedef void* yyscan_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
-
+ #define YY_LINENO_REWIND_TO(ptr)
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -199,14 +402,8 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -219,7 +416,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -264,7 +461,7 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via fts0trestart()), so that the user can continue scanning by
+ * (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -281,84 +478,77 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-void fts0trestart (FILE *input_file ,yyscan_t yyscanner );
-void fts0t_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void fts0t_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0t_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void fts0tpop_buffer_state (yyscan_t yyscanner );
+void yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void yypop_buffer_state ( yyscan_t yyscanner );
-static void fts0tensure_buffer_stack (yyscan_t yyscanner );
-static void fts0t_load_buffer_state (yyscan_t yyscanner );
-static void fts0t_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
+static void yyensure_buffer_stack ( yyscan_t yyscanner );
+static void yy_load_buffer_state ( yyscan_t yyscanner );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
-#define YY_FLUSH_BUFFER fts0t_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-
-void *fts0talloc (yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-void *fts0trealloc (void *,yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-void fts0tfree (void * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
-
-#define yy_new_buffer fts0t_create_buffer
+void *yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void yyfree ( void * , yyscan_t yyscanner );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- fts0tensure_buffer_stack (yyscanner); \
+ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- fts0t_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- fts0tensure_buffer_stack (yyscanner); \
+ yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- fts0t_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
-#define fts0twrap(n) 1
+#define fts0twrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
typedef int yy_state_type;
#define yytext_ptr yytext_r
-static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
-static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
+static int yy_get_next_buffer ( yyscan_t yyscanner );
+static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yyg->yytext_ptr = yy_bp; \
- yyleng = static_cast(yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-
#define YY_NUM_RULES 7
#define YY_END_OF_BUFFER 8
/* This struct is not used in this scanner,
@@ -368,13 +558,13 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[17] =
+static const flex_int16_t yy_accept[17] =
{ 0,
4, 4, 8, 4, 1, 6, 1, 5, 5, 2,
4, 1, 1, 0, 3, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -406,31 +596,31 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[8] =
+static const YY_CHAR yy_meta[8] =
{ 0,
1, 2, 3, 4, 5, 5, 1
} ;
-static yyconst flex_int16_t yy_base[20] =
+static const flex_int16_t yy_base[20] =
{ 0,
0, 0, 18, 0, 6, 21, 0, 9, 21, 0,
0, 0, 0, 4, 21, 21, 10, 11, 15
} ;
-static yyconst flex_int16_t yy_def[20] =
+static const flex_int16_t yy_def[20] =
{ 0,
16, 1, 16, 17, 17, 16, 18, 19, 16, 17,
17, 5, 18, 19, 16, 0, 16, 16, 16
} ;
-static yyconst flex_int16_t yy_nxt[29] =
+static const flex_int16_t yy_nxt[29] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 12, 15, 13,
11, 11, 13, 15, 13, 14, 14, 16, 14, 14,
3, 16, 16, 16, 16, 16, 16, 16
} ;
-static yyconst flex_int16_t yy_chk[29] =
+static const flex_int16_t yy_chk[29] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 5, 14, 5,
17, 17, 18, 8, 18, 19, 19, 3, 19, 19,
@@ -447,7 +637,7 @@ static yyconst flex_int16_t yy_chk[29] =
#line 1 "fts0tlex.l"
/*****************************************************************************
-Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 2014, 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
@@ -476,8 +666,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
/* Required for reentrant parser */
#define YY_DECL int fts_tlexer(YYSTYPE* val, yyscan_t yyscanner)
+#line 670 "fts0tlex.cc"
#define YY_NO_INPUT 1
-#line 480 "fts0tlex.cc"
+#line 672 "fts0tlex.cc"
#define INITIAL 0
@@ -527,40 +718,44 @@ struct yyguts_t
}; /* end struct yyguts_t */
-static int yy_init_globals (yyscan_t yyscanner );
+static int yy_init_globals ( yyscan_t yyscanner );
-int fts0tlex_init (yyscan_t* scanner);
+int yylex_init (yyscan_t* scanner);
-int fts0tlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int fts0tlex_destroy (yyscan_t yyscanner );
+int yylex_destroy ( yyscan_t yyscanner );
+
+int yyget_debug ( yyscan_t yyscanner );
+
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-int fts0tget_debug (yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-void fts0tset_debug (int debug_flag ,yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-void fts0tset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-FILE *fts0tget_in (yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-void fts0tset_in (FILE * in_str ,yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-FILE *fts0tget_out (yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-void fts0tset_out (FILE * out_str ,yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-int fts0tget_leng (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-char *fts0tget_text (yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
-int fts0tget_lineno (yyscan_t yyscanner );
+int yyget_column ( yyscan_t yyscanner );
-void fts0tset_lineno (int line_number ,yyscan_t yyscanner );
+void yyset_column ( int _column_no , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -568,26 +763,29 @@ void fts0tset_lineno (int line_number ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int fts0twrap (yyscan_t yyscanner );
+extern "C" int yywrap ( yyscan_t yyscanner );
#else
-extern int fts0twrap (yyscan_t yyscanner );
+extern int yywrap ( yyscan_t yyscanner );
#endif
#endif
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (yyscan_t yyscanner );
+static int yyinput ( yyscan_t yyscanner );
#else
-static int input (yyscan_t yyscanner );
+static int input ( yyscan_t yyscanner );
#endif
#endif
@@ -607,7 +805,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -619,7 +817,7 @@ static int input (yyscan_t yyscanner );
{ \
int c = '*'; \
int n; \
- for ( n = 0; n < static_cast(max_size) && \
+ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
@@ -631,8 +829,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
- while ( (result = static_cast(fread(buf, 1, max_size, yyin)))==0 \
- && ferror(yyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -673,9 +870,9 @@ static int input (yyscan_t yyscanner );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int fts0tlex (yyscan_t yyscanner);
+extern int yylex (yyscan_t yyscanner);
-#define YY_DECL int fts0tlex (yyscan_t yyscanner)
+#define YY_DECL int yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
@@ -687,7 +884,7 @@ extern int fts0tlex (yyscan_t yyscanner);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -702,11 +899,6 @@ YY_DECL
int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 44 "fts0tlex.l"
-
-
-#line 707 "fts0tlex.cc"
-
if ( !yyg->yy_init )
{
yyg->yy_init = 1;
@@ -725,15 +917,21 @@ YY_DECL
yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- fts0tensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- fts0t_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
- fts0t_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+#line 44 "fts0tlex.l"
+
+
+#line 933 "fts0tlex.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
@@ -749,7 +947,7 @@ YY_DECL
yy_match:
do
{
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -759,9 +957,9 @@ YY_DECL
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 17 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 16 );
@@ -832,7 +1030,7 @@ YY_RULE_SETUP
#line 68 "fts0tlex.l"
ECHO;
YY_BREAK
-#line 834 "fts0tlex.cc"
+#line 1034 "fts0tlex.cc"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -850,7 +1048,7 @@ case YY_STATE_EOF(INITIAL):
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
- * fts0tlex(). If so, then we have to assure
+ * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
@@ -911,7 +1109,7 @@ case YY_STATE_EOF(INITIAL):
{
yyg->yy_did_buffer_switch_on_eof = 0;
- if ( fts0twrap(yyscanner ) )
+ if ( yywrap( yyscanner ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -964,7 +1162,8 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of fts0tlex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1007,7 +1206,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1020,21 +1219,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = static_cast(b->yy_buf_size * 2);
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1043,11 +1242,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- fts0trealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -1055,8 +1255,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
}
@@ -1065,7 +1265,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read);
+ yyg->yy_n_chars, num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1075,7 +1275,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- fts0trestart(yyin ,yyscanner);
+ yyrestart( yyin , yyscanner);
}
else
@@ -1089,12 +1289,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fts0trealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
yyg->yy_n_chars += number_to_move;
@@ -1128,9 +1331,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 17 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -1157,14 +1360,19 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 17 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 16);
+ (void)yyg;
return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner)
@@ -1190,7 +1398,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -1207,14 +1415,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
/* Reset buffer status. */
- fts0trestart(yyin ,yyscanner);
+ yyrestart( yyin , yyscanner);
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( fts0twrap(yyscanner ) )
- return EOF;
+ if ( yywrap( yyscanner ) )
+ return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
@@ -1245,34 +1453,34 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @note This function does not reset the start condition to @c INITIAL .
*/
- void fts0trestart (FILE * input_file , yyscan_t yyscanner)
+ void yyrestart (FILE * input_file , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! YY_CURRENT_BUFFER ){
- fts0tensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- fts0t_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
- fts0t_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
- fts0t_load_buffer_state(yyscanner );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
+ yy_load_buffer_state( yyscanner );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
* @param yyscanner The scanner object.
*/
- void fts0t_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body
* with
- * fts0tpop_buffer_state();
- * fts0tpush_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- fts0tensure_buffer_stack (yyscanner);
+ yyensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1285,17 +1493,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- fts0t_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
/* We don't actually know whether we did this switch during
- * EOF (fts0twrap()) processing, but the only time this flag
- * is looked at is after fts0twrap() is called, so it's safe
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yyg->yy_did_buffer_switch_on_eof = 1;
}
-static void fts0t_load_buffer_state (yyscan_t yyscanner)
+static void yy_load_buffer_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
@@ -1310,35 +1518,35 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE fts0t_create_buffer (FILE * file, int size , yyscan_t yyscanner)
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) fts0talloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in fts0t_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) fts0talloc(b->yy_buf_size + 2 ,yyscanner );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in fts0t_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- fts0t_init_buffer(b,file ,yyscanner);
+ yy_init_buffer( b, file , yyscanner);
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with fts0t_create_buffer()
+ * @param b a buffer created with yy_create_buffer()
* @param yyscanner The scanner object.
*/
- void fts0t_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -1349,28 +1557,28 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- fts0tfree((void *) b->yy_ch_buf ,yyscanner );
+ yyfree( (void *) b->yy_ch_buf , yyscanner );
- fts0tfree((void *) b ,yyscanner );
+ yyfree( (void *) b , yyscanner );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a fts0trestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
- static void fts0t_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
{
int oerrno = errno;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- fts0t_flush_buffer(b ,yyscanner);
+ yy_flush_buffer( b , yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then fts0t_init_buffer was _probably_
- * called from fts0trestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -1379,7 +1587,7 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
}
b->yy_is_interactive = 0;
-
+
errno = oerrno;
}
@@ -1387,7 +1595,7 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
* @param yyscanner The scanner object.
*/
- void fts0t_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
@@ -1408,7 +1616,7 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- fts0t_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -1417,15 +1625,15 @@ static void fts0t_load_buffer_state (yyscan_t yyscanner)
* @param new_buffer The new state.
* @param yyscanner The scanner object.
*/
-void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL)
return;
- fts0tensure_buffer_stack(yyscanner);
+ yyensure_buffer_stack(yyscanner);
- /* This block is copied from fts0t_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -1439,8 +1647,8 @@ void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
yyg->yy_buffer_stack_top++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from fts0t_switch_to_buffer. */
- fts0t_load_buffer_state(yyscanner );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
@@ -1448,19 +1656,19 @@ void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
* The next element becomes the new top.
* @param yyscanner The scanner object.
*/
-void fts0tpop_buffer_state (yyscan_t yyscanner)
+void yypop_buffer_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER)
return;
- fts0t_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
+ yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
YY_CURRENT_BUFFER_LVALUE = NULL;
if (yyg->yy_buffer_stack_top > 0)
--yyg->yy_buffer_stack_top;
if (YY_CURRENT_BUFFER) {
- fts0t_load_buffer_state(yyscanner );
+ yy_load_buffer_state( yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
}
@@ -1468,9 +1676,9 @@ void fts0tpop_buffer_state (yyscan_t yyscanner)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void fts0tensure_buffer_stack (yyscan_t yyscanner)
+static void yyensure_buffer_stack (yyscan_t yyscanner)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -1479,12 +1687,12 @@ static void fts0tensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
- yyg->yy_buffer_stack = (struct yy_buffer_state**)fts0talloc
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in fts0tensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
@@ -1496,15 +1704,15 @@ static void fts0tensure_buffer_stack (yyscan_t yyscanner)
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
- num_to_alloc = static_cast(yyg->yy_buffer_stack_max + grow_size);
- yyg->yy_buffer_stack = (struct yy_buffer_state**)fts0trealloc
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in fts0tensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -1518,77 +1726,77 @@ static void fts0tensure_buffer_stack (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE fts0t_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) fts0talloc(sizeof( struct yy_buffer_state ) ,yyscanner );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in fts0t_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = static_cast(b->yy_buf_size);
+ b->yy_input_file = NULL;
+ b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- fts0t_switch_to_buffer(b ,yyscanner );
+ yy_switch_to_buffer( b , yyscanner );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to fts0tlex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * fts0t_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE fts0t_scan_string (yyconst char * yystr , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
{
-
- return fts0t_scan_bytes(yystr,static_cast(strlen(yystr)) ,yyscanner);
+
+ return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
}
-/** Setup the input buffer state to scan the given bytes. The next call to fts0tlex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE fts0t_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) fts0talloc(n ,yyscanner );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n , yyscanner );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in fts0t_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = fts0t_scan_buffer(buf,n ,yyscanner);
+ b = yy_scan_buffer( buf, n , yyscanner);
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in fts0t_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -1602,9 +1810,11 @@ YY_BUFFER_STATE fts0t_scan_bytes (yyconst char * yybytes, int _yybytes_len , y
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
{
- (void) fprintf( stderr, "%s\n", msg );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -1630,7 +1840,7 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
-YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner)
+YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyextra;
@@ -1639,33 +1849,33 @@ YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner)
/** Get the current line number.
* @param yyscanner The scanner object.
*/
-int fts0tget_lineno (yyscan_t yyscanner)
+int yyget_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yylineno;
}
/** Get the current column number.
* @param yyscanner The scanner object.
*/
-int fts0tget_column (yyscan_t yyscanner)
+int yyget_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yycolumn;
}
/** Get the input stream.
* @param yyscanner The scanner object.
*/
-FILE *fts0tget_in (yyscan_t yyscanner)
+FILE *yyget_in (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyin;
@@ -1674,7 +1884,7 @@ FILE *fts0tget_in (yyscan_t yyscanner)
/** Get the output stream.
* @param yyscanner The scanner object.
*/
-FILE *fts0tget_out (yyscan_t yyscanner)
+FILE *yyget_out (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyout;
@@ -1683,7 +1893,7 @@ FILE *fts0tget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int fts0tget_leng (yyscan_t yyscanner)
+int yyget_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
@@ -1693,7 +1903,7 @@ int fts0tget_leng (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
-char *fts0tget_text (yyscan_t yyscanner)
+char *yyget_text (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yytext;
@@ -1703,90 +1913,88 @@ char *fts0tget_text (yyscan_t yyscanner)
* @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object.
*/
-void fts0tset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
+void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyextra = user_defined ;
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
* @param yyscanner The scanner object.
*/
-void fts0tset_lineno (int line_number , yyscan_t yyscanner)
+void yyset_lineno (int _line_number , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "fts0tset_lineno called with no buffer" , yyscanner);
-
- yylineno = line_number;
+ YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
+
+ yylineno = _line_number;
}
/** Set the current column.
- * @param line_number
+ * @param _column_no column number
* @param yyscanner The scanner object.
*/
-void fts0tset_column (int column_no , yyscan_t yyscanner)
+void yyset_column (int _column_no , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "fts0tset_column called with no buffer" , yyscanner);
-
- yycolumn = column_no;
+ YY_FATAL_ERROR( "yyset_column called with no buffer" );
+
+ yycolumn = _column_no;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
* @param yyscanner The scanner object.
- * @see fts0t_switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void fts0tset_in (FILE * in_str , yyscan_t yyscanner)
+void yyset_in (FILE * _in_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
+ yyin = _in_str ;
}
-void fts0tset_out (FILE * out_str , yyscan_t yyscanner)
+void yyset_out (FILE * _out_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
+ yyout = _out_str ;
}
-int fts0tget_debug (yyscan_t yyscanner)
+int yyget_debug (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yy_flex_debug;
}
-void fts0tset_debug (int bdebug , yyscan_t yyscanner)
+void yyset_debug (int _bdebug , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
/* Accessor methods for yylval and yylloc */
/* User-visible API */
-/* fts0tlex_init is special because it creates the scanner itself, so it is
+/* yylex_init is special because it creates the scanner itself, so it is
* the ONLY reentrant function that doesn't take the scanner as the last argument.
* That's why we explicitly handle the declaration, instead of using our macros.
*/
-
-int fts0tlex_init(yyscan_t* ptr_yy_globals)
-
+int yylex_init(yyscan_t* ptr_yy_globals)
{
if (ptr_yy_globals == NULL){
errno = EINVAL;
return 1;
}
- *ptr_yy_globals = (yyscan_t) fts0talloc ( sizeof( struct yyguts_t ), NULL );
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
@@ -1799,27 +2007,25 @@ int fts0tlex_init(yyscan_t* ptr_yy_globals)
return yy_init_globals ( *ptr_yy_globals );
}
-/* fts0tlex_init_extra has the same functionality as fts0tlex_init, but follows the
+/* yylex_init_extra has the same functionality as yylex_init, but follows the
* convention of taking the scanner as the last argument. Note however, that
* this is a *pointer* to a scanner, as it will be allocated by this call (and
* is the reason, too, why this function also must handle its own declaration).
- * The user defined value in the first argument will be available to fts0talloc in
+ * The user defined value in the first argument will be available to yyalloc in
* the yyextra field.
*/
-
-int fts0tlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
-
+int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
{
struct yyguts_t dummy_yyguts;
- fts0tset_extra (yy_user_defined, &dummy_yyguts);
+ yyset_extra (yy_user_defined, &dummy_yyguts);
if (ptr_yy_globals == NULL){
errno = EINVAL;
return 1;
}
- *ptr_yy_globals = (yyscan_t) fts0talloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
@@ -1830,7 +2036,7 @@ int fts0tlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
- fts0tset_extra (yy_user_defined, *ptr_yy_globals);
+ yyset_extra (yy_user_defined, *ptr_yy_globals);
return yy_init_globals ( *ptr_yy_globals );
}
@@ -1839,13 +2045,13 @@ static int yy_init_globals (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from fts0tlex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
- yyg->yy_buffer_stack = 0;
+ yyg->yy_buffer_stack = NULL;
yyg->yy_buffer_stack_top = 0;
yyg->yy_buffer_stack_max = 0;
- yyg->yy_c_buf_p = (char *) 0;
+ yyg->yy_c_buf_p = NULL;
yyg->yy_init = 0;
yyg->yy_start = 0;
@@ -1858,42 +2064,42 @@ static int yy_init_globals (yyscan_t yyscanner)
yyin = stdin;
yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
- * fts0tlex_init()
+ * yylex_init()
*/
return 0;
}
-/* fts0tlex_destroy is for both reentrant and non-reentrant scanners. */
-int fts0tlex_destroy (yyscan_t yyscanner)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- fts0t_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
+ yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
- fts0tpop_buffer_state(yyscanner);
+ yypop_buffer_state(yyscanner);
}
/* Destroy the stack itself. */
- fts0tfree(yyg->yy_buffer_stack ,yyscanner);
+ yyfree(yyg->yy_buffer_stack , yyscanner);
yyg->yy_buffer_stack = NULL;
/* Destroy the start condition stack. */
- fts0tfree(yyg->yy_start_stack ,yyscanner );
+ yyfree( yyg->yy_start_stack , yyscanner );
yyg->yy_start_stack = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * fts0tlex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( yyscanner);
/* Destroy the main struct (reentrant only). */
- fts0tfree ( yyscanner , yyscanner );
+ yyfree ( yyscanner , yyscanner );
yyscanner = NULL;
return 0;
}
@@ -1903,8 +2109,11 @@ int fts0tlex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
@@ -1912,7 +2121,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yys
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
{
int n;
for ( n = 0; s[n]; ++n )
@@ -1922,13 +2131,18 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_A
}
#endif
-void *fts0talloc (yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void *yyalloc (yy_size_t size , yyscan_t yyscanner)
{
- return (void *) malloc( size );
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ return malloc(size);
}
-void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -1936,12 +2150,14 @@ void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void fts0tfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
+void yyfree (void * ptr , yyscan_t yyscanner)
{
- free( (char *) ptr ); /* see fts0trealloc() for (char *) cast */
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ (void)yyg;
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
@@ -1949,4 +2165,3 @@ void fts0tfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)
#line 68 "fts0tlex.l"
-
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index c9db941b4bf6e011ec3a918e0ea1f179e7e80695..583ee3b54f9585f4294d9606257c77219ee1baeb 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -5,7 +5,7 @@ Copyright (c) 2013, 2018, MariaDB Corporation.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -687,9 +687,25 @@ ib_cb_t innodb_api_cb[] = {
static void innodb_remember_check_sysvar_funcs();
mysql_var_check_func check_sysvar_enum;
+/** Update callback for SET [SESSION] innodb_default_encryption_key_id */
+static void
+innodb_default_encryption_key_id_update(THD* thd, st_mysql_sys_var* var,
+ void* var_ptr, const void *save)
+{
+ uint key_id = *static_cast(save);
+ if (key_id != FIL_DEFAULT_ENCRYPTION_KEY
+ && !encryption_key_id_exists(key_id)) {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_ARGUMENTS,
+ "innodb_default_encryption_key=%u"
+ " is not available", key_id);
+ }
+ *static_cast(var_ptr) = key_id;
+}
+
static MYSQL_THDVAR_UINT(default_encryption_key_id, PLUGIN_VAR_RQCMDARG,
"Default encryption key id used for table encryption.",
- NULL, NULL,
+ NULL, innodb_default_encryption_key_id_update,
FIL_DEFAULT_ENCRYPTION_KEY, 1, UINT_MAX32, 0);
/**
@@ -8911,8 +8927,8 @@ ha_innobase::write_row(
/* We need the upper limit of the col type to check for
whether we update the table autoinc counter or not. */
- col_max_value = innobase_get_int_col_max_value(
- table->next_number_field);
+ col_max_value =
+ table->next_number_field->get_max_int_value();
/* Get the value that MySQL attempted to store in the table.*/
auto_inc = table->next_number_field->val_uint();
@@ -8989,15 +9005,33 @@ ha_innobase::write_row(
/* This should filter out the negative
values set explicitly by the user. */
if (auto_inc <= col_max_value) {
- ut_a(prebuilt->autoinc_increment > 0);
ulonglong offset;
ulonglong increment;
dberr_t err;
- offset = prebuilt->autoinc_offset;
- increment = prebuilt->autoinc_increment;
-
+#ifdef WITH_WSREP
+ /* Applier threads which are processing
+ ROW events and don't go through server
+ level autoinc processing, therefore
+ prebuilt autoinc values don't get
+ properly assigned. Fetch values from
+ server side. */
+ if (wsrep_on(user_thd) &&
+ wsrep_thd_exec_mode(user_thd) == REPL_RECV)
+ {
+ wsrep_thd_auto_increment_variables(
+ user_thd, &offset, &increment);
+ }
+ else
+ {
+#endif /* WITH_WSREP */
+ ut_a(prebuilt->autoinc_increment > 0);
+ offset = prebuilt->autoinc_offset;
+ increment = prebuilt->autoinc_increment;
+#ifdef WITH_WSREP
+ }
+#endif /* WITH_WSREP */
auto_inc = innobase_next_autoinc(
auto_inc,
1, increment, offset,
@@ -9509,17 +9543,35 @@ ha_innobase::update_row(
/* We need the upper limit of the col type to check for
whether we update the table autoinc counter or not. */
- col_max_value = innobase_get_int_col_max_value(
- table->next_number_field);
+ col_max_value =
+ table->next_number_field->get_max_int_value();
if (auto_inc <= col_max_value && auto_inc != 0) {
ulonglong offset;
ulonglong increment;
- offset = prebuilt->autoinc_offset;
- increment = prebuilt->autoinc_increment;
-
+#ifdef WITH_WSREP
+ /* Applier threads which are processing
+ ROW events and don't go through server
+ level autoinc processing, therefore
+ prebuilt autoinc values don't get
+ properly assigned. Fetch values from
+ server side. */
+ if (wsrep_on(user_thd) &&
+ wsrep_thd_exec_mode(user_thd) == REPL_RECV)
+ {
+ wsrep_thd_auto_increment_variables(
+ user_thd, &offset, &increment);
+ }
+ else
+ {
+#endif /* WITH_WSREP */
+ offset = prebuilt->autoinc_offset;
+ increment = prebuilt->autoinc_increment;
+#ifdef WITH_WSREP
+ }
+#endif /* WITH_WSREP */
auto_inc = innobase_next_autoinc(
auto_inc, 1, increment, offset, col_max_value);
@@ -11036,7 +11088,7 @@ wsrep_append_foreign_key(
key_type,
copy);
if (rcode) {
- DBUG_PRINT("wsrep", ("row key failed: %zu", rcode));
+ DBUG_PRINT("wsrep", ("row key failed: %lu", rcode));
WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu",
(wsrep_thd_query(thd)) ?
wsrep_thd_query(thd) : "void", rcode);
@@ -11394,8 +11446,7 @@ create_table_def(
const char* remote_path, /*!< in: Remote path or zero length-string */
ulint flags, /*!< in: table flags */
ulint flags2, /*!< in: table flags2 */
- fil_encryption_t mode, /*!< in: encryption mode */
- ulint key_id) /*!< in: encryption key_id */
+ const ha_table_option_struct*options)
{
THD* thd = trx->mysql_thd;
dict_table_t* table;
@@ -11586,7 +11637,9 @@ create_table_def(
fts_add_doc_id_column(table, heap);
}
- err = row_create_table_for_mysql(table, trx, false, mode, key_id);
+ err = row_create_table_for_mysql(table, trx, false,
+ fil_encryption_t(options->encryption),
+ options->encryption_key_id);
mem_heap_free(heap);
@@ -12417,21 +12470,47 @@ ha_innobase::check_table_options(
enum row_type row_format = table->s->row_type;
ha_table_option_struct *options= table->s->option_struct;
atomic_writes_t awrites = (atomic_writes_t)options->atomic_writes;
- fil_encryption_t encrypt = (fil_encryption_t)options->encryption;
- if (encrypt != FIL_ENCRYPTION_DEFAULT && !use_tablespace) {
+ switch (options->encryption) {
+ case FIL_ENCRYPTION_OFF:
+ if (options->encryption_key_id != FIL_DEFAULT_ENCRYPTION_KEY) {
+ push_warning(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ HA_WRONG_CREATE_OPTION,
+ "InnoDB: ENCRYPTED=NO implies"
+ " ENCRYPTION_KEY_ID=1");
+ compile_time_assert(FIL_DEFAULT_ENCRYPTION_KEY == 1);
+ }
+ if (srv_encrypt_tables != 2) {
+ break;
+ }
push_warning(
thd, Sql_condition::WARN_LEVEL_WARN,
HA_WRONG_CREATE_OPTION,
- "InnoDB: ENCRYPTED requires innodb_file_per_table");
+ "InnoDB: ENCRYPTED=NO cannot be used with"
+ " innodb_encrypt_tables=FORCE");
return "ENCRYPTED";
+ case FIL_ENCRYPTION_DEFAULT:
+ if (!srv_encrypt_tables) {
+ break;
+ }
+ /* fall through */
+ case FIL_ENCRYPTION_ON:
+ if (!encryption_key_id_exists(options->encryption_key_id)) {
+ push_warning_printf(
+ thd, Sql_condition::WARN_LEVEL_WARN,
+ HA_WRONG_CREATE_OPTION,
+ "InnoDB: ENCRYPTION_KEY_ID %u not available",
+ options->encryption_key_id);
+ return "ENCRYPTION_KEY_ID";
+ }
}
- if (encrypt == FIL_ENCRYPTION_OFF && srv_encrypt_tables == 2) {
- push_warning(
- thd, Sql_condition::WARN_LEVEL_WARN,
- HA_WRONG_CREATE_OPTION,
- "InnoDB: ENCRYPTED=OFF cannot be used when innodb_encrypt_tables=FORCE");
+ if (!use_tablespace && options->encryption != FIL_ENCRYPTION_DEFAULT) {
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+ HA_WRONG_CREATE_OPTION,
+ "InnoDB: ENCRYPTED requires"
+ " innodb_file_per_table");
return "ENCRYPTED";
}
@@ -12507,47 +12586,6 @@ ha_innobase::check_table_options(
}
}
- /* If encryption is set up make sure that used key_id is found */
- if (encrypt == FIL_ENCRYPTION_ON ||
- (encrypt == FIL_ENCRYPTION_DEFAULT && srv_encrypt_tables)) {
- if (!encryption_key_id_exists((unsigned int)options->encryption_key_id)) {
- push_warning_printf(
- thd, Sql_condition::WARN_LEVEL_WARN,
- HA_WRONG_CREATE_OPTION,
- "InnoDB: ENCRYPTION_KEY_ID %u not available",
- (uint)options->encryption_key_id
- );
- return "ENCRYPTION_KEY_ID";
-
- }
- }
-
- /* Ignore nondefault key_id if encryption is set off */
- if (encrypt == FIL_ENCRYPTION_OFF &&
- options->encryption_key_id != THDVAR(thd, default_encryption_key_id)) {
- push_warning_printf(
- thd, Sql_condition::WARN_LEVEL_WARN,
- HA_WRONG_CREATE_OPTION,
- "InnoDB: Ignored ENCRYPTION_KEY_ID %u when encryption is disabled",
- (uint)options->encryption_key_id
- );
- options->encryption_key_id = FIL_DEFAULT_ENCRYPTION_KEY;
- }
-
- /* If default encryption is used and encryption is disabled, you may
- not use nondefault encryption_key_id as it is not stored anywhere. */
- if (encrypt == FIL_ENCRYPTION_DEFAULT
- && !srv_encrypt_tables
- && options->encryption_key_id != FIL_DEFAULT_ENCRYPTION_KEY) {
- compile_time_assert(FIL_DEFAULT_ENCRYPTION_KEY == 1);
- push_warning_printf(
- thd, Sql_condition::WARN_LEVEL_WARN,
- HA_WRONG_CREATE_OPTION,
- "InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1"
- );
- return "ENCRYPTION_KEY_ID";
- }
-
/* Check atomic writes requirements */
if (awrites == ATOMIC_WRITES_ON ||
(awrites == ATOMIC_WRITES_DEFAULT && srv_use_atomic_writes)) {
@@ -12605,10 +12643,6 @@ ha_innobase::create(
const char* stmt;
size_t stmt_len;
- /* Cache table options */
- ha_table_option_struct *options= form->s->option_struct;
- fil_encryption_t encrypt = (fil_encryption_t)options->encryption;
- uint key_id = (uint)options->encryption_key_id;
DBUG_ENTER("ha_innobase::create");
@@ -12631,7 +12665,7 @@ ha_innobase::create(
/* Validate create options if innodb_strict_mode is set. */
if (create_options_are_invalid(
- thd, form, create_info, use_tablespace)) {
+ thd, form, create_info, use_tablespace)) {
DBUG_RETURN(HA_WRONG_CREATE_OPTION);
}
@@ -12707,7 +12741,8 @@ ha_innobase::create(
row_mysql_lock_data_dictionary(trx);
error = create_table_def(trx, form, norm_name, temp_path,
- remote_path, flags, flags2, encrypt, key_id);
+ remote_path, flags, flags2,
+ form->s->option_struct);
if (error) {
goto cleanup;
}
@@ -16744,12 +16779,11 @@ ha_innobase::get_auto_increment(
current, autoinc);
if (!wsrep_on(ha_thd()))
{
- current = autoinc - prebuilt->autoinc_increment;
+ current = autoinc - prebuilt->autoinc_increment;
+ current = innobase_next_autoinc(
+ current, 1, increment, offset, col_max_value);
}
- current = innobase_next_autoinc(
- current, 1, increment, offset, col_max_value);
-
dict_table_autoinc_initialize(prebuilt->table, current);
*first_value = current;
@@ -19114,8 +19148,10 @@ innodb_track_changed_pages_validate(
return 0;
}
- if (intbuf == srv_track_changed_pages)
+ if (intbuf == srv_track_changed_pages) { // == 0
+ *reinterpret_cast(save) = srv_track_changed_pages;
return 0;
+ }
return 1;
}
diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc
index 3d55ca839cb507376786fe2809e2d94237bc4ded..808f8529a772eb84c7e02b6b9f6d769bb7573fab 100644
--- a/storage/xtradb/handler/handler0alter.cc
+++ b/storage/xtradb/handler/handler0alter.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2018, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2019, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -332,7 +332,7 @@ ha_innobase::check_if_supported_inplace_alter(
NULL to a NOT NULL value. */
if ((ha_alter_info->handler_flags
& Alter_inplace_info::ALTER_COLUMN_NOT_NULLABLE)
- && !thd_is_strict_mode(user_thd)) {
+ && (ha_alter_info->ignore || !thd_is_strict_mode(user_thd))) {
ha_alter_info->unsupported_reason = innobase_get_err_msg(
ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL);
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
@@ -1516,8 +1516,8 @@ innobase_check_index_keys(
index
@param[in] altered_table MySQL table that is being altered
@param[in] key_part MySQL key definition
-@param[out] index_field index field defition for key_part */
-static MY_ATTRIBUTE((nonnull(2,3)))
+@param[out] index_field index field definition for key_part */
+static MY_ATTRIBUTE((nonnull))
void
innobase_create_index_field_def(
bool new_clustered,
@@ -1532,10 +1532,6 @@ innobase_create_index_field_def(
DBUG_ENTER("innobase_create_index_field_def");
- ut_ad(key_part);
- ut_ad(index_field);
- ut_ad(altered_table);
-
/* Virtual columns are not stored in InnoDB data dictionary, thus
if there is virtual columns we need to skip them to find the
correct field. */
@@ -1599,8 +1595,6 @@ innobase_create_index_def(
DBUG_ENTER("innobase_create_index_def");
DBUG_ASSERT(!key_clustered || new_clustered);
- ut_ad(altered_table);
-
index->fields = static_cast(
mem_heap_alloc(heap, n_fields * sizeof *index->fields));
index->ind_type = 0;
@@ -2187,6 +2181,23 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
@return whether the table will be rebuilt */
bool need_rebuild () const { return(old_table != new_table); }
+ /** Share context between partitions.
+ @param[in] ctx context from another partition of the table */
+ void set_shared_data(const inplace_alter_handler_ctx& ctx)
+ {
+ if (add_autoinc != ULINT_UNDEFINED) {
+ const ha_innobase_inplace_ctx& ha_ctx =
+ static_cast
+ (ctx);
+ /* When adding an AUTO_INCREMENT column to a
+ partitioned InnoDB table, we must share the
+ sequence for all partitions. */
+ ut_ad(ha_ctx.add_autoinc == add_autoinc);
+ ut_ad(ha_ctx.sequence.last());
+ sequence = ha_ctx.sequence;
+ }
+ }
+
private:
// Disable copying
ha_innobase_inplace_ctx(const ha_innobase_inplace_ctx&);
@@ -2733,7 +2744,7 @@ prepare_inplace_alter_table_dict(
(ha_alter_info->handler_ctx);
DBUG_ASSERT((ctx->add_autoinc != ULINT_UNDEFINED)
- == (ctx->sequence.m_max_value > 0));
+ == (ctx->sequence.max_value() > 0));
DBUG_ASSERT(!ctx->num_to_drop_index == !ctx->drop_index);
DBUG_ASSERT(!ctx->num_to_drop_fk == !ctx->drop_fk);
DBUG_ASSERT(!add_fts_doc_id || add_fts_doc_id_idx);
@@ -3097,10 +3108,18 @@ prepare_inplace_alter_table_dict(
/* Create the indexes in SYS_INDEXES and load into dictionary. */
for (ulint a = 0; a < ctx->num_to_add_index; a++) {
-
+ DBUG_EXECUTE_IF(
+ "create_index_metadata_fail",
+ if (a + 1 == ctx->num_to_add_index) {
+ ctx->trx->error_state = DB_OUT_OF_FILE_SPACE;
+ ctx->add_index[a] = NULL;
+ goto index_created;
+ });
ctx->add_index[a] = row_merge_create_index(
ctx->trx, ctx->new_table, &index_defs[a]);
-
+#ifndef DBUG_OFF
+index_created:
+#endif
add_key_nums[a] = index_defs[a].key_number;
if (!ctx->add_index[a]) {
@@ -4837,7 +4856,6 @@ innobase_rename_columns_try(
ha_alter_info->alter_info->create_list);
uint i = 0;
- DBUG_ASSERT(ctx);
DBUG_ASSERT(ha_alter_info->handler_flags
& Alter_inplace_info::ALTER_COLUMN_NAME);
@@ -5021,7 +5039,6 @@ innobase_update_foreign_try(
ulint i;
DBUG_ENTER("innobase_update_foreign_try");
- DBUG_ASSERT(ctx);
foreign_id = dict_table_get_highest_foreign_id(ctx->new_table);
@@ -6181,7 +6198,6 @@ ha_innobase::commit_inplace_alter_table(
if (!commit_cache_norebuild(ctx, table, trx)) {
fk_fail = true;
- ut_ad(!prebuilt->trx->check_foreigns);
}
innobase_rename_columns_cache(ha_alter_info, table,
diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc
index 201d2ad13a59b4db44dc10e0c173bcef9c209656..5c2d65e5799a9b8a52cfa9d0009440079380d386 100644
--- a/storage/xtradb/handler/i_s.cc
+++ b/storage/xtradb/handler/i_s.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2019, MariaDB Corporation.
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
@@ -9120,78 +9120,105 @@ i_s_innodb_mutexes_fill_table(
DBUG_RETURN(0);
}
- mutex_enter(&mutex_list_mutex);
+ {
+ struct Locking
+ {
+ Locking() { mutex_enter(&mutex_list_mutex); }
+ ~Locking() { mutex_exit(&mutex_list_mutex); }
+ } locking;
+
+ for (mutex = UT_LIST_GET_FIRST(mutex_list); mutex != NULL;
+ mutex = UT_LIST_GET_NEXT(list, mutex)) {
+ if (mutex->count_os_wait == 0) {
+ continue;
+ }
- for (mutex = UT_LIST_GET_FIRST(mutex_list); mutex != NULL;
- mutex = UT_LIST_GET_NEXT(list, mutex)) {
- if (mutex->count_os_wait == 0) {
- continue;
- }
+ if (buf_pool_is_block_mutex(mutex)) {
+ block_mutex = mutex;
+ block_mutex_oswait_count
+ += mutex->count_os_wait;
+ continue;
+ }
- if (buf_pool_is_block_mutex(mutex)) {
- block_mutex = mutex;
- block_mutex_oswait_count += mutex->count_os_wait;
- continue;
+ OK(field_store_string(fields[MUTEXES_NAME],
+ mutex->cmutex_name));
+ OK(field_store_string(
+ fields[MUTEXES_CREATE_FILE],
+ innobase_basename(mutex->cfile_name)));
+ OK(field_store_ulint(fields[MUTEXES_CREATE_LINE],
+ mutex->cline));
+ OK(field_store_ulint(fields[MUTEXES_OS_WAITS],
+ mutex->count_os_wait));
+ OK(schema_table_store_record(thd, tables->table));
}
- OK(field_store_string(fields[MUTEXES_NAME], mutex->cmutex_name));
- OK(field_store_string(fields[MUTEXES_CREATE_FILE], innobase_basename(mutex->cfile_name)));
- OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], mutex->cline));
- OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)mutex->count_os_wait));
- OK(schema_table_store_record(thd, tables->table));
- }
-
- if (block_mutex) {
- char buf1[IO_SIZE];
-
- my_snprintf(buf1, sizeof buf1, "combined %s",
- innobase_basename(block_mutex->cfile_name));
-
- OK(field_store_string(fields[MUTEXES_NAME], block_mutex->cmutex_name));
- OK(field_store_string(fields[MUTEXES_CREATE_FILE], buf1));
- OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], block_mutex->cline));
- OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)block_mutex_oswait_count));
- OK(schema_table_store_record(thd, tables->table));
+ if (block_mutex) {
+ char buf1[IO_SIZE];
+
+ my_snprintf(buf1, sizeof buf1, "combined %s",
+ innobase_basename(block_mutex->cfile_name));
+
+ OK(field_store_string(fields[MUTEXES_NAME],
+ block_mutex->cmutex_name));
+ OK(field_store_string(fields[MUTEXES_CREATE_FILE],
+ buf1));
+ OK(field_store_ulint(fields[MUTEXES_CREATE_LINE],
+ block_mutex->cline));
+ OK(field_store_ulint(fields[MUTEXES_OS_WAITS],
+ block_mutex_oswait_count));
+ OK(schema_table_store_record(thd, tables->table));
+ }
}
- mutex_exit(&mutex_list_mutex);
+ {
+ struct Locking
+ {
+ Locking() { mutex_enter(&rw_lock_list_mutex); }
+ ~Locking() { mutex_exit(&rw_lock_list_mutex); }
+ } locking;
+
+ for (lock = UT_LIST_GET_FIRST(rw_lock_list); lock != NULL;
+ lock = UT_LIST_GET_NEXT(list, lock)) {
+ if (lock->count_os_wait == 0) {
+ continue;
+ }
- mutex_enter(&rw_lock_list_mutex);
+ if (buf_pool_is_block_lock(lock)) {
+ block_lock = lock;
+ block_lock_oswait_count += lock->count_os_wait;
+ continue;
+ }
- for (lock = UT_LIST_GET_FIRST(rw_lock_list); lock != NULL;
- lock = UT_LIST_GET_NEXT(list, lock)) {
- if (lock->count_os_wait == 0) {
- continue;
+ OK(field_store_string(fields[MUTEXES_NAME],
+ lock->lock_name));
+ OK(field_store_string(
+ fields[MUTEXES_CREATE_FILE],
+ innobase_basename(lock->cfile_name)));
+ OK(field_store_ulint(fields[MUTEXES_CREATE_LINE],
+ lock->cline));
+ OK(field_store_ulint(fields[MUTEXES_OS_WAITS],
+ lock->count_os_wait));
+ OK(schema_table_store_record(thd, tables->table));
}
- if (buf_pool_is_block_lock(lock)) {
- block_lock = lock;
- block_lock_oswait_count += lock->count_os_wait;
- continue;
+ if (block_lock) {
+ char buf1[IO_SIZE];
+
+ my_snprintf(buf1, sizeof buf1, "combined %s",
+ innobase_basename(block_lock->cfile_name));
+
+ OK(field_store_string(fields[MUTEXES_NAME],
+ block_lock->lock_name));
+ OK(field_store_string(fields[MUTEXES_CREATE_FILE],
+ buf1));
+ OK(field_store_ulint(fields[MUTEXES_CREATE_LINE],
+ block_lock->cline));
+ OK(field_store_ulint(fields[MUTEXES_OS_WAITS],
+ block_lock_oswait_count));
+ OK(schema_table_store_record(thd, tables->table));
}
-
- OK(field_store_string(fields[MUTEXES_NAME], lock->lock_name));
- OK(field_store_string(fields[MUTEXES_CREATE_FILE], innobase_basename(lock->cfile_name)));
- OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], lock->cline));
- OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)lock->count_os_wait));
- OK(schema_table_store_record(thd, tables->table));
- }
-
- if (block_lock) {
- char buf1[IO_SIZE];
-
- my_snprintf(buf1, sizeof buf1, "combined %s",
- innobase_basename(block_lock->cfile_name));
-
- OK(field_store_string(fields[MUTEXES_NAME], block_lock->lock_name));
- OK(field_store_string(fields[MUTEXES_CREATE_FILE], buf1));
- OK(field_store_ulint(fields[MUTEXES_CREATE_LINE], block_lock->cline));
- OK(field_store_ulint(fields[MUTEXES_OS_WAITS], (longlong)block_lock_oswait_count));
- OK(schema_table_store_record(thd, tables->table));
}
- mutex_exit(&rw_lock_list_mutex);
-
DBUG_RETURN(0);
}
diff --git a/storage/xtradb/include/data0data.ic b/storage/xtradb/include/data0data.ic
index 11499ab928c26e95852ab234e7cdcc9f8bde191d..deac969a03d7a5711377c772f37c02a945b7303b 100644
--- a/storage/xtradb/include/data0data.ic
+++ b/storage/xtradb/include/data0data.ic
@@ -1,6 +1,7 @@
/*****************************************************************************
-Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -41,8 +42,6 @@ dfield_get_type(
/*============*/
const dfield_t* field) /*!< in: SQL data field */
{
- ut_ad(field);
-
return((dtype_t*) &(field->type));
}
#endif /* UNIV_DEBUG */
@@ -72,7 +71,6 @@ dfield_get_data(
/*============*/
const dfield_t* field) /*!< in: field */
{
- ut_ad(field);
ut_ad((field->len == UNIV_SQL_NULL)
|| (field->data != &data_error));
@@ -89,7 +87,6 @@ dfield_get_len(
/*===========*/
const dfield_t* field) /*!< in: field */
{
- ut_ad(field);
ut_ad((field->len == UNIV_SQL_NULL)
|| (field->data != &data_error));
@@ -105,7 +102,6 @@ dfield_set_len(
dfield_t* field, /*!< in: field */
ulint len) /*!< in: length or UNIV_SQL_NULL */
{
- ut_ad(field);
#ifdef UNIV_VALGRIND_DEBUG
if (len != UNIV_SQL_NULL) UNIV_MEM_ASSERT_RW(field->data, len);
#endif /* UNIV_VALGRIND_DEBUG */
@@ -123,8 +119,6 @@ dfield_is_null(
/*===========*/
const dfield_t* field) /*!< in: field */
{
- ut_ad(field);
-
return(field->len == UNIV_SQL_NULL);
}
@@ -137,8 +131,6 @@ dfield_is_ext(
/*==========*/
const dfield_t* field) /*!< in: field */
{
- ut_ad(field);
-
return(field->ext);
}
@@ -150,8 +142,6 @@ dfield_set_ext(
/*===========*/
dfield_t* field) /*!< in/out: field */
{
- ut_ad(field);
-
field->ext = 1;
}
@@ -165,8 +155,6 @@ dfield_set_data(
const void* data, /*!< in: data */
ulint len) /*!< in: length or UNIV_SQL_NULL */
{
- ut_ad(field);
-
#ifdef UNIV_VALGRIND_DEBUG
if (len != UNIV_SQL_NULL) UNIV_MEM_ASSERT_RW(data, len);
#endif /* UNIV_VALGRIND_DEBUG */
@@ -286,8 +274,6 @@ dtuple_get_info_bits(
/*=================*/
const dtuple_t* tuple) /*!< in: tuple */
{
- ut_ad(tuple);
-
return(tuple->info_bits);
}
@@ -300,8 +286,6 @@ dtuple_set_info_bits(
dtuple_t* tuple, /*!< in: tuple */
ulint info_bits) /*!< in: info bits */
{
- ut_ad(tuple);
-
tuple->info_bits = info_bits;
}
@@ -314,8 +298,6 @@ dtuple_get_n_fields_cmp(
/*====================*/
const dtuple_t* tuple) /*!< in: tuple */
{
- ut_ad(tuple);
-
return(tuple->n_fields_cmp);
}
@@ -329,9 +311,7 @@ dtuple_set_n_fields_cmp(
ulint n_fields_cmp) /*!< in: number of fields used in
comparisons in rem0cmp.* */
{
- ut_ad(tuple);
ut_ad(n_fields_cmp <= tuple->n_fields);
-
tuple->n_fields_cmp = n_fields_cmp;
}
@@ -344,8 +324,6 @@ dtuple_get_n_fields(
/*================*/
const dtuple_t* tuple) /*!< in: tuple */
{
- ut_ad(tuple);
-
return(tuple->n_fields);
}
@@ -483,7 +461,6 @@ dtuple_get_data_size(
ulint i;
ulint sum = 0;
- ut_ad(tuple);
ut_ad(dtuple_check_typed(tuple));
ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N);
@@ -517,7 +494,6 @@ dtuple_get_n_ext(
ulint n_fields = tuple->n_fields;
ulint i;
- ut_ad(tuple);
ut_ad(dtuple_check_typed(tuple));
ut_ad(tuple->magic_n == DATA_TUPLE_MAGIC_N);
diff --git a/storage/xtradb/include/dict0crea.ic b/storage/xtradb/include/dict0crea.ic
index 1cbaa47032b55e90f240a888c81313c8f63aec86..3eb3ddfa84efe3aa89bb3acf88ca7e058c776e2e 100644
--- a/storage/xtradb/include/dict0crea.ic
+++ b/storage/xtradb/include/dict0crea.ic
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -65,11 +66,11 @@ dict_create_add_foreign_id(
sprintf(id, "%s_ibfk_%lu", name,
(ulong) (*id_nr)++);
} else {
- char table_name[MAX_TABLE_NAME_LEN + 20] = "";
+ char table_name[MAX_TABLE_NAME_LEN + 21];
uint errors = 0;
- strncpy(table_name, name,
- MAX_TABLE_NAME_LEN + 20);
+ strncpy(table_name, name, (sizeof table_name) - 1);
+ table_name[(sizeof table_name) - 1] = '\0';
innobase_convert_to_system_charset(
strchr(table_name, '/') + 1,
@@ -78,7 +79,8 @@ dict_create_add_foreign_id(
if (errors) {
strncpy(table_name, name,
- MAX_TABLE_NAME_LEN + 20);
+ (sizeof table_name) - 1);
+ table_name[(sizeof table_name) - 1] = '\0';
}
/* no overflow if number < 1e13 */
diff --git a/storage/xtradb/include/dict0dict.ic b/storage/xtradb/include/dict0dict.ic
index 17b4adc10e29c9717f4999f8bedd0c10ba2d55a5..5c0cdbd722765e0b7acf17eb0775b512fcc789b3 100644
--- a/storage/xtradb/include/dict0dict.ic
+++ b/storage/xtradb/include/dict0dict.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
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
@@ -85,9 +85,6 @@ dict_col_type_assert_equal(
const dict_col_t* col, /*!< in: column */
const dtype_t* type) /*!< in: data type */
{
- ut_ad(col);
- ut_ad(type);
-
ut_ad(col->mtype == type->mtype);
ut_ad(col->prtype == type->prtype);
//ut_ad(col->len == type->len);
@@ -161,8 +158,6 @@ dict_col_get_no(
/*============*/
const dict_col_t* col) /*!< in: column */
{
- ut_ad(col);
-
return(col->ind);
}
@@ -177,8 +172,6 @@ dict_col_get_clust_pos(
{
ulint i;
- ut_ad(col);
- ut_ad(clust_index);
ut_ad(dict_index_is_clust(clust_index));
for (i = 0; i < clust_index->n_def; i++) {
@@ -203,7 +196,6 @@ dict_table_get_first_index(
/*=======================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
return(UT_LIST_GET_FIRST(((dict_table_t*) table)->indexes));
@@ -218,9 +210,7 @@ dict_table_get_last_index(
/*=======================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
-
return(UT_LIST_GET_LAST((const_cast(table))
->indexes));
}
@@ -234,9 +224,7 @@ dict_table_get_next_index(
/*======================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(UT_LIST_GET_NEXT(indexes, (dict_index_t*) index));
}
#endif /* UNIV_DEBUG */
@@ -252,7 +240,6 @@ dict_index_is_clust(
const dict_index_t* index) /*!< in: index */
{
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->type & DICT_CLUSTERED);
}
/********************************************************************//**
@@ -265,7 +252,6 @@ dict_index_is_unique(
const dict_index_t* index) /*!< in: index */
{
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->type & DICT_UNIQUE);
}
@@ -279,7 +265,6 @@ dict_index_is_ibuf(
const dict_index_t* index) /*!< in: index */
{
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->type & DICT_IBUF);
}
@@ -292,9 +277,7 @@ dict_index_is_univ(
/*===============*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->type & DICT_UNIVERSAL);
}
@@ -423,7 +406,6 @@ dict_table_get_nth_col(
const dict_table_t* table, /*!< in: table */
ulint pos) /*!< in: position of column */
{
- ut_ad(table);
ut_ad(pos < table->n_def);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
@@ -465,7 +447,6 @@ dict_table_get_sys_col_no(
const dict_table_t* table, /*!< in: table */
ulint sys) /*!< in: DATA_ROW_ID, ... */
{
- ut_ad(table);
ut_ad(sys < DATA_N_SYS_COLS);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
@@ -499,8 +480,6 @@ dict_table_has_fts_index(
/* out: TRUE if table has an FTS index */
dict_table_t* table) /* in: table */
{
- ut_ad(table);
-
return(DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS));
}
@@ -1049,8 +1028,7 @@ dict_table_x_lock_indexes(
{
dict_index_t* index;
- ut_a(table);
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys->mutex));
/* Loop through each index of the table and lock them */
for (index = dict_table_get_first_index(table);
@@ -1091,8 +1069,7 @@ dict_table_x_unlock_indexes(
{
dict_index_t* index;
- ut_a(table);
- ut_ad(mutex_own(&(dict_sys->mutex)));
+ ut_ad(mutex_own(&dict_sys->mutex));
for (index = dict_table_get_first_index(table);
index != NULL;
@@ -1114,9 +1091,7 @@ dict_index_get_n_fields(
representation of index (in
the dictionary cache) */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
-
return(index->n_fields);
}
@@ -1133,10 +1108,8 @@ dict_index_get_n_unique(
const dict_index_t* index) /*!< in: an internal representation
of index (in the dictionary cache) */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(index->cached);
-
return(index->n_uniq);
}
@@ -1152,7 +1125,6 @@ dict_index_get_n_unique_in_tree(
const dict_index_t* index) /*!< in: an internal representation
of index (in the dictionary cache) */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(index->cached);
@@ -1191,7 +1163,6 @@ dict_index_get_nth_field(
const dict_index_t* index, /*!< in: index */
ulint pos) /*!< in: position of field */
{
- ut_ad(index);
ut_ad(pos < index->n_def);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
@@ -1209,7 +1180,6 @@ dict_index_get_sys_col_pos(
const dict_index_t* index, /*!< in: index */
ulint type) /*!< in: DATA_ROW_ID, ... */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
ut_ad(!dict_index_is_univ(index));
@@ -1234,8 +1204,6 @@ dict_field_get_col(
/*===============*/
const dict_field_t* field) /*!< in: index field */
{
- ut_ad(field);
-
return(field->col);
}
@@ -1341,7 +1309,6 @@ dict_index_get_page(
/*================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(index->page);
@@ -1356,7 +1323,6 @@ dict_index_get_lock(
/*================*/
dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(&(index->lock));
diff --git a/storage/xtradb/include/fts0blex.h b/storage/xtradb/include/fts0blex.h
index d0e4cae067871804c03702ec41d186b2bd4c6b29..10dc314d5d4df13e9d97b0f20be66ba1e2719622 100644
--- a/storage/xtradb/include/fts0blex.h
+++ b/storage/xtradb/include/fts0blex.h
@@ -12,12 +12,222 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define fts0b_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer fts0b_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define fts0b_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer fts0b_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define fts0b_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer fts0b_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define fts0b_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string fts0b_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define fts0b_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes fts0b_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define fts0b_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer fts0b_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define fts0b_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer fts0b_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define fts0b_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state fts0b_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define fts0b_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer fts0b_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define fts0bpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state fts0bpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define fts0bpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state fts0bpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define fts0bensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack fts0bensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define fts0blex_ALREADY_DEFINED
+#else
+#define yylex fts0blex
+#endif
+
+#ifdef yyrestart
+#define fts0brestart_ALREADY_DEFINED
+#else
+#define yyrestart fts0brestart
+#endif
+
+#ifdef yylex_init
+#define fts0blex_init_ALREADY_DEFINED
+#else
+#define yylex_init fts0blex_init
+#endif
+
+#ifdef yylex_init_extra
+#define fts0blex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra fts0blex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define fts0blex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy fts0blex_destroy
+#endif
+
+#ifdef yyget_debug
+#define fts0bget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug fts0bget_debug
+#endif
+
+#ifdef yyset_debug
+#define fts0bset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug fts0bset_debug
+#endif
+
+#ifdef yyget_extra
+#define fts0bget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra fts0bget_extra
+#endif
+
+#ifdef yyset_extra
+#define fts0bset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra fts0bset_extra
+#endif
+
+#ifdef yyget_in
+#define fts0bget_in_ALREADY_DEFINED
+#else
+#define yyget_in fts0bget_in
+#endif
+
+#ifdef yyset_in
+#define fts0bset_in_ALREADY_DEFINED
+#else
+#define yyset_in fts0bset_in
+#endif
+
+#ifdef yyget_out
+#define fts0bget_out_ALREADY_DEFINED
+#else
+#define yyget_out fts0bget_out
+#endif
+
+#ifdef yyset_out
+#define fts0bset_out_ALREADY_DEFINED
+#else
+#define yyset_out fts0bset_out
+#endif
+
+#ifdef yyget_leng
+#define fts0bget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng fts0bget_leng
+#endif
+
+#ifdef yyget_text
+#define fts0bget_text_ALREADY_DEFINED
+#else
+#define yyget_text fts0bget_text
+#endif
+
+#ifdef yyget_lineno
+#define fts0bget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno fts0bget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define fts0bset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno fts0bset_lineno
+#endif
+
+#ifdef yyget_column
+#define fts0bget_column_ALREADY_DEFINED
+#else
+#define yyget_column fts0bget_column
+#endif
+
+#ifdef yyset_column
+#define fts0bset_column_ALREADY_DEFINED
+#else
+#define yyset_column fts0bset_column
+#endif
+
+#ifdef yywrap
+#define fts0bwrap_ALREADY_DEFINED
+#else
+#define yywrap fts0bwrap
+#endif
+
+#ifdef yyalloc
+#define fts0balloc_ALREADY_DEFINED
+#else
+#define yyalloc fts0balloc
+#endif
+
+#ifdef yyrealloc
+#define fts0brealloc_ALREADY_DEFINED
+#else
+#define yyrealloc fts0brealloc
+#endif
+
+#ifdef yyfree
+#define fts0bfree_ALREADY_DEFINED
+#else
+#define yyfree fts0bfree
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -88,29 +298,23 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+/* begin standard C++ headers. */
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* An opaque pointer. */
@@ -165,7 +369,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -193,7 +397,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -204,25 +408,25 @@ struct yy_buffer_state
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-void fts0brestart (FILE *input_file ,yyscan_t yyscanner );
-void fts0b_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void fts0b_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0b_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0bpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void fts0bpop_buffer_state (yyscan_t yyscanner );
+void yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void yypop_buffer_state ( yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-void *fts0balloc (yy_size_t ,yyscan_t yyscanner );
-void *fts0brealloc (void *,yy_size_t ,yyscan_t yyscanner );
-void fts0bfree (void * ,yyscan_t yyscanner );
+void *yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void yyfree ( void * , yyscan_t yyscanner );
/* Begin user sect3 */
-#define fts0bwrap(n) 1
+#define fts0bwrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
@@ -244,38 +448,42 @@ void fts0bfree (void * ,yyscan_t yyscanner );
#define YY_EXTRA_TYPE void *
#endif
-int fts0blex_init (yyscan_t* scanner);
+int yylex_init (yyscan_t* scanner);
-int fts0blex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int fts0blex_destroy (yyscan_t yyscanner );
+int yylex_destroy ( yyscan_t yyscanner );
-int fts0bget_debug (yyscan_t yyscanner );
+int yyget_debug ( yyscan_t yyscanner );
-void fts0bset_debug (int debug_flag ,yyscan_t yyscanner );
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0bget_extra (yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-void fts0bset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-FILE *fts0bget_in (yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-void fts0bset_in (FILE * in_str ,yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-FILE *fts0bget_out (yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-void fts0bset_out (FILE * out_str ,yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-int fts0bget_leng (yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-char *fts0bget_text (yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-int fts0bget_lineno (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-void fts0bset_lineno (int line_number ,yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
+
+int yyget_column ( yyscan_t yyscanner );
+
+void yyset_column ( int _column_no , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -283,18 +491,18 @@ void fts0bset_lineno (int line_number ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int fts0bwrap (yyscan_t yyscanner );
+extern "C" int yywrap ( yyscan_t yyscanner );
#else
-extern int fts0bwrap (yyscan_t yyscanner );
+extern int yywrap ( yyscan_t yyscanner );
#endif
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
@@ -322,9 +530,9 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int fts0blex (yyscan_t yyscanner);
+extern int yylex (yyscan_t yyscanner);
-#define YY_DECL int fts0blex (yyscan_t yyscanner)
+#define YY_DECL int yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* yy_get_previous_state - get the state just before the EOB char was reached */
@@ -341,9 +549,154 @@ extern int fts0blex (yyscan_t yyscanner);
#undef YY_DECL
#endif
+#ifndef fts0b_create_buffer_ALREADY_DEFINED
+#undef yy_create_buffer
+#endif
+#ifndef fts0b_delete_buffer_ALREADY_DEFINED
+#undef yy_delete_buffer
+#endif
+#ifndef fts0b_scan_buffer_ALREADY_DEFINED
+#undef yy_scan_buffer
+#endif
+#ifndef fts0b_scan_string_ALREADY_DEFINED
+#undef yy_scan_string
+#endif
+#ifndef fts0b_scan_bytes_ALREADY_DEFINED
+#undef yy_scan_bytes
+#endif
+#ifndef fts0b_init_buffer_ALREADY_DEFINED
+#undef yy_init_buffer
+#endif
+#ifndef fts0b_flush_buffer_ALREADY_DEFINED
+#undef yy_flush_buffer
+#endif
+#ifndef fts0b_load_buffer_state_ALREADY_DEFINED
+#undef yy_load_buffer_state
+#endif
+#ifndef fts0b_switch_to_buffer_ALREADY_DEFINED
+#undef yy_switch_to_buffer
+#endif
+#ifndef fts0bpush_buffer_state_ALREADY_DEFINED
+#undef yypush_buffer_state
+#endif
+#ifndef fts0bpop_buffer_state_ALREADY_DEFINED
+#undef yypop_buffer_state
+#endif
+#ifndef fts0bensure_buffer_stack_ALREADY_DEFINED
+#undef yyensure_buffer_stack
+#endif
+#ifndef fts0blex_ALREADY_DEFINED
+#undef yylex
+#endif
+#ifndef fts0brestart_ALREADY_DEFINED
+#undef yyrestart
+#endif
+#ifndef fts0blex_init_ALREADY_DEFINED
+#undef yylex_init
+#endif
+#ifndef fts0blex_init_extra_ALREADY_DEFINED
+#undef yylex_init_extra
+#endif
+#ifndef fts0blex_destroy_ALREADY_DEFINED
+#undef yylex_destroy
+#endif
+#ifndef fts0bget_debug_ALREADY_DEFINED
+#undef yyget_debug
+#endif
+#ifndef fts0bset_debug_ALREADY_DEFINED
+#undef yyset_debug
+#endif
+#ifndef fts0bget_extra_ALREADY_DEFINED
+#undef yyget_extra
+#endif
+#ifndef fts0bset_extra_ALREADY_DEFINED
+#undef yyset_extra
+#endif
+#ifndef fts0bget_in_ALREADY_DEFINED
+#undef yyget_in
+#endif
+#ifndef fts0bset_in_ALREADY_DEFINED
+#undef yyset_in
+#endif
+#ifndef fts0bget_out_ALREADY_DEFINED
+#undef yyget_out
+#endif
+#ifndef fts0bset_out_ALREADY_DEFINED
+#undef yyset_out
+#endif
+#ifndef fts0bget_leng_ALREADY_DEFINED
+#undef yyget_leng
+#endif
+#ifndef fts0bget_text_ALREADY_DEFINED
+#undef yyget_text
+#endif
+#ifndef fts0bget_lineno_ALREADY_DEFINED
+#undef yyget_lineno
+#endif
+#ifndef fts0bset_lineno_ALREADY_DEFINED
+#undef yyset_lineno
+#endif
+#ifndef fts0bget_column_ALREADY_DEFINED
+#undef yyget_column
+#endif
+#ifndef fts0bset_column_ALREADY_DEFINED
+#undef yyset_column
+#endif
+#ifndef fts0bwrap_ALREADY_DEFINED
+#undef yywrap
+#endif
+#ifndef fts0bget_lval_ALREADY_DEFINED
+#undef yyget_lval
+#endif
+#ifndef fts0bset_lval_ALREADY_DEFINED
+#undef yyset_lval
+#endif
+#ifndef fts0bget_lloc_ALREADY_DEFINED
+#undef yyget_lloc
+#endif
+#ifndef fts0bset_lloc_ALREADY_DEFINED
+#undef yyset_lloc
+#endif
+#ifndef fts0balloc_ALREADY_DEFINED
+#undef yyalloc
+#endif
+#ifndef fts0brealloc_ALREADY_DEFINED
+#undef yyrealloc
+#endif
+#ifndef fts0bfree_ALREADY_DEFINED
+#undef yyfree
+#endif
+#ifndef fts0btext_ALREADY_DEFINED
+#undef yytext
+#endif
+#ifndef fts0bleng_ALREADY_DEFINED
+#undef yyleng
+#endif
+#ifndef fts0bin_ALREADY_DEFINED
+#undef yyin
+#endif
+#ifndef fts0bout_ALREADY_DEFINED
+#undef yyout
+#endif
+#ifndef fts0b_flex_debug_ALREADY_DEFINED
+#undef yy_flex_debug
+#endif
+#ifndef fts0blineno_ALREADY_DEFINED
+#undef yylineno
+#endif
+#ifndef fts0btables_fload_ALREADY_DEFINED
+#undef yytables_fload
+#endif
+#ifndef fts0btables_destroy_ALREADY_DEFINED
+#undef yytables_destroy
+#endif
+#ifndef fts0bTABLES_NAME_ALREADY_DEFINED
+#undef yyTABLES_NAME
+#endif
+
#line 73 "fts0blex.l"
-#line 348 "../include/fts0blex.h"
+#line 701 "../include/fts0blex.h"
#undef fts0bIN_HEADER
#endif /* fts0bHEADER_H */
diff --git a/storage/xtradb/include/fts0tlex.h b/storage/xtradb/include/fts0tlex.h
index f91533803e82cd707641676f3db32c160cdb8557..038cbb8858d0884a47711f423a99d6df7188031b 100644
--- a/storage/xtradb/include/fts0tlex.h
+++ b/storage/xtradb/include/fts0tlex.h
@@ -12,12 +12,222 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define fts0t_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer fts0t_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define fts0t_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer fts0t_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define fts0t_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer fts0t_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define fts0t_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string fts0t_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define fts0t_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes fts0t_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define fts0t_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer fts0t_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define fts0t_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer fts0t_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define fts0t_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state fts0t_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define fts0t_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer fts0t_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define fts0tpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state fts0tpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define fts0tpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state fts0tpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define fts0tensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack fts0tensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define fts0tlex_ALREADY_DEFINED
+#else
+#define yylex fts0tlex
+#endif
+
+#ifdef yyrestart
+#define fts0trestart_ALREADY_DEFINED
+#else
+#define yyrestart fts0trestart
+#endif
+
+#ifdef yylex_init
+#define fts0tlex_init_ALREADY_DEFINED
+#else
+#define yylex_init fts0tlex_init
+#endif
+
+#ifdef yylex_init_extra
+#define fts0tlex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra fts0tlex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define fts0tlex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy fts0tlex_destroy
+#endif
+
+#ifdef yyget_debug
+#define fts0tget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug fts0tget_debug
+#endif
+
+#ifdef yyset_debug
+#define fts0tset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug fts0tset_debug
+#endif
+
+#ifdef yyget_extra
+#define fts0tget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra fts0tget_extra
+#endif
+
+#ifdef yyset_extra
+#define fts0tset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra fts0tset_extra
+#endif
+
+#ifdef yyget_in
+#define fts0tget_in_ALREADY_DEFINED
+#else
+#define yyget_in fts0tget_in
+#endif
+
+#ifdef yyset_in
+#define fts0tset_in_ALREADY_DEFINED
+#else
+#define yyset_in fts0tset_in
+#endif
+
+#ifdef yyget_out
+#define fts0tget_out_ALREADY_DEFINED
+#else
+#define yyget_out fts0tget_out
+#endif
+
+#ifdef yyset_out
+#define fts0tset_out_ALREADY_DEFINED
+#else
+#define yyset_out fts0tset_out
+#endif
+
+#ifdef yyget_leng
+#define fts0tget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng fts0tget_leng
+#endif
+
+#ifdef yyget_text
+#define fts0tget_text_ALREADY_DEFINED
+#else
+#define yyget_text fts0tget_text
+#endif
+
+#ifdef yyget_lineno
+#define fts0tget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno fts0tget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define fts0tset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno fts0tset_lineno
+#endif
+
+#ifdef yyget_column
+#define fts0tget_column_ALREADY_DEFINED
+#else
+#define yyget_column fts0tget_column
+#endif
+
+#ifdef yyset_column
+#define fts0tset_column_ALREADY_DEFINED
+#else
+#define yyset_column fts0tset_column
+#endif
+
+#ifdef yywrap
+#define fts0twrap_ALREADY_DEFINED
+#else
+#define yywrap fts0twrap
+#endif
+
+#ifdef yyalloc
+#define fts0talloc_ALREADY_DEFINED
+#else
+#define yyalloc fts0talloc
+#endif
+
+#ifdef yyrealloc
+#define fts0trealloc_ALREADY_DEFINED
+#else
+#define yyrealloc fts0trealloc
+#endif
+
+#ifdef yyfree
+#define fts0tfree_ALREADY_DEFINED
+#else
+#define yyfree fts0tfree
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -88,29 +298,23 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+/* begin standard C++ headers. */
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* An opaque pointer. */
@@ -165,7 +369,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -193,7 +397,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -204,25 +408,25 @@ struct yy_buffer_state
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-void fts0trestart (FILE *input_file ,yyscan_t yyscanner );
-void fts0t_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
-void fts0t_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0t_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
-void fts0tpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
-void fts0tpop_buffer_state (yyscan_t yyscanner );
+void yyrestart ( FILE *input_file , yyscan_t yyscanner );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
+void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
+void yypop_buffer_state ( yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
-void *fts0talloc (yy_size_t ,yyscan_t yyscanner );
-void *fts0trealloc (void *,yy_size_t ,yyscan_t yyscanner );
-void fts0tfree (void * ,yyscan_t yyscanner );
+void *yyalloc ( yy_size_t , yyscan_t yyscanner );
+void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
+void yyfree ( void * , yyscan_t yyscanner );
/* Begin user sect3 */
-#define fts0twrap(n) 1
+#define fts0twrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
@@ -244,38 +448,42 @@ void fts0tfree (void * ,yyscan_t yyscanner );
#define YY_EXTRA_TYPE void *
#endif
-int fts0tlex_init (yyscan_t* scanner);
+int yylex_init (yyscan_t* scanner);
-int fts0tlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int fts0tlex_destroy (yyscan_t yyscanner );
+int yylex_destroy ( yyscan_t yyscanner );
-int fts0tget_debug (yyscan_t yyscanner );
+int yyget_debug ( yyscan_t yyscanner );
-void fts0tset_debug (int debug_flag ,yyscan_t yyscanner );
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-void fts0tset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-FILE *fts0tget_in (yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-void fts0tset_in (FILE * in_str ,yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-FILE *fts0tget_out (yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-void fts0tset_out (FILE * out_str ,yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-int fts0tget_leng (yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-char *fts0tget_text (yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-int fts0tget_lineno (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-void fts0tset_lineno (int line_number ,yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
+
+int yyget_column ( yyscan_t yyscanner );
+
+void yyset_column ( int _column_no , yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -283,18 +491,18 @@ void fts0tset_lineno (int line_number ,yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int fts0twrap (yyscan_t yyscanner );
+extern "C" int yywrap ( yyscan_t yyscanner );
#else
-extern int fts0twrap (yyscan_t yyscanner );
+extern int yywrap ( yyscan_t yyscanner );
#endif
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
+static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
+static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
@@ -322,9 +530,9 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int fts0tlex (yyscan_t yyscanner);
+extern int yylex (yyscan_t yyscanner);
-#define YY_DECL int fts0tlex (yyscan_t yyscanner)
+#define YY_DECL int yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */
/* yy_get_previous_state - get the state just before the EOB char was reached */
@@ -341,9 +549,154 @@ extern int fts0tlex (yyscan_t yyscanner);
#undef YY_DECL
#endif
+#ifndef fts0t_create_buffer_ALREADY_DEFINED
+#undef yy_create_buffer
+#endif
+#ifndef fts0t_delete_buffer_ALREADY_DEFINED
+#undef yy_delete_buffer
+#endif
+#ifndef fts0t_scan_buffer_ALREADY_DEFINED
+#undef yy_scan_buffer
+#endif
+#ifndef fts0t_scan_string_ALREADY_DEFINED
+#undef yy_scan_string
+#endif
+#ifndef fts0t_scan_bytes_ALREADY_DEFINED
+#undef yy_scan_bytes
+#endif
+#ifndef fts0t_init_buffer_ALREADY_DEFINED
+#undef yy_init_buffer
+#endif
+#ifndef fts0t_flush_buffer_ALREADY_DEFINED
+#undef yy_flush_buffer
+#endif
+#ifndef fts0t_load_buffer_state_ALREADY_DEFINED
+#undef yy_load_buffer_state
+#endif
+#ifndef fts0t_switch_to_buffer_ALREADY_DEFINED
+#undef yy_switch_to_buffer
+#endif
+#ifndef fts0tpush_buffer_state_ALREADY_DEFINED
+#undef yypush_buffer_state
+#endif
+#ifndef fts0tpop_buffer_state_ALREADY_DEFINED
+#undef yypop_buffer_state
+#endif
+#ifndef fts0tensure_buffer_stack_ALREADY_DEFINED
+#undef yyensure_buffer_stack
+#endif
+#ifndef fts0tlex_ALREADY_DEFINED
+#undef yylex
+#endif
+#ifndef fts0trestart_ALREADY_DEFINED
+#undef yyrestart
+#endif
+#ifndef fts0tlex_init_ALREADY_DEFINED
+#undef yylex_init
+#endif
+#ifndef fts0tlex_init_extra_ALREADY_DEFINED
+#undef yylex_init_extra
+#endif
+#ifndef fts0tlex_destroy_ALREADY_DEFINED
+#undef yylex_destroy
+#endif
+#ifndef fts0tget_debug_ALREADY_DEFINED
+#undef yyget_debug
+#endif
+#ifndef fts0tset_debug_ALREADY_DEFINED
+#undef yyset_debug
+#endif
+#ifndef fts0tget_extra_ALREADY_DEFINED
+#undef yyget_extra
+#endif
+#ifndef fts0tset_extra_ALREADY_DEFINED
+#undef yyset_extra
+#endif
+#ifndef fts0tget_in_ALREADY_DEFINED
+#undef yyget_in
+#endif
+#ifndef fts0tset_in_ALREADY_DEFINED
+#undef yyset_in
+#endif
+#ifndef fts0tget_out_ALREADY_DEFINED
+#undef yyget_out
+#endif
+#ifndef fts0tset_out_ALREADY_DEFINED
+#undef yyset_out
+#endif
+#ifndef fts0tget_leng_ALREADY_DEFINED
+#undef yyget_leng
+#endif
+#ifndef fts0tget_text_ALREADY_DEFINED
+#undef yyget_text
+#endif
+#ifndef fts0tget_lineno_ALREADY_DEFINED
+#undef yyget_lineno
+#endif
+#ifndef fts0tset_lineno_ALREADY_DEFINED
+#undef yyset_lineno
+#endif
+#ifndef fts0tget_column_ALREADY_DEFINED
+#undef yyget_column
+#endif
+#ifndef fts0tset_column_ALREADY_DEFINED
+#undef yyset_column
+#endif
+#ifndef fts0twrap_ALREADY_DEFINED
+#undef yywrap
+#endif
+#ifndef fts0tget_lval_ALREADY_DEFINED
+#undef yyget_lval
+#endif
+#ifndef fts0tset_lval_ALREADY_DEFINED
+#undef yyset_lval
+#endif
+#ifndef fts0tget_lloc_ALREADY_DEFINED
+#undef yyget_lloc
+#endif
+#ifndef fts0tset_lloc_ALREADY_DEFINED
+#undef yyset_lloc
+#endif
+#ifndef fts0talloc_ALREADY_DEFINED
+#undef yyalloc
+#endif
+#ifndef fts0trealloc_ALREADY_DEFINED
+#undef yyrealloc
+#endif
+#ifndef fts0tfree_ALREADY_DEFINED
+#undef yyfree
+#endif
+#ifndef fts0ttext_ALREADY_DEFINED
+#undef yytext
+#endif
+#ifndef fts0tleng_ALREADY_DEFINED
+#undef yyleng
+#endif
+#ifndef fts0tin_ALREADY_DEFINED
+#undef yyin
+#endif
+#ifndef fts0tout_ALREADY_DEFINED
+#undef yyout
+#endif
+#ifndef fts0t_flex_debug_ALREADY_DEFINED
+#undef yy_flex_debug
+#endif
+#ifndef fts0tlineno_ALREADY_DEFINED
+#undef yylineno
+#endif
+#ifndef fts0ttables_fload_ALREADY_DEFINED
+#undef yytables_fload
+#endif
+#ifndef fts0ttables_destroy_ALREADY_DEFINED
+#undef yytables_destroy
+#endif
+#ifndef fts0tTABLES_NAME_ALREADY_DEFINED
+#undef yyTABLES_NAME
+#endif
+
#line 68 "fts0tlex.l"
-#line 348 "../include/fts0tlex.h"
+#line 701 "../include/fts0tlex.h"
#undef fts0tIN_HEADER
#endif /* fts0tHEADER_H */
diff --git a/storage/xtradb/include/handler0alter.h b/storage/xtradb/include/handler0alter.h
index 3dd6c99eb6d8bda91ccd7991494c694795533af4..63379ad93716be302a0680c7495d10d665449f5e 100644
--- a/storage/xtradb/include/handler0alter.h
+++ b/storage/xtradb/include/handler0alter.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -96,9 +97,13 @@ struct ib_sequence_t {
return(m_next_value);
}
- /** Maximum calumn value if adding an AUTOINC column else 0. Once
- we reach the end of the sequence it will be set to ~0. */
- const ulonglong m_max_value;
+ /** @return maximum column value
+ @retval 0 if not adding AUTO_INCREMENT column */
+ ulonglong max_value() const { return m_max_value; }
+
+private:
+ /** Maximum value if adding an AUTO_INCREMENT column, else 0 */
+ ulonglong m_max_value;
/** Value of auto_increment_increment */
ulong m_increment;
diff --git a/storage/xtradb/include/log0online.h b/storage/xtradb/include/log0online.h
index 2d1febe9b9fc81b8bc9430c45d78dc699b20594b..1a53b9efa9cd167e391f29e4caaa54972d742958 100644
--- a/storage/xtradb/include/log0online.h
+++ b/storage/xtradb/include/log0online.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2011-2012, Percona Inc. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -146,7 +147,7 @@ struct log_online_bitmap_file_range_struct {
size_t count; /*!< Number of files */
/*!< Dynamically-allocated array of info about individual files */
struct files_t {
- char name[FN_REFLEN]; /*!< Name of a file */
+ char name[OS_FILE_MAX_PATH+1];/*!< Name of a file */
lsn_t start_lsn; /*!< Starting LSN of data in
this file */
ulong seq_num; /*!< Sequence number of this
diff --git a/storage/xtradb/include/pars0pars.h b/storage/xtradb/include/pars0pars.h
index 73585c78a6aff024a97fa5044c90572c1883c8c1..313380a40b454a1ab8ff6c8a8743a029ff7b2097 100644
--- a/storage/xtradb/include/pars0pars.h
+++ b/storage/xtradb/include/pars0pars.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -109,11 +110,11 @@ pars_sql(
Retrieves characters to the lexical analyzer.
@return number of characters copied or 0 on EOF */
UNIV_INTERN
-int
+size_t
pars_get_lex_chars(
/*===============*/
char* buf, /*!< in/out: buffer where to copy */
- int max_size); /*!< in: maximum number of characters which fit
+ size_t max_size); /*!< in: maximum number of characters which fit
in the buffer */
/*************************************************************//**
Called by yyparse on error. */
diff --git a/storage/xtradb/include/rem0rec.ic b/storage/xtradb/include/rem0rec.ic
index 89f6902059dcb63f66e7e33ad9cfb136095cd073..122ea733065a1768b7ac8f8ca1a4ce445c35373a 100644
--- a/storage/xtradb/include/rem0rec.ic
+++ b/storage/xtradb/include/rem0rec.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -373,15 +373,9 @@ rec_set_next_offs_old(
rec_t* rec, /*!< in: old-style physical record */
ulint next) /*!< in: offset of the next record */
{
- ut_ad(rec);
- ut_ad(UNIV_PAGE_SIZE > next);
-#if REC_NEXT_MASK != 0xFFFFUL
-# error "REC_NEXT_MASK != 0xFFFFUL"
-#endif
-#if REC_NEXT_SHIFT
-# error "REC_NEXT_SHIFT != 0"
-#endif
-
+ ut_ad(srv_page_size > next);
+ compile_time_assert(REC_NEXT_MASK == 0xFFFFUL);
+ compile_time_assert(REC_NEXT_SHIFT == 0);
mach_write_to_2(rec - REC_NEXT, next);
}
@@ -397,8 +391,7 @@ rec_set_next_offs_new(
{
ulint field_value;
- ut_ad(rec);
- ut_ad(UNIV_PAGE_SIZE > next);
+ ut_ad(srv_page_size > next);
if (!next) {
field_value = 0;
@@ -921,7 +914,6 @@ rec_offs_set_n_alloc(
must be allocated */
ulint n_alloc) /*!< in: number of elements */
{
- ut_ad(offsets);
ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
UNIV_MEM_ALLOC(offsets, n_alloc * sizeof *offsets);
offsets[0] = n_alloc;
@@ -1039,7 +1031,6 @@ rec_get_nth_field_offs(
ulint offs;
ulint length;
ut_ad(n < rec_offs_n_fields(offsets));
- ut_ad(len);
if (n == 0) {
offs = 0;
@@ -1387,7 +1378,6 @@ rec_set_nth_field(
byte* data2;
ulint len2;
- ut_ad(rec);
ut_ad(rec_offs_validate(rec, NULL, offsets));
if (len == UNIV_SQL_NULL) {
@@ -1589,8 +1579,6 @@ rec_get_converted_size(
ulint data_size;
ulint extra_size;
- ut_ad(index);
- ut_ad(dtuple);
ut_ad(dtuple_check_typed(dtuple));
ut_ad(dict_index_is_univ(index)
diff --git a/storage/xtradb/include/trx0trx.h b/storage/xtradb/include/trx0trx.h
index 77afde4c35cef887c524f80fe9d54b89b157665d..b3a513b9b91678e4b9e1b3252d4f5f6f8effc857 100644
--- a/storage/xtradb/include/trx0trx.h
+++ b/storage/xtradb/include/trx0trx.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2019, MariaDB Corporation.
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
@@ -575,7 +575,7 @@ non-locking select */
ut_ad(!trx_is_autocommit_non_locking((t))); \
switch ((t)->state) { \
case TRX_STATE_PREPARED: \
- /* fall through */ \
+ case TRX_STATE_PREPARED_RECOVERED: \
case TRX_STATE_ACTIVE: \
case TRX_STATE_COMMITTED_IN_MEMORY: \
continue; \
@@ -768,6 +768,7 @@ struct trx_t{
TRX_STATE_NOT_STARTED
TRX_STATE_ACTIVE
TRX_STATE_PREPARED
+ TRX_STATE_PREPARED_RECOVERED (special case of TRX_STATE_PREPARED)
TRX_STATE_COMMITTED_IN_MEMORY (alias below COMMITTED)
Valid state transitions are:
diff --git a/storage/xtradb/include/trx0trx.ic b/storage/xtradb/include/trx0trx.ic
index eb7d62d9cad5839556b0d8ad1d23a06bc6f1ccc7..6b8078a55e83d27128fc01543ebea71409913b85 100644
--- a/storage/xtradb/include/trx0trx.ic
+++ b/storage/xtradb/include/trx0trx.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, MariaDB Corporation. All Rights Reserved.
+Copyright (c) 2016, 2019, MariaDB Corporation.
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
@@ -49,6 +49,7 @@ trx_state_eq(
#ifdef UNIV_DEBUG
switch (trx->state) {
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
ut_ad(!trx_is_autocommit_non_locking(trx));
return(trx->state == state);
diff --git a/storage/xtradb/include/trx0types.h b/storage/xtradb/include/trx0types.h
index 7ca95131328853541692816cd6c15a57bab895e9..a0b398fffa1b99666d5ee3018073c08290a3121e 100644
--- a/storage/xtradb/include/trx0types.h
+++ b/storage/xtradb/include/trx0types.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -48,7 +49,11 @@ enum trx_que_t {
enum trx_state_t {
TRX_STATE_NOT_STARTED,
TRX_STATE_ACTIVE,
- TRX_STATE_PREPARED, /* Support for 2PC/XA */
+ /** XA PREPARE has been executed; only XA COMMIT or XA ROLLBACK
+ are possible */
+ TRX_STATE_PREPARED,
+ /** XA PREPARE transaction that was returned to ha_recover() */
+ TRX_STATE_PREPARED_RECOVERED,
TRX_STATE_COMMITTED_IN_MEMORY
};
diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i
index 6d1520bc6a3a051a6895cda3286b3590f9b23070..93e910831444d2c70df02fe8a8e8e4cffb55e1ee 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 42
+#define INNODB_VERSION_BUGFIX 43
#ifndef PERCONA_INNODB_VERSION
-#define PERCONA_INNODB_VERSION 84.2
+#define PERCONA_INNODB_VERSION 84.3
#endif
/* Enable UNIV_LOG_ARCHIVE in XtraDB */
@@ -471,7 +471,6 @@ macro ULINTPF. */
# define INT64PF "%lld"
# define UINT64PF "%llu"
# define UINT64PFx "%016llx"
-# define TIMETPF "%ld"
typedef __int64 ib_int64_t;
typedef unsigned __int64 ib_uint64_t;
typedef unsigned __int32 ib_uint32_t;
@@ -481,7 +480,6 @@ typedef unsigned __int32 ib_uint32_t;
# define INT64PF "%" PRId64
# define UINT64PF "%" PRIu64
# define UINT64PFx "%016" PRIx64
-# define TIMETPF "%" PRIdFAST32
typedef int64_t ib_int64_t;
typedef uint64_t ib_uint64_t;
typedef uint32_t ib_uint32_t;
diff --git a/storage/xtradb/include/ut0dbg.h b/storage/xtradb/include/ut0dbg.h
index 3f5baef0a3c988d798ab6650dd61665f03ad0075..b4c941bc16394fb8e69264535c817f8c714424df 100644
--- a/storage/xtradb/include/ut0dbg.h
+++ b/storage/xtradb/include/ut0dbg.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, MariaDB Corporation.
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 +85,7 @@ ut_dbg_assertion_failed(
/** Debug assertion. Does nothing unless UNIV_DEBUG is defined. */
#define ut_ad(EXPR) ut_a(EXPR)
/** Debug statement. Does nothing unless UNIV_DEBUG is defined. */
-#define ut_d(EXPR) do {EXPR;} while (0)
+#define ut_d(EXPR) EXPR
#else
/** Debug assertion. Does nothing unless UNIV_DEBUG is defined. */
#define ut_ad(EXPR)
diff --git a/storage/xtradb/include/ut0wqueue.h b/storage/xtradb/include/ut0wqueue.h
index d69363afe7b4e2b88897f675aec4e997ddadf03a..e0f8f76d5f136800f2bdb72b413c47fa86f05af5 100644
--- a/storage/xtradb/include/ut0wqueue.h
+++ b/storage/xtradb/include/ut0wqueue.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2006, 2009, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation. All Rights Reserved.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -67,15 +67,10 @@ ib_wqueue_add(
mem_heap_t* heap); /*!< in: memory heap to use for allocating the
list node */
-/********************************************************************
-Check if queue is empty. */
-
-ibool
-ib_wqueue_is_empty(
-/*===============*/
- /* out: TRUE if queue empty
- else FALSE */
- const ib_wqueue_t* wq); /* in: work queue */
+/** Check if queue is empty.
+@param wq wait queue
+@return whether the queue is empty */
+bool ib_wqueue_is_empty(ib_wqueue_t* wq);
/****************************************************************//**
Wait for a work item to appear in the queue.
diff --git a/storage/xtradb/lock/lock0lock.cc b/storage/xtradb/lock/lock0lock.cc
index 2183d281b7838cde5360331c53b3a6d83bb5dd78..9c86abf71721afc21a28d80ff2b7104ec78dec02 100644
--- a/storage/xtradb/lock/lock0lock.cc
+++ b/storage/xtradb/lock/lock0lock.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2019, MariaDB Corporation.
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
@@ -5401,7 +5401,7 @@ lock_table(
lock_mutex_enter();
DBUG_EXECUTE_IF("fatal-semaphore-timeout",
- { os_thread_sleep(3600000000); });
+ { os_thread_sleep(3600000000U); });
/* We have to check if the new lock is compatible with any locks
other transactions have in the table lock queue. */
@@ -8010,7 +8010,8 @@ lock_trx_release_locks(
{
assert_trx_in_list(trx);
- if (trx_state_eq(trx, TRX_STATE_PREPARED)) {
+ if (trx_state_eq(trx, TRX_STATE_PREPARED)
+ || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)) {
mutex_enter(&trx_sys->mutex);
ut_a(trx_sys->n_prepared_trx > 0);
trx_sys->n_prepared_trx--;
diff --git a/storage/xtradb/log/log0online.cc b/storage/xtradb/log/log0online.cc
index bc1667e1c20483aa5bca51dea7d464251517cd7f..b25e2bca71107b1ce0862605afc148a7a9049445 100644
--- a/storage/xtradb/log/log0online.cc
+++ b/storage/xtradb/log/log0online.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011-2012 Percona Inc. All Rights Reserved.
-Copyright (C) 2016, MariaDB Corporation.
+Copyright (C) 2016, 2019, MariaDB Corporation.
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
@@ -1453,8 +1453,9 @@ log_online_setup_bitmap_file_range(
bitmap_files->files[array_pos].seq_num = file_seq_num;
strncpy(bitmap_files->files[array_pos].name,
- bitmap_dir_file_info.name, FN_REFLEN);
- bitmap_files->files[array_pos].name[FN_REFLEN - 1]
+ bitmap_dir_file_info.name,
+ OS_FILE_MAX_PATH);
+ bitmap_files->files[array_pos].name[OS_FILE_MAX_PATH]
= '\0';
bitmap_files->files[array_pos].start_lsn
= file_start_lsn;
diff --git a/storage/xtradb/pars/lexyy.cc b/storage/xtradb/pars/lexyy.cc
index bc6544b099d27136d129c698c8583a45153e3cf3..33de48e7b2f0f81f3dacdb04570cb67320fade4a 100644
--- a/storage/xtradb/pars/lexyy.cc
+++ b/storage/xtradb/pars/lexyy.cc
@@ -9,8 +9,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -35,7 +35,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -52,7 +52,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -85,60 +85,48 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+/* begin standard C++ headers. */
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -168,16 +156,17 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t yyleng;
-extern FILE *yyin, *yyout;
+
+
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
-
+ #define YY_LINENO_REWIND_TO(ptr)
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -191,7 +180,6 @@ extern FILE *yyin, *yyout;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -206,12 +194,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -262,7 +250,7 @@ struct yy_buffer_state
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
@@ -273,7 +261,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
@@ -281,11 +268,11 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t yyleng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+static int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
@@ -294,85 +281,81 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart (FILE *input_file );
-MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
-void yy_delete_buffer (YY_BUFFER_STATE b );
-void yy_flush_buffer (YY_BUFFER_STATE b );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state (void );
+static void yyrestart ( FILE *input_file );
+MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+static YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+static void yy_delete_buffer ( YY_BUFFER_STATE b );
+static void yy_flush_buffer ( YY_BUFFER_STATE b );
+MY_ATTRIBUTE((unused)) static void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+MY_ATTRIBUTE((unused)) static void yypop_buffer_state ( void );
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
-YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
-
-void *yyalloc (yy_size_t );
-void *yyrealloc (void *,yy_size_t );
-void yyfree (void * );
+static void *yyalloc ( yy_size_t );
+static void *yyrealloc ( void *, yy_size_t );
+static void yyfree ( void * );
#define yy_new_buffer yy_create_buffer
-
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
-#define yywrap(n) 1
+#define yywrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+static FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-extern int yylineno;
-int yylineno = 1;
+static int yylineno = 1;
-extern char *yytext;
+
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-
#define YY_NUM_RULES 124
#define YY_END_OF_BUFFER 125
/* This struct is not used in this scanner,
@@ -382,7 +365,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[425] =
+static const flex_int16_t yy_accept[425] =
{ 0,
0, 0, 119, 119, 0, 0, 0, 0, 125, 123,
122, 122, 8, 123, 114, 5, 103, 109, 112, 110,
@@ -433,7 +416,7 @@ static yyconst flex_int16_t yy_accept[425] =
96, 96, 62, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -465,7 +448,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[57] =
+static const YY_CHAR yy_meta[57] =
{ 0,
1, 1, 1, 2, 3, 1, 1, 4, 1, 1,
5, 1, 1, 1, 1, 6, 7, 1, 1, 1,
@@ -475,7 +458,7 @@ static yyconst flex_int32_t yy_meta[57] =
9, 9, 9, 9, 1, 1
} ;
-static yyconst flex_int16_t yy_base[438] =
+static const flex_int16_t yy_base[438] =
{ 0,
0, 0, 293, 287, 284, 281, 272, 256, 254, 1357,
55, 57, 1357, 0, 1357, 1357, 1357, 1357, 1357, 1357,
@@ -527,7 +510,7 @@ static yyconst flex_int16_t yy_base[438] =
1306, 1315, 1324, 1333, 1340, 1344, 1347
} ;
-static yyconst flex_int16_t yy_def[438] =
+static const flex_int16_t yy_def[438] =
{ 0,
424, 1, 425, 425, 426, 426, 427, 427, 424, 424,
424, 424, 424, 428, 424, 424, 424, 424, 424, 424,
@@ -579,7 +562,7 @@ static yyconst flex_int16_t yy_def[438] =
424, 424, 424, 424, 424, 424, 424
} ;
-static yyconst flex_int16_t yy_nxt[1414] =
+static const flex_int16_t yy_nxt[1414] =
{ 0,
10, 11, 12, 13, 10, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
@@ -739,7 +722,7 @@ static yyconst flex_int16_t yy_nxt[1414] =
424, 424, 424
} ;
-static yyconst flex_int16_t yy_chk[1414] =
+static const flex_int16_t yy_chk[1414] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -902,8 +885,8 @@ static yyconst flex_int16_t yy_chk[1414] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
+
+static int yy_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -912,11 +895,12 @@ int yy_flex_debug = 0;
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+static char *yytext;
#line 1 "pars0lex.l"
/*****************************************************************************
-Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -951,7 +935,7 @@ Created 12/14/1997 Heikki Tuuri
*******************************************************/
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
-#line 53 "pars0lex.l"
+#line 54 "pars0lex.l"
#define YYSTYPE que_node_t*
#include "univ.i"
@@ -966,9 +950,8 @@ Created 12/14/1997 Heikki Tuuri
#define realloc(P, A) ut_realloc(P, A)
#define exit(A) ut_error
-/* Note: We cast &result to int* from yysize_t* */
#define YY_INPUT(buf, result, max_size) \
- (result = pars_get_lex_chars(buf, max_size))
+ result = pars_get_lex_chars(buf, max_size)
/* String buffer for removing quotes */
static ulint stringbuf_len_alloc = 0; /* Allocated length */
@@ -1000,10 +983,9 @@ string_append(
stringbuf_len += len;
}
+#line 986 "lexyy.cc"
-
-
-#line 1006 "lexyy.cc"
+#line 988 "lexyy.cc"
#define INITIAL 0
#define comment 1
@@ -1022,36 +1004,36 @@ string_append(
#define YY_EXTRA_TYPE void *
#endif
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-MY_ATTRIBUTE((unused)) static int yylex_destroy (void );
+MY_ATTRIBUTE((unused)) static int yylex_destroy ( void );
+
+MY_ATTRIBUTE((unused)) static int yyget_debug ( void );
-int yyget_debug (void );
+MY_ATTRIBUTE((unused)) static void yyset_debug ( int debug_flag );
-void yyset_debug (int debug_flag );
+YY_EXTRA_TYPE yyget_extra ( void );
-YY_EXTRA_TYPE yyget_extra (void );
-void yyset_extra (YY_EXTRA_TYPE user_defined );
-FILE *yyget_in (void );
+MY_ATTRIBUTE((unused)) static FILE *yyget_in ( void );
-void yyset_in (FILE * in_str );
+MY_ATTRIBUTE((unused)) static void yyset_in ( FILE * _in_str );
-FILE *yyget_out (void );
+MY_ATTRIBUTE((unused)) static FILE *yyget_out ( void );
-void yyset_out (FILE * out_str );
+MY_ATTRIBUTE((unused)) static void yyset_out ( FILE * _out_str );
-yy_size_t yyget_leng (void );
+ MY_ATTRIBUTE((unused)) static int yyget_leng ( void );
-char *yyget_text (void );
+MY_ATTRIBUTE((unused)) static char *yyget_text ( void );
-int yyget_lineno (void );
+MY_ATTRIBUTE((unused)) static int yyget_lineno ( void );
-void yyset_lineno (int line_number );
+MY_ATTRIBUTE((unused)) static void yyset_lineno ( int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1059,26 +1041,29 @@ void yyset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int yywrap ( void );
#else
-extern int yywrap (void );
+extern int yywrap ( void );
#endif
#endif
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
#endif
@@ -1098,7 +1083,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1109,7 +1094,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1122,7 +1107,7 @@ static int input (void );
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -1177,7 +1162,7 @@ extern int yylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -1190,12 +1175,7 @@ YY_DECL
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
int yy_act;
-
-#line 112 "pars0lex.l"
-
-
-#line 1197 "lexyy.cc"
-
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -1216,13 +1196,19 @@ YY_DECL
if ( ! YY_CURRENT_BUFFER ) {
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+#line 112 "pars0lex.l"
+
+
+#line 1209 "lexyy.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
@@ -1238,7 +1224,7 @@ YY_DECL
yy_match:
do
{
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1248,9 +1234,9 @@ YY_DECL
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 425 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 424 );
@@ -2234,7 +2220,7 @@ YY_RULE_SETUP
#line 691 "pars0lex.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 2237 "lexyy.cc"
+#line 2223 "lexyy.cc"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(comment):
case YY_STATE_EOF(quoted):
@@ -2316,7 +2302,7 @@ case YY_STATE_EOF(id):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -2369,6 +2355,7 @@ case YY_STATE_EOF(id):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
@@ -2411,7 +2398,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -2424,21 +2411,21 @@ static int yy_get_next_buffer (void)
else
{
- int num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1);
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = static_cast(b->yy_buf_size * 2);
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -2447,11 +2434,12 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -2459,9 +2447,8 @@ static int yy_get_next_buffer (void)
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = static_cast(
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size
- - number_to_move - 1);
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
}
@@ -2470,7 +2457,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
+ (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -2480,7 +2467,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart(yyin );
+ yyrestart( yyin );
}
else
@@ -2494,12 +2481,15 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -2513,11 +2503,11 @@ static int yy_get_next_buffer (void)
/* yy_get_previous_state - get the state just before the EOB char was reached */
- yy_state_type yy_get_previous_state (void)
+ static yy_state_type yy_get_previous_state (void)
{
yy_state_type yy_current_state;
char *yy_cp;
-
+
yy_current_state = (yy_start);
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
@@ -2532,9 +2522,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 425 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -2545,7 +2535,7 @@ static int yy_get_next_buffer (void)
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
int yy_is_jam;
char *yy_cp = (yy_c_buf_p);
@@ -2560,14 +2550,18 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 425 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 424);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -2577,7 +2571,7 @@ static int yy_get_next_buffer (void)
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -2592,7 +2586,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (int)((yy_c_buf_p) - (yytext_ptr));
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -2609,14 +2603,14 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
- return EOF;
+ if ( yywrap( ) )
+ return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -2644,29 +2638,29 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
- *
+ *
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyrestart (FILE * input_file )
+ static void yyrestart (FILE * input_file )
{
-
+
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
- yy_load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
- *
+ *
*/
MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
-
+
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
@@ -2685,7 +2679,7 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
@@ -2706,14 +2700,14 @@ static void yy_load_buffer_state (void)
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
+ *
* @return the allocated buffer state.
*/
static YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -2722,24 +2716,24 @@ static void yy_load_buffer_state (void)
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
- *
+ *
*/
- void yy_delete_buffer (YY_BUFFER_STATE b )
+ static void yy_delete_buffer (YY_BUFFER_STATE b )
{
-
+
if ( ! b )
return;
@@ -2747,21 +2741,21 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- yyfree((void *) b );
+ yyfree( (void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
*/
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
-
- yy_flush_buffer(b );
+
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
@@ -2776,15 +2770,15 @@ static void yy_load_buffer_state (void)
}
b->yy_is_interactive = 0;
-
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
+ *
*/
- void yy_flush_buffer (YY_BUFFER_STATE b )
+ static void yy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -2804,16 +2798,16 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
- *
+ *
*/
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+MY_ATTRIBUTE((unused)) static void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
@@ -2835,15 +2829,15 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
- *
+ *
*/
-void yypop_buffer_state (void)
+MY_ATTRIBUTE((unused)) static void yypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
@@ -2854,7 +2848,7 @@ void yypop_buffer_state (void)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -2864,15 +2858,15 @@ void yypop_buffer_state (void)
*/
static void yyensure_buffer_stack (void)
{
- int num_to_alloc;
-
+ yy_size_t num_to_alloc;
+
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
@@ -2889,10 +2883,9 @@ static void yyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
- num_to_alloc = static_cast(
- (yy_buffer_stack_max) + grow_size);
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
@@ -2910,9 +2903,9 @@ static void yyensure_buffer_stack (void)
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -2936,81 +2929,81 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
- *
+ *
*/
-int yyget_lineno (void)
+MY_ATTRIBUTE((unused)) static int yyget_lineno (void)
{
-
+
return yylineno;
}
/** Get the input stream.
- *
+ *
*/
-FILE *yyget_in (void)
+MY_ATTRIBUTE((unused)) static FILE *yyget_in (void)
{
return yyin;
}
/** Get the output stream.
- *
+ *
*/
-FILE *yyget_out (void)
+MY_ATTRIBUTE((unused)) static FILE *yyget_out (void)
{
return yyout;
}
/** Get the length of the current token.
- *
+ *
*/
-yy_size_t yyget_leng (void)
+MY_ATTRIBUTE((unused)) static int yyget_leng (void)
{
return yyleng;
}
/** Get the current token.
- *
+ *
*/
-char *yyget_text (void)
+MY_ATTRIBUTE((unused)) static char *yyget_text (void)
{
return yytext;
}
/** Set the current line number.
- * @param line_number
- *
+ * @param _line_number line number
+ *
*/
-void yyset_lineno (int line_number )
+MY_ATTRIBUTE((unused)) static void yyset_lineno (int _line_number )
{
-
- yylineno = line_number;
+
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
- *
+ * @param _in_str A readable stream.
+ *
* @see yy_switch_to_buffer
*/
-void yyset_in (FILE * in_str )
+MY_ATTRIBUTE((unused)) static void yyset_in (FILE * _in_str )
{
- yyin = in_str ;
+ yyin = _in_str ;
}
-void yyset_out (FILE * out_str )
+MY_ATTRIBUTE((unused)) static void yyset_out (FILE * _out_str )
{
- yyout = out_str ;
+ yyout = _out_str ;
}
-int yyget_debug (void)
+MY_ATTRIBUTE((unused)) static int yyget_debug (void)
{
return yy_flex_debug;
}
-void yyset_debug (int bdebug )
+MY_ATTRIBUTE((unused)) static void yyset_debug (int _bdebug )
{
- yy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
static int yy_init_globals (void)
@@ -3019,10 +3012,10 @@ static int yy_init_globals (void)
* This function is called from yylex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
@@ -3031,8 +3024,8 @@ static int yy_init_globals (void)
yyin = stdin;
yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
@@ -3044,10 +3037,10 @@ static int yy_init_globals (void)
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
MY_ATTRIBUTE((unused)) static int yylex_destroy (void)
{
-
+
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
yypop_buffer_state();
}
@@ -3068,8 +3061,9 @@ MY_ATTRIBUTE((unused)) static int yylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
+
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
@@ -3077,7 +3071,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
int n;
for ( n = 0; s[n]; ++n )
@@ -3087,13 +3081,14 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *yyalloc (yy_size_t size )
+static void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
-void *yyrealloc (void * ptr, yy_size_t size )
+static void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -3101,12 +3096,12 @@ void *yyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void yyfree (void * ptr )
+static void yyfree (void * ptr )
{
- free( (char*) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
@@ -3114,7 +3109,6 @@ void yyfree (void * ptr )
#line 691 "pars0lex.l"
-
/**********************************************************************
Release any resources used by the lexer. */
UNIV_INTERN
@@ -3122,10 +3116,8 @@ void
pars_lexer_close(void)
/*==================*/
{
- if (yy_buffer_stack)
- yylex_destroy();
- if (stringbuf)
- free(stringbuf);
+ yylex_destroy();
+ free(stringbuf);
stringbuf = NULL;
stringbuf_len_alloc = stringbuf_len = 0;
}
diff --git a/storage/xtradb/pars/make_flex.sh b/storage/xtradb/pars/make_flex.sh
index c3db8aea29838b5bbebe986126615d3b98a496d8..54aebb259d991e2152d487fa31c42ee6c43fc4ed 100755
--- a/storage/xtradb/pars/make_flex.sh
+++ b/storage/xtradb/pars/make_flex.sh
@@ -1,6 +1,7 @@
#!/bin/bash
#
# Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 2017, 2019, MariaDB Corporation.
#
# 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
@@ -31,6 +32,7 @@ echo '#include "univ.i"' > $OUTFILE
# a warning on Win64. Add the cast. Also define some symbols as static.
sed -e '
s/'"$TMPFILE"'/'"$OUTFILE"'/;
+s/^void *yyset_extra *( *YY_EXTRA_TYPE *user_defined *) *;//
s/\(int offset = \)\((yy_c_buf_p) - (yytext_ptr)\);/\1(int)(\2);/;
s/\(void yy\(restart\|_\(delete\|flush\)_buffer\)\)/static \1/;
s/\(void yy_switch_to_buffer\)/MY_ATTRIBUTE((unused)) static \1/;
@@ -38,11 +40,12 @@ s/\(void yy\(push\|pop\)_buffer_state\)/MY_ATTRIBUTE((unused)) static \1/;
s/\(YY_BUFFER_STATE yy_create_buffer\)/static \1/;
s/\(\(int\|void\) yy[gs]et_\)/MY_ATTRIBUTE((unused)) static \1/;
s/\(void \*\?yy\(\(re\)\?alloc\|free\)\)/static \1/;
-s/\(extern \)\?\(int yy\(leng\|lineno\|_flex_debug\)\)/static \2/;
+s/extern int yy\(leng\|_flex_debug\|lineno\);//;
+s/\(int yy\(leng\|lineno\|_flex_debug\)\)/static \1/;
s/\(int yylex_destroy\)/MY_ATTRIBUTE((unused)) static \1/;
-s/\(extern \)\?\(int yylex \)/UNIV_INTERN \2/;
s/^\(\(FILE\|char\) *\* *yyget\)/MY_ATTRIBUTE((unused)) static \1/;
-s/^\(extern \)\?\(\(FILE\|char\) *\* *yy\)/static \2/;
+s/^extern \(\(FILE\|char\) *\* *yy\).*//;
+s/^\(FILE\|char\) *\* *yy/static &/;
' < $TMPFILE >> $OUTFILE
rm $TMPFILE
diff --git a/storage/xtradb/pars/pars0lex.l b/storage/xtradb/pars/pars0lex.l
index f800410fa3fb54096f149a0349fa9a7460e92ea0..60756413c0a48315f007687c971958fc3e6d2a51 100644
--- a/storage/xtradb/pars/pars0lex.l
+++ b/storage/xtradb/pars/pars0lex.l
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -64,9 +65,8 @@ Created 12/14/1997 Heikki Tuuri
#define realloc(P, A) ut_realloc(P, A)
#define exit(A) ut_error
-/* Note: We cast &result to int* from yysize_t* */
#define YY_INPUT(buf, result, max_size) \
- pars_get_lex_chars(buf, (int*) &result, max_size)
+ result = pars_get_lex_chars(buf, max_size)
/* String buffer for removing quotes */
static ulint stringbuf_len_alloc = 0; /* Allocated length */
@@ -697,10 +697,8 @@ void
pars_lexer_close(void)
/*==================*/
{
- if (yy_buffer_stack)
- yylex_destroy();
- if (stringbuf)
- free(stringbuf);
+ yylex_destroy();
+ free(stringbuf);
stringbuf = NULL;
stringbuf_len_alloc = stringbuf_len = 0;
}
diff --git a/storage/xtradb/pars/pars0pars.cc b/storage/xtradb/pars/pars0pars.cc
index ce61d6e1e3bc65b525de2ac2359e20559eb52173..24bbeb1d36dd0d0bbf5a007e7605fdb88aa85039 100644
--- a/storage/xtradb/pars/pars0pars.cc
+++ b/storage/xtradb/pars/pars0pars.cc
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -2153,16 +2154,14 @@ pars_stored_procedure_call(
/*************************************************************//**
Retrieves characters to the lexical analyzer. */
UNIV_INTERN
-int
+size_t
pars_get_lex_chars(
/*===============*/
char* buf, /*!< in/out: buffer where to copy */
- int max_size) /*!< in: maximum number of characters which fit
+ size_t max_size) /*!< in: maximum number of characters which fit
in the buffer */
{
- int len;
-
- len = static_cast(
+ size_t len = size_t(
pars_sym_tab_global->string_len
- pars_sym_tab_global->next_char_pos);
if (len == 0) {
diff --git a/storage/xtradb/rem/rem0rec.cc b/storage/xtradb/rem/rem0rec.cc
index 2314f110312c8a2be76f8c1544e4d558a39797bc..ff680b3cfb61264271908fe1492fc79bac064f2a 100644
--- a/storage/xtradb/rem/rem0rec.cc
+++ b/storage/xtradb/rem/rem0rec.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -556,10 +556,6 @@ rec_get_offsets_func(
ulint n;
ulint size;
- ut_ad(rec);
- ut_ad(index);
- ut_ad(heap);
-
if (dict_table_is_comp(index->table)) {
switch (UNIV_EXPECT(rec_get_status(rec),
REC_STATUS_ORDINARY)) {
@@ -637,9 +633,6 @@ rec_get_offsets_reverse(
ulint null_mask;
ulint n_node_ptr_field;
- ut_ad(extra);
- ut_ad(index);
- ut_ad(offsets);
ut_ad(dict_table_is_comp(index->table));
if (UNIV_UNLIKELY(node_ptr)) {
@@ -748,8 +741,6 @@ rec_get_nth_field_offs_old(
ulint os;
ulint next_os;
- ut_ad(len);
- ut_a(rec);
ut_a(n < rec_get_n_fields_old(rec));
if (rec_get_1byte_offs_flag(rec)) {
@@ -1717,7 +1708,6 @@ rec_validate(
ulint sum = 0;
ulint i;
- ut_a(rec);
n_fields = rec_offs_n_fields(offsets);
if ((n_fields == 0) || (n_fields > REC_MAX_N_FIELDS)) {
@@ -1781,8 +1771,6 @@ rec_print_old(
ulint n;
ulint i;
- ut_ad(rec);
-
n = rec_get_n_fields_old(rec);
fprintf(file, "PHYSICAL RECORD: n_fields %lu;"
@@ -1876,8 +1864,6 @@ rec_print_new(
const rec_t* rec, /*!< in: physical record */
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
{
- ut_ad(rec);
- ut_ad(offsets);
ut_ad(rec_offs_validate(rec, NULL, offsets));
if (!rec_offs_comp(offsets)) {
@@ -1904,8 +1890,6 @@ rec_print(
const rec_t* rec, /*!< in: physical record */
const dict_index_t* index) /*!< in: record descriptor */
{
- ut_ad(index);
-
if (!dict_table_is_comp(index->table)) {
rec_print_old(file, rec);
return;
diff --git a/storage/xtradb/row/row0ftsort.cc b/storage/xtradb/row/row0ftsort.cc
index deae270f7166e77e023d6eeb76a8f561ff78e83b..d3c8b9a80bd4e598381dab03cc6743f5f5e80565 100644
--- a/storage/xtradb/row/row0ftsort.cc
+++ b/storage/xtradb/row/row0ftsort.cc
@@ -102,7 +102,7 @@ row_merge_create_fts_sort_index(
field->name = NULL;
field->prefix_len = 0;
field->col = static_cast(
- mem_heap_alloc(new_index->heap, sizeof(dict_col_t)));
+ mem_heap_zalloc(new_index->heap, sizeof(dict_col_t)));
field->col->prtype = idx_field->col->prtype | DATA_NOT_NULL;
field->col->mtype = charset == &my_charset_latin1
? DATA_VARCHAR : DATA_VARMYSQL;
@@ -117,7 +117,7 @@ row_merge_create_fts_sort_index(
field->name = NULL;
field->prefix_len = 0;
field->col = static_cast(
- mem_heap_alloc(new_index->heap, sizeof(dict_col_t)));
+ mem_heap_zalloc(new_index->heap, sizeof(dict_col_t)));
field->col->mtype = DATA_INT;
*opt_doc_id_size = FALSE;
@@ -151,21 +151,16 @@ row_merge_create_fts_sort_index(
field->col->prtype = DATA_NOT_NULL | DATA_BINARY_TYPE;
- field->col->mbminlen = 0;
- field->col->mbmaxlen = 0;
-
/* The third field is on the word's position in the original doc */
field = dict_index_get_nth_field(new_index, 2);
field->name = NULL;
field->prefix_len = 0;
field->col = static_cast(
- mem_heap_alloc(new_index->heap, sizeof(dict_col_t)));
+ mem_heap_zalloc(new_index->heap, sizeof(dict_col_t)));
field->col->mtype = DATA_INT;
field->col->len = 4 ;
field->fixed_len = 4;
field->col->prtype = DATA_NOT_NULL;
- field->col->mbminlen = 0;
- field->col->mbmaxlen = 0;
return(new_index);
}
@@ -1423,9 +1418,6 @@ row_fts_merge_insert(
ulint count_diag = 0;
ulint space;
- ut_ad(index);
- ut_ad(table);
-
/* We use the insert query graph as the dummy graph
needed in the row module call */
diff --git a/storage/xtradb/row/row0ins.cc b/storage/xtradb/row/row0ins.cc
index 476c18680f3bd3d554b0fa54f4d06c9d75d6d2f7..cb22f5030d57d0feff137ad58434678558598c21 100644
--- a/storage/xtradb/row/row0ins.cc
+++ b/storage/xtradb/row/row0ins.cc
@@ -495,8 +495,6 @@ row_ins_cascade_calc_update_vec(
ulint doc_id_pos = 0;
doc_id_t new_doc_id = FTS_NULL_DOC_ID;
- ut_a(node);
- ut_a(foreign);
ut_a(cascade);
ut_a(table);
ut_a(index);
@@ -991,11 +989,6 @@ row_ins_foreign_check_on_constraint(
doc_id_t doc_id = FTS_NULL_DOC_ID;
ibool fts_col_affacted = FALSE;
- ut_a(thr);
- ut_a(foreign);
- ut_a(pcur);
- ut_a(mtr);
-
trx = thr_get_trx(thr);
/* Since we are going to delete or update a row, we have to invalidate
diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc
index e4440640431d6d9cdbdeaae6b219d3b1d8c17a74..75d7397e7ee45a4ee1163a33ea3d2692215a5c4a 100644
--- a/storage/xtradb/row/row0merge.cc
+++ b/storage/xtradb/row/row0merge.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2019, MariaDB Corporation.
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
@@ -3471,7 +3471,6 @@ row_merge_rename_index_to_add(
"WHERE TABLE_ID = :tableid AND ID = :indexid;\n"
"END;\n";
- ut_ad(trx);
ut_a(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
@@ -3528,7 +3527,6 @@ row_merge_rename_index_to_drop(
"WHERE TABLE_ID = :tableid AND ID = :indexid;\n"
"END;\n";
- ut_ad(trx);
ut_a(trx->dict_operation_lock_mode == RW_X_LATCH);
ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
@@ -3705,7 +3703,7 @@ row_merge_create_index_graph(
/*=========================*/
trx_t* trx, /*!< in: trx */
dict_table_t* table, /*!< in: table */
- dict_index_t* index) /*!< in: index */
+ dict_index_t*& index) /*!< in,out: index */
{
ind_node_t* node; /*!< Index creation node */
mem_heap_t* heap; /*!< Memory heap */
@@ -3729,6 +3727,8 @@ row_merge_create_index_graph(
err = trx->error_state;
+ index = node->index;
+
que_graph_free((que_t*) que_node_get_parent(thr));
return(err);
@@ -3770,20 +3770,21 @@ row_merge_create_index(
ifield->prefix_len);
}
+ ut_d(const dict_index_t* const index_template = index);
/* Add the index to SYS_INDEXES, using the index prototype. */
err = row_merge_create_index_graph(trx, table, index);
if (err == DB_SUCCESS) {
-
- index = dict_table_get_index_on_name(table, index_def->name);
-
- ut_a(index);
-
+ ut_ad(index != index_template);
/* Note the id of the transaction that created this
index, we use it to restrict readers from accessing
this index, to ensure read consistency. */
ut_ad(index->trx_id == trx->id);
} else {
+ ut_ad(!index || index == index_template);
+ if (index) {
+ dict_mem_index_free(index);
+ }
index = NULL;
}
diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc
index 93a4db98e7bf8e3ec560437a63bf71fd8dbdd506..a21e32cb91ed63c88456873e601590aa609f729c 100644
--- a/storage/xtradb/row/row0mysql.cc
+++ b/storage/xtradb/row/row0mysql.cc
@@ -615,8 +615,7 @@ row_mysql_handle_errors(
switch (err) {
case DB_LOCK_WAIT_TIMEOUT:
if (row_rollback_on_timeout) {
- trx_rollback_to_savepoint(trx, NULL);
- break;
+ goto rollback;
}
/* fall through */
case DB_DUPLICATE_KEY:
@@ -635,6 +634,7 @@ row_mysql_handle_errors(
case DB_DICT_CHANGED:
case DB_TABLE_NOT_FOUND:
case DB_DECRYPTION_FAILED:
+ rollback_to_savept:
if (savept) {
/* Roll back the latest, possibly incomplete insertion
or update */
@@ -658,6 +658,7 @@ row_mysql_handle_errors(
case DB_DEADLOCK:
case DB_LOCK_TABLE_FULL:
+ rollback:
/* Roll back the whole transaction; this resolution was added
to version 3.23.43 */
@@ -687,14 +688,14 @@ row_mysql_handle_errors(
"InnoDB: you dump the tables, look at\n"
"InnoDB: " REFMAN "forcing-innodb-recovery.html"
" for help.\n", stderr);
- break;
+ goto rollback_to_savept;
case DB_FOREIGN_EXCEED_MAX_CASCADE:
fprintf(stderr, "InnoDB: Cannot delete/update rows with"
" cascading foreign key constraints that exceed max"
" depth of %lu\n"
"Please drop excessive foreign constraints"
" and try again\n", (ulong) DICT_FK_MAX_RECURSIVE_LOAD);
- break;
+ goto rollback_to_savept;
default:
fprintf(stderr, "InnoDB: unknown error code %lu\n",
(ulong) err);
@@ -3238,7 +3239,6 @@ row_mysql_lock_table(
dberr_t err;
sel_node_t* node;
- ut_ad(trx);
ut_ad(mode == LOCK_X || mode == LOCK_S);
heap = mem_heap_create(512);
@@ -3319,17 +3319,17 @@ fil_wait_crypt_bg_threads(
time_t now = time(0);
if (now >= last + 30) {
fprintf(stderr,
- "WARNING: waited " TIMETPF " seconds "
+ "WARNING: waited %ld seconds "
"for ref-count on table: %s space: %u\n",
- now - start, table->name, table->space);
+ (long)(now - start), table->name, table->space);
last = now;
}
if (now >= start + 300) {
fprintf(stderr,
- "WARNING: after " TIMETPF " seconds, gave up waiting "
+ "WARNING: after %ld seconds, gave up waiting "
"for ref-count on table: %s space: %u\n",
- now - start, table->name, table->space);
+ (long)(now - start), table->name, table->space);
break;
}
}
@@ -5183,11 +5183,12 @@ row_rename_table_for_mysql(
if (!new_is_tmp) {
/* Rename all constraints. */
- char new_table_name[MAX_TABLE_NAME_LEN] = "";
- char old_table_utf8[MAX_TABLE_NAME_LEN] = "";
+ char new_table_name[MAX_TABLE_NAME_LEN + 1];
+ char old_table_utf8[MAX_TABLE_NAME_LEN + 1];
uint errors = 0;
strncpy(old_table_utf8, old_name, MAX_TABLE_NAME_LEN);
+ old_table_utf8[MAX_TABLE_NAME_LEN] = '\0';
innobase_convert_to_system_charset(
strchr(old_table_utf8, '/') + 1,
strchr(old_name, '/') +1,
@@ -5198,6 +5199,7 @@ row_rename_table_for_mysql(
my_charset_filename to UTF-8. This means that the
table name is already in UTF-8 (#mysql#50). */
strncpy(old_table_utf8, old_name, MAX_TABLE_NAME_LEN);
+ old_table_utf8[MAX_TABLE_NAME_LEN] = '\0';
}
info = pars_info_create();
@@ -5208,6 +5210,7 @@ row_rename_table_for_mysql(
old_table_utf8);
strncpy(new_table_name, new_name, MAX_TABLE_NAME_LEN);
+ new_table_name[MAX_TABLE_NAME_LEN] = '\0';
innobase_convert_to_system_charset(
strchr(new_table_name, '/') + 1,
strchr(new_name, '/') +1,
@@ -5218,6 +5221,7 @@ row_rename_table_for_mysql(
my_charset_filename to UTF-8. This means that the
table name is already in UTF-8 (#mysql#50). */
strncpy(new_table_name, new_name, MAX_TABLE_NAME_LEN);
+ new_table_name[MAX_TABLE_NAME_LEN] = '\0';
}
pars_info_add_str_literal(info, "new_table_utf8", new_table_name);
diff --git a/storage/xtradb/row/row0purge.cc b/storage/xtradb/row/row0purge.cc
index 0cd0941987d06e23cf72b4c26352a8dfaefe3215..414eeb9db3ac4ad8ca570f179ea4a860ad32ba64 100644
--- a/storage/xtradb/row/row0purge.cc
+++ b/storage/xtradb/row/row0purge.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -968,8 +968,6 @@ row_purge_step(
{
purge_node_t* node;
- ut_ad(thr);
-
node = static_cast(thr->run_node);
node->table = NULL;
diff --git a/storage/xtradb/row/row0row.cc b/storage/xtradb/row/row0row.cc
index 9bf9e7182ca670118405508a974def4ec80487a7..884bf52af340f038dcf6f736a5e6697195cfe535 100644
--- a/storage/xtradb/row/row0row.cc
+++ b/storage/xtradb/row/row0row.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2019, MariaDB Corporation.
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
@@ -639,9 +639,6 @@ row_build_row_ref_in_tuple(
ulint offsets_[REC_OFFS_NORMAL_SIZE];
rec_offs_init(offsets_);
- ut_a(ref);
- ut_a(index);
- ut_a(rec);
ut_ad(!dict_index_is_clust(index));
if (UNIV_UNLIKELY(!index->table)) {
diff --git a/storage/xtradb/row/row0upd.cc b/storage/xtradb/row/row0upd.cc
index 93ccc07c9af19b5bb6c2ddbdeb29e85f5bfc3ed5..3df207716c34a08b8ad6fd0e6a35e32003bab0f8 100644
--- a/storage/xtradb/row/row0upd.cc
+++ b/storage/xtradb/row/row0upd.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2019, MariaDB Corporation.
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
@@ -2208,7 +2208,6 @@ row_upd_clust_rec_by_insert(
rec_t* rec;
ulint* offsets = NULL;
- ut_ad(node);
ut_ad(dict_index_is_clust(index));
trx = thr_get_trx(thr);
@@ -2357,7 +2356,6 @@ row_upd_clust_rec(
dberr_t err;
const dtuple_t* rebuilt_old_pk = NULL;
- ut_ad(node);
ut_ad(dict_index_is_clust(index));
pcur = node->pcur;
@@ -2525,7 +2523,6 @@ row_upd_del_mark_clust_rec(
trx_t* trx = thr_get_trx(thr) ;
#endif /* WITH_WSREP */
- ut_ad(node);
ut_ad(dict_index_is_clust(index));
ut_ad(node->is_delete);
diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc
index 2553d405a19eb5273c4223e45a96f0c54155cd69..941feeb70c7bba4107ac9058dc32a407df0eb951 100644
--- a/storage/xtradb/srv/srv0start.cc
+++ b/storage/xtradb/srv/srv0start.cc
@@ -3,7 +3,7 @@
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2017, MariaDB Corporation
+Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -3476,9 +3476,8 @@ srv_get_meta_data_filename(
if (strncmp(suffix, ".cfg", suffix_len) == 0) {
strcpy(filename, path);
} else {
- ut_ad(strncmp(suffix, ".ibd", suffix_len) == 0);
-
- strncpy(filename, path, len - suffix_len);
+ ut_ad(!strcmp(suffix, ".ibd"));
+ memcpy(filename, path, len - suffix_len);
suffix = filename + (len - suffix_len);
strcpy(suffix, ".cfg");
}
diff --git a/storage/xtradb/trx/trx0purge.cc b/storage/xtradb/trx/trx0purge.cc
index 11522ea5f9ce89bce58c12448a7780ce878d3c26..a9736e36075d0233322b9b00ba31c6274bf5a14a 100644
--- a/storage/xtradb/trx/trx0purge.cc
+++ b/storage/xtradb/trx/trx0purge.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -989,7 +989,7 @@ trx_purge_attach_undo_recs(
i = 0;
- for (;;) {
+ while (UNIV_LIKELY(srv_undo_sources) || !srv_fast_shutdown) {
purge_node_t* node;
trx_purge_rec_t* purge_rec;
diff --git a/storage/xtradb/trx/trx0rec.cc b/storage/xtradb/trx/trx0rec.cc
index dc9b08299255244321dd80bd5966d012d4ceed5a..351f65bb9434e8e06eafcc014430122446ff2a0d 100644
--- a/storage/xtradb/trx/trx0rec.cc
+++ b/storage/xtradb/trx/trx0rec.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
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
@@ -1087,10 +1087,6 @@ trx_undo_rec_get_partial_row(
const byte* end_ptr;
ulint row_len;
- ut_ad(index);
- ut_ad(ptr);
- ut_ad(row);
- ut_ad(heap);
ut_ad(dict_index_is_clust(index));
row_len = dict_table_get_n_cols(index->table);
diff --git a/storage/xtradb/trx/trx0roll.cc b/storage/xtradb/trx/trx0roll.cc
index 56b7120fa34bc9f85d1a7c8f2ce75361d7e6c3f5..6f393511611b3ea3d73df2a96036fe42f4ab8b67 100644
--- a/storage/xtradb/trx/trx0roll.cc
+++ b/storage/xtradb/trx/trx0roll.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2018, MariaDB Corporation.
+Copyright (c) 2016, 2019, MariaDB Corporation.
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
@@ -208,6 +208,7 @@ trx_rollback_for_mysql(
return(trx_rollback_for_mysql_low(trx));
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
ut_ad(!trx_is_autocommit_non_locking(trx));
return(trx_rollback_for_mysql_low(trx));
@@ -260,6 +261,7 @@ trx_rollback_last_sql_stat_for_mysql(
return(err);
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
/* The statement rollback is only allowed on an ACTIVE
transaction, not a PREPARED or COMMITTED one. */
@@ -433,6 +435,7 @@ trx_rollback_to_savepoint_for_mysql(
return(trx_rollback_to_savepoint_for_mysql_low(
trx, savep, mysql_binlog_cache_pos));
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
/* The savepoint rollback is only allowed on an ACTIVE
transaction, not a PREPARED or COMMITTED one. */
@@ -722,6 +725,7 @@ trx_rollback_resurrected(
}
return(FALSE);
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
goto func_exit;
case TRX_STATE_NOT_STARTED:
break;
diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc
index 17cba81daf378d1ddcb12753753cbc1492a61f96..1044a9321a07a03e1e96096f8d67bec03378ca11 100644
--- a/storage/xtradb/trx/trx0trx.cc
+++ b/storage/xtradb/trx/trx0trx.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2019, MariaDB Corporation.
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
@@ -480,6 +480,7 @@ trx_free_prepared(
trx_t* trx) /*!< in, own: trx object */
{
ut_a(trx_state_eq(trx, TRX_STATE_PREPARED)
+ || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)
|| (trx->is_recovered
&& (trx_state_eq(trx, TRX_STATE_ACTIVE)
|| trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY))
@@ -747,8 +748,7 @@ trx_resurrect_insert(
/* trx_start_low() is not called with resurrect, so need to initialize
start time here.*/
- if (trx->state == TRX_STATE_ACTIVE
- || trx->state == TRX_STATE_PREPARED) {
+ if (trx->state != TRX_STATE_COMMITTED_IN_MEMORY) {
trx->start_time = ut_time();
}
@@ -1790,6 +1790,7 @@ trx_commit_or_rollback_prepare(
/* fall through */
case TRX_STATE_ACTIVE:
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
/* If the trx is in a lock wait state, moves the waiting
query thread to the suspended state */
@@ -1927,6 +1928,7 @@ trx_commit_for_mysql(
/* fall through */
case TRX_STATE_ACTIVE:
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
trx->op_info = "committing";
trx_commit(trx);
MONITOR_DEC(MONITOR_TRX_ACTIVE);
@@ -1983,6 +1985,7 @@ trx_mark_sql_stat_end(
switch (trx->state) {
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
break;
case TRX_STATE_NOT_STARTED:
@@ -2041,6 +2044,7 @@ trx_print_low(
(ulong) difftime(time(NULL), trx->start_time));
goto state_ok;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
fprintf(f, ", ACTIVE (PREPARED) %lu sec",
(ulong) difftime(time(NULL), trx->start_time));
goto state_ok;
@@ -2185,6 +2189,7 @@ wsrep_trx_print_locking(
(ulong) difftime(time(NULL), trx->start_time));
goto state_ok;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
fprintf(f, ", ACTIVE (PREPARED) %lu sec",
(ulong) difftime(time(NULL), trx->start_time));
goto state_ok;
@@ -2313,6 +2318,7 @@ trx_assert_started(
switch (trx->state) {
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
return(TRUE);
case TRX_STATE_ACTIVE:
@@ -2478,7 +2484,7 @@ trx_recover_for_mysql(
XID* xid_list, /*!< in/out: prepared transactions */
ulint len) /*!< in: number of slots in xid_list */
{
- const trx_t* trx;
+ trx_t* trx;
ulint count = 0;
ut_ad(xid_list);
@@ -2500,6 +2506,7 @@ trx_recover_for_mysql(
trx_sys->mutex. It may change to PREPARED, but not if
trx->is_recovered. It may also change to COMMITTED. */
if (trx_state_eq(trx, TRX_STATE_PREPARED)) {
+ trx->state = TRX_STATE_PREPARED_RECOVERED;
xid_list[count] = trx->xid;
if (count == 0) {
@@ -2524,11 +2531,22 @@ trx_recover_for_mysql(
count++;
if (count == len) {
- break;
+ goto partial;
}
}
}
+ /* After returning the full list, reset the state, because
+ there will be a second call to recover the transactions. */
+ for (trx = UT_LIST_GET_FIRST(trx_sys->rw_trx_list);
+ trx != NULL;
+ trx = UT_LIST_GET_NEXT(trx_list, trx)) {
+ if (trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)) {
+ trx->state = TRX_STATE_PREPARED;
+ }
+ }
+
+partial:
mutex_exit(&trx_sys->mutex);
if (count > 0){
@@ -2571,7 +2589,8 @@ trx_get_trx_by_xid_low(
the same */
if (trx->is_recovered
- && trx_state_eq(trx, TRX_STATE_PREPARED)
+ && (trx_state_eq(trx, TRX_STATE_PREPARED)
+ || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED))
&& !trx->xid.is_null()
&& xid->gtrid_length == trx->xid.gtrid_length
&& xid->bqual_length == trx->xid.bqual_length
@@ -2651,6 +2670,7 @@ trx_start_if_not_started_xa_low(
case TRX_STATE_ACTIVE:
return;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
break;
}
@@ -2677,6 +2697,7 @@ trx_start_if_not_started_low(
case TRX_STATE_ACTIVE:
return;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
break;
}
@@ -2722,6 +2743,7 @@ trx_start_for_ddl_low(
ut_ad(trx->will_lock > 0);
return;
case TRX_STATE_PREPARED:
+ case TRX_STATE_PREPARED_RECOVERED:
case TRX_STATE_COMMITTED_IN_MEMORY:
break;
}
diff --git a/storage/xtradb/ut/ut0wqueue.cc b/storage/xtradb/ut/ut0wqueue.cc
index 1607e535a946ee9cb724d58ced02cc803be92b92..fce39bd817ef4798ace8003cee7f2800182404be 100644
--- a/storage/xtradb/ut/ut0wqueue.cc
+++ b/storage/xtradb/ut/ut0wqueue.cc
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
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
@@ -193,17 +194,15 @@ ib_wqueue_nowait(
return (node ? node->data : NULL);
}
-/********************************************************************
-Check if queue is empty. */
-
-ibool
-ib_wqueue_is_empty(
-/*===============*/
- /* out: TRUE if queue empty
- else FALSE */
- const ib_wqueue_t* wq) /* in: work queue */
+/** Check if queue is empty.
+@param wq wait queue
+@return whether the queue is empty */
+bool ib_wqueue_is_empty(ib_wqueue_t* wq)
{
- return(ib_list_is_empty(wq->items));
+ mutex_enter(&wq->mutex);
+ bool is_empty = ib_list_is_empty(wq->items);
+ mutex_exit(&wq->mutex);
+ return is_empty;
}
/********************************************************************
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index efd862f5a1cf7a6283418d0544f5622ee8e857bb..e2e3d96386eaaba8d8718bf39baba03c2ff7f927 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2009, 2017, MariaDB
+ Copyright (c) 2009, 2019, MariaDB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -4887,16 +4887,6 @@ static const uchar to_upper_utf8[] = {
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
};
-static inline int bincmp(const uchar *s, const uchar *se,
- const uchar *t, const uchar *te)
-{
- int slen= (int) (se-s), tlen= (int) (te-t);
- int len=MY_MIN(slen,tlen);
- int cmp= memcmp(s,t,len);
- return cmp ? cmp : slen-tlen;
-}
-
-
static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
@@ -5059,14 +5049,6 @@ my_toupper_utf8mb3(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
}
-static inline void
-my_tosort_utf8mb3(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
-{
- MY_UNICASE_CHARACTER *page;
- if ((page= uni_plane->page[(*wc >> 8) & 0xFF]))
- *wc= page[*wc & 0xFF].sort;
-}
-
static size_t my_caseup_utf8(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
@@ -7306,17 +7288,6 @@ static uchar to_upper_utf8mb4[]=
};
-static inline int
-bincmp_utf8mb4(const uchar *s, const uchar *se,
- const uchar *t, const uchar *te)
-{
- int slen= (int) (se - s), tlen= (int) (te - t);
- int len= MY_MIN(slen, tlen);
- int cmp= memcmp(s, t, len);
- return cmp ? cmp : slen - tlen;
-}
-
-
static int
my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh
index 08b046dc27208ea1d975b90a170b798364d641fc..57db9fd5d90a478b491aa08f641e4b8fa6a0b81b 100644
--- a/support-files/rpm/server-postin.sh
+++ b/support-files/rpm/server-postin.sh
@@ -17,9 +17,7 @@ fi
if [ $1 = 1 ] ; then
if [ -x /usr/bin/systemctl ] ; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1
- fi
-
- if [ -x /sbin/chkconfig ] ; then
+ elif [ -x /sbin/chkconfig ] ; then
/sbin/chkconfig --add mysql
fi
@@ -55,9 +53,6 @@ if [ $1 = 1 ] ; then
chown -R %{mysqld_user}:%{mysqld_group} $datadir
if [ ! -e $datadir/mysql ]; then
- # Create data directory
- mkdir -p $datadir/{mysql,test}
-
# Initiate databases
%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
fi
diff --git a/support-files/rpm/server-postun.sh b/support-files/rpm/server-postun.sh
index 412c6f4c67b58a9a42a7f30479212013a928955c..21468e39e1872c2d7ad4151510b7e6d757ac8c7a 100644
--- a/support-files/rpm/server-postun.sh
+++ b/support-files/rpm/server-postun.sh
@@ -1,9 +1,10 @@
if [ $1 -ge 1 ]; then
- if [ -x %{_sysconfdir}/init.d/mysql ] ; then
- # only restart the server if it was alredy running
- if %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then
- %{_sysconfdir}/init.d/mysql restart
- fi
+ # only restart the server if it was alredy running
+ if [ -x /usr/bin/systemctl ] ; then
+ /usr/bin/systemctl daemon-reload > /dev/null 2>&1
+ /usr/bin/systemctl try-restart mariadb.service > /dev/null 2>&1
+ elif %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then
+ %{_sysconfdir}/init.d/mysql restart
fi
fi
diff --git a/support-files/rpm/server-preun.sh b/support-files/rpm/server-preun.sh
index 7ef48f1c8d4f239b0bb97bb88de29a2ad00772f9..1d733a7d8990d713b3e5c3bc08adf5352785ccde 100644
--- a/support-files/rpm/server-preun.sh
+++ b/support-files/rpm/server-preun.sh
@@ -1,12 +1,16 @@
if [ $1 = 0 ] ; then
- # Stop MySQL before uninstalling it
- if [ -x %{_sysconfdir}/init.d/mysql ] ; then
- %{_sysconfdir}/init.d/mysql stop > /dev/null
- fi
+ # Stop MySQL before uninstalling it
# Don't start it automatically anymore
- if [ -x /sbin/chkconfig ] ; then
- /sbin/chkconfig --del mysql
- fi
+ if [ -x /usr/bin/systemctl ] ; then
+ /usr/bin/systemctl stop mariadb.service > /dev/null 2>&1
+ /usr/bin/systemctl disable mariadb.service > /dev/null 2>&1
+ fi
+ if [ -x %{_sysconfdir}/init.d/mysql ] ; then
+ %{_sysconfdir}/init.d/mysql stop > /dev/null
+ fi
+ if [ -x /sbin/chkconfig ] ; then
+ /sbin/chkconfig --del mysql > /dev/null 2>&1
+ fi
fi
# We do not remove the mysql user since it may still own a lot of
diff --git a/support-files/wsrep.cnf.sh b/support-files/wsrep.cnf.sh
index 51ce3dca2ddad469169174cfc7d6175d85b15574..7242fff9f7ac0f1f27c97c7c021913fbd3980460 100644
--- a/support-files/wsrep.cnf.sh
+++ b/support-files/wsrep.cnf.sh
@@ -67,10 +67,10 @@ wsrep_slave_threads=1
wsrep_certify_nonPK=1
# Maximum number of rows in write set
-wsrep_max_ws_rows=131072
+wsrep_max_ws_rows=0
# Maximum size of write set
-wsrep_max_ws_size=1073741824
+wsrep_max_ws_size=2147483647
# to enable debug level logging, set this to 1
wsrep_debug=0
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index b63bcbaa03755b97ab96d5200c0d495bc911dc41..63d40c5db64b90cc553d70da363a5df44c61a983 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -19451,8 +19451,8 @@ static void test_big_packet()
opt_password, current_db, opt_port,
opt_unix_socket, 0)))
{
- mysql_close(mysql_local);
fprintf(stderr, "\n connection failed(%s)", mysql_error(mysql_local));
+ mysql_close(mysql_local);
exit(1);
}
@@ -19479,6 +19479,25 @@ static void test_big_packet()
}
+/* Test simple prepares of all DML statements */
+
+static void test_prepare_analyze()
+{
+ MYSQL_STMT *stmt;
+ int rc;
+ myheader("test_prepare_analyze");
+
+ stmt= mysql_stmt_init(mysql);
+ check_stmt(stmt);
+ rc= mysql_stmt_prepare(stmt, STRING_WITH_LEN("ANALYZE SELECT 1"));
+ check_execute(stmt, rc);
+ verify_param_count(stmt, 0);
+ rc= mysql_stmt_execute(stmt);
+ check_execute(stmt, rc);
+
+ mysql_stmt_close(stmt);
+}
+
static struct my_tests_st my_tests[]= {
{ "disable_query_logs", disable_query_logs },
{ "test_view_sp_list_fields", test_view_sp_list_fields },
@@ -19755,6 +19774,7 @@ static struct my_tests_st my_tests[]= {
#endif
{ "test_compressed_protocol", test_compressed_protocol },
{ "test_big_packet", test_big_packet },
+ { "test_prepare_analyze", test_prepare_analyze },
{ 0, 0 }
};
diff --git a/unittest/sql/mf_iocache-t.cc b/unittest/sql/mf_iocache-t.cc
index fca5ec5014db6b0d68f113ac511028dd98aa8ae5..51656c02e57f9d851809ce1d21a563bd572b1ffc 100644
--- a/unittest/sql/mf_iocache-t.cc
+++ b/unittest/sql/mf_iocache-t.cc
@@ -49,6 +49,12 @@ uint encryption_key_get_func(uint, uint, uchar* key, uint* size)
return 0;
}
+uint encryption_ctx_size_func(unsigned int, unsigned int)
+{
+ return MY_AES_CTX_SIZE;
+}
+
+
#ifdef HAVE_EncryptAes128Gcm
enum my_aes_mode aes_mode= MY_AES_GCM;
#else
@@ -72,7 +78,7 @@ struct encryption_service_st encryption_handler=
{
encryption_key_get_latest_version_func,
encryption_key_get_func,
- (uint (*)(unsigned int, unsigned int))my_aes_ctx_size,
+ encryption_ctx_size_func,
encryption_ctx_init_func,
my_aes_crypt_update,
my_aes_crypt_finish,
@@ -350,7 +356,7 @@ void mdev17133()
// random size 2nd read
res= my_b_read(&info, buf_i + total + MY_MIN(19, curr_read_size),
19 >= curr_read_size ? 0 : curr_read_size - 19);
- ok(res == 0, "rest of read %lu", curr_read_size - 19);
+ ok(res == 0, "rest of read %zu", curr_read_size - 19);
// mark read bytes in the used part of the cache buffer
memset(info.buffer, 0, info.read_pos - info.buffer);
diff --git a/win/packaging/create_msi.cmake.in b/win/packaging/create_msi.cmake.in
index 62ce5f1edd217e64f5bca5093f4565df8bb4b058..db6f57e023d575198f98e608f73c413d5d0512c9 100644
--- a/win/packaging/create_msi.cmake.in
+++ b/win/packaging/create_msi.cmake.in
@@ -398,9 +398,10 @@ IF("$ENV{EXTRA_LIGHT_ARGS}")
ENDIF()
FILE(REMOVE mysql_server.wixobj extra.wixobj)
+STRING(REPLACE " " ";" EXTRA_WIX_PREPROCESSOR_FLAGS_LIST ${EXTRA_WIX_PREPROCESSOR_FLAGS})
EXECUTE_PROCESS(
COMMAND ${CANDLE_EXECUTABLE}
- ${EXTRA_WIX_PREPROCESSOR_FLAGS}
+ ${EXTRA_WIX_PREPROCESSOR_FLAGS_LIST}
${CANDLE_ARCH}
-ext WixUtilExtension
-ext WixFirewallExtension
@@ -410,7 +411,7 @@ EXECUTE_PROCESS(
EXECUTE_PROCESS(
COMMAND ${CANDLE_EXECUTABLE} ${CANDLE_ARCH}
- ${EXTRA_WIX_PREPROCESSOR_FLAGS}
+ ${EXTRA_WIX_PREPROCESSOR_FLAGS_LIST}
-ext WixUtilExtension
-ext WixFirewallExtension
${CMAKE_CURRENT_BINARY_DIR}/extra.wxs