summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-02 11:04:54 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-02 11:04:54 +0300
commit5c3ff5cb93f8363820d506cdad3daafbc944f03b (patch)
treef5671e95dabd8ced0c7925e54b351bd704e41bcf
parentf9ab7b473a935141f85d27994d0faf3433a73144 (diff)
parent7b42d892de6acc04490f5cb6b8355c72b8f1a406 (diff)
downloadmariadb-git-5c3ff5cb93f8363820d506cdad3daafbc944f03b.tar.gz
Merge 10.3 into 10.4
-rw-r--r--CMakeLists.txt2
-rw-r--r--client/mysql.cc3
-rw-r--r--cmake/build_configurations/mysql_release.cmake4
-rw-r--r--cmake/build_depends.cmake39
-rw-r--r--cmake/cpack_rpm.cmake58
-rw-r--r--cmake/cpack_source_ignore_files.cmake20
-rw-r--r--cmake/maintainer.cmake9
-rw-r--r--cmake/mariadb_connector_c.cmake5
-rw-r--r--cmake/plugin.cmake3
-rw-r--r--cmake/systemd.cmake14
-rw-r--r--include/mysql/client_plugin.h26
-rw-r--r--mysql-test/include/mix2.inc2
-rw-r--r--mysql-test/main/ddl_i18n_koi8r.result76
-rw-r--r--mysql-test/main/ddl_i18n_koi8r.test8
-rw-r--r--mysql-test/main/ddl_i18n_utf8.result76
-rw-r--r--mysql-test/main/ddl_i18n_utf8.test8
-rw-r--r--mysql-test/main/events_1.result4
-rw-r--r--mysql-test/main/events_1.test4
-rw-r--r--mysql-test/main/insert.test2
-rw-r--r--mysql-test/main/mysql.result4
-rw-r--r--mysql-test/main/mysql.test6
-rw-r--r--mysql-test/main/partition_error.result2
-rw-r--r--mysql-test/main/show_check.result4
-rw-r--r--mysql-test/main/show_check.test2
-rw-r--r--mysql-test/main/stat_tables.result59
-rw-r--r--mysql-test/main/stat_tables.test44
-rw-r--r--mysql-test/main/stat_tables_innodb.result59
-rw-r--r--mysql-test/main/type_blob.result9
-rw-r--r--mysql-test/main/type_blob.test5
-rw-r--r--mysql-test/suite/binlog/r/binlog_innodb_stm.result17
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result434
-rw-r--r--mysql-test/suite/binlog/t/binlog_innodb_stm.test26
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test22
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result12
-rw-r--r--mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result12
-rw-r--r--mysql-test/suite/gcol/r/gcol_partition_innodb.result2
-rw-r--r--mysql-test/suite/innodb/t/innodb.test2
-rw-r--r--mysql-test/suite/plugins/t/thread_pool_server_audit.test2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result23
-rw-r--r--mysql-test/suite/rpl/r/rpl_rewrt_db.result21
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_invalid_external_user.result15
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_excess_initial_delay.test58
-rw-r--r--mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_rewrt_db.test19
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_invalid_external_user.test42
-rw-r--r--mysql-test/suite/storage_engine/vcol.result16
-rw-r--r--mysql-test/suite/vcol/r/binlog.result24
-rw-r--r--mysql-test/suite/vcol/r/partition.result2
-rw-r--r--mysql-test/suite/vcol/r/update.result8
-rw-r--r--mysql-test/suite/vcol/r/update_binlog.result16
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result20
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result20
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_select_myisam.result6
-rw-r--r--mysql-test/suite/versioning/r/insert2.result8
-rw-r--r--mysql-test/suite/versioning/r/partition.result31
-rw-r--r--mysql-test/suite/versioning/r/partition_innodb.result69
-rw-r--r--mysql-test/suite/versioning/r/rpl.result54
-rw-r--r--mysql-test/suite/versioning/r/rpl_row.result14
-rw-r--r--mysql-test/suite/versioning/r/select.result2
-rw-r--r--mysql-test/suite/versioning/r/trx_id.result22
-rw-r--r--mysql-test/suite/versioning/r/update,trx_id.rdiff19
-rw-r--r--mysql-test/suite/versioning/r/update.result52
-rw-r--r--mysql-test/suite/versioning/t/partition.combinations5
-rw-r--r--mysql-test/suite/versioning/t/partition.test40
-rw-r--r--mysql-test/suite/versioning/t/partition_innodb.test80
-rw-r--r--mysql-test/suite/versioning/t/rpl.test44
-rw-r--r--mysql-test/suite/versioning/t/rpl_row.test18
-rw-r--r--mysql-test/suite/versioning/t/trx_id.test10
-rw-r--r--mysql-test/suite/versioning/t/update.test20
-rw-r--r--mysys_ssl/my_crypt.cc5
-rw-r--r--plugin/auth_pam/CMakeLists.txt2
-rw-r--r--sql/field.cc7
-rw-r--r--sql/ha_partition.h16
-rw-r--r--sql/handler.cc32
-rw-r--r--sql/handler.h8
-rw-r--r--sql/item.h2
-rw-r--r--sql/item_vers.cc3
-rw-r--r--sql/log.cc6
-rw-r--r--sql/mysqld.cc3
-rw-r--r--sql/partition_element.h15
-rw-r--r--sql/share/errmsg-utf8.txt35
-rw-r--r--sql/slave.cc6
-rw-r--r--sql/sp_head.cc3
-rw-r--r--sql/spatial.cc12
-rw-r--r--sql/sql_admin.cc6
-rw-r--r--sql/sql_class.cc22
-rw-r--r--sql/sql_class.h3
-rw-r--r--sql/sql_parse.cc2
-rw-r--r--sql/sql_partition.cc8
-rw-r--r--sql/sql_statistics.cc10
-rw-r--r--sql/sql_table.cc5
-rw-r--r--sql/sql_update.cc1
-rw-r--r--sql/table.cc6
-rw-r--r--sql/winservice.c2
-rw-r--r--storage/cassandra/ha_cassandra.cc2
-rw-r--r--storage/cassandra/ha_cassandra.h4
-rw-r--r--storage/connect/CMakeLists.txt31
-rw-r--r--storage/connect/ha_connect.h4
-rw-r--r--storage/innobase/CMakeLists.txt12
-rw-r--r--storage/innobase/btr/btr0cur.cc5
-rw-r--r--storage/innobase/buf/buf0dump.cc2
-rw-r--r--storage/innobase/dict/dict0stats.cc59
-rw-r--r--storage/innobase/fts/Makefile.query20
-rw-r--r--storage/innobase/fts/fts0blex.cc1113
-rw-r--r--storage/innobase/fts/fts0tlex.cc1110
-rw-r--r--storage/innobase/handler/handler0alter.cc301
-rw-r--r--storage/innobase/include/btr0bulk.h2
-rw-r--r--storage/innobase/include/dict0stats.h15
-rw-r--r--storage/innobase/include/fts0blex.h465
-rw-r--r--storage/innobase/include/fts0tlex.h465
-rw-r--r--storage/innobase/include/ha_prototypes.h1
-rw-r--r--storage/innobase/include/mem0mem.h64
-rw-r--r--storage/innobase/include/mem0mem.ic96
-rw-r--r--storage/innobase/include/pars0pars.h6
-rw-r--r--storage/innobase/include/trx0trx.h34
-rw-r--r--storage/innobase/innodb.cmake8
-rw-r--r--storage/innobase/lock/lock0lock.cc14
-rw-r--r--storage/innobase/pars/lexyy.cc477
-rwxr-xr-xstorage/innobase/pars/make_flex.sh7
-rw-r--r--storage/innobase/pars/pars0lex.l5
-rw-r--r--storage/innobase/pars/pars0pars.cc13
-rw-r--r--storage/innobase/row/row0ftsort.cc2
-rw-r--r--storage/innobase/row/row0merge.cc93
-rw-r--r--storage/innobase/trx/trx0trx.cc30
-rw-r--r--storage/mroonga/lib/mrn_context_pool.cpp2
-rw-r--r--storage/myisammrg/mysql-test/storage_engine/vcol.rdiff16
-rw-r--r--storage/rocksdb/ha_rocksdb.cc34
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/deadlock.test1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/include/have_rocksdb.inc10
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/include/have_rocksdb.opt12
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/include/rocksdb_stress.inc11
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/my.cnf2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/suite.opt2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/suite.pm28
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/t/disabled.def2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress.test2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress_crash.test2
-rw-r--r--storage/spider/spd_table.cc6
-rw-r--r--strings/json_lib.c6
-rw-r--r--unittest/sql/mf_iocache-t.cc2
143 files changed, 4024 insertions, 2680 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index de89f6a93b9..96f251e9553 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -507,6 +507,8 @@ IF(UNIX)
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY Docs/README-wsrep COMPONENT Readme)
ENDIF()
+INCLUDE(build_depends)
+
INCLUDE(CPack)
IF(WIN32 AND SIGNCODE)
diff --git a/client/mysql.cc b/client/mysql.cc
index 537e10e5dc7..3ab3c1192b7 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -3782,9 +3782,10 @@ print_table_data_html(MYSQL_RES *result)
MYSQL_FIELD *field;
mysql_field_seek(result,0);
- (void) tee_fputs("<TABLE BORDER=1><TR>", PAGER);
+ (void) tee_fputs("<TABLE BORDER=1>", PAGER);
if (column_names)
{
+ (void) tee_fputs("<TR>", PAGER);
while((field = mysql_fetch_field(result)))
{
tee_fputs("<TH>", PAGER);
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index e9c9b971d87..91650e5e206 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -95,8 +95,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(PLUGIN_AUTH_SOCKET YES 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 00000000000..0d17c22cf98
--- /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 19293e9a176..fd2998a8608 100644
--- a/cmake/cpack_rpm.cmake
+++ b/cmake/cpack_rpm.cmake
@@ -83,6 +83,12 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE "
%define _sysconfdir ${INSTALL_SYSCONFDIR}
%define restart_flag_dir %{_localstatedir}/lib/rpm-state/mariadb
%define restart_flag %{restart_flag_dir}/need-restart
+
+%{?filter_setup:
+%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
@@ -202,7 +208,7 @@ ALTERNATIVE_NAME("server" "mysql-server")
ALTERNATIVE_NAME("test" "mysql-test")
# Argh! Different distributions call packages differently, to be a drop-in
-# replacement we have to fake distribution-specificic dependencies
+# replacement we have to fake distribution-specific dependencies
IF(RPM MATCHES "(rhel|centos)6")
ALTERNATIVE_NAME("client" "mysql")
@@ -218,36 +224,6 @@ ELSEIF(RPM MATCHES "(rhel|centos)8")
SET(PYTHON_SHEBANG "/usr/bin/python3")
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 compat53 RELATIVE ${CMAKE_SOURCE_DIR}
@@ -294,4 +270,24 @@ IF(compat53 AND compat101)
ENDIF()
ENDIF()
+################
+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 2627e6cb697..fbd6ea6963d 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/
@@ -49,5 +50,6 @@ include/config\\\\.h$
include/my_config\\\\.h$
/autom4te\\\\.cache/
errmsg\\\\.sys$
+\\\\.rpm$
#
)
diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake
index 4a13edceece..30ba667d7f9 100644
--- a/cmake/maintainer.cmake
+++ b/cmake/maintainer.cmake
@@ -33,10 +33,15 @@ SET(MY_WARNING_FLAGS
-Wnon-virtual-dtor
-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/mariadb_connector_c.cmake b/cmake/mariadb_connector_c.cmake
index 368a6cc8da5..0f08c3464c4 100644
--- a/cmake/mariadb_connector_c.cmake
+++ b/cmake/mariadb_connector_c.cmake
@@ -37,3 +37,8 @@ SET(CLIENT_PLUGIN_PVIO_SOCKET STATIC)
MESSAGE("== Configuring MariaDB Connector/C")
ADD_SUBDIRECTORY(libmariadb)
+
+#remove after merging libmariadb > v3.0.9
+IF(TARGET caching_sha2_password AND CMAKE_C_FLAGS_DEBUG MATCHES "-Werror")
+ SET_PROPERTY(TARGET caching_sha2_password APPEND_STRING PROPERTY COMPILE_FLAGS -Wno-unused-function)
+ENDIF()
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 1252a796ba6..d6fae85d48d 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -233,9 +233,6 @@ MACRO(MYSQL_ADD_PLUGIN)
IF (NOT ARG_CLIENT)
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB-server${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 UNIX)
IF (NOT ARG_CONFIG)
diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake
index fc36d7cefbf..27f0a109a55 100644
--- a/cmake/systemd.cmake
+++ b/cmake/systemd.cmake
@@ -40,22 +40,14 @@ MACRO(CHECK_SYSTEMD)
SET(LIBSYSTEMD systemd)
ENDIF()
SET(CMAKE_REQUIRED_LIBRARIES ${LIBSYSTEMD})
- CHECK_C_SOURCE_COMPILES(
- "
- #include <systemd/sd-daemon.h>
- 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)
IF(DEB)
SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld")
diff --git a/include/mysql/client_plugin.h b/include/mysql/client_plugin.h
index b2df0019dfe..84fb3c6798d 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/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc
index 53c1ffd36a3..ed06e436ead 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/main/ddl_i18n_koi8r.result b/mysql-test/main/ddl_i18n_koi8r.result
index ba43c1c867f..f6e44a14f9d 100644
--- a/mysql-test/main/ddl_i18n_koi8r.result
+++ b/mysql-test/main/ddl_i18n_koi8r.result
@@ -2172,7 +2172,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
@@ -2184,7 +2184,7 @@ COLLATION(_utf8 'текÑÑ‚') AS c4,
@@character_set_client AS c6;
END|
-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
@@ -2196,7 +2196,7 @@ COLLATION(_utf8 'текÑÑ‚') AS c4,
@@character_set_client AS c6;
END|
-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
@@ -2208,7 +2208,7 @@ COLLATION(_utf8 'текÑÑ‚') AS c4,
@@character_set_client AS c6;
END|
-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
@@ -2224,7 +2224,7 @@ END|
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,
@@ -2237,7 +2237,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,
@@ -2250,7 +2250,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,
@@ -2263,7 +2263,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,
@@ -2277,11 +2277,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
@@ -2301,7 +2301,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 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
@@ -2314,7 +2314,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 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
@@ -2327,7 +2327,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 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
@@ -2340,7 +2340,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 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
ALTER DATABASE mysqltest1 COLLATE cp866_general_ci|
@@ -2358,7 +2358,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,
@@ -2371,7 +2371,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,
@@ -2384,7 +2384,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,
@@ -2397,7 +2397,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,
@@ -2411,11 +2411,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
@@ -2435,7 +2435,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 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
@@ -2448,7 +2448,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 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
@@ -2461,7 +2461,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 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
@@ -2474,7 +2474,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 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
---> Dump of mysqltest1
@@ -2494,7 +2494,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,
@@ -2522,7 +2522,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,
@@ -2561,7 +2561,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,
@@ -2589,7 +2589,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,
@@ -2630,7 +2630,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,
@@ -2643,7 +2643,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,
@@ -2656,7 +2656,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,
@@ -2669,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,
@@ -2683,11 +2683,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
@@ -2707,7 +2707,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 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
@@ -2720,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 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
@@ -2733,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 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
@@ -2746,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 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/main/ddl_i18n_koi8r.test b/mysql-test/main/ddl_i18n_koi8r.test
index 5e2417fab4d..ada21b092aa 100644
--- a/mysql-test/main/ddl_i18n_koi8r.test
+++ b/mysql-test/main/ddl_i18n_koi8r.test
@@ -802,7 +802,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);
@@ -819,7 +819,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;
@@ -836,7 +836,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;
@@ -853,7 +853,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/main/ddl_i18n_utf8.result b/mysql-test/main/ddl_i18n_utf8.result
index 47786196037..2021a552f69 100644
--- a/mysql-test/main/ddl_i18n_utf8.result
+++ b/mysql-test/main/ddl_i18n_utf8.result
@@ -2172,7 +2172,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
@@ -2184,7 +2184,7 @@ COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@character_set_client AS c6;
END|
-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
@@ -2196,7 +2196,7 @@ COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@character_set_client AS c6;
END|
-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
@@ -2208,7 +2208,7 @@ COLLATION(_koi8r 'ÔÅËÓÔ') AS c4,
@@character_set_client AS c6;
END|
-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
@@ -2224,7 +2224,7 @@ END|
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,
@@ -2237,7 +2237,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,
@@ -2250,7 +2250,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,
@@ -2263,7 +2263,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,
@@ -2277,11 +2277,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
@@ -2301,7 +2301,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
@@ -2314,7 +2314,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
@@ -2327,7 +2327,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
@@ -2340,7 +2340,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|
@@ -2358,7 +2358,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,
@@ -2371,7 +2371,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,
@@ -2384,7 +2384,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,
@@ -2397,7 +2397,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,
@@ -2411,11 +2411,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
@@ -2435,7 +2435,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
@@ -2448,7 +2448,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
@@ -2461,7 +2461,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
@@ -2474,7 +2474,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
@@ -2494,7 +2494,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,
@@ -2522,7 +2522,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,
@@ -2561,7 +2561,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,
@@ -2589,7 +2589,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,
@@ -2630,7 +2630,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,
@@ -2643,7 +2643,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,
@@ -2656,7 +2656,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,
@@ -2669,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,
@@ -2683,11 +2683,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
@@ -2707,7 +2707,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
@@ -2720,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 = '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
@@ -2733,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 = '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
@@ -2746,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
-------------------------------------------------------------------
DDL statements within stored routine.
diff --git a/mysql-test/main/ddl_i18n_utf8.test b/mysql-test/main/ddl_i18n_utf8.test
index 9fecad87515..2e6944d8b86 100644
--- a/mysql-test/main/ddl_i18n_utf8.test
+++ b/mysql-test/main/ddl_i18n_utf8.test
@@ -805,7 +805,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);
@@ -822,7 +822,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;
@@ -839,7 +839,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;
@@ -856,7 +856,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/main/events_1.result b/mysql-test/main/events_1.result
index fc8d02e5e93..6f3ad654810 100644
--- a/mysql-test/main/events_1.result
+++ b/mysql-test/main/events_1.result
@@ -55,7 +55,7 @@ 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
@@ -68,7 +68,7 @@ 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;
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
diff --git a/mysql-test/main/events_1.test b/mysql-test/main/events_1.test
index 9768127f458..58c151bc86e 100644
--- a/mysql-test/main/events_1.test
+++ b/mysql-test/main/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/main/insert.test b/mysql-test/main/insert.test
index d57e9051e3f..e00c9cd7a0d 100644
--- a/mysql-test/main/insert.test
+++ b/mysql-test/main/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/main/mysql.result b/mysql-test/main/mysql.result
index 07f49d32b2e..b9ffd25ec0b 100644
--- a/mysql-test/main/mysql.result
+++ b/mysql-test/main/mysql.result
@@ -626,3 +626,7 @@ count(*)
0
truncate table t1;
drop table t1;
+#
+# MDEV-15538 '-N' Produce html output wrong
+#
+<TABLE BORDER=1><TR><TD>1</TD></TR></TABLE> \ No newline at end of file
diff --git a/mysql-test/main/mysql.test b/mysql-test/main/mysql.test
index cd335973288..fbc5bd20842 100644
--- a/mysql-test/main/mysql.test
+++ b/mysql-test/main/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/main/partition_error.result b/mysql-test/main/partition_error.result
index 868eb3b0924..ee1d6e92c51 100644
--- a/mysql-test/main/partition_error.result
+++ b/mysql-test/main/partition_error.result
@@ -1873,5 +1873,5 @@ v CHAR(4) AS (c) VIRTUAL
) WITH SYSTEM VERSIONING PARTITION BY HASH(pk);
INSERT INTO t1 (pk,c) VALUES (1,'foo'),(2,'bar');
UPDATE t1 SET v = 'qux' WHERE pk = 2;
-ERROR HY000: The value specified for generated column 'v' in table 't1' ignored
+ERROR HY000: The value specified for generated column 'v' in table 't1' has been ignored
DROP TABLE t1;
diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result
index 741514b99b1..9205eee1cf7 100644
--- a/mysql-test/main/show_check.result
+++ b/mysql-test/main/show_check.result
@@ -1434,7 +1434,7 @@ 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;
set names utf8;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -1454,7 +1454,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 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,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 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,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/main/show_check.test b/mysql-test/main/show_check.test
index 1b43a510e84..18826f31fed 100644
--- a/mysql-test/main/show_check.test
+++ b/mysql-test/main/show_check.test
@@ -1209,7 +1209,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.
diff --git a/mysql-test/main/stat_tables.result b/mysql-test/main/stat_tables.result
index 05bae1da085..a16756406f7 100644
--- a/mysql-test/main/stat_tables.result
+++ b/mysql-test/main/stat_tables.result
@@ -628,6 +628,64 @@ NULL
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
#
+# MDEV-18899: Server crashes in Field::set_warning_truncated_wrong_value
+#
+set names utf8;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=4;
+set use_stat_tables=preferably;
+set @save_histogram_size= @@histogram_size;
+set histogram_size=255;
+create table t1 ( a varchar(255) character set utf8);
+insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select HEX(RIGHT(min_value, 1)), length(min_value) from mysql.column_stats where db_name='test' and table_name='t1';
+HEX(RIGHT(min_value, 1)) length(min_value)
+A7 254
+select HEX(RIGHT(max_value, 1)), length(max_value) from mysql.column_stats where db_name='test' and table_name='t1';
+HEX(RIGHT(max_value, 1)) length(max_value)
+A5 254
+analyze select * from t1 where a >= 'Ó¥';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 2.00 50.00 50.00 Using where
+set @save_sql_mode= @@sql_mode;
+set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
+update mysql.column_stats set min_value= REPEAT('Ó¥',255) where db_name='test' and table_name='t1';
+Warnings:
+Warning 1265 Data truncated for column 'min_value' at row 1
+select HEX(RIGHT(min_value, 1)), length(min_value) from mysql.column_stats where db_name='test' and table_name='t1';
+HEX(RIGHT(min_value, 1)) length(min_value)
+D3 255
+analyze select * from t1 where a >= 'Ó¥';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 2.00 50.00 50.00 Using where
+set names latin1;
+drop table t1;
+CREATE TABLE t1 (col1 date);
+INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29');
+INSERT INTO t1 VALUES('0000-10-31');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+update mysql.column_stats set min_value='2004-0-31123' where db_name='test' and table_name='t1';
+select min_value from mysql.column_stats where db_name='test' and table_name='t1';
+min_value
+2004-0-31123
+select * from t1;
+col1
+2004-01-01
+2004-02-29
+0000-10-31
+drop table t1;
+set @@sql_mode= @save_sql_mode;
+set use_stat_tables=@save_use_stat_tables;
+set @@histogram_size= @save_histogram_size;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+#
# MDEV-17255: New optimizer defaults and ANALYZE TABLE
#
create table t1 (a int, b int);
@@ -683,4 +741,3 @@ id select_type table type possible_keys key key_len ref rows r_rows filtered r_f
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
drop table t1;
set histogram_size=@tmp_stt_hs, histogram_type=@tmp_stt_ht;
-set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/stat_tables.test b/mysql-test/main/stat_tables.test
index da17dcf7df8..9ae1cc211f9 100644
--- a/mysql-test/main/stat_tables.test
+++ b/mysql-test/main/stat_tables.test
@@ -404,6 +404,49 @@ SELECT MAX(pk) FROM t1;
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
+
+--echo #
+--echo # MDEV-18899: Server crashes in Field::set_warning_truncated_wrong_value
+--echo #
+
+set names utf8;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=4;
+set use_stat_tables=preferably;
+set @save_histogram_size= @@histogram_size;
+set histogram_size=255;
+
+create table t1 ( a varchar(255) character set utf8);
+insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
+
+analyze table t1;
+select HEX(RIGHT(min_value, 1)), length(min_value) from mysql.column_stats where db_name='test' and table_name='t1';
+select HEX(RIGHT(max_value, 1)), length(max_value) from mysql.column_stats where db_name='test' and table_name='t1';
+analyze select * from t1 where a >= 'Ó¥';
+
+set @save_sql_mode= @@sql_mode;
+set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
+update mysql.column_stats set min_value= REPEAT('Ó¥',255) where db_name='test' and table_name='t1';
+select HEX(RIGHT(min_value, 1)), length(min_value) from mysql.column_stats where db_name='test' and table_name='t1';
+analyze select * from t1 where a >= 'Ó¥';
+
+set names latin1;
+drop table t1;
+
+CREATE TABLE t1 (col1 date);
+INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29');
+INSERT INTO t1 VALUES('0000-10-31');
+analyze table t1;
+update mysql.column_stats set min_value='2004-0-31123' where db_name='test' and table_name='t1';
+select min_value from mysql.column_stats where db_name='test' and table_name='t1';
+select * from t1;
+drop table t1;
+
+set @@sql_mode= @save_sql_mode;
+set use_stat_tables=@save_use_stat_tables;
+set @@histogram_size= @save_histogram_size;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+
--echo #
--echo # MDEV-17255: New optimizer defaults and ANALYZE TABLE
--echo #
@@ -446,4 +489,3 @@ analyze
select * from t1 where a=1 and b=3;
drop table t1;
set histogram_size=@tmp_stt_hs, histogram_type=@tmp_stt_ht;
-set use_stat_tables=@save_use_stat_tables;
diff --git a/mysql-test/main/stat_tables_innodb.result b/mysql-test/main/stat_tables_innodb.result
index 60e04ed20e0..e9c1bc1dddb 100644
--- a/mysql-test/main/stat_tables_innodb.result
+++ b/mysql-test/main/stat_tables_innodb.result
@@ -660,6 +660,64 @@ NULL
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
#
+# MDEV-18899: Server crashes in Field::set_warning_truncated_wrong_value
+#
+set names utf8;
+set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
+set optimizer_use_condition_selectivity=4;
+set use_stat_tables=preferably;
+set @save_histogram_size= @@histogram_size;
+set histogram_size=255;
+create table t1 ( a varchar(255) character set utf8);
+insert into t1 values (REPEAT('ӥ',255)), (REPEAT('ç',255));
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select HEX(RIGHT(min_value, 1)), length(min_value) from mysql.column_stats where db_name='test' and table_name='t1';
+HEX(RIGHT(min_value, 1)) length(min_value)
+A7 254
+select HEX(RIGHT(max_value, 1)), length(max_value) from mysql.column_stats where db_name='test' and table_name='t1';
+HEX(RIGHT(max_value, 1)) length(max_value)
+A5 254
+analyze select * from t1 where a >= 'Ó¥';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 2.00 50.00 50.00 Using where
+set @save_sql_mode= @@sql_mode;
+set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
+update mysql.column_stats set min_value= REPEAT('Ó¥',255) where db_name='test' and table_name='t1';
+Warnings:
+Warning 1265 Data truncated for column 'min_value' at row 1
+select HEX(RIGHT(min_value, 1)), length(min_value) from mysql.column_stats where db_name='test' and table_name='t1';
+HEX(RIGHT(min_value, 1)) length(min_value)
+D3 255
+analyze select * from t1 where a >= 'Ó¥';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 2.00 50.00 50.00 Using where
+set names latin1;
+drop table t1;
+CREATE TABLE t1 (col1 date);
+INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29');
+INSERT INTO t1 VALUES('0000-10-31');
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+update mysql.column_stats set min_value='2004-0-31123' where db_name='test' and table_name='t1';
+select min_value from mysql.column_stats where db_name='test' and table_name='t1';
+min_value
+2004-0-31123
+select * from t1;
+col1
+2004-01-01
+2004-02-29
+0000-10-31
+drop table t1;
+set @@sql_mode= @save_sql_mode;
+set use_stat_tables=@save_use_stat_tables;
+set @@histogram_size= @save_histogram_size;
+set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
+#
# MDEV-17255: New optimizer defaults and ANALYZE TABLE
#
create table t1 (a int, b int);
@@ -715,7 +773,6 @@ id select_type table type possible_keys key key_len ref rows r_rows filtered r_f
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10.00 2.78 10.00 Using where
drop table t1;
set histogram_size=@tmp_stt_hs, histogram_type=@tmp_stt_ht;
-set use_stat_tables=@save_use_stat_tables;
set global innodb_stats_persistent= @innodb_stats_persistent_save;
set global innodb_stats_persistent_sample_pages=
@innodb_stats_persistent_sample_pages_save;
diff --git a/mysql-test/main/type_blob.result b/mysql-test/main/type_blob.result
index 0654338a6ca..94741ddbc0e 100644
--- a/mysql-test/main/type_blob.result
+++ b/mysql-test/main/type_blob.result
@@ -1081,6 +1081,15 @@ t1 CREATE TABLE `t1` (
`a` longtext CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+create table t1 (a int);
+alter table t1 add column b blob, alter column b set default "foo";
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` blob DEFAULT 'foo'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
#
# End of 10.2 test
#
diff --git a/mysql-test/main/type_blob.test b/mysql-test/main/type_blob.test
index 993362c3298..910050f067a 100644
--- a/mysql-test/main/type_blob.test
+++ b/mysql-test/main/type_blob.test
@@ -693,6 +693,11 @@ CREATE TABLE t1 (a TEXT(1431655798) CHARACTER SET utf8);
SHOW CREATE TABLE t1;
DROP TABLE t1;
+# ALTER SET DEFAULT
+create table t1 (a int);
+alter table t1 add column b blob, alter column b set default "foo";
+show create table t1;
+drop table t1;
--echo #
--echo # End of 10.2 test
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 00000000000..829ed7d3c61
--- /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_mysqlbinlog2.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
index 432f108e538..8c8ba9de477 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result
@@ -1,9 +1,9 @@
set sql_mode="";
set global binlog_checksum=NONE;
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");
@@ -23,7 +23,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -37,46 +37,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 ;
@@ -95,7 +95,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -106,43 +106,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 ;
@@ -161,7 +161,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -172,25 +172,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 ;
@@ -206,7 +206,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -220,19 +220,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 ;
@@ -251,7 +251,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -278,7 +278,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -289,25 +289,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 ;
@@ -323,7 +323,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -337,19 +337,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 ;
@@ -366,7 +366,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -380,46 +380,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 ;
@@ -428,7 +428,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -439,7 +439,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 ;
@@ -458,7 +458,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -469,43 +469,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 ;
@@ -514,7 +514,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -525,7 +525,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 ;
@@ -544,7 +544,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -555,25 +555,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 ;
@@ -582,7 +582,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -593,7 +593,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 ;
@@ -609,7 +609,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -623,46 +623,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 ;
@@ -685,7 +685,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -696,25 +696,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 ;
@@ -723,7 +723,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -734,7 +734,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 ;
@@ -750,7 +750,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -764,19 +764,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 ;
@@ -792,7 +792,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -806,46 +806,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 ;
@@ -864,7 +864,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -875,43 +875,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 ;
@@ -929,7 +929,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -940,25 +940,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 ;
@@ -974,7 +974,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -988,19 +988,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 ;
@@ -1018,7 +1018,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1045,7 +1045,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1056,25 +1056,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 ;
@@ -1090,7 +1090,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1104,19 +1104,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 ;
@@ -1132,7 +1132,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1146,46 +1146,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 ;
@@ -1194,7 +1194,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1205,7 +1205,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 ;
@@ -1224,7 +1224,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1235,43 +1235,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 ;
@@ -1280,7 +1280,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1291,7 +1291,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 ;
@@ -1309,7 +1309,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1320,25 +1320,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 ;
@@ -1347,7 +1347,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1358,7 +1358,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 ;
@@ -1374,7 +1374,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1388,46 +1388,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 ;
@@ -1448,7 +1448,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1459,25 +1459,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 ;
@@ -1486,7 +1486,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1497,7 +1497,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 ;
@@ -1513,7 +1513,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1527,19 +1527,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 ;
@@ -1555,7 +1555,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, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
@@ -1569,55 +1569,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/t/binlog_innodb_stm.test b/mysql-test/suite/binlog/t/binlog_innodb_stm.test
new file mode 100644
index 00000000000..4dfa7a76584
--- /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 c3fa7ba3891..7ef30a48ac0 100644
--- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test
@@ -10,15 +10,15 @@ set global binlog_checksum=NONE;
--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");
@@ -72,11 +72,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 "";
@@ -104,11 +104,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 "";
@@ -139,11 +139,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 "";
@@ -168,11 +168,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/gcol/r/gcol_column_def_options_innodb.result b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
index 6c2cd8a18c8..a98652248f8 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
@@ -357,14 +357,14 @@ DROP TABLE t1;
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5 AS c2;
Warnings:
-Warning 1906 The value specified for generated column 'c2' in table 't1' ignored
+Warning 1906 The value specified for generated column 'c2' in table 't1' has been ignored
CREATE TABLE t2 (a int);
INSERT INTO t2 values(1);
DROP TABLE t1;
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, a AS c2 from t2;
Warnings:
-Warning 1906 The value specified for generated column 'c2' in table 't1' ignored
+Warning 1906 The value specified for generated column 'c2' in table 't1' has been ignored
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5;
SELECT * FROM t1;
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
index 85370d42af8..82a879be3f7 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
@@ -357,14 +357,14 @@ DROP TABLE t1;
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5 AS c2;
Warnings:
-Warning 1906 The value specified for generated column 'c2' in table 't1' ignored
+Warning 1906 The value specified for generated column 'c2' in table 't1' has been ignored
CREATE TABLE t2 (a int);
INSERT INTO t2 values(1);
DROP TABLE t1;
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, a AS c2 from t2;
Warnings:
-Warning 1906 The value specified for generated column 'c2' in table 't1' ignored
+Warning 1906 The value specified for generated column 'c2' in table 't1' has been ignored
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5;
SELECT * FROM t1;
diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
index 3c2e4d3dd0a..3024b58da54 100644
--- a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
@@ -25,8 +25,8 @@ a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against gcols
insert ignore into t1 values (1,2,3);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated 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 gcols
insert ignore into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
@@ -153,7 +153,7 @@ a b c
2 -2 -2
update ignore t1 set c=3 where a=2;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated column 'c' in table 't1' has been ignored
select * from t1 order by a;
a b c
1 -1 -1
@@ -183,7 +183,7 @@ a b c
2 -2 -2
update ignore t1 set c=3 where b=-2;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated column 'c' in table 't1' has been ignored
select * from t1 order by a;
a b c
1 -1 -1
diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
index 4d62a5d7a82..c7e5cab4f8c 100644
--- a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
@@ -25,8 +25,8 @@ a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against gcols
insert ignore into t1 values (1,2,3);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated 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 gcols
insert ignore into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
select * from t1;
a b c
1 -1 -1
@@ -153,7 +153,7 @@ a b c
2 -2 -2
update ignore t1 set c=3 where a=2;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated column 'c' in table 't1' has been ignored
select * from t1 order by a;
a b c
1 -1 -1
@@ -183,7 +183,7 @@ a b c
2 -2 -2
update ignore t1 set c=3 where b=-2;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated column 'c' in table 't1' has been ignored
select * from t1 order by a;
a b c
1 -1 -1
diff --git a/mysql-test/suite/gcol/r/gcol_partition_innodb.result b/mysql-test/suite/gcol/r/gcol_partition_innodb.result
index 7600c9792f1..e5a68cdb177 100644
--- a/mysql-test/suite/gcol/r/gcol_partition_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_partition_innodb.result
@@ -99,7 +99,7 @@ INSERT IGNORE INTO t1 (d) VALUES ('2015-04-14');
SET sql_mode= '';
REPLACE INTO t1 SELECT * FROM t1;
Warnings:
-Warning 1906 The value specified for generated column 'vd' in table 't1' ignored
+Warning 1906 The value specified for generated column 'vd' in table 't1' has been ignored
DROP TABLE t1;
InnoDB 0 transactions not purged
DROP VIEW IF EXISTS v1,v2;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index 985376446c3..0062ba72add 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -1132,7 +1132,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/plugins/t/thread_pool_server_audit.test b/mysql-test/suite/plugins/t/thread_pool_server_audit.test
index 724000c9789..7347d8f99ff 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/rpl/r/rpl_gtid_excess_initial_delay.result b/mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result
new file mode 100644
index 00000000000..641d186ab78
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_gtid_excess_initial_delay.result
@@ -0,0 +1,23 @@
+include/master-slave.inc
+[connection master]
+CREATE TABLE t1 (i INT);
+connection slave;
+include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID= current_pos, MASTER_DELAY= 10;
+include/start_slave.inc
+connection master;
+INSERT INTO t1 VALUES (1);
+include/sync_slave_io_with_master.inc
+connection slave;
+"Sleeping for 15"
+# Asserted this: Seconds_Behind_Master should be less than MASTER_DELAY
+# Asserted this: One row shoule be found in table t1.
+"======= Clean up ========"
+STOP SLAVE;
+CHANGE MASTER TO MASTER_USE_GTID=no, MASTER_DELAY=0;
+START SLAVE;
+connection master;
+DROP TABLE t1;
+connection slave;
+connection master;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
index 5230283fd6c..617f112196b 100644
--- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result
+++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
@@ -1,13 +1,28 @@
include/master-slave.inc
[connection master]
+connection slave;
+set sql_log_bin=0;
+create database y;
+set sql_log_bin=1;
+connection master;
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
connection slave;
show databases like 'mysqltest1';
Database (mysqltest1)
@@ -15,7 +30,11 @@ mysqltest1
select * from test.t1;
a
9
+select * from y.t1;
+a
+9
connection master;
+use mysqltest1;
drop table t1;
drop database mysqltest1;
connection slave;
@@ -259,12 +278,14 @@ 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;
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;
connection slave;
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 00000000000..29b815420ba
--- /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/t/rpl_gtid_excess_initial_delay.test b/mysql-test/suite/rpl/t/rpl_gtid_excess_initial_delay.test
new file mode 100644
index 00000000000..d840b67e9e8
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_gtid_excess_initial_delay.test
@@ -0,0 +1,58 @@
+# ==== Purpose ====
+#
+# Test verifies that when "Master_Delay" is specified on slave with GTIDS there
+# will not be any extra delay initially.
+#
+# ==== Implementation ====
+#
+# Steps:
+# 0 - Stop the slave and execute CHANGE MASTER command with
+# master_use_gtid= curren_pos and master_delay= 10
+# 1 - On slave introduce a sleep of 15 seconds and check that the
+# Seconds_Behind_Master is within specified master_delay limit. It should
+# not be more that "10" seconds.
+#
+# ==== References ====
+#
+# MDEV-13895: GTID and Master_Delay causes excessive initial delay
+
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+
+CREATE TABLE t1 (i INT);
+--sync_slave_with_master
+
+--source include/stop_slave.inc
+CHANGE MASTER TO MASTER_USE_GTID= current_pos, MASTER_DELAY= 10;
+--source include/start_slave.inc
+
+--connection master
+INSERT INTO t1 VALUES (1);
+--source include/sync_slave_io_with_master.inc
+
+--connection slave
+--let $actual_delay= query_get_value(SHOW SLAVE STATUS, SQL_Delay, 1)
+--let $sleep_time= `SELECT 5 + $actual_delay`
+--echo "Sleeping for $sleep_time"
+--sleep $sleep_time
+
+--let $assert_cond= [SHOW SLAVE STATUS, Seconds_Behind_Master, 1] <= 10
+--let $assert_text= Seconds_Behind_Master should be less than MASTER_DELAY
+--source include/rpl_assert.inc
+
+# The row should be available in table after master_delay=20 seconds.
+--let $assert_text= One row shoule be found in table t1.
+--let $assert_cond= COUNT(*) = 1 FROM t1
+--source include/rpl_assert.inc
+
+--echo "======= Clean up ========"
+STOP SLAVE;
+CHANGE MASTER TO MASTER_USE_GTID=no, MASTER_DELAY=0;
+START SLAVE;
+
+--connection master
+DROP TABLE t1;
+--sync_slave_with_master
+
+--connection master
+--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 290b92e0a3e..84059110136 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 235545747fa..aa0370c8ae3 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;
@@ -215,6 +232,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;
@@ -222,6 +240,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 00000000000..5099d7ee49e
--- /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 e56a1b0543d..672f2080504 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 GENERATED
INSERT INTO t1 (a) VALUES (1),(2);
INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
SELECT a,b FROM t1;
a b
1 2
@@ -24,8 +24,8 @@ b int(11) # # STORED GENERATED
INSERT INTO t1 (a) VALUES (1),(2);
INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated 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 GENERATED
INSERT INTO t1 (a) VALUES (1),(2);
INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
SELECT a,b FROM t1;
a b
1 2
@@ -58,8 +58,8 @@ b int(11) # # STORED GENERATED
INSERT INTO t1 (a) VALUES (1),(2);
INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
SELECT a,b FROM t1;
a b
1 2
diff --git a/mysql-test/suite/vcol/r/binlog.result b/mysql-test/suite/vcol/r/binlog.result
index 35bfb50ba2f..83382d47511 100644
--- a/mysql-test/suite/vcol/r/binlog.result
+++ b/mysql-test/suite/vcol/r/binlog.result
@@ -18,10 +18,10 @@ set binlog_row_image="FULL";
CREATE VIEW v1 AS SELECT * FROM t1;
REPLACE INTO v1 SELECT pk, vcol_date, vcol_int, vcol_year, vcol_blob, col_date, col_int, col_blob, 1982 FROM t1;
Warnings:
-Warning 1906 The value specified for generated column 'vcol_date' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_int' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_year' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_blob' in table 't1' ignored
+Warning 1906 The value specified for generated column 'vcol_date' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_int' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_year' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_blob' in table 't1' has been ignored
select col_date,col_int,col_blob,col_year from v1;
col_date col_int col_blob col_year
2010-04-24 5 foo 1982
@@ -35,10 +35,10 @@ set binlog_row_image="MINIMAL";
CREATE VIEW v1 AS SELECT * FROM t1;
REPLACE INTO v1 SELECT pk, vcol_date, vcol_int, vcol_year, vcol_blob, col_date, col_int, col_blob, 1983 FROM t1;
Warnings:
-Warning 1906 The value specified for generated column 'vcol_date' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_int' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_year' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_blob' in table 't1' ignored
+Warning 1906 The value specified for generated column 'vcol_date' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_int' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_year' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_blob' in table 't1' has been ignored
select col_date,col_int,col_blob,col_year from v1;
col_date col_int col_blob col_year
2010-04-24 5 foo 1983
@@ -52,10 +52,10 @@ set @@binlog_row_image="NOBLOB";
CREATE VIEW v1 AS SELECT * FROM t1;
REPLACE INTO v1 SELECT pk, vcol_date, vcol_int, vcol_year, vcol_blob, col_date, col_int, col_blob, 1984 FROM t1;
Warnings:
-Warning 1906 The value specified for generated column 'vcol_date' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_int' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_year' in table 't1' ignored
-Warning 1906 The value specified for generated column 'vcol_blob' in table 't1' ignored
+Warning 1906 The value specified for generated column 'vcol_date' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_int' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_year' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'vcol_blob' in table 't1' has been ignored
select col_date,col_int,col_blob,col_year from v1;
col_date col_int col_blob col_year
2010-04-24 5 foo 1984
diff --git a/mysql-test/suite/vcol/r/partition.result b/mysql-test/suite/vcol/r/partition.result
index 6afc57be067..bd1353fa145 100644
--- a/mysql-test/suite/vcol/r/partition.result
+++ b/mysql-test/suite/vcol/r/partition.result
@@ -26,5 +26,5 @@ partition pn values less than (maxvalue));
insert t1 set i= 0;
set statement sql_mode= '' for update t1 set i= 1, v= 2;
Warnings:
-Warning 1906 The value specified for generated column 'v' in table 't1' ignored
+Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored
drop table t1;
diff --git a/mysql-test/suite/vcol/r/update.result b/mysql-test/suite/vcol/r/update.result
index 5b67c9dd0f7..5a1caaeb5eb 100644
--- a/mysql-test/suite/vcol/r/update.result
+++ b/mysql-test/suite/vcol/r/update.result
@@ -74,10 +74,10 @@ b int, c blob as (b), index (c(57)),
d blob, e blob as (d), index (e(57)))
replace select * from t1;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't' ignored
-Warning 1906 The value specified for generated column 'e' in table 't' ignored
-Warning 1906 The value specified for generated column 'c' in table 't' ignored
-Warning 1906 The value specified for generated column 'e' in table 't' ignored
+Warning 1906 The value specified for generated column 'c' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'e' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'c' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'e' in table 't' has been ignored
check table t;
Table Op Msg_type Msg_text
test.t check status OK
diff --git a/mysql-test/suite/vcol/r/update_binlog.result b/mysql-test/suite/vcol/r/update_binlog.result
index c29200513b0..828452bf084 100644
--- a/mysql-test/suite/vcol/r/update_binlog.result
+++ b/mysql-test/suite/vcol/r/update_binlog.result
@@ -76,10 +76,10 @@ b int, c blob as (b), index (c(57)),
d blob, e blob as (d), index (e(57)))
replace select * from t1;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't' ignored
-Warning 1906 The value specified for generated column 'e' in table 't' ignored
-Warning 1906 The value specified for generated column 'c' in table 't' ignored
-Warning 1906 The value specified for generated column 'e' in table 't' ignored
+Warning 1906 The value specified for generated column 'c' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'e' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'c' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'e' in table 't' has been ignored
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -256,10 +256,10 @@ b int, c blob as (b), index (c(57)),
d blob, e blob as (d), index (e(57)))
replace select * from t1;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't' ignored
-Warning 1906 The value specified for generated column 'e' in table 't' ignored
-Warning 1906 The value specified for generated column 'c' in table 't' ignored
-Warning 1906 The value specified for generated column 'e' in table 't' ignored
+Warning 1906 The value specified for generated column 'c' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'e' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'c' in table 't' has been ignored
+Warning 1906 The value specified for generated column 'e' in table 't' has been ignored
check table t;
Table Op Msg_type Msg_text
test.t check status OK
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 f45bd8a6b55..3629307a54d 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 ignore into t1 values (1,2,3);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated 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 ignore into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated 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 ignore into t2 select * from t1;
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
-Warning 1906 The value specified for generated column 'c' in table 't2' ignored
+Warning 1906 The value specified for generated column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for generated 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 ignore into t2 (a,b) select a,b from t1;
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
+Warning 1906 The value specified for generated column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for generated 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 ignore t1 set c=3 where a=2;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated 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 ignore t1 set c=3 where b=-2;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated 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 ef8f3f00e42..8eb59ca32ff 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 ignore into t1 values (1,2,3);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated 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 ignore into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
-Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+Warning 1906 The value specified for generated 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 ignore into t2 select * from t1;
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
-Warning 1906 The value specified for generated column 'c' in table 't2' ignored
+Warning 1906 The value specified for generated column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for generated 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 ignore into t2 (a,b) select a,b from t1;
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
+Warning 1906 The value specified for generated column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for generated 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 ignore t1 set c=3 where a=2;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated 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 ignore t1 set c=3 where b=-2;
Warnings:
-Warning 1906 The value specified for generated column 'c' in table 't1' ignored
+Warning 1906 The value specified for generated 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 f23a1b2367f..7d6bb0b3195 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 IGNORE INTO t1 VALUES (0,1,0);
Warnings:
-Warning 1906 The value specified for generated column 'v' in table 't1' ignored
+Warning 1906 The value specified for generated column 'v' in table 't1' has been ignored
INSERT IGNORE INTO t1 VALUES (NULL,0,0);
Warnings:
-Warning 1906 The value specified for generated column 'v' in table 't1' ignored
+Warning 1906 The value specified for generated 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
@@ -322,15 +322,15 @@ d varchar(5) latin1_swedish_ci YES NULL STORED GENERATED #
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,NULL);
UPDATE IGNORE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a';
Warnings:
-Warning 1906 The value specified for generated column 'd' in table 't1' ignored
+Warning 1906 The value specified for generated column 'd' in table 't1' has been ignored
INSERT IGNORE INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
Warnings:
-Warning 1906 The value specified for generated column 'd' in table 't1' ignored
+Warning 1906 The value specified for generated 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 generated column 'd' in table 't1' ignored
+ERROR HY000: The value specified for generated 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 generated column 'd' in table 't1' ignored
+ERROR HY000: The value specified for generated 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 4e21582116c..5e79a12d17e 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 IGNORE INTO t2 VALUES (187,187), (9,9), (187,187);
Warnings:
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
-Warning 1906 The value specified for generated column 'b' in table 't2' ignored
+Warning 1906 The value specified for generated column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for generated column 'b' in table 't2' has been ignored
+Warning 1906 The value specified for generated 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/versioning/r/insert2.result b/mysql-test/suite/versioning/r/insert2.result
index 03f8e5875a8..f5c7b411cdf 100644
--- a/mysql-test/suite/versioning/r/insert2.result
+++ b/mysql-test/suite/versioning/r/insert2.result
@@ -36,18 +36,18 @@ period for system_time (row_start, row_end)
) with system versioning;
insert into t1 values (1), (2);
insert into t1 (row_start) select row_end from t1;
-ERROR HY000: The value specified for generated column 'row_start' in table 't1' ignored
+ERROR HY000: The value specified for generated column 'row_start' in table 't1' has been ignored
set sql_mode='';
insert into t1 (row_start, row_end) values (DEFAULT, 1);
Warnings:
-Warning 1906 The value specified for generated column 'row_end' in table 't1' ignored
+Warning 1906 The value specified for generated column 'row_end' in table 't1' has been ignored
set sql_mode=default;
select @@sql_mode into @saved_mode;
set sql_mode= '';
insert into t1 (x, row_start, row_end) values (3, 4, 5);
Warnings:
-Warning 1906 The value specified for generated column 'row_start' in table 't1' ignored
-Warning 1906 The value specified for generated column 'row_end' in table 't1' ignored
+Warning 1906 The value specified for generated column 'row_start' in table 't1' has been ignored
+Warning 1906 The value specified for generated column 'row_end' in table 't1' has been ignored
set sql_mode= @saved_mode;
insert into t1 (row_start, row_end) values (DEFAULT, DEFAULT);
select * from t1;
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index f5106e03a14..9b6f2201c22 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -1,6 +1,10 @@
set system_versioning_alter_history=keep;
# Check conventional partitioning on temporal tables
-create table t1 (x int)
+create or replace table t1 (
+x int,
+row_start SYS_DATATYPE as row start invisible,
+row_end SYS_DATATYPE as row end invisible,
+period for system_time(row_start, row_end))
with system versioning
partition by range columns (x) (
partition p0 values less than (100),
@@ -34,7 +38,13 @@ select * from t1 partition (p1) for system_time all;
x
300
# Engine change native <-> non-native versioning prohibited
-create or replace table t1 (i int) engine=DEFAULT_ENGINE with system versioning partition by hash(i);
+create or replace table t1 (
+i int,
+row_start SYS_DATATYPE as row start invisible,
+row_end SYS_DATATYPE as row end invisible,
+period for system_time(row_start, row_end))
+engine=DEFAULT_ENGINE
+with system versioning partition by hash(i);
alter table t1 engine=NON_DEFAULT_ENGINE;
ERROR HY000: Not allowed for system-versioned `test`.`t1`. Change to/from native system versioning engine is not supported.
## CREATE TABLE
@@ -334,14 +344,21 @@ select * from t1 partition (p1sp0);
x
select * from t1 partition (p1sp1);
x
-create or replace table t1 (a bigint)
+create or replace table t1 (
+a bigint,
+row_start SYS_DATATYPE as row start invisible,
+row_end SYS_DATATYPE as row end invisible,
+period for system_time(row_start, row_end))
with system versioning
partition by range (a)
(partition p0 values less than (20) engine innodb,
partition p1 values less than maxvalue engine innodb);
insert into t1 values (1);
create or replace table t1 (
-f_int1 integer default 0
+f_int1 integer default 0,
+row_start SYS_DATATYPE as row start invisible,
+row_end SYS_DATATYPE as row end invisible,
+period for system_time(row_start, row_end)
) with system versioning
partition by range(f_int1)
subpartition by hash(f_int1)
@@ -350,7 +367,11 @@ subpartition by hash(f_int1)
subpartition subpart12 storage engine = 'innodb'));
insert into t1 values (1);
create or replace table t1 (i int) engine=innodb partition by key(i);
-alter table t1 add system versioning;
+alter table t1
+add column row_start SYS_DATATYPE as row start invisible,
+add column row_end SYS_DATATYPE as row end invisible,
+add period for system_time(row_start, row_end),
+add system versioning;
insert into t1 values();
# MDEV-14722 Assertion in ha_commit_trans for sub-statement
create or replace table t1 (i int) with system versioning
diff --git a/mysql-test/suite/versioning/r/partition_innodb.result b/mysql-test/suite/versioning/r/partition_innodb.result
new file mode 100644
index 00000000000..de3521b6aa3
--- /dev/null
+++ b/mysql-test/suite/versioning/r/partition_innodb.result
@@ -0,0 +1,69 @@
+# MDEV-15951 system versioning by trx id doesn't work with partitioning
+# currently trx_id does not support partitioning by system_time
+create or replace table t1(
+i int,
+row_start bigint unsigned generated always as row start,
+row_end bigint unsigned generated always as row end,
+period for system_time(row_start, row_end)
+) engine=InnoDB with system versioning partition by system_time (
+partition p0 history,
+partition pn current
+);
+ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
+create or replace table t1(
+i int,
+row_start bigint unsigned generated always as row start,
+row_end bigint unsigned generated always as row end,
+period for system_time(row_start, row_end)
+) engine=InnoDB with system versioning;
+alter table t1 partition by system_time (
+partition p0 history,
+partition pn current
+);
+ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `#sql-temporary`
+create or replace table t (
+a int primary key,
+row_start bigint unsigned as row start invisible,
+row_end bigint unsigned as row end invisible,
+period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by key() (
+partition p1,
+partition p2
+);
+ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
+create or replace table t (
+a int primary key,
+row_start bigint unsigned as row start invisible,
+row_end bigint unsigned as row end invisible,
+period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by key(a, row_start) (
+partition p1,
+partition p2
+);
+ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
+create or replace table t (
+a int primary key,
+row_start bigint unsigned as row start invisible,
+row_end bigint unsigned as row end invisible,
+period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by hash(a + row_end * 2) (
+partition p1,
+partition p2
+);
+ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
+create or replace table t (
+a int primary key,
+row_start bigint unsigned as row start invisible,
+row_end bigint unsigned as row end invisible,
+period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by range columns (a, row_start) (
+partition p1 values less than (100, 100)
+);
+ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
+# Test cleanup
+drop database test;
+create database test;
diff --git a/mysql-test/suite/versioning/r/rpl.result b/mysql-test/suite/versioning/r/rpl.result
index c5770a91c77..fd62a65f473 100644
--- a/mysql-test/suite/versioning/r/rpl.result
+++ b/mysql-test/suite/versioning/r/rpl.result
@@ -4,38 +4,38 @@ connection slave;
connection master;
CREATE TABLE t1 (x int) with system versioning;
insert into t1 values (1);
-SELECT * FROM t1;
+select * from t1 order by x;
x
1
delete from t1;
-select * from t1;
+select * from t1 order by x;
x
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
1
connection slave;
-select * from t1;
+select * from t1 order by x;
x
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
1
connection master;
insert into t1 values (2);
connection slave;
-select * from t1;
+select * from t1 order by x;
x
2
connection master;
update t1 set x = 3;
connection slave;
-select * from t1;
+select * from t1 order by x;
x
3
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
1
-3
2
+3
# check unversioned -> versioned replication
connection master;
create or replace table t1 (x int primary key);
@@ -44,28 +44,28 @@ alter table t1 with system versioning;
connection master;
insert into t1 values (1);
connection slave;
-select * from t1;
+select * from t1 order by x;
x
1
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
1
connection master;
update t1 set x= 2 where x = 1;
connection slave;
-select * from t1;
+select * from t1 order by x;
x
2
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
1
2
connection master;
delete from t1;
connection slave;
-select * from t1;
+select * from t1 order by x;
x
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
1
2
@@ -78,22 +78,22 @@ connection master;
insert into t1 values (1);
update t1 set x= 2 where x = 1;
connection slave;
-select * from t1;
+select * from t1 order by x;
x
2
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
-2
1
+2
connection master;
delete from t1;
connection slave;
-select * from t1;
+select * from t1 order by x;
x
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
-2
1
+2
# multi-update
connection master;
create or replace table t1 (x int) with system versioning;
@@ -102,20 +102,20 @@ insert into t1 values (1);
insert into t2 values (2);
update t1, t2 set t1.x=11, t2.x=22;
connection slave;
-select * from t1;
+select * from t1 order by x;
x
11
-select * from t2;
+select * from t2 order by x;
x
22
-select * from t1 for system_time all;
+select * from t1 for system_time all order by row_end, x;
x
-11
1
-select * from t2 for system_time all;
+11
+select * from t2 for system_time all order by row_end, x;
x
-22
2
+22
# MDEV-14767 system_versioning_alter_history breaks ALTER replication
## Case 1: KEEP on the master, ALTER will work on the slave
connection master;
diff --git a/mysql-test/suite/versioning/r/rpl_row.result b/mysql-test/suite/versioning/r/rpl_row.result
new file mode 100644
index 00000000000..03ac8dc9eb8
--- /dev/null
+++ b/mysql-test/suite/versioning/r/rpl_row.result
@@ -0,0 +1,14 @@
+include/master-slave.inc
+[connection master]
+# MDEV-16252: MINIMAL binlog_row_image does not work for versioned tables
+set @old_row_image= @@binlog_row_image;
+set binlog_row_image= minimal;
+create or replace table t1 (pk int, i int, primary key(pk))
+with system versioning;
+insert into t1 values (1,10),(2,20);
+update t1 set i = 0;
+connection slave;
+connection master;
+drop table t1;
+set binlog_row_image= @old_row_image;
+include/rpl_end.inc
diff --git a/mysql-test/suite/versioning/r/select.result b/mysql-test/suite/versioning/r/select.result
index f483bb49928..3569268ce1d 100644
--- a/mysql-test/suite/versioning/r/select.result
+++ b/mysql-test/suite/versioning/r/select.result
@@ -355,7 +355,7 @@ ERROR HY000: Table `t` is not system-versioned
# TRANSACTION/TIMESTAMP specifier in SYSTEM_TIME [MDEV-14645, Issue #396]
create or replace table t1 (x int) with system versioning engine myisam;
select * from t1 for system_time as of transaction 1;
-ERROR HY000: Transaction system versioning for `t1` is not supported
+ERROR HY000: Transaction-precise system versioning for `t1` is not supported
create or replace table t1 (
x int,
sys_trx_start bigint unsigned as row start invisible,
diff --git a/mysql-test/suite/versioning/r/trx_id.result b/mysql-test/suite/versioning/r/trx_id.result
index f8339c0a4b8..333b8b3efa0 100644
--- a/mysql-test/suite/versioning/r/trx_id.result
+++ b/mysql-test/suite/versioning/r/trx_id.result
@@ -338,7 +338,7 @@ DECLARE var BIT(10);
SELECT * FROM t2 FOR SYSTEM_TIME AS OF var;
END;
$$
-ERROR HY000: Transaction system versioning for `t2` is not supported
+ERROR HY000: Transaction-precise system versioning for `t2` is not supported
#
# String literals resolve to TIMESTAMP
#
@@ -350,19 +350,17 @@ x
#
# HEX hybrids resolve to TRANSACTION
#
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (0x60);
-x
-1
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (0x60);
-ERROR HY000: Transaction system versioning for `t2` is not supported
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF (0xFFFFFFFF);
+ERROR HY000: TRX_ID 4294967295 not found in `mysql.transaction_registry`
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF (0xFFFFFFFF);
+ERROR HY000: Transaction-precise system versioning for `t2` is not supported
#
# BIT literals resolve to TRANSACTION
#
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (b'1100000');
-x
-1
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (b'1100000');
-ERROR HY000: Transaction system versioning for `t2` is not supported
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF (b'11111111111111111111111111111111');
+ERROR HY000: TRX_ID 4294967295 not found in `mysql.transaction_registry`
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF (b'11111111111111111111111111111111');
+ERROR HY000: Transaction-precise system versioning for `t2` is not supported
DROP TABLE t1, t2;
#
# MDEV-16094 Crash when using AS OF with a stored function
@@ -386,7 +384,7 @@ PERIOD FOR SYSTEM_TIME(start_timestamp, end_timestamp)
SELECT * FROM tts FOR SYSTEM_TIME AS OF fts();
x start_timestamp end_timestamp
SELECT * FROM tts FOR SYSTEM_TIME AS OF ftx();
-ERROR HY000: Transaction system versioning for `tts` is not supported
+ERROR HY000: Transaction-precise system versioning for `tts` is not supported
SELECT * FROM ttx FOR SYSTEM_TIME AS OF fts();
x start_timestamp end_timestamp
SELECT * FROM ttx FOR SYSTEM_TIME AS OF ftx();
diff --git a/mysql-test/suite/versioning/r/update,trx_id.rdiff b/mysql-test/suite/versioning/r/update,trx_id.rdiff
index 037ec548072..7ce75714235 100644
--- a/mysql-test/suite/versioning/r/update,trx_id.rdiff
+++ b/mysql-test/suite/versioning/r/update,trx_id.rdiff
@@ -1,13 +1,16 @@
---- suite/versioning/r/update.result
-+++ suite/versioning/r/update.reject
-@@ -88,10 +88,8 @@
- 5 3 1
- 3 1 0
+--- update.result 2018-12-19 13:55:35.873917389 +0300
++++ update,trx_id.reject 2018-12-19 13:55:35.533917399 +0300
+@@ -81,12 +81,10 @@
+ commit;
+ select x, y, sys_trx_end = MAXVAL as current from t1 for system_time all order by sys_trx_end, x, y;
+ x y current
+-3 1 0
2 1 0
-3 2 0
++3 1 0
4 1 0
5 1 0
-5 2 0
- drop table t1;
- create table t1 (
- id int primary key auto_increment,
+ 1 1 1
+ 2 2 1
+ 3 3 1
diff --git a/mysql-test/suite/versioning/r/update.result b/mysql-test/suite/versioning/r/update.result
index 8e42e7d413d..334d8d8899b 100644
--- a/mysql-test/suite/versioning/r/update.result
+++ b/mysql-test/suite/versioning/r/update.result
@@ -6,7 +6,7 @@ sys_trx_end SYS_DATATYPE as row end invisible,
period for system_time (sys_trx_start, sys_trx_end))
with system versioning;
insert into t1(x, y) values (1, 1000), (2, 2000), (3, 3000), (4, 4000), (5, 5000), (6, 6000), (7, 7000), (8, 8000), (9, 9000);
-select x, y from t1;
+select x, y from t1 order by x, y;
x y
1 1000
2 2000
@@ -18,7 +18,7 @@ x y
8 8000
9 9000
update t1 set y = y + 1 where x > 7;
-select x, y from t1;
+select x, y from t1 order by x, y;
x y
1 1000
2 2000
@@ -29,8 +29,10 @@ x y
7 7000
8 8001
9 9001
-select x, y from t1 for system_time all;
+select x, y from t1 for system_time all order by sys_trx_end, x, y;
x y
+8 8000
+9 9000
1 1000
2 2000
3 3000
@@ -40,8 +42,6 @@ x y
7 7000
8 8001
9 9001
-8 8000
-9 9000
drop table t1;
create table t1 (
id bigint primary key,
@@ -79,19 +79,19 @@ update t1 set y= y + 1 where x = 3;
update t1 set y= y + 1 where x > 3;
update t1 set y= y + 1 where x > 4;
commit;
-select x, y, sys_trx_end = MAXVAL as current from t1 for system_time all;
+select x, y, sys_trx_end = MAXVAL as current from t1 for system_time all order by sys_trx_end, x, y;
x y current
-1 1 1
-2 2 1
-3 3 1
-4 2 1
-5 3 1
3 1 0
2 1 0
3 2 0
4 1 0
5 1 0
5 2 0
+1 1 1
+2 2 1
+3 3 1
+4 2 1
+5 3 1
drop table t1;
create table t1 (
id int primary key auto_increment,
@@ -129,15 +129,15 @@ with system versioning;
insert into t1(x, y) values (1, 1000), (3, 3000), (4, 4000), (5, 5000);
insert into t1(x, y) values(3, 3000) on duplicate key update y = y+1;
insert into t1(x, y) values(4, 4444) on duplicate key update y = y+1;
-select x, y from t1 for system_time all;
+select x, y from t1 for system_time all order by sys_trx_end, x, y;
x y
-1 1000
3 3000
+1 1000
3 3001
4 4000
4 4444
5 5000
-select x, y from t1;
+select x, y from t1 order by x, y;
x y
1 1000
3 3001
@@ -156,8 +156,10 @@ create table t2 like t1;
insert into t1(x, y) values (1, 1000), (2, 2000), (3, 3000), (4, 4000), (5, 5000), (6, 6000), (7, 7000), (8, 8000), (9, 9000);
insert into t2(x, y) values (1, 1010), (2, 2010), (3, 3010), (4, 4010), (5, 5010), (6, 6010), (7, 7010), (8, 8010), (9, 9010);
update t1, t2 set t1.y = t1.x + t1.y, t2.y = t2.x + t2.y where t1.x > 7 and t2.x < 7;
-select x, y from t1 for system_time all;
+select x, y from t1 for system_time all order by sys_trx_end, x, y;
x y
+8 8000
+9 9000
1 1000
2 2000
3 3000
@@ -167,9 +169,7 @@ x y
7 7000
8 8008
9 9009
-8 8000
-9 9000
-select x, y from t1;
+select x, y from t1 order by x, y;
x y
1 1000
2 2000
@@ -180,8 +180,14 @@ x y
7 7000
8 8008
9 9009
-select x, y from t2 for system_time all;
+select x, y from t2 for system_time all order by sys_trx_end, x, y;
x y
+1 1010
+2 2010
+3 3010
+4 4010
+5 5010
+6 6010
1 1011
2 2012
3 3013
@@ -191,13 +197,7 @@ x y
7 7010
8 8010
9 9010
-1 1010
-2 2010
-3 3010
-4 4010
-5 5010
-6 6010
-select x, y from t2;
+select x, y from t2 order by x, y;
x y
1 1011
2 2012
diff --git a/mysql-test/suite/versioning/t/partition.combinations b/mysql-test/suite/versioning/t/partition.combinations
deleted file mode 100644
index 4d73ef5a5ea..00000000000
--- a/mysql-test/suite/versioning/t/partition.combinations
+++ /dev/null
@@ -1,5 +0,0 @@
-[timestamp]
-default-storage-engine=innodb
-
-[myisam]
-default-storage-engine=myisam
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index d9e784b082b..88411468516 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -1,10 +1,16 @@
-- source include/have_partition.inc
-- source suite/versioning/common.inc
+-- source suite/versioning/engines.inc
set system_versioning_alter_history=keep;
--echo # Check conventional partitioning on temporal tables
-create table t1 (x int)
+--replace_result $sys_datatype_expl SYS_DATATYPE
+eval create or replace table t1 (
+ x int,
+ row_start $sys_datatype_expl as row start invisible,
+ row_end $sys_datatype_expl as row end invisible,
+ period for system_time(row_start, row_end))
with system versioning
partition by range columns (x) (
partition p0 values less than (100),
@@ -24,8 +30,14 @@ select * from t1 partition (p0) for system_time all;
select * from t1 partition (p1) for system_time all;
--echo # Engine change native <-> non-native versioning prohibited
---replace_result $default_engine DEFAULT_ENGINE
-eval create or replace table t1 (i int) engine=$default_engine with system versioning partition by hash(i);
+--replace_result $sys_datatype_expl SYS_DATATYPE $default_engine DEFAULT_ENGINE
+eval create or replace table t1 (
+ i int,
+ row_start $sys_datatype_expl as row start invisible,
+ row_end $sys_datatype_expl as row end invisible,
+ period for system_time(row_start, row_end))
+engine=$default_engine
+with system versioning partition by hash(i);
--replace_result $non_default_engine NON_DEFAULT_ENGINE
--error ER_VERS_ALTER_ENGINE_PROHIBITED
eval alter table t1 engine=$non_default_engine;
@@ -273,15 +285,24 @@ select * from t1 partition (p0sp1);
select * from t1 partition (p1sp0);
select * from t1 partition (p1sp1);
-create or replace table t1 (a bigint)
+--replace_result $sys_datatype_expl SYS_DATATYPE
+eval create or replace table t1 (
+ a bigint,
+ row_start $sys_datatype_expl as row start invisible,
+ row_end $sys_datatype_expl as row end invisible,
+ period for system_time(row_start, row_end))
with system versioning
partition by range (a)
(partition p0 values less than (20) engine innodb,
partition p1 values less than maxvalue engine innodb);
insert into t1 values (1);
-create or replace table t1 (
- f_int1 integer default 0
+--replace_result $sys_datatype_expl SYS_DATATYPE
+eval create or replace table t1 (
+ f_int1 integer default 0,
+ row_start $sys_datatype_expl as row start invisible,
+ row_end $sys_datatype_expl as row end invisible,
+ period for system_time(row_start, row_end)
) with system versioning
partition by range(f_int1)
subpartition by hash(f_int1)
@@ -291,7 +312,12 @@ subpartition subpart12 storage engine = 'innodb'));
insert into t1 values (1);
create or replace table t1 (i int) engine=innodb partition by key(i);
-alter table t1 add system versioning;
+--replace_result $sys_datatype_expl SYS_DATATYPE
+eval alter table t1
+ add column row_start $sys_datatype_expl as row start invisible,
+ add column row_end $sys_datatype_expl as row end invisible,
+ add period for system_time(row_start, row_end),
+ add system versioning;
insert into t1 values();
--echo # MDEV-14722 Assertion in ha_commit_trans for sub-statement
diff --git a/mysql-test/suite/versioning/t/partition_innodb.test b/mysql-test/suite/versioning/t/partition_innodb.test
new file mode 100644
index 00000000000..bb4fe50ce91
--- /dev/null
+++ b/mysql-test/suite/versioning/t/partition_innodb.test
@@ -0,0 +1,80 @@
+--source include/have_innodb.inc
+--source include/have_partition.inc
+
+--echo # MDEV-15951 system versioning by trx id doesn't work with partitioning
+--echo # currently trx_id does not support partitioning by system_time
+--error ER_VERS_FIELD_WRONG_TYPE
+create or replace table t1(
+ i int,
+ row_start bigint unsigned generated always as row start,
+ row_end bigint unsigned generated always as row end,
+ period for system_time(row_start, row_end)
+) engine=InnoDB with system versioning partition by system_time (
+ partition p0 history,
+ partition pn current
+);
+
+create or replace table t1(
+ i int,
+ row_start bigint unsigned generated always as row start,
+ row_end bigint unsigned generated always as row end,
+ period for system_time(row_start, row_end)
+) engine=InnoDB with system versioning;
+
+--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
+--error ER_VERS_FIELD_WRONG_TYPE
+alter table t1 partition by system_time (
+ partition p0 history,
+ partition pn current
+);
+
+--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+create or replace table t (
+ a int primary key,
+ row_start bigint unsigned as row start invisible,
+ row_end bigint unsigned as row end invisible,
+ period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by key() (
+ partition p1,
+ partition p2
+);
+
+--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+create or replace table t (
+ a int primary key,
+ row_start bigint unsigned as row start invisible,
+ row_end bigint unsigned as row end invisible,
+ period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by key(a, row_start) (
+ partition p1,
+ partition p2
+);
+
+--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+create or replace table t (
+ a int primary key,
+ row_start bigint unsigned as row start invisible,
+ row_end bigint unsigned as row end invisible,
+ period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by hash(a + row_end * 2) (
+ partition p1,
+ partition p2
+);
+
+--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+create or replace table t (
+ a int primary key,
+ row_start bigint unsigned as row start invisible,
+ row_end bigint unsigned as row end invisible,
+ period for system_time(row_start, row_end)
+) engine=innodb with system versioning
+partition by range columns (a, row_start) (
+ partition p1 values less than (100, 100)
+);
+
+--echo # Test cleanup
+drop database test;
+create database test;
diff --git a/mysql-test/suite/versioning/t/rpl.test b/mysql-test/suite/versioning/t/rpl.test
index a9e3af45af8..e59d41c38a3 100644
--- a/mysql-test/suite/versioning/t/rpl.test
+++ b/mysql-test/suite/versioning/t/rpl.test
@@ -14,24 +14,24 @@ let $slave_com_update_before= query_get_value(SHOW GLOBAL STATUS LIKE 'com_updat
connection master;
CREATE TABLE t1 (x int) with system versioning;
insert into t1 values (1);
-SELECT * FROM t1;
+select * from t1 order by x;
delete from t1;
-select * from t1;
-select * from t1 for system_time all;
+select * from t1 order by x;
+select * from t1 for system_time all order by row_end, x;
sync_slave_with_master;
-select * from t1;
-select * from t1 for system_time all;
+select * from t1 order by x;
+select * from t1 for system_time all order by row_end, x;
connection master;
insert into t1 values (2);
sync_slave_with_master;
-select * from t1;
+select * from t1 order by x;
connection master;
update t1 set x = 3;
sync_slave_with_master;
-select * from t1;
-select * from t1 for system_time all;
+select * from t1 order by x;
+select * from t1 for system_time all order by row_end, x;
--echo # check unversioned -> versioned replication
connection master;
@@ -42,20 +42,20 @@ alter table t1 with system versioning;
connection master;
insert into t1 values (1);
sync_slave_with_master;
-select * from t1;
-select * from t1 for system_time all;
+select * from t1 order by x;
+select * from t1 for system_time all order by row_end, x;
connection master;
update t1 set x= 2 where x = 1;
sync_slave_with_master;
-select * from t1;
-select * from t1 for system_time all;
+select * from t1 order by x;
+select * from t1 for system_time all order by row_end, x;
connection master;
delete from t1;
sync_slave_with_master;
-select * from t1;
-select * from t1 for system_time all;
+select * from t1 order by x;
+select * from t1 for system_time all order by row_end, x;
--echo # same thing (UPDATE, DELETE), but without PK
connection master;
@@ -67,14 +67,14 @@ connection master;
insert into t1 values (1);
update t1 set x= 2 where x = 1;
sync_slave_with_master;
-select * from t1;
-select * from t1 for system_time all;
+select * from t1 order by x;
+select * from t1 for system_time all order by row_end, x;
connection master;
delete from t1;
sync_slave_with_master;
-select * from t1;
-select * from t1 for system_time all;
+select * from t1 order by x;
+select * from t1 for system_time all order by row_end, x;
--echo # multi-update
connection master;
@@ -84,10 +84,10 @@ insert into t1 values (1);
insert into t2 values (2);
update t1, t2 set t1.x=11, t2.x=22;
sync_slave_with_master;
-select * from t1;
-select * from t2;
-select * from t1 for system_time all;
-select * from t2 for system_time all;
+select * from t1 order by x;
+select * from t2 order by x;
+select * from t1 for system_time all order by row_end, x;
+select * from t2 for system_time all order by row_end, x;
--echo # MDEV-14767 system_versioning_alter_history breaks ALTER replication
--echo ## Case 1: KEEP on the master, ALTER will work on the slave
diff --git a/mysql-test/suite/versioning/t/rpl_row.test b/mysql-test/suite/versioning/t/rpl_row.test
new file mode 100644
index 00000000000..17ce2dfdcf8
--- /dev/null
+++ b/mysql-test/suite/versioning/t/rpl_row.test
@@ -0,0 +1,18 @@
+--source include/have_binlog_format_row.inc
+--source include/master-slave.inc
+
+--echo # MDEV-16252: MINIMAL binlog_row_image does not work for versioned tables
+set @old_row_image= @@binlog_row_image;
+set binlog_row_image= minimal;
+
+create or replace table t1 (pk int, i int, primary key(pk))
+with system versioning;
+insert into t1 values (1,10),(2,20);
+update t1 set i = 0;
+
+--sync_slave_with_master
+--connection master
+drop table t1;
+set binlog_row_image= @old_row_image;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/versioning/t/trx_id.test b/mysql-test/suite/versioning/t/trx_id.test
index 885455a6977..b0691e4580c 100644
--- a/mysql-test/suite/versioning/t/trx_id.test
+++ b/mysql-test/suite/versioning/t/trx_id.test
@@ -361,18 +361,20 @@ SELECT * FROM t2 FOR SYSTEM_TIME AS OF '2038-12-30 00:00:00';
--echo # HEX hybrids resolve to TRANSACTION
--echo #
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (0x60);
+--error ER_VERS_NO_TRX_ID
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF (0xFFFFFFFF);
--error ER_VERS_ENGINE_UNSUPPORTED
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (0x60);
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF (0xFFFFFFFF);
--echo #
--echo # BIT literals resolve to TRANSACTION
--echo #
-SELECT * FROM t1 FOR SYSTEM_TIME AS OF (b'1100000');
+--error ER_VERS_NO_TRX_ID
+SELECT * FROM t1 FOR SYSTEM_TIME AS OF (b'11111111111111111111111111111111');
--error ER_VERS_ENGINE_UNSUPPORTED
-SELECT * FROM t2 FOR SYSTEM_TIME AS OF (b'1100000');
+SELECT * FROM t2 FOR SYSTEM_TIME AS OF (b'11111111111111111111111111111111');
DROP TABLE t1, t2;
diff --git a/mysql-test/suite/versioning/t/update.test b/mysql-test/suite/versioning/t/update.test
index 67d7db952ae..95c844c88a2 100644
--- a/mysql-test/suite/versioning/t/update.test
+++ b/mysql-test/suite/versioning/t/update.test
@@ -11,10 +11,10 @@ eval create table t1(
with system versioning;
insert into t1(x, y) values (1, 1000), (2, 2000), (3, 3000), (4, 4000), (5, 5000), (6, 6000), (7, 7000), (8, 8000), (9, 9000);
-select x, y from t1;
+select x, y from t1 order by x, y;
update t1 set y = y + 1 where x > 7;
-select x, y from t1;
-select x, y from t1 for system_time all;
+select x, y from t1 order by x, y;
+select x, y from t1 for system_time all order by sys_trx_end, x, y;
drop table t1;
replace_result $sys_datatype_expl SYS_DATATYPE;
@@ -56,7 +56,7 @@ update t1 set y= y + 1 where x > 4;
commit;
replace_result $sys_datatype_max MAXVAL;
-eval select x, y, sys_trx_end = $sys_datatype_max as current from t1 for system_time all;
+eval select x, y, sys_trx_end = $sys_datatype_max as current from t1 for system_time all order by sys_trx_end, x, y;
drop table t1;
@@ -95,8 +95,8 @@ with system versioning;
insert into t1(x, y) values (1, 1000), (3, 3000), (4, 4000), (5, 5000);
insert into t1(x, y) values(3, 3000) on duplicate key update y = y+1;
insert into t1(x, y) values(4, 4444) on duplicate key update y = y+1;
-select x, y from t1 for system_time all;
-select x, y from t1;
+select x, y from t1 for system_time all order by sys_trx_end, x, y;
+select x, y from t1 order by x, y;
drop table t1;
replace_result $sys_datatype_expl SYS_DATATYPE;
@@ -111,10 +111,10 @@ create table t2 like t1;
insert into t1(x, y) values (1, 1000), (2, 2000), (3, 3000), (4, 4000), (5, 5000), (6, 6000), (7, 7000), (8, 8000), (9, 9000);
insert into t2(x, y) values (1, 1010), (2, 2010), (3, 3010), (4, 4010), (5, 5010), (6, 6010), (7, 7010), (8, 8010), (9, 9010);
update t1, t2 set t1.y = t1.x + t1.y, t2.y = t2.x + t2.y where t1.x > 7 and t2.x < 7;
-select x, y from t1 for system_time all;
-select x, y from t1;
-select x, y from t2 for system_time all;
-select x, y from t2;
+select x, y from t1 for system_time all order by sys_trx_end, x, y;
+select x, y from t1 order by x, y;
+select x, y from t2 for system_time all order by sys_trx_end, x, y;
+select x, y from t2 order by x, y;
drop table t1;
drop table t2;
diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc
index db303f37b0e..2d6f5188034 100644
--- a/mysys_ssl/my_crypt.cc
+++ b/mysys_ssl/my_crypt.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2014 Google Inc.
- Copyright (c) 2014, 2017 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
@@ -93,7 +93,8 @@ public:
this->key= key;
this->klen= klen;
this->buf_len= 0;
- memcpy(oiv, iv, ivlen);
+ if (ivlen)
+ memcpy(oiv, iv, ivlen);
DBUG_ASSERT(ivlen == 0 || ivlen == sizeof(oiv));
int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen);
diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt
index fbf0979cd1e..10f7e47eb40 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)
ADD_DEFINITIONS(-D_GNU_SOURCE)
MYSQL_ADD_PLUGIN(auth_pam_v1 auth_pam_v1.c LINK_LIBRARIES pam MODULE_ONLY)
MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam dl MODULE_ONLY)
@@ -19,4 +20,3 @@ IF(HAVE_PAM_APPL_H)
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_PLUGINDIR}/)"
COMPONENT Server)
ENDIF(HAVE_PAM_APPL_H)
-
diff --git a/sql/field.cc b/sql/field.cc
index 54063d7fcb5..c752a58cbd6 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -6938,8 +6938,11 @@ Field_longstr::check_string_copy_error(const String_copier *copier,
if (likely(!(pos= copier->most_important_error_pos())))
return FALSE;
- convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6);
- set_warning_truncated_wrong_value("string", tmp);
+ if (!is_stat_field)
+ {
+ convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6);
+ set_warning_truncated_wrong_value("string", tmp);
+ }
return TRUE;
}
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index f385ceb6d3b..5913b3d2aa8 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -412,6 +412,22 @@ public:
virtual void return_record_by_parent();
+ virtual bool vers_can_native(THD *thd)
+ {
+ if (thd->lex->part_info)
+ {
+ // PARTITION BY SYSTEM_TIME is not supported for now
+ return thd->lex->part_info->part_type != VERSIONING_PARTITION;
+ }
+ else
+ {
+ bool can= true;
+ for (uint i= 0; i < m_tot_parts && can; i++)
+ can= can && m_file[i]->vers_can_native(thd);
+ return can;
+ }
+ }
+
/*
-------------------------------------------------------------------------
MODULE create/delete handler object
diff --git a/sql/handler.cc b/sql/handler.cc
index da7850c5c4e..a9890b0ffd9 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -7403,28 +7403,6 @@ bool Vers_parse_info::fix_implicit(THD *thd, Alter_info *alter_info)
return false;
}
-bool Table_scope_and_contents_source_pod_st::vers_native(THD *thd) const
-{
- if (ha_check_storage_engine_flag(db_type, HTON_NATIVE_SYS_VERSIONING))
- return true;
-
-#ifdef WITH_PARTITION_STORAGE_ENGINE
- partition_info *info= thd->work_part_info;
- if (info && !(used_fields & HA_CREATE_USED_ENGINE))
- {
- if (handlerton *hton= info->default_engine_type)
- return ha_check_storage_engine_flag(hton, HTON_NATIVE_SYS_VERSIONING);
-
- List_iterator_fast<partition_element> it(info->partitions);
- while (partition_element *partition_element= it++)
- {
- if (partition_element->find_engine_flag(HTON_NATIVE_SYS_VERSIONING))
- return true;
- }
- }
-#endif
- return false;
-}
bool Table_scope_and_contents_source_st::vers_fix_system_fields(
THD *thd, Alter_info *alter_info, const TABLE_LIST &create_table,
@@ -7501,7 +7479,7 @@ bool Table_scope_and_contents_source_st::vers_check_system_fields(
if (!(options & HA_VERSIONED_TABLE))
return false;
return vers_info.check_sys_fields(create_table.table_name, create_table.db,
- alter_info, vers_native(thd));
+ alter_info);
}
@@ -7610,8 +7588,7 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
if (alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING)
{
- bool native= create_info->vers_native(thd);
- if (check_sys_fields(table_name, share->db, alter_info, native))
+ if (check_sys_fields(table_name, share->db, alter_info))
return true;
}
@@ -7718,7 +7695,7 @@ bool Vers_parse_info::check_conditions(const Lex_table_name &table_name,
bool Vers_parse_info::check_sys_fields(const Lex_table_name &table_name,
const Lex_table_name &db,
- Alter_info *alter_info, bool native)
+ Alter_info *alter_info)
{
if (check_conditions(table_name, db))
return true;
@@ -7749,8 +7726,7 @@ bool Vers_parse_info::check_sys_fields(const Lex_table_name &table_name,
{
f_check_unit= VERS_TIMESTAMP;
}
- else if (native
- && f->type_handler() == &type_handler_longlong
+ else if (f->type_handler() == &type_handler_longlong
&& (f->flags & UNSIGNED_FLAG)
&& f->length == (MY_INT64_NUM_DECIMAL_DIGITS - 1))
{
diff --git a/sql/handler.h b/sql/handler.h
index 4c1a53cc570..d7559a21445 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -2056,7 +2056,7 @@ public:
TABLE_LIST &src_table, TABLE_LIST &table);
bool check_sys_fields(const Lex_table_name &table_name,
const Lex_table_name &db,
- Alter_info *alter_info, bool native);
+ Alter_info *alter_info);
/**
At least one field was specified 'WITH/WITHOUT SYSTEM VERSIONING'.
@@ -2140,8 +2140,6 @@ struct Table_scope_and_contents_source_pod_st // For trivial members
bool table_was_deleted;
sequence_definition *seq_create_info;
- bool vers_native(THD *thd) const;
-
void init()
{
bzero(this, sizeof(*this));
@@ -3576,6 +3574,10 @@ public:
ha_pre_index_end() :
pre_inited == RND ? ha_pre_rnd_end() : 0 );
}
+ virtual bool vers_can_native(THD *thd)
+ {
+ return ht->flags & HTON_NATIVE_SYS_VERSIONING;
+ }
/**
@brief
diff --git a/sql/item.h b/sql/item.h
index 5486aed1f94..c46877231f6 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -525,7 +525,7 @@ class Rewritable_query_parameter
Value of 0 means that this object doesn't have to be replaced
(for example SP variables in control statements)
*/
- uint pos_in_query;
+ my_ptrdiff_t pos_in_query;
/*
Byte length of parameter name in the statement. This is not
diff --git a/sql/item_vers.cc b/sql/item_vers.cc
index c4bb734096f..c8f1c793895 100644
--- a/sql/item_vers.cc
+++ b/sql/item_vers.cc
@@ -61,10 +61,7 @@ Item_func_trt_ts::get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate)
null_value= !trt.query(trx_id);
if (null_value)
- {
- my_error(ER_VERS_NO_TRX_ID, MYF(0), (longlong) trx_id);
return true;
- }
return trt[trt_field]->get_date(res, fuzzydate);
}
diff --git a/sql/log.cc b/sql/log.cc
index 97f86da0b90..0e0a79d4558 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -9747,9 +9747,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/mysqld.cc b/sql/mysqld.cc
index f17e8d45309..e28ec64089e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -8390,7 +8390,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!");
return 1;
diff --git a/sql/partition_element.h b/sql/partition_element.h
index 45900c77cfc..2c89562adda 100644
--- a/sql/partition_element.h
+++ b/sql/partition_element.h
@@ -176,21 +176,6 @@ public:
DBUG_ASSERT(ev->col_val_array);
return ev->col_val_array[idx];
}
-
- bool find_engine_flag(uint32 flag)
- {
- if (ha_check_storage_engine_flag(engine_type, flag))
- return true;
-
- List_iterator_fast<partition_element> it(subpartitions);
- while (partition_element *element= it++)
- {
- if (element->find_engine_flag(flag))
- return true;
- }
-
- return false;
- }
};
#endif /* PARTITION_ELEMENT_INCLUDED */
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 3827f83da5f..db38b157406 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -2377,31 +2377,8 @@ ER_TABLE_NOT_LOCKED
spa "Tabla '%-.192s' no fue trabada con LOCK TABLES"
swe "Tabell '%-.192s' är inte låst med LOCK TABLES"
ukr "Таблицю '%-.192s' не було блоковано з LOCK TABLES"
-ER_BLOB_CANT_HAVE_DEFAULT 42000
- cze "Blob položka '%-.192s' nemůže mít defaultní hodnotu"
- dan "BLOB feltet '%-.192s' kan ikke have en standard værdi"
- nla "Blob veld '%-.192s' can geen standaardwaarde bevatten"
- eng "BLOB/TEXT column '%-.192s' can't have a default value"
- est "BLOB-tüüpi tulp '%-.192s' ei saa omada vaikeväärtust"
- fre "BLOB '%-.192s' ne peut avoir de valeur par défaut"
- ger "BLOB/TEXT-Feld '%-.192s' darf keinen Vorgabewert (DEFAULT) haben"
- greek "Τα Blob πεδία '%-.192s' δεν μποÏοÏν να έχουν Ï€ÏοκαθοÏισμένες τιμές (default value)"
- hindi "BLOB/TEXT कॉलम '%-.192s' का डिफ़ॉलà¥à¤Ÿ मान नहीं हो सकता"
- hun "A(z) '%-.192s' blob objektumnak nem lehet alapertelmezett erteke"
- ita "Il campo BLOB '%-.192s' non puo` avere un valore di default"
- jpn "BLOB/TEXT 列 '%-.192s' ã«ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’指定ã§ãã¾ã›ã‚“。"
- kor "BLOB 칼럼 '%-.192s' 는 ë””í´íŠ¸ ê°’ì„ ê°€ì§ˆ 수 없습니다."
- nor "Blob feltet '%-.192s' kan ikke ha en standard verdi"
- norwegian-ny "Blob feltet '%-.192s' kan ikkje ha ein standard verdi"
- pol "Pole typu blob '%-.192s' nie może mieć domy?lnej warto?ci"
- por "Coluna BLOB '%-.192s' não pode ter um valor padrão (default)"
- rum "Coloana BLOB '%-.192s' nu poate avea o valoare default"
- rus "Ðевозможно указывать значение по умолчанию Ð´Ð»Ñ Ñтолбца BLOB '%-.192s'"
- serbian "BLOB kolona '%-.192s' ne može imati default vrednost"
- slo "Pole BLOB '%-.192s' nemôže mať implicitnú hodnotu"
- spa "Campo Blob '%-.192s' no puede tener valores patron"
- swe "BLOB fält '%-.192s' kan inte ha ett DEFAULT-värde"
- ukr "Стовбець BLOB '%-.192s' не може мати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð¾ замовчуванню"
+ER_UNUSED_17
+ eng "You should never see it"
ER_WRONG_DB_NAME 42000
cze "Nepřípustné jméno databáze '%-.100s'"
dan "Ugyldigt database navn '%-.100s'"
@@ -7177,7 +7154,7 @@ ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN
ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN
eng "Cannot define foreign key with %s clause on a generated column"
ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
- eng "The value specified for generated column '%s' in table '%s' ignored"
+ eng "The value specified for generated column '%s' in table '%s' has been ignored"
ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN
eng "This is not yet supported for generated columns"
ER_UNUSED_20
@@ -7829,7 +7806,7 @@ ER_VERS_FIELD_WRONG_TYPE
eng "%`s must be of type %s for system-versioned table %`s"
ER_VERS_ENGINE_UNSUPPORTED
- eng "Transaction system versioning for %`s is not supported"
+ eng "Transaction-precise system versioning for %`s is not supported"
ER_UNUSED_23
eng "You should never see it"
@@ -7909,8 +7886,8 @@ ER_UNUSED_24
ER_VERS_TEMPORARY
eng "TEMPORARY tables do not support system versioning"
-ER_VERS_NOT_SUPPORTED
- eng "%s is not supported for %s system-versioned tables"
+ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
+ eng "Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END"
ER_INDEX_FILE_FULL
eng "The index file for table '%-.192s' is full"
ER_UPDATED_COLUMN_ONLY_ONCE
diff --git a/sql/slave.cc b/sql/slave.cc
index f5bfd0f1974..52cecf2fd36 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3912,12 +3912,6 @@ apply_event_and_update_pos_setup(Log_event* ev, THD* thd, rpl_group_info *rgi)
thd->variables.server_id = ev->server_id;
thd->set_time(); // time the query
thd->lex->current_select= 0;
- if (!ev->when)
- {
- my_hrtime_t hrtime= my_hrtime();
- ev->when= hrtime_to_my_time(hrtime);
- ev->when_sec_part= hrtime_sec_part(hrtime);
- }
thd->variables.option_bits=
(thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) |
(ev->flags & LOG_EVENT_SKIP_REPLICATION_F ? OPTION_SKIP_REPLICATION : 0);
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index dc5123efe36..bd4d74c58a8 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -532,6 +532,7 @@ sp_head::sp_head(sp_package *parent, const Sp_handler *sph,
DBUG_ENTER("sp_head::sp_head");
+ m_security_ctx.init();
m_backpatch.empty();
m_backpatch_goto.empty();
m_cont_backpatch.empty();
@@ -1338,7 +1339,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
if (WSREP(thd) && thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID)
{
thd->set_wsrep_next_trx_id(thd->query_id);
- WSREP_DEBUG("assigned new next trx ID for SP, trx id: %lu", thd->wsrep_next_trx_id());
+ WSREP_DEBUG("assigned new next trx ID for SP, trx id: %" PRIu64, thd->wsrep_next_trx_id());
}
#endif /* WITH_WSREP */
err_status= i->execute(thd, &ip);
diff --git a/sql/spatial.cc b/sql/spatial.cc
index a8a70d0763b..3514a519db7 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -238,17 +238,17 @@ int Geometry::as_wkt(String *wkt, const char **end)
static const uchar type_keyname[]= "type";
-static const int type_keyname_len= 4;
+static const uint type_keyname_len= 4;
static const uchar coord_keyname[]= "coordinates";
-static const int coord_keyname_len= 11;
+static const uint coord_keyname_len= 11;
static const uchar geometries_keyname[]= "geometries";
-static const int geometries_keyname_len= 10;
+static const uint geometries_keyname_len= 10;
static const uchar features_keyname[]= "features";
-static const int features_keyname_len= 8;
+static const uint features_keyname_len= 8;
static const uchar geometry_keyname[]= "geometry";
-static const int geometry_keyname_len= 8;
+static const uint geometry_keyname_len= 8;
-static const int max_keyname_len= 11; /*'coordinates' keyname is the longest.*/
+static const uint max_keyname_len= 11; /*'coordinates' keyname is the longest.*/
static const uchar feature_type[]= "feature";
static const int feature_type_len= 7;
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 1da345dfbf4..ed48d65fffc 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -566,7 +566,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))
{
@@ -1219,9 +1220,6 @@ err:
}
close_thread_tables(thd); // Shouldn't be needed
thd->mdl_context.release_transactional_locks();
-#ifdef WITH_PARTITION_STORAGE_ENGINE
-err2:
-#endif
thd->resume_subsequent_commits(suspended_wfc);
DBUG_RETURN(TRUE);
}
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index d6196d8edbe..92e0796da76 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -5556,7 +5556,7 @@ void THD::set_query_and_id(char *query_arg, uint32 query_length_arg,
query_id= new_query_id;
#ifdef WITH_WSREP
set_wsrep_next_trx_id(query_id);
- WSREP_DEBUG("assigned new next query and trx id: %lu", wsrep_next_trx_id());
+ WSREP_DEBUG("assigned new next query and trx id: %" PRIu64, wsrep_next_trx_id());
#endif /* WITH_WSREP */
}
@@ -6158,16 +6158,18 @@ int THD::decide_logging_format(TABLE_LIST *tables)
replicated_tables_count++;
- if (table->lock_type <= TL_READ_NO_INSERT &&
- table->prelocking_placeholder != TABLE_LIST::PRELOCK_FK)
- has_read_tables= true;
- else if (table->table->found_next_number_field &&
- (table->lock_type >= TL_WRITE_ALLOW_WRITE))
+ if (table->prelocking_placeholder != TABLE_LIST::PRELOCK_FK)
{
- has_auto_increment_write_tables= true;
- has_auto_increment_write_tables_not_first= found_first_not_own_table;
- if (table->table->s->next_number_keypart != 0)
- has_write_table_auto_increment_not_first_in_pk= true;
+ if (table->lock_type <= TL_READ_NO_INSERT)
+ has_read_tables= true;
+ else if (table->table->found_next_number_field &&
+ (table->lock_type >= TL_WRITE_ALLOW_WRITE))
+ {
+ has_auto_increment_write_tables= true;
+ has_auto_increment_write_tables_not_first= found_first_not_own_table;
+ if (table->table->s->next_number_keypart != 0)
+ has_write_table_auto_increment_not_first_in_pk= true;
+ }
}
if (table->lock_type >= TL_WRITE_ALLOW_WRITE)
diff --git a/sql/sql_class.h b/sql/sql_class.h
index ba4bb45c5ae..25a9ca8e935 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -64,6 +64,7 @@ void set_thd_stage_info(void *thd,
#include "wsrep_mysqld.h"
#ifdef WITH_WSREP
+#include <inttypes.h>
/* wsrep-lib */
#include "wsrep_client_service.h"
#include "wsrep_client_state.h"
@@ -4550,7 +4551,7 @@ public:
if (WSREP(this))
{
set_wsrep_next_trx_id(query_id);
- WSREP_DEBUG("assigned new next trx id: %lu", wsrep_next_trx_id());
+ WSREP_DEBUG("assigned new next trx id: %" PRIu64, wsrep_next_trx_id());
}
#endif /* WITH_WSREP */
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 6e7b1d07073..831c2954e20 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1600,7 +1600,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (WSREP(thd) && thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID)
{
thd->set_wsrep_next_trx_id(thd->query_id);
- WSREP_DEBUG("assigned new next trx id: %lu", thd->wsrep_next_trx_id());
+ WSREP_DEBUG("assigned new next trx id: %" PRIu64, thd->wsrep_next_trx_id());
}
#endif /* WITH_WSREP */
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 6b530a95efb..746a030a7ab 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -341,7 +341,15 @@ static bool set_up_field_array(THD *thd, TABLE *table,
while ((field= *(ptr++)))
{
if (field->flags & GET_FIXED_FIELDS_FLAG)
+ {
+ if (table->versioned(VERS_TRX_ID)
+ && unlikely(field->flags & VERS_SYSTEM_FIELD))
+ {
+ my_error(ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
num_fields++;
+ }
}
if (unlikely(num_fields > MAX_REF_PARTS))
{
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index a9b6ba222f9..944fa5dc176 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -1057,7 +1057,9 @@ public:
else
{
table_field->collected_stats->min_value->val_str(&val);
- stat_field->store(val.ptr(), val.length(), &my_charset_bin);
+ size_t length= Well_formed_prefix(val.charset(), val.ptr(),
+ MY_MIN(val.length(), stat_field->field_length)).length();
+ stat_field->store(val.ptr(), length, &my_charset_bin);
}
break;
case COLUMN_STAT_MAX_VALUE:
@@ -1066,7 +1068,9 @@ public:
else
{
table_field->collected_stats->max_value->val_str(&val);
- stat_field->store(val.ptr(), val.length(), &my_charset_bin);
+ size_t length= Well_formed_prefix(val.charset(), val.ptr(),
+ MY_MIN(val.length(), stat_field->field_length)).length();
+ stat_field->store(val.ptr(), length, &my_charset_bin);
}
break;
case COLUMN_STAT_NULLS_RATIO:
@@ -3133,7 +3137,7 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables)
}
}
}
-
+
table->stats_is_read= TRUE;
DBUG_RETURN(0);
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index ad62ecc1103..378e04c2fac 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -8268,11 +8268,6 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
if (alter)
{
- if (def->real_field_type() == MYSQL_TYPE_BLOB)
- {
- my_error(ER_BLOB_CANT_HAVE_DEFAULT, MYF(0), def->change.str);
- goto err;
- }
if ((def->default_value= alter->default_value)) // Use new default
def->flags&= ~NO_DEFAULT_VALUE_FLAG;
else
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 30578405c21..54e13d860a9 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1028,6 +1028,7 @@ update_begin:
if (table->versioned(VERS_TIMESTAMP))
{
store_record(table, record[2]);
+ table->mark_columns_per_binlog_row_image();
error= vers_insert_history_row(table);
restore_record(table, record[2]);
}
diff --git a/sql/table.cc b/sql/table.cc
index b86298ef49d..e1f6f1a191b 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2087,7 +2087,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
DBUG_PRINT("info", ("Columns with system versioning: [%d, %d]",
vers.start_fieldno, vers.end_fieldno));
versioned= VERS_TIMESTAMP;
- vers_can_native= plugin_hton(se_plugin)->flags & HTON_NATIVE_SYS_VERSIONING;
+ vers_can_native= handler_file->vers_can_native(thd);
status_var_increment(thd->status_var.feature_system_versioning);
} // if (system_period == NULL)
@@ -9149,7 +9149,10 @@ bool TR_table::query(ulonglong trx_id)
return false;
select= make_select(table, 0, 0, conds, NULL, 0, &error);
if (unlikely(error || !select))
+ {
+ my_error(ER_OUT_OF_RESOURCES, MYF(0));
return false;
+ }
// FIXME: (performance) force index 'transaction_id'
error= init_read_record(&info, thd, table, select, NULL,
1 /* use_record_cache */, true /* print_error */,
@@ -9159,6 +9162,7 @@ bool TR_table::query(ulonglong trx_id)
if (select->skip_record(thd) > 0)
return true;
}
+ my_error(ER_VERS_NO_TRX_ID, MYF(0), (longlong) trx_id);
return false;
}
diff --git a/sql/winservice.c b/sql/winservice.c
index 388ea886cea..5e021c0e297 100644
--- a/sql/winservice.c
+++ b/sql/winservice.c
@@ -108,7 +108,7 @@ BOOL exclude_service(mysqld_service_properties *props)
}
if ((props->version_major == 0) ||
(props->version_major > 5 && props->version_major < 10) ||
- (props->version_major == 5 && props->version_minor > 6))
+ (props->version_major == 5 && props->version_minor > 7))
{
return TRUE;
}
diff --git a/storage/cassandra/ha_cassandra.cc b/storage/cassandra/ha_cassandra.cc
index c55e9976ede..0104fc06420 100644
--- a/storage/cassandra/ha_cassandra.cc
+++ b/storage/cassandra/ha_cassandra.cc
@@ -2360,7 +2360,7 @@ public:
};
-int ha_cassandra::update_row(const uchar *old_data, uchar *new_data)
+int ha_cassandra::update_row(const uchar *old_data, const uchar *new_data)
{
DYNAMIC_COLUMN_VALUE *oldvals, *vals;
LEX_STRING *oldnames, *names;
diff --git a/storage/cassandra/ha_cassandra.h b/storage/cassandra/ha_cassandra.h
index 5da1bbcaa78..49fd87ad15c 100644
--- a/storage/cassandra/ha_cassandra.h
+++ b/storage/cassandra/ha_cassandra.h
@@ -240,7 +240,7 @@ public:
int close(void);
int write_row(uchar *buf);
- int update_row(const uchar *old_data, uchar *new_data);
+ int update_row(const uchar *old_data, const uchar *new_data);
int delete_row(const uchar *buf);
/** @brief
@@ -268,7 +268,7 @@ public:
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type); ///< required
- my_bool register_query_cache_table(THD *thd, char *table_key,
+ my_bool register_query_cache_table(THD *thd, const char *table_key,
uint key_length,
qc_engine_callback
*engine_callback,
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 73c7619aaa9..2ebc342910d 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 )
@@ -168,7 +173,8 @@ IF(CONNECT_WITH_ODBC)
# the library 'libiodbc' gets compiled with 'sql'h.
# This will also need changes in the sources (e.g. #include <isql.h>).
- find_path(ODBC_INCLUDE_DIR sql.h
+ find_file(ODBC_INCLUDES sql.h
+ PATHS
/usr/include
/usr/include/odbc
/usr/local/include
@@ -178,7 +184,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
@@ -197,9 +203,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(
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h
index 8504b585ae1..5f853d843ed 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. */
/****************************************************************************/
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index 7d255531b15..89e4fd1bce7 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -1,5 +1,5 @@
# Copyright (c) 2006, 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
@@ -163,12 +163,9 @@ ENDIF()
# A GCC bug causes crash when compiling these files on ARM64 with -O1+
# Compile them with -O0 as a workaround.
-IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
- # Bug was fixed in GCC 5.2, so workaround only needed < 5.2
- EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
- OUTPUT_VARIABLE GCC_VERSION)
- IF(GCC_VERSION VERSION_LESS 5.2)
- ADD_COMPILE_FLAGS(
+IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64"
+ AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5.2.0")
+ ADD_COMPILE_FLAGS(
btr/btr0btr.cc
btr/btr0cur.cc
buf/buf0buf.cc
@@ -181,7 +178,6 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
srv/srv0srv.cc
COMPILE_FLAGS "-O0"
)
- ENDIF()
ENDIF()
IF(MSVC)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index ba72d795e92..9fba62e5b15 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -4874,10 +4874,7 @@ btr_cur_pessimistic_update(
}
rec = btr_cur_get_rec(cursor);
-
- *offsets = rec_get_offsets(
- rec, index, *offsets, page_is_leaf(page),
- ULINT_UNDEFINED, offsets_heap);
+ ut_ad(rec_offs_validate(rec, index, *offsets));
dtuple_t* new_entry;
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc
index 2fc700307ab..f933bfb81b3 100644
--- a/storage/innobase/buf/buf0dump.cc
+++ b/storage/innobase/buf/buf0dump.cc
@@ -392,7 +392,7 @@ buf_dump(
if (SHUTTING_DOWN() && !(j % 1024)) {
service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL,
"Dumping buffer pool "
- ULINTPF "/" ULINTPF ", "
+ ULINTPF "/%lu, "
"page " ULINTPF "/" ULINTPF,
i + 1, srv_buf_pool_instances,
j + 1, n_pages);
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index f4b05766e79..718202d1950 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -3840,65 +3840,6 @@ dict_stats_rename_table(
return(ret);
}
-#ifdef MYSQL_RENAME_INDEX
-/*********************************************************************//**
-Renames an index in InnoDB persistent stats storage.
-This function creates its own transaction and commits it.
-@return DB_SUCCESS or error code. DB_STATS_DO_NOT_EXIST will be returned
-if the persistent stats do not exist. */
-dberr_t
-dict_stats_rename_index(
-/*====================*/
- const dict_table_t* table, /*!< in: table whose index
- is renamed */
- const char* old_index_name, /*!< in: old index name */
- const char* new_index_name) /*!< in: new index name */
-{
- rw_lock_x_lock(dict_operation_lock);
- mutex_enter(&dict_sys->mutex);
-
- if (!dict_stats_persistent_storage_check(true)) {
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(dict_operation_lock);
- return(DB_STATS_DO_NOT_EXIST);
- }
-
- char dbname_utf8[MAX_DB_UTF8_LEN];
- char tablename_utf8[MAX_TABLE_UTF8_LEN];
-
- dict_fs2utf8(table->name.m_name, dbname_utf8, sizeof(dbname_utf8),
- tablename_utf8, sizeof(tablename_utf8));
-
- pars_info_t* pinfo;
-
- pinfo = pars_info_create();
-
- pars_info_add_str_literal(pinfo, "dbname_utf8", dbname_utf8);
- pars_info_add_str_literal(pinfo, "tablename_utf8", tablename_utf8);
- pars_info_add_str_literal(pinfo, "new_index_name", new_index_name);
- pars_info_add_str_literal(pinfo, "old_index_name", old_index_name);
-
- dberr_t ret;
-
- ret = dict_stats_exec_sql(
- pinfo,
- "PROCEDURE RENAME_INDEX_IN_INDEX_STATS () IS\n"
- "BEGIN\n"
- "UPDATE \"" INDEX_STATS_NAME "\" SET\n"
- "index_name = :new_index_name\n"
- "WHERE\n"
- "database_name = :dbname_utf8 AND\n"
- "table_name = :tablename_utf8 AND\n"
- "index_name = :old_index_name;\n"
- "END;\n", NULL);
-
- mutex_exit(&dict_sys->mutex);
- rw_lock_x_unlock(dict_operation_lock);
-
- return(ret);
-}
-#endif /* MYSQL_RENAME_INDEX */
-
/* tests @{ */
#ifdef UNIV_ENABLE_UNIT_TEST_DICT_STATS
diff --git a/storage/innobase/fts/Makefile.query b/storage/innobase/fts/Makefile.query
index 12dcd833064..d91b1b92de1 100644
--- a/storage/innobase/fts/Makefile.query
+++ b/storage/innobase/fts/Makefile.query
@@ -9,23 +9,9 @@ fts0blex.cc: fts0blex.l
fts0tlex.cc: fts0tlex.l
.l.cc:
- $(LEX) -P$(subst lex,,$*) -o $*.cc --header-file=../include/$*.h $<
-
-.y.cc:
- $(YACC) -p $(PREFIX) -o $*.cc -d $<
- mv $*.h ../include
-LEX=flex
-YACC=bison
-PREFIX=fts
-
-all: fts0pars.cc fts0blex.cc fts0tlex.cc
-
-fts0par.cc: fts0pars.y
-fts0blex.cc: fts0blex.l
-fts0tlex.cc: fts0tlex.l
-
-.l.cc:
- $(LEX) -P$(subst lex,,$*) -o $*.cc --header-file=../include/$*.h $<
+ echo '#include "univ.i"' > $*.cc
+ $(LEX) --stdout -P$(subst lex,,$*) -o $*.cc \
+ --header-file=../include/$*.h $< >> $*.cc
.y.cc:
$(YACC) -p $(PREFIX) -o $*.cc -d $<
diff --git a/storage/innobase/fts/fts0blex.cc b/storage/innobase/fts/fts0blex.cc
index 183e05edd04..714f8078850 100644
--- a/storage/innobase/fts/fts0blex.cc
+++ b/storage/innobase/fts/fts0blex.cc
@@ -9,12 +9,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 +245,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 +262,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 +295,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 +344,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 +378,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 +417,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 +443,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 +462,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 +479,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<int>(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 +559,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 +597,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 +624,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 +642,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
@@ -481,8 +672,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
#define YY_DECL int fts_blexer(YYSTYPE* val, yyscan_t yyscanner)
#define exit(A) ut_error
+#line 675 "fts0blex.cc"
#define YY_NO_INPUT 1
-#line 485 "fts0blex.cc"
+#line 677 "fts0blex.cc"
#define INITIAL 0
@@ -500,72 +692,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.
@@ -573,26 +769,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
@@ -612,7 +811,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,
@@ -624,7 +823,7 @@ static int input (yyscan_t yyscanner );
{ \
int c = '*'; \
int n; \
- for ( n = 0; n < static_cast<int>(max_size) && \
+ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
@@ -636,8 +835,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
- while ( (result = static_cast<int>(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) \
{ \
@@ -678,9 +876,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
@@ -692,7 +890,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 \
@@ -702,15 +900,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 44 "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 )
{
@@ -730,15 +923,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 44 "fts0blex.l"
+
+
+#line 938 "fts0blex.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
@@ -754,7 +953,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;
@@ -764,9 +963,9 @@ yy_match:
{
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 );
@@ -841,7 +1040,7 @@ YY_RULE_SETUP
#line 74 "fts0blex.l"
ECHO;
YY_BREAK
-#line 843 "fts0blex.cc"
+#line 1043 "fts0blex.cc"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -859,7 +1058,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
@@ -920,7 +1119,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
@@ -973,7 +1172,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
*
@@ -984,10 +1184,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] )
@@ -1016,7 +1216,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++);
@@ -1029,21 +1229,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read = static_cast<int>(
- 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<int>(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;
@@ -1052,11 +1252,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(
@@ -1064,8 +1265,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<int>(
- 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;
}
@@ -1074,7 +1275,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;
}
@@ -1084,7 +1285,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
@@ -1098,12 +1299,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;
@@ -1117,17 +1321,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;
@@ -1137,9 +1341,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;
@@ -1150,13 +1354,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;
@@ -1166,24 +1370,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;
@@ -1199,7 +1408,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 ) )
@@ -1216,14 +1425,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;
@@ -1254,34 +1463,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;
@@ -1294,19 +1503,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;
@@ -1319,37 +1528,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;
@@ -1358,37 +1567,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;
}
@@ -1396,9 +1605,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;
@@ -1417,7 +1626,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
@@ -1426,15 +1635,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. */
@@ -1448,8 +1657,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;
}
@@ -1457,19 +1666,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;
}
}
@@ -1477,23 +1686,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*));
@@ -1505,15 +1714,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<int>(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*));
@@ -1527,76 +1736,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<int>(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<int>(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.
@@ -1610,9 +1820,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 );
}
@@ -1623,8 +1835,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; \
@@ -1638,272 +1850,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;
}
/*
@@ -1911,18 +2119,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 )
;
@@ -1930,13 +2141,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
@@ -1944,15 +2160,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 74 "fts0blex.l"
+
diff --git a/storage/innobase/fts/fts0tlex.cc b/storage/innobase/fts/fts0tlex.cc
index 4cb09784e03..f4a773eec21 100644
--- a/storage/innobase/fts/fts0tlex.cc
+++ b/storage/innobase/fts/fts0tlex.cc
@@ -9,12 +9,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 +245,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 +262,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 +295,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 +344,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,33 +378,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 +417,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 +443,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 +462,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 +479,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<int>(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 +559,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 +597,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 +638,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
@@ -477,8 +668,9 @@ this program; if not, write to the Free Software Foundation, Inc.,
#define YY_DECL int fts_tlexer(YYSTYPE* val, yyscan_t yyscanner)
#define exit(A) ut_error
+#line 671 "fts0tlex.cc"
#define YY_NO_INPUT 1
-#line 481 "fts0tlex.cc"
+#line 673 "fts0tlex.cc"
#define INITIAL 0
@@ -496,72 +688,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 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 );
-int fts0tget_debug (yyscan_t yyscanner );
+void yyset_debug ( int debug_flag , yyscan_t yyscanner );
-void fts0tset_debug (int debug_flag ,yyscan_t yyscanner );
+YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
-YY_EXTRA_TYPE fts0tget_extra (yyscan_t yyscanner );
+void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
-void fts0tset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
+FILE *yyget_in ( yyscan_t yyscanner );
-FILE *fts0tget_in (yyscan_t yyscanner );
+void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
-void fts0tset_in (FILE * in_str ,yyscan_t yyscanner );
+FILE *yyget_out ( yyscan_t yyscanner );
-FILE *fts0tget_out (yyscan_t yyscanner );
+void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
-void fts0tset_out (FILE * out_str ,yyscan_t yyscanner );
+ int yyget_leng ( yyscan_t yyscanner );
-int fts0tget_leng (yyscan_t yyscanner );
+char *yyget_text ( yyscan_t yyscanner );
-char *fts0tget_text (yyscan_t yyscanner );
+int yyget_lineno ( yyscan_t yyscanner );
-int fts0tget_lineno (yyscan_t yyscanner );
+void yyset_lineno ( int _line_number , yyscan_t yyscanner );
-void fts0tset_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.
@@ -569,26 +765,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
@@ -608,7 +807,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,
@@ -620,7 +819,7 @@ static int input (yyscan_t yyscanner );
{ \
int c = '*'; \
int n; \
- for ( n = 0; n < static_cast<int>(max_size) && \
+ for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
@@ -632,8 +831,7 @@ static int input (yyscan_t yyscanner );
else \
{ \
errno=0; \
- while ( (result = static_cast<int>(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) \
{ \
@@ -674,9 +872,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
@@ -688,7 +886,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 \
@@ -698,15 +896,10 @@ 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;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
-#line 45 "fts0tlex.l"
-
-
-#line 708 "fts0tlex.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 )
{
@@ -726,15 +919,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 45 "fts0tlex.l"
+
+
+#line 934 "fts0tlex.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = yyg->yy_c_buf_p;
@@ -750,7 +949,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;
@@ -760,9 +959,9 @@ yy_match:
{
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 );
@@ -833,7 +1032,7 @@ YY_RULE_SETUP
#line 69 "fts0tlex.l"
ECHO;
YY_BREAK
-#line 835 "fts0tlex.cc"
+#line 1035 "fts0tlex.cc"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -851,7 +1050,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
@@ -912,7 +1111,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
@@ -965,7 +1164,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,10 +1176,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] )
@@ -1008,7 +1208,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++);
@@ -1021,21 +1221,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
- int num_to_read =static_cast<int>(
- 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<int>(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;
@@ -1044,11 +1244,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(
@@ -1056,8 +1257,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<int>(
- 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;
}
@@ -1066,7 +1267,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;
}
@@ -1076,7 +1277,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
@@ -1090,12 +1291,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;
@@ -1109,17 +1313,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;
@@ -1129,9 +1333,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 >= 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;
@@ -1142,13 +1346,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;
@@ -1158,24 +1362,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 >= 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)
+ 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;
@@ -1191,7 +1400,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 ) )
@@ -1208,14 +1417,14 @@ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_
*/
/* 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;
@@ -1246,34 +1455,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 fts0trestart (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 ){
- 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;
+ 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);
- */
- fts0tensure_buffer_stack (yyscanner);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
+ */
+ yyensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1286,19 +1495,19 @@ void fts0t_switch_to_buffer (YY_BUFFER_STATE new_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;
+ 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;
@@ -1311,37 +1520,37 @@ 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;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -1350,37 +1559,37 @@ void fts0t_delete_buffer (YY_BUFFER_STATE b , 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;
+ 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.
- * 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;
}
@@ -1388,9 +1597,9 @@ static void fts0t_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 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;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -1409,7 +1618,7 @@ void fts0t_flush_buffer (YY_BUFFER_STATE b , 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
@@ -1418,15 +1627,15 @@ void fts0t_flush_buffer (YY_BUFFER_STATE b , 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;
+ 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. */
@@ -1440,8 +1649,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;
}
@@ -1449,19 +1658,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;
+ 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;
}
}
@@ -1469,23 +1678,23 @@ 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;
- 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**)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*));
@@ -1497,15 +1706,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<int>(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*));
@@ -1519,77 +1728,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<int>(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<int>(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.
@@ -1603,9 +1812,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 );
}
@@ -1616,8 +1827,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; \
@@ -1631,272 +1842,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 fts0tget_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 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;
+ 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 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;
+ 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 *fts0tget_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 *fts0tget_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 fts0tget_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 *fts0tget_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 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 ;
+ 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);
+ 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 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;
+ 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;
+ /* 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 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 ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ 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 ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ 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;
+ 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 ;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ 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;
- }
+ 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;
- 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 );
}
-/* 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;
+ 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;
- }
+ 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;
- 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));
- fts0tset_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 fts0tlex_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;
+ 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
- * fts0tlex_init()
- */
- return 0;
+ /* For future reference: Set errno on error, since we are called by
+ * 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;
+ 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){
- 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 );
- 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
- * fts0tlex() 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). */
- fts0tfree ( yyscanner , yyscanner );
- yyscanner = NULL;
- return 0;
+ /* Destroy the main struct (reentrant only). */
+ yyfree ( yyscanner , yyscanner );
+ yyscanner = NULL;
+ return 0;
}
/*
@@ -1904,18 +2111,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 )
;
@@ -1923,13 +2133,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
@@ -1937,15 +2152,18 @@ 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"
#line 69 "fts0tlex.l"
+
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 526c6b95de5..29485f22079 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -129,9 +129,6 @@ static const alter_table_operations INNOBASE_ALTER_NOREBUILD
static const alter_table_operations INNOBASE_ALTER_INSTANT
= ALTER_VIRTUAL_COLUMN_ORDER
| ALTER_COLUMN_NAME
-#ifdef MYSQL_RENAME_INDEX
- | ALTER_RENAME_INDEX
-#endif
| ALTER_ADD_VIRTUAL_COLUMN
| INNOBASE_FOREIGN_OPERATIONS
| ALTER_COLUMN_EQUAL_PACK_LENGTH
@@ -3261,23 +3258,6 @@ innobase_check_index_keys(
}
}
-#ifdef MYSQL_RENAME_INDEX
- /* If a key by the same name is being created and
- renamed, the name clash is OK. E.g.
- ALTER TABLE t ADD INDEX i (col), RENAME INDEX i TO x
- where the index "i" exists prior to the ALTER command.
- In this case we:
- 1. rename the existing index from "i" to "x"
- 2. add the new index "i" */
- for (uint i = 0; i < info->index_rename_count; i++) {
- const KEY_PAIR* pair
- = &info->index_rename_buffer[i];
-
- if (0 == strcmp(key.name, pair->old_key->name)) {
- goto name_ok;
- }
- }
-#endif /* MYSQL_RENAME_INDEX */
my_error(ER_WRONG_NAME_FOR_INDEX, MYF(0),
key.name.str);
@@ -4183,10 +4163,16 @@ innobase_build_col_map(
& INNOBASE_DEFAULTS));
DBUG_ASSERT(!defaults || dtuple_get_n_fields(defaults)
== dict_table_get_n_cols(new_table));
+ DBUG_ASSERT(table->s->stored_fields > 0);
+
+ const size_t old_n_v_cols = table->s->fields - table->s->stored_fields;
+ DBUG_ASSERT(old_n_v_cols == old_table->n_v_cols
+ || table->s->frm_version < FRM_VER_EXPRESSSIONS);
+ DBUG_ASSERT(!old_n_v_cols || table->s->virtual_fields);
ulint* col_map = static_cast<ulint*>(
mem_heap_alloc(
- heap, unsigned(old_table->n_cols + old_table->n_v_cols)
+ heap, (size_t(old_table->n_cols) + old_n_v_cols)
* sizeof *col_map));
List_iterator_fast<Create_field> cf_it(
@@ -4200,10 +4186,12 @@ innobase_build_col_map(
col_map[old_i] = ULINT_UNDEFINED;
}
- for (uint old_i = 0; old_i < old_table->n_v_cols; old_i++) {
+ for (uint old_i = 0; old_i < old_n_v_cols; old_i++) {
col_map[old_i + old_table->n_cols] = ULINT_UNDEFINED;
}
+ const bool omits_virtual = ha_innobase::omits_virtual_cols(*table->s);
+
while (const Create_field* new_field = cf_it++) {
bool is_v = !new_field->stored_in_db();
ulint num_old_v = 0;
@@ -4212,8 +4200,11 @@ innobase_build_col_map(
const Field* field = table->field[old_i];
if (!field->stored_in_db()) {
if (is_v && new_field->field == field) {
- col_map[old_table->n_cols + num_v]
- = num_old_v;
+ if (!omits_virtual) {
+ col_map[old_table->n_cols
+ + num_v]
+ = num_old_v;
+ }
num_old_v++;
goto found_col;
}
@@ -4267,7 +4258,7 @@ found_col:
DBUG_ASSERT(i == altered_table->s->fields - num_v);
- i = table->s->fields - old_table->n_v_cols;
+ i = table->s->fields - old_n_v_cols;
/* Add the InnoDB hidden FTS_DOC_ID column, if any. */
if (i + DATA_N_SYS_COLS < old_table->n_cols) {
@@ -7082,192 +7073,6 @@ innobase_check_foreign_key_index(
return(false);
}
-#ifdef MYSQL_RENAME_INDEX
-/**
-Rename a given index in the InnoDB data dictionary.
-
-@param index index to rename
-@param new_name new name of the index
-@param[in,out] trx dict transaction to use, not going to be committed here
-
-@retval true Failure
-@retval false Success */
-static MY_ATTRIBUTE((warn_unused_result))
-bool
-rename_index_in_data_dictionary(
-/*============================*/
- const dict_index_t* index,
- const char* new_name,
- trx_t* trx)
-{
- DBUG_ENTER("rename_index_in_data_dictionary");
-
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_X));
- ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
-
- pars_info_t* pinfo;
- dberr_t err;
-
- pinfo = pars_info_create();
-
- pars_info_add_ull_literal(pinfo, "table_id", index->table->id);
- pars_info_add_ull_literal(pinfo, "index_id", index->id);
- pars_info_add_str_literal(pinfo, "new_name", new_name);
-
- trx->op_info = "Renaming an index in SYS_INDEXES";
-
- DBUG_EXECUTE_IF(
- "ib_rename_index_fail1",
- DBUG_SET("+d,innodb_report_deadlock");
- );
-
- err = que_eval_sql(
- pinfo,
- "PROCEDURE RENAME_INDEX_IN_SYS_INDEXES () IS\n"
- "BEGIN\n"
- "UPDATE SYS_INDEXES SET\n"
- "NAME = :new_name\n"
- "WHERE\n"
- "ID = :index_id AND\n"
- "TABLE_ID = :table_id;\n"
- "END;\n",
- FALSE, trx); /* pinfo is freed by que_eval_sql() */
-
- DBUG_EXECUTE_IF(
- "ib_rename_index_fail1",
- DBUG_SET("-d,innodb_report_deadlock");
- );
-
- trx->op_info = "";
-
- if (err != DB_SUCCESS) {
- my_error_innodb(err, index->table->name.m_name, 0);
- DBUG_RETURN(true);
- }
-
- DBUG_RETURN(false);
-}
-
-/**
-Rename all indexes in data dictionary of a given table that are
-specified in ha_alter_info.
-
-@param ctx alter context, used to fetch the list of indexes to
-rename
-@param ha_alter_info fetch the new names from here
-@param[in,out] trx dict transaction to use, not going to be committed here
-
-@retval true Failure
-@retval false Success */
-static MY_ATTRIBUTE((warn_unused_result))
-bool
-rename_indexes_in_data_dictionary(
-/*==============================*/
- const ha_innobase_inplace_ctx* ctx,
- const Alter_inplace_info* ha_alter_info,
- trx_t* trx)
-{
- DBUG_ENTER("rename_indexes_in_data_dictionary");
-
- ut_ad(ctx->num_to_rename == ha_alter_info->index_rename_count);
-
- for (ulint i = 0; i < ctx->num_to_rename; i++) {
-
- KEY_PAIR* pair = &ha_alter_info->index_rename_buffer[i];
- dict_index_t* index;
-
- index = ctx->rename[i];
-
- ut_ad(strcmp(index->name, pair->old_key->name) == 0);
-
- if (rename_index_in_data_dictionary(index,
- pair->new_key->name,
- trx)) {
- /* failed */
- DBUG_RETURN(true);
- }
- }
-
- DBUG_RETURN(false);
-}
-
-/**
-Rename a given index in the InnoDB data dictionary cache.
-
-@param[in,out] index index to rename
-@param new_name new index name
-*/
-static
-void
-rename_index_in_cache(
-/*==================*/
- dict_index_t* index,
- const char* new_name)
-{
- DBUG_ENTER("rename_index_in_cache");
-
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_X));
-
- size_t old_name_len = strlen(index->name);
- size_t new_name_len = strlen(new_name);
-
- if (old_name_len >= new_name_len) {
- /* reuse the old buffer for the name if it is large enough */
- memcpy(const_cast<char*>(index->name()), new_name,
- new_name_len + 1);
- } else {
- /* Free the old chunk of memory if it is at the topmost
- place in the heap, otherwise the old chunk will be freed
- when the index is evicted from the cache. This code will
- kick-in in a repeated ALTER sequences where the old name is
- alternately longer/shorter than the new name:
- 1. ALTER TABLE t RENAME INDEX a TO aa;
- 2. ALTER TABLE t RENAME INDEX aa TO a;
- 3. go to 1. */
- index->name = mem_heap_strdup_replace(
- index->heap,
- /* Presumed topmost element of the heap: */
- index->name, old_name_len + 1,
- new_name);
- }
-
- DBUG_VOID_RETURN;
-}
-
-/**
-Rename all indexes in data dictionary cache of a given table that are
-specified in ha_alter_info.
-
-@param ctx alter context, used to fetch the list of indexes to rename
-@param ha_alter_info fetch the new names from here
-*/
-static
-void
-rename_indexes_in_cache(
-/*====================*/
- const ha_innobase_inplace_ctx* ctx,
- const Alter_inplace_info* ha_alter_info)
-{
- DBUG_ENTER("rename_indexes_in_cache");
-
- ut_ad(ctx->num_to_rename == ha_alter_info->index_rename_count);
-
- for (ulint i = 0; i < ctx->num_to_rename; i++) {
- KEY_PAIR* pair = &ha_alter_info->index_rename_buffer[i];
- dict_index_t* index;
-
- index = ctx->rename[i];
-
- ut_ad(strcmp(index->name, pair->old_key->name) == 0);
-
- rename_index_in_cache(index, pair->new_key->name);
- }
-
- DBUG_VOID_RETURN;
-}
-#endif /* MYSQL_RENAME_INDEX */
/** Fill the stored column information in s_cols list.
@param[in] altered_table mysql table object
@@ -7865,43 +7670,6 @@ check_if_can_drop_indexes:
n_rename_index = 0;
rename_index = NULL;
-#ifdef MYSQL_RENAME_INDEX
-
- n_rename_index = ha_alter_info->index_rename_count;
-
- /* Create a list of dict_index_t objects that are to be renamed,
- also checking for requests to rename nonexistent indexes. If
- the table is going to be rebuilt (new_clustered == true in
- prepare_inplace_alter_table_dict()), then this can be skipped,
- but we don't for simplicity (we have not determined the value of
- new_clustered yet). */
- if (n_rename_index > 0) {
- rename_index = static_cast<dict_index_t**>(
- mem_heap_alloc(
- heap,
- n_rename_index * sizeof(*rename_index)));
- for (ulint i = 0; i < n_rename_index; i++) {
- dict_index_t* index = NULL;
- const char* old_name = NULL;
-
- const char* old_name = ha_alter_info
- ->index_rename_buffer[i].old_key->name;
-
- index = dict_table_get_index_on_name(indexed_table,
- old_name);
-
- if (index == NULL) {
- my_error(ER_KEY_DOES_NOT_EXITS, MYF(0),
- old_name,
- m_prebuilt->table->name.m_name);
- goto err_exit;
- }
-
- rename_index[i] = index;
- }
- }
-#endif /* MYSQL_RENAME_INDEX */
-
n_add_fk = 0;
if (ha_alter_info->handler_flags
@@ -10154,14 +9922,6 @@ commit_try_norebuild(
DBUG_RETURN(true);
}
-#ifdef MYSQL_RENAME_INDEX
- if ((ha_alter_info->handler_flags
- & ALTER_RENAME_INDEX)
- && rename_indexes_in_data_dictionary(ctx, ha_alter_info, trx)) {
- DBUG_RETURN(true);
- }
-#endif /* MYSQL_RENAME_INDEX */
-
if (ctx->is_instant()) {
DBUG_RETURN(innobase_instant_try(ha_alter_info, ctx,
altered_table, old_table,
@@ -10414,10 +10174,6 @@ commit_cache_norebuild(
vers_change_fields_cache(ha_alter_info, ctx, table);
}
-#ifdef MYSQL_RENAME_INDEX
- rename_indexes_in_cache(ctx, ha_alter_info);
-#endif
-
ctx->new_table->fts_doc_id_index
= ctx->new_table->fts
? dict_table_get_index_on_name(
@@ -10487,31 +10243,6 @@ alter_stats_norebuild(
}
}
-#ifdef MYSQL_RENAME_INDEX
- for (i = 0; i < ha_alter_info->index_rename_count; i++) {
- KEY_PAIR* pair = &ha_alter_info->index_rename_buffer[i];
- dberr_t err;
-
- err = dict_stats_rename_index(ctx->new_table,
- pair->old_key->name,
- pair->new_key->name);
-
- if (err != DB_SUCCESS) {
- push_warning_printf(
- thd,
- Sql_condition::WARN_LEVEL_WARN,
- ER_ERROR_ON_RENAME,
- "Error renaming an index of table '%s'"
- " from '%s' to '%s' in InnoDB persistent"
- " statistics storage: %s",
- table_name,
- pair->old_key->name,
- pair->new_key->name,
- ut_strerr(err));
- }
- }
-#endif /* MYSQL_RENAME_INDEX */
-
for (i = 0; i < ctx->num_to_add_index; i++) {
dict_index_t* index = ctx->add_index[i];
DBUG_ASSERT(index->table == ctx->new_table);
diff --git a/storage/innobase/include/btr0bulk.h b/storage/innobase/include/btr0bulk.h
index 4e25d12d786..0cabbcab7cd 100644
--- a/storage/innobase/include/btr0bulk.h
+++ b/storage/innobase/include/btr0bulk.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2014, 2015, 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
@@ -284,6 +285,7 @@ public:
m_trx(trx),
m_flush_observer(observer)
{
+ ut_ad(!dict_index_is_spatial(index));
#ifdef UNIV_DEBUG
if (m_flush_observer)
m_index->table->space->redo_skipped_count++;
diff --git a/storage/innobase/include/dict0stats.h b/storage/innobase/include/dict0stats.h
index 95507dca36c..e846ecabf5a 100644
--- a/storage/innobase/include/dict0stats.h
+++ b/storage/innobase/include/dict0stats.h
@@ -187,21 +187,6 @@ dict_stats_rename_table(
char* errstr, /*!< out: error string if != DB_SUCCESS
is returned */
size_t errstr_sz); /*!< in: errstr size */
-#ifdef MYSQL_RENAME_INDEX
-/*********************************************************************//**
-Renames an index in InnoDB persistent stats storage.
-This function creates its own transaction and commits it.
-@return DB_SUCCESS or error code. DB_STATS_DO_NOT_EXIST will be returned
-if the persistent stats do not exist. */
-dberr_t
-dict_stats_rename_index(
-/*====================*/
- const dict_table_t* table, /*!< in: table whose index
- is renamed */
- const char* old_index_name, /*!< in: old index name */
- const char* new_index_name) /*!< in: new index name */
- __attribute__((warn_unused_result));
-#endif /* MYSQL_RENAME_INDEX */
/** Save an individual index's statistic into the persistent statistics
storage.
diff --git a/storage/innobase/include/fts0blex.h b/storage/innobase/include/fts0blex.h
index da93ab8617d..b16e7f2c495 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 74 "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 49bea8b08d4..89655ca13d4 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 69 "fts0tlex.l"
-#line 348 "../include/fts0tlex.h"
+#line 701 "../include/fts0tlex.h"
#undef fts0tIN_HEADER
#endif /* fts0tHEADER_H */
diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h
index 62c58d6616d..ee60bdbf597 100644
--- a/storage/innobase/include/ha_prototypes.h
+++ b/storage/innobase/include/ha_prototypes.h
@@ -40,7 +40,6 @@ class THD;
// JAN: TODO missing features:
#undef MYSQL_FT_INIT_EXT
#undef MYSQL_PFS
-#undef MYSQL_RENAME_INDEX
#undef MYSQL_STORE_FTS_DOC_ID
/*******************************************************************//**
diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h
index a2d676e7f2a..b013d597393 100644
--- a/storage/innobase/include/mem0mem.h
+++ b/storage/innobase/include/mem0mem.h
@@ -193,70 +193,6 @@ mem_heap_get_top(
mem_heap_t* heap,
ulint n);
-/** Checks if a given chunk of memory is the topmost element stored in the
-heap. If this is the case, then calling mem_heap_free_top() would free
-that element from the heap.
-@param[in] heap memory heap
-@param[in] buf presumed topmost element
-@param[in] buf_sz size of buf in bytes
-@return true if topmost */
-UNIV_INLINE
-bool
-mem_heap_is_top(
- mem_heap_t* heap,
- const void* buf,
- ulint buf_sz)
- MY_ATTRIBUTE((warn_unused_result));
-
-/*****************************************************************//**
-Allocate a new chunk of memory from a memory heap, possibly discarding
-the topmost element. If the memory chunk specified with (top, top_sz)
-is the topmost element, then it will be discarded, otherwise it will
-be left untouched and this function will be equivallent to
-mem_heap_alloc().
-@return allocated storage, NULL if did not succeed (only possible for
-MEM_HEAP_BTR_SEARCH type heaps) */
-UNIV_INLINE
-void*
-mem_heap_replace(
-/*=============*/
- mem_heap_t* heap, /*!< in/out: memory heap */
- const void* top, /*!< in: chunk to discard if possible */
- ulint top_sz, /*!< in: size of top in bytes */
- ulint new_sz);/*!< in: desired size of the new chunk */
-/*****************************************************************//**
-Allocate a new chunk of memory from a memory heap, possibly discarding
-the topmost element and then copy the specified data to it. If the memory
-chunk specified with (top, top_sz) is the topmost element, then it will be
-discarded, otherwise it will be left untouched and this function will be
-equivallent to mem_heap_dup().
-@return allocated storage, NULL if did not succeed (only possible for
-MEM_HEAP_BTR_SEARCH type heaps) */
-UNIV_INLINE
-void*
-mem_heap_dup_replace(
-/*=================*/
- mem_heap_t* heap, /*!< in/out: memory heap */
- const void* top, /*!< in: chunk to discard if possible */
- ulint top_sz, /*!< in: size of top in bytes */
- const void* data, /*!< in: new data to duplicate */
- ulint data_sz);/*!< in: size of data in bytes */
-/*****************************************************************//**
-Allocate a new chunk of memory from a memory heap, possibly discarding
-the topmost element and then copy the specified string to it. If the memory
-chunk specified with (top, top_sz) is the topmost element, then it will be
-discarded, otherwise it will be left untouched and this function will be
-equivallent to mem_heap_strdup().
-@return allocated string, NULL if did not succeed (only possible for
-MEM_HEAP_BTR_SEARCH type heaps) */
-UNIV_INLINE
-char*
-mem_heap_strdup_replace(
-/*====================*/
- mem_heap_t* heap, /*!< in/out: memory heap */
- const void* top, /*!< in: chunk to discard if possible */
- ulint top_sz, /*!< in: size of top in bytes */
- const char* str); /*!< in: new data to duplicate */
/*****************************************************************//**
Frees the topmost element in a memory heap.
The size of the element must be given. */
diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic
index bfe3a3afd51..ce30146c53c 100644
--- a/storage/innobase/include/mem0mem.ic
+++ b/storage/innobase/include/mem0mem.ic
@@ -328,102 +328,6 @@ mem_heap_get_top(
return((void*) buf);
}
-/** Checks if a given chunk of memory is the topmost element stored in the
-heap. If this is the case, then calling mem_heap_free_top() would free
-that element from the heap.
-@param[in] heap memory heap
-@param[in] buf presumed topmost element
-@param[in] buf_sz size of buf in bytes
-@return true if topmost */
-UNIV_INLINE
-bool
-mem_heap_is_top(
- mem_heap_t* heap,
- const void* buf,
- ulint buf_sz)
-{
- const byte* first_free_byte;
- const byte* presumed_start_of_buf;
-
- ut_d(mem_block_validate(heap));
-
- first_free_byte = mem_heap_get_heap_top(heap);
-
- presumed_start_of_buf = first_free_byte - MEM_SPACE_NEEDED(buf_sz);
-
- return(presumed_start_of_buf == buf);
-}
-
-/*****************************************************************//**
-Allocate a new chunk of memory from a memory heap, possibly discarding
-the topmost element. If the memory chunk specified with (top, top_sz)
-is the topmost element, then it will be discarded, otherwise it will
-be left untouched and this function will be equivallent to
-mem_heap_alloc().
-@return allocated storage, NULL if did not succeed (only possible for
-MEM_HEAP_BTR_SEARCH type heaps) */
-UNIV_INLINE
-void*
-mem_heap_replace(
-/*=============*/
- mem_heap_t* heap, /*!< in/out: memory heap */
- const void* top, /*!< in: chunk to discard if possible */
- ulint top_sz, /*!< in: size of top in bytes */
- ulint new_sz) /*!< in: desired size of the new chunk */
-{
- if (mem_heap_is_top(heap, top, top_sz)) {
- mem_heap_free_top(heap, top_sz);
- }
-
- return(mem_heap_alloc(heap, new_sz));
-}
-
-/*****************************************************************//**
-Allocate a new chunk of memory from a memory heap, possibly discarding
-the topmost element and then copy the specified data to it. If the memory
-chunk specified with (top, top_sz) is the topmost element, then it will be
-discarded, otherwise it will be left untouched and this function will be
-equivallent to mem_heap_dup().
-@return allocated storage, NULL if did not succeed (only possible for
-MEM_HEAP_BTR_SEARCH type heaps) */
-UNIV_INLINE
-void*
-mem_heap_dup_replace(
-/*=================*/
- mem_heap_t* heap, /*!< in/out: memory heap */
- const void* top, /*!< in: chunk to discard if possible */
- ulint top_sz, /*!< in: size of top in bytes */
- const void* data, /*!< in: new data to duplicate */
- ulint data_sz)/*!< in: size of data in bytes */
-{
- void* p = mem_heap_replace(heap, top, top_sz, data_sz);
-
- memcpy(p, data, data_sz);
-
- return(p);
-}
-
-/*****************************************************************//**
-Allocate a new chunk of memory from a memory heap, possibly discarding
-the topmost element and then copy the specified string to it. If the memory
-chunk specified with (top, top_sz) is the topmost element, then it will be
-discarded, otherwise it will be left untouched and this function will be
-equivallent to mem_heap_strdup().
-@return allocated string, NULL if did not succeed (only possible for
-MEM_HEAP_BTR_SEARCH type heaps) */
-UNIV_INLINE
-char*
-mem_heap_strdup_replace(
-/*====================*/
- mem_heap_t* heap, /*!< in/out: memory heap */
- const void* top, /*!< in: chunk to discard if possible */
- ulint top_sz, /*!< in: size of top in bytes */
- const char* str) /*!< in: new data to duplicate */
-{
- return(reinterpret_cast<char*>(mem_heap_dup_replace(
- heap, top, top_sz, str, strlen(str) + 1)));
-}
-
/*****************************************************************//**
Frees the topmost element in a memory heap. The size of the element must be
given. */
diff --git a/storage/innobase/include/pars0pars.h b/storage/innobase/include/pars0pars.h
index fba42be413f..7cf41db601f 100644
--- a/storage/innobase/include/pars0pars.h
+++ b/storage/innobase/include/pars0pars.h
@@ -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
@@ -101,11 +101,11 @@ pars_sql(
/*************************************************************//**
Retrieves characters to the lexical analyzer.
@return number of characters copied or 0 on EOF */
-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/trx0trx.h b/storage/innobase/include/trx0trx.h
index 8bf64c28441..b466a187ada 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
@@ -41,20 +41,9 @@ Created 3/26/1996 Heikki Tuuri
// Forward declaration
struct mtr_t;
-
-// Forward declaration
class FlushObserver;
-
struct rw_trx_hash_element_t;
-/** Set flush observer for the transaction
-@param[in/out] trx transaction struct
-@param[in] observer flush observer */
-void
-trx_set_flush_observer(
- trx_t* trx,
- FlushObserver* observer);
-
/******************************************************************//**
Set detailed error message for the transaction. */
void
@@ -1063,8 +1052,11 @@ public:
/*------------------------------*/
char* detailed_error; /*!< detailed error message for last
error, or empty. */
- FlushObserver* flush_observer; /*!< flush observer */
-
+private:
+ /** flush observer used to track flushing of non-redo logged pages
+ during bulk create index */
+ FlushObserver* flush_observer;
+public:
/* Lock wait statistics */
ulint n_rec_lock_waits;
/*!< Number of record lock waits,
@@ -1117,6 +1109,20 @@ public:
return(assign_temp_rseg());
}
+ /** Set the innodb_log_optimize_ddl page flush observer
+ @param[in,out] space tablespace
+ @param[in,out] stage performance_schema accounting */
+ void set_flush_observer(fil_space_t* space, ut_stage_alter_t* stage);
+
+ /** Remove the flush observer */
+ void remove_flush_observer();
+
+ /** @return the flush observer */
+ FlushObserver* get_flush_observer() const
+ {
+ return flush_observer;
+ }
+
/** Evict a table definition due to the rollback of ALTER TABLE.
@param[in] table_id table identifier */
void evict_table(table_id_t table_id);
diff --git a/storage/innobase/innodb.cmake b/storage/innobase/innodb.cmake
index 85ae3bbc025..a73f642c510 100644
--- a/storage/innobase/innodb.cmake
+++ b/storage/innobase/innodb.cmake
@@ -1,5 +1,5 @@
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2017, 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
@@ -141,6 +141,12 @@ IF(HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE)
ENDIF()
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)
ADD_DEFINITIONS(-DHAVE_POSIX_MEMALIGN)
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 6f5011558e4..be27651ea8c 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -5523,6 +5523,20 @@ static void lock_rec_other_trx_holds_expl(trx_t *caller_trx, trx_t *trx,
{
ut_ad(!page_rec_is_metadata(rec));
lock_mutex_enter();
+ ut_ad(trx->is_referenced());
+ /* Prevent a data race with trx_prepare(), which could change the
+ state from ACTIVE to PREPARED. Other state changes should be
+ blocked by lock_mutex_own() and trx->is_referenced(). */
+ trx_mutex_enter(trx);
+ const trx_state_t state = trx->state;
+ trx_mutex_exit(trx);
+ ut_ad(state != TRX_STATE_NOT_STARTED);
+ if (state == TRX_STATE_COMMITTED_IN_MEMORY)
+ {
+ /* The transaction was committed before our lock_mutex_enter(). */
+ lock_mutex_exit();
+ return;
+ }
lock_rec_other_trx_holds_expl_arg arg= { page_rec_get_heap_no(rec), block,
trx };
trx_sys.rw_trx_hash.iterate(caller_trx,
diff --git a/storage/innobase/pars/lexyy.cc b/storage/innobase/pars/lexyy.cc
index 4d1b021fa2b..bd0b6d78cd2 100644
--- a/storage/innobase/pars/lexyy.cc
+++ b/storage/innobase/pars/lexyy.cc
@@ -10,7 +10,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 1
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -85,10 +85,16 @@ 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 */
+/* begin standard C++ headers. */
+
/* TODO: this is always defined, so inline it */
#define yyconst const
@@ -101,32 +107,26 @@ typedef unsigned int flex_uint32_t;
/* 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. */
@@ -163,7 +163,7 @@ typedef size_t yy_size_t;
#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)
@@ -180,7 +180,6 @@ typedef size_t yy_size_t;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -262,7 +261,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< 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.
*/
@@ -283,65 +281,59 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-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 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 );
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+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 )
-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,int len );
+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 );
-static void *yyalloc (yy_size_t );
-static void *yyrealloc (void *,yy_size_t );
-static 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() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
-
-typedef unsigned char YY_CHAR;
+typedef flex_uint8_t YY_CHAR;
static FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-
static int yylineno = 1;
@@ -350,10 +342,10 @@ static int yylineno = 1;
#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 yynoreturn 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.
@@ -364,7 +356,6 @@ static void yynoreturn yy_fatal_error (yyconst char* msg );
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-
#define YY_NUM_RULES 123
#define YY_END_OF_BUFFER 124
/* This struct is not used in this scanner,
@@ -374,7 +365,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[404] =
+static const flex_int16_t yy_accept[404] =
{ 0,
0, 0, 118, 118, 0, 0, 0, 0, 124, 122,
121, 121, 8, 122, 113, 5, 102, 108, 111, 109,
@@ -423,7 +414,7 @@ static yyconst flex_int16_t yy_accept[404] =
95, 72, 0
} ;
-static yyconst YY_CHAR 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,
@@ -455,7 +446,7 @@ static yyconst YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst YY_CHAR 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,
@@ -465,7 +456,7 @@ static yyconst YY_CHAR yy_meta[57] =
9, 9, 9, 9, 1, 1
} ;
-static yyconst flex_uint16_t yy_base[417] =
+static const flex_int16_t yy_base[417] =
{ 0,
0, 0, 296, 281, 283, 280, 261, 252, 253, 1285,
55, 57, 1285, 0, 1285, 1285, 1285, 1285, 1285, 1285,
@@ -515,7 +506,7 @@ static yyconst flex_uint16_t yy_base[417] =
1243, 1252, 1261, 1268, 1272, 1275
} ;
-static yyconst flex_int16_t yy_def[417] =
+static const flex_int16_t yy_def[417] =
{ 0,
403, 1, 404, 404, 405, 405, 406, 406, 403, 403,
403, 403, 403, 407, 403, 403, 403, 403, 403, 403,
@@ -565,7 +556,7 @@ static yyconst flex_int16_t yy_def[417] =
403, 403, 403, 403, 403, 403
} ;
-static yyconst flex_uint16_t yy_nxt[1342] =
+static const flex_int16_t yy_nxt[1342] =
{ 0,
10, 11, 12, 13, 10, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
@@ -717,7 +708,7 @@ static yyconst flex_uint16_t yy_nxt[1342] =
403
} ;
-static yyconst flex_int16_t yy_chk[1342] =
+static const flex_int16_t yy_chk[1342] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -887,7 +878,7 @@ static char *yytext;
/*****************************************************************************
Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 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
@@ -937,9 +928,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 */
@@ -971,10 +961,9 @@ string_append(
stringbuf_len += len;
}
+#line 964 "lexyy.cc"
-
-
-#line 977 "lexyy.cc"
+#line 966 "lexyy.cc"
#define INITIAL 0
#define comment 1
@@ -993,36 +982,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 );
+MY_ATTRIBUTE((unused)) static int yyget_debug ( void );
-MY_ATTRIBUTE((unused)) static void yyset_debug (int debug_flag );
+MY_ATTRIBUTE((unused)) static void yyset_debug ( int debug_flag );
-YY_EXTRA_TYPE yyget_extra (void );
+YY_EXTRA_TYPE yyget_extra ( void );
-MY_ATTRIBUTE((unused)) static FILE *yyget_in (void );
+MY_ATTRIBUTE((unused)) static FILE *yyget_in ( void );
-MY_ATTRIBUTE((unused)) static void yyset_in (FILE * _in_str );
+MY_ATTRIBUTE((unused)) static void yyset_in ( FILE * _in_str );
-MY_ATTRIBUTE((unused)) static FILE *yyget_out (void );
+MY_ATTRIBUTE((unused)) static FILE *yyget_out ( void );
-MY_ATTRIBUTE((unused)) static void yyset_out (FILE * _out_str );
+MY_ATTRIBUTE((unused)) static void yyset_out ( FILE * _out_str );
- MY_ATTRIBUTE((unused)) static int yyget_leng (void );
+ MY_ATTRIBUTE((unused)) static int yyget_leng ( void );
-MY_ATTRIBUTE((unused)) static char *yyget_text (void );
+MY_ATTRIBUTE((unused)) static char *yyget_text ( void );
-MY_ATTRIBUTE((unused)) static int yyget_lineno (void );
+MY_ATTRIBUTE((unused)) static int yyget_lineno ( void );
-MY_ATTRIBUTE((unused)) static 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.
@@ -1030,9 +1019,9 @@ MY_ATTRIBUTE((unused)) static 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
@@ -1041,19 +1030,18 @@ extern int yywrap (void );
#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
@@ -1084,7 +1072,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; \
@@ -1097,7 +1085,7 @@ static int input (void );
else \
{ \
errno=0; \
- while ( (result = (int) 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) \
{ \
@@ -1186,17 +1174,17 @@ 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( );
}
{
-#line 113 "pars0lex.l"
+#line 112 "pars0lex.l"
-#line 1199 "lexyy.cc"
+#line 1187 "lexyy.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -1224,9 +1212,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 404 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 403 );
@@ -1251,7 +1239,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 115 "pars0lex.l"
+#line 114 "pars0lex.l"
{
yylval = sym_tab_add_int_lit(pars_sym_tab_global,
atoi(yytext));
@@ -1260,7 +1248,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 121 "pars0lex.l"
+#line 120 "pars0lex.l"
{
ut_error; /* not implemented */
@@ -1269,7 +1257,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 127 "pars0lex.l"
+#line 126 "pars0lex.l"
{
ulint type;
@@ -1281,7 +1269,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 136 "pars0lex.l"
+#line 135 "pars0lex.l"
{
yylval = sym_tab_add_bound_id(pars_sym_tab_global,
yytext + 1);
@@ -1291,7 +1279,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 143 "pars0lex.l"
+#line 142 "pars0lex.l"
{
/* Quoted character string literals are handled in an explicit
start state 'quoted'. This state is entered and the buffer for
@@ -1305,7 +1293,7 @@ In the state 'quoted', only two actions are possible (defined below). */
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
-#line 152 "pars0lex.l"
+#line 151 "pars0lex.l"
{
/* Got a sequence of characters other than "'":
append to string buffer */
@@ -1314,7 +1302,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 157 "pars0lex.l"
+#line 156 "pars0lex.l"
{
/* Got a sequence of "'" characters:
append half of them to string buffer,
@@ -1341,7 +1329,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 181 "pars0lex.l"
+#line 180 "pars0lex.l"
{
/* Quoted identifiers are handled in an explicit start state 'id'.
This state is entered and the buffer for the scanned string is emptied
@@ -1355,7 +1343,7 @@ In the state 'id', only two actions are possible (defined below). */
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 190 "pars0lex.l"
+#line 189 "pars0lex.l"
{
/* Got a sequence of characters other than '"':
append to string buffer */
@@ -1364,7 +1352,7 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 195 "pars0lex.l"
+#line 194 "pars0lex.l"
{
/* Got a sequence of '"' characters:
append half of them to string buffer,
@@ -1392,7 +1380,7 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 220 "pars0lex.l"
+#line 219 "pars0lex.l"
{
yylval = sym_tab_add_null_lit(pars_sym_tab_global);
@@ -1401,7 +1389,7 @@ YY_RULE_SETUP
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 226 "pars0lex.l"
+#line 225 "pars0lex.l"
{
/* Implicit cursor name */
yylval = sym_tab_add_str_lit(pars_sym_tab_global,
@@ -1411,581 +1399,581 @@ YY_RULE_SETUP
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 233 "pars0lex.l"
+#line 232 "pars0lex.l"
{
return(PARS_AND_TOKEN);
}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 237 "pars0lex.l"
+#line 236 "pars0lex.l"
{
return(PARS_OR_TOKEN);
}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 241 "pars0lex.l"
+#line 240 "pars0lex.l"
{
return(PARS_NOT_TOKEN);
}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 245 "pars0lex.l"
+#line 244 "pars0lex.l"
{
return(PARS_PROCEDURE_TOKEN);
}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 249 "pars0lex.l"
+#line 248 "pars0lex.l"
{
return(PARS_IN_TOKEN);
}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 253 "pars0lex.l"
+#line 252 "pars0lex.l"
{
return(PARS_OUT_TOKEN);
}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 257 "pars0lex.l"
+#line 256 "pars0lex.l"
{
return(PARS_BINARY_TOKEN);
}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 261 "pars0lex.l"
+#line 260 "pars0lex.l"
{
return(PARS_BLOB_TOKEN);
}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 265 "pars0lex.l"
+#line 264 "pars0lex.l"
{
return(PARS_INT_TOKEN);
}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 269 "pars0lex.l"
+#line 268 "pars0lex.l"
{
return(PARS_INT_TOKEN);
}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 273 "pars0lex.l"
+#line 272 "pars0lex.l"
{
return(PARS_FLOAT_TOKEN);
}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 277 "pars0lex.l"
+#line 276 "pars0lex.l"
{
return(PARS_CHAR_TOKEN);
}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 281 "pars0lex.l"
+#line 280 "pars0lex.l"
{
return(PARS_IS_TOKEN);
}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 285 "pars0lex.l"
+#line 284 "pars0lex.l"
{
return(PARS_BEGIN_TOKEN);
}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 289 "pars0lex.l"
+#line 288 "pars0lex.l"
{
return(PARS_END_TOKEN);
}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 293 "pars0lex.l"
+#line 292 "pars0lex.l"
{
return(PARS_IF_TOKEN);
}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 297 "pars0lex.l"
+#line 296 "pars0lex.l"
{
return(PARS_THEN_TOKEN);
}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 301 "pars0lex.l"
+#line 300 "pars0lex.l"
{
return(PARS_ELSE_TOKEN);
}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 305 "pars0lex.l"
+#line 304 "pars0lex.l"
{
return(PARS_ELSIF_TOKEN);
}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 309 "pars0lex.l"
+#line 308 "pars0lex.l"
{
return(PARS_LOOP_TOKEN);
}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 313 "pars0lex.l"
+#line 312 "pars0lex.l"
{
return(PARS_WHILE_TOKEN);
}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 317 "pars0lex.l"
+#line 316 "pars0lex.l"
{
return(PARS_RETURN_TOKEN);
}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 321 "pars0lex.l"
+#line 320 "pars0lex.l"
{
return(PARS_SELECT_TOKEN);
}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 325 "pars0lex.l"
+#line 324 "pars0lex.l"
{
return(PARS_SUM_TOKEN);
}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 329 "pars0lex.l"
+#line 328 "pars0lex.l"
{
return(PARS_COUNT_TOKEN);
}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 333 "pars0lex.l"
+#line 332 "pars0lex.l"
{
return(PARS_DISTINCT_TOKEN);
}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 337 "pars0lex.l"
+#line 336 "pars0lex.l"
{
return(PARS_FROM_TOKEN);
}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 341 "pars0lex.l"
+#line 340 "pars0lex.l"
{
return(PARS_WHERE_TOKEN);
}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 345 "pars0lex.l"
+#line 344 "pars0lex.l"
{
return(PARS_FOR_TOKEN);
}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 349 "pars0lex.l"
+#line 348 "pars0lex.l"
{
return(PARS_READ_TOKEN);
}
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 353 "pars0lex.l"
+#line 352 "pars0lex.l"
{
return(PARS_ORDER_TOKEN);
}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 357 "pars0lex.l"
+#line 356 "pars0lex.l"
{
return(PARS_BY_TOKEN);
}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 361 "pars0lex.l"
+#line 360 "pars0lex.l"
{
return(PARS_ASC_TOKEN);
}
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 365 "pars0lex.l"
+#line 364 "pars0lex.l"
{
return(PARS_DESC_TOKEN);
}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 369 "pars0lex.l"
+#line 368 "pars0lex.l"
{
return(PARS_INSERT_TOKEN);
}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 373 "pars0lex.l"
+#line 372 "pars0lex.l"
{
return(PARS_INTO_TOKEN);
}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 377 "pars0lex.l"
+#line 376 "pars0lex.l"
{
return(PARS_VALUES_TOKEN);
}
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 381 "pars0lex.l"
+#line 380 "pars0lex.l"
{
return(PARS_UPDATE_TOKEN);
}
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 385 "pars0lex.l"
+#line 384 "pars0lex.l"
{
return(PARS_SET_TOKEN);
}
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 389 "pars0lex.l"
+#line 388 "pars0lex.l"
{
return(PARS_DELETE_TOKEN);
}
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 393 "pars0lex.l"
+#line 392 "pars0lex.l"
{
return(PARS_CURRENT_TOKEN);
}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 397 "pars0lex.l"
+#line 396 "pars0lex.l"
{
return(PARS_OF_TOKEN);
}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 401 "pars0lex.l"
+#line 400 "pars0lex.l"
{
return(PARS_CREATE_TOKEN);
}
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 405 "pars0lex.l"
+#line 404 "pars0lex.l"
{
return(PARS_TABLE_TOKEN);
}
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 409 "pars0lex.l"
+#line 408 "pars0lex.l"
{
return(PARS_COMPACT_TOKEN);
}
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 413 "pars0lex.l"
+#line 412 "pars0lex.l"
{
return(PARS_BLOCK_SIZE_TOKEN);
}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 417 "pars0lex.l"
+#line 416 "pars0lex.l"
{
return(PARS_INDEX_TOKEN);
}
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 421 "pars0lex.l"
+#line 420 "pars0lex.l"
{
return(PARS_UNIQUE_TOKEN);
}
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 425 "pars0lex.l"
+#line 424 "pars0lex.l"
{
return(PARS_CLUSTERED_TOKEN);
}
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 429 "pars0lex.l"
+#line 428 "pars0lex.l"
{
return(PARS_ON_TOKEN);
}
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 433 "pars0lex.l"
+#line 432 "pars0lex.l"
{
return(PARS_DECLARE_TOKEN);
}
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 437 "pars0lex.l"
+#line 436 "pars0lex.l"
{
return(PARS_CURSOR_TOKEN);
}
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 441 "pars0lex.l"
+#line 440 "pars0lex.l"
{
return(PARS_OPEN_TOKEN);
}
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 445 "pars0lex.l"
+#line 444 "pars0lex.l"
{
return(PARS_FETCH_TOKEN);
}
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 449 "pars0lex.l"
+#line 448 "pars0lex.l"
{
return(PARS_CLOSE_TOKEN);
}
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 453 "pars0lex.l"
+#line 452 "pars0lex.l"
{
return(PARS_NOTFOUND_TOKEN);
}
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 457 "pars0lex.l"
+#line 456 "pars0lex.l"
{
return(PARS_TO_CHAR_TOKEN);
}
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 461 "pars0lex.l"
+#line 460 "pars0lex.l"
{
return(PARS_TO_NUMBER_TOKEN);
}
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 465 "pars0lex.l"
+#line 464 "pars0lex.l"
{
return(PARS_TO_BINARY_TOKEN);
}
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 469 "pars0lex.l"
+#line 468 "pars0lex.l"
{
return(PARS_BINARY_TO_NUMBER_TOKEN);
}
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 473 "pars0lex.l"
+#line 472 "pars0lex.l"
{
return(PARS_SUBSTR_TOKEN);
}
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 477 "pars0lex.l"
+#line 476 "pars0lex.l"
{
return(PARS_REPLSTR_TOKEN);
}
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 481 "pars0lex.l"
+#line 480 "pars0lex.l"
{
return(PARS_CONCAT_TOKEN);
}
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 485 "pars0lex.l"
+#line 484 "pars0lex.l"
{
return(PARS_INSTR_TOKEN);
}
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 489 "pars0lex.l"
+#line 488 "pars0lex.l"
{
return(PARS_LENGTH_TOKEN);
}
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 493 "pars0lex.l"
+#line 492 "pars0lex.l"
{
return(PARS_SYSDATE_TOKEN);
}
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 497 "pars0lex.l"
+#line 496 "pars0lex.l"
{
return(PARS_PRINTF_TOKEN);
}
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 501 "pars0lex.l"
+#line 500 "pars0lex.l"
{
return(PARS_ASSERT_TOKEN);
}
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 505 "pars0lex.l"
+#line 504 "pars0lex.l"
{
return(PARS_RND_TOKEN);
}
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 509 "pars0lex.l"
+#line 508 "pars0lex.l"
{
return(PARS_RND_STR_TOKEN);
}
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 513 "pars0lex.l"
+#line 512 "pars0lex.l"
{
return(PARS_ROW_PRINTF_TOKEN);
}
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 517 "pars0lex.l"
+#line 516 "pars0lex.l"
{
return(PARS_COMMIT_TOKEN);
}
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 521 "pars0lex.l"
+#line 520 "pars0lex.l"
{
return(PARS_ROLLBACK_TOKEN);
}
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 525 "pars0lex.l"
+#line 524 "pars0lex.l"
{
return(PARS_WORK_TOKEN);
}
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 529 "pars0lex.l"
+#line 528 "pars0lex.l"
{
return(PARS_UNSIGNED_TOKEN);
}
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 533 "pars0lex.l"
+#line 532 "pars0lex.l"
{
return(PARS_EXIT_TOKEN);
}
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 537 "pars0lex.l"
+#line 536 "pars0lex.l"
{
return(PARS_FUNCTION_TOKEN);
}
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 541 "pars0lex.l"
+#line 540 "pars0lex.l"
{
return(PARS_LOCK_TOKEN);
}
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 545 "pars0lex.l"
+#line 544 "pars0lex.l"
{
return(PARS_SHARE_TOKEN);
}
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 549 "pars0lex.l"
+#line 548 "pars0lex.l"
{
return(PARS_MODE_TOKEN);
}
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 553 "pars0lex.l"
+#line 552 "pars0lex.l"
{
return(PARS_LIKE_TOKEN);
}
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 557 "pars0lex.l"
+#line 556 "pars0lex.l"
{
return(PARS_BIGINT_TOKEN);
}
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 561 "pars0lex.l"
+#line 560 "pars0lex.l"
{
yylval = sym_tab_add_id(pars_sym_tab_global,
(byte*) yytext,
@@ -1995,7 +1983,7 @@ YY_RULE_SETUP
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 568 "pars0lex.l"
+#line 567 "pars0lex.l"
{
yylval = sym_tab_add_id(pars_sym_tab_global,
(byte*) yytext,
@@ -2005,42 +1993,42 @@ YY_RULE_SETUP
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 575 "pars0lex.l"
+#line 574 "pars0lex.l"
{
return(PARS_DDOT_TOKEN);
}
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 579 "pars0lex.l"
+#line 578 "pars0lex.l"
{
return(PARS_ASSIGN_TOKEN);
}
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 583 "pars0lex.l"
+#line 582 "pars0lex.l"
{
return(PARS_LE_TOKEN);
}
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 587 "pars0lex.l"
+#line 586 "pars0lex.l"
{
return(PARS_GE_TOKEN);
}
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 591 "pars0lex.l"
+#line 590 "pars0lex.l"
{
return(PARS_NE_TOKEN);
}
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 595 "pars0lex.l"
+#line 594 "pars0lex.l"
{
return((int)(*yytext));
@@ -2048,7 +2036,7 @@ YY_RULE_SETUP
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 600 "pars0lex.l"
+#line 599 "pars0lex.l"
{
return((int)(*yytext));
@@ -2056,7 +2044,7 @@ YY_RULE_SETUP
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 605 "pars0lex.l"
+#line 604 "pars0lex.l"
{
return((int)(*yytext));
@@ -2064,7 +2052,7 @@ YY_RULE_SETUP
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 610 "pars0lex.l"
+#line 609 "pars0lex.l"
{
return((int)(*yytext));
@@ -2072,7 +2060,7 @@ YY_RULE_SETUP
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 615 "pars0lex.l"
+#line 614 "pars0lex.l"
{
return((int)(*yytext));
@@ -2080,7 +2068,7 @@ YY_RULE_SETUP
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 620 "pars0lex.l"
+#line 619 "pars0lex.l"
{
return((int)(*yytext));
@@ -2088,7 +2076,7 @@ YY_RULE_SETUP
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 625 "pars0lex.l"
+#line 624 "pars0lex.l"
{
return((int)(*yytext));
@@ -2096,7 +2084,7 @@ YY_RULE_SETUP
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 630 "pars0lex.l"
+#line 629 "pars0lex.l"
{
return((int)(*yytext));
@@ -2104,7 +2092,7 @@ YY_RULE_SETUP
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 635 "pars0lex.l"
+#line 634 "pars0lex.l"
{
return((int)(*yytext));
@@ -2112,7 +2100,7 @@ YY_RULE_SETUP
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 640 "pars0lex.l"
+#line 639 "pars0lex.l"
{
return((int)(*yytext));
@@ -2120,7 +2108,7 @@ YY_RULE_SETUP
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 645 "pars0lex.l"
+#line 644 "pars0lex.l"
{
return((int)(*yytext));
@@ -2128,7 +2116,7 @@ YY_RULE_SETUP
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 650 "pars0lex.l"
+#line 649 "pars0lex.l"
{
return((int)(*yytext));
@@ -2136,7 +2124,7 @@ YY_RULE_SETUP
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 655 "pars0lex.l"
+#line 654 "pars0lex.l"
{
return((int)(*yytext));
@@ -2144,7 +2132,7 @@ YY_RULE_SETUP
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 660 "pars0lex.l"
+#line 659 "pars0lex.l"
{
return((int)(*yytext));
@@ -2152,7 +2140,7 @@ YY_RULE_SETUP
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 665 "pars0lex.l"
+#line 664 "pars0lex.l"
{
return((int)(*yytext));
@@ -2160,35 +2148,35 @@ YY_RULE_SETUP
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 670 "pars0lex.l"
+#line 669 "pars0lex.l"
BEGIN(comment); /* eat up comment */
YY_BREAK
case 118:
/* rule 118 can match eol */
YY_RULE_SETUP
-#line 672 "pars0lex.l"
+#line 671 "pars0lex.l"
YY_BREAK
case 119:
/* rule 119 can match eol */
YY_RULE_SETUP
-#line 673 "pars0lex.l"
+#line 672 "pars0lex.l"
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 674 "pars0lex.l"
+#line 673 "pars0lex.l"
BEGIN(INITIAL);
YY_BREAK
case 121:
/* rule 121 can match eol */
YY_RULE_SETUP
-#line 676 "pars0lex.l"
+#line 675 "pars0lex.l"
/* eat up whitespace */
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 679 "pars0lex.l"
+#line 678 "pars0lex.l"
{
fprintf(stderr,"Unrecognized character: %02x\n",
*yytext);
@@ -2200,10 +2188,10 @@ YY_RULE_SETUP
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 688 "pars0lex.l"
+#line 687 "pars0lex.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 2206 "lexyy.cc"
+#line 2194 "lexyy.cc"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(comment):
case YY_STATE_EOF(quoted):
@@ -2285,7 +2273,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
@@ -2417,7 +2405,8 @@ 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. */
@@ -2449,7 +2438,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
@@ -2466,9 +2455,12 @@ static int yy_get_next_buffer (void)
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. */
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,new_size );
+ 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;
@@ -2501,9 +2493,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 404 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
@@ -2529,9 +2521,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 404 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 403);
return yy_is_jam ? 0 : yy_current_state;
@@ -2565,7 +2557,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( ) )
@@ -2582,13 +2574,13 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
+ if ( yywrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -2626,11 +2618,11 @@ static int yy_get_next_buffer (void)
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.
@@ -2658,7 +2650,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
@@ -2686,22 +2678,22 @@ static void yy_load_buffer_state (void)
{
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()" );
- b->yy_buf_size = (yy_size_t)size;
+ 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 *) 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;
}
@@ -2720,9 +2712,9 @@ 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.
@@ -2734,7 +2726,7 @@ static void yy_load_buffer_state (void)
{
int oerrno = errno;
- yy_flush_buffer(b );
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
@@ -2777,7 +2769,7 @@ 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
@@ -2808,7 +2800,7 @@ MY_ATTRIBUTE((unused)) static void yypush_buffer_state (YY_BUFFER_STATE new_buff
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;
}
@@ -2827,7 +2819,7 @@ MY_ATTRIBUTE((unused)) static 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;
}
}
@@ -2837,7 +2829,7 @@ MY_ATTRIBUTE((unused)) static 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)) {
@@ -2882,9 +2874,9 @@ static void yyensure_buffer_stack (void)
#define YY_EXIT_FAILURE 2
#endif
-static void yynoreturn 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 );
}
@@ -3019,7 +3011,7 @@ 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();
}
@@ -3040,7 +3032,7 @@ 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;
@@ -3050,7 +3042,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 )
@@ -3085,8 +3077,7 @@ static void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 688 "pars0lex.l"
-
+#line 687 "pars0lex.l"
/**********************************************************************
diff --git a/storage/innobase/pars/make_flex.sh b/storage/innobase/pars/make_flex.sh
index 2ddb1460640..37b62340320 100755
--- a/storage/innobase/pars/make_flex.sh
+++ b/storage/innobase/pars/make_flex.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-# Copyright (c) 2017, 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
@@ -24,15 +24,14 @@ OUTFILE=lexyy.cc
flex -o $TMPFILE pars0lex.l
-# AIX needs its includes done in a certain order, so include "univ.i" first
-# to be sure we get it right.
+# The Microsoft compiler needs its includes done in a certain order.
echo '#include "univ.i"' > $OUTFILE
# flex assigns a pointer to an int in one place without a cast, resulting in
# 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/^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/;
diff --git a/storage/innobase/pars/pars0lex.l b/storage/innobase/pars/pars0lex.l
index e73472866fb..c4b2d584369 100644
--- a/storage/innobase/pars/pars0lex.l
+++ b/storage/innobase/pars/pars0lex.l
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 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
@@ -65,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) \
- (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 */
diff --git a/storage/innobase/pars/pars0pars.cc b/storage/innobase/pars/pars0pars.cc
index 33dc9ebf602..4c3343a60ae 100644
--- a/storage/innobase/pars/pars0pars.cc
+++ b/storage/innobase/pars/pars0pars.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
@@ -2062,17 +2062,16 @@ pars_stored_procedure_call(
/*************************************************************//**
Retrieves characters to the lexical analyzer. */
-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 = int(pars_sym_tab_global->string_len)
- - pars_sym_tab_global->next_char_pos;
+ size_t len = size_t(
+ pars_sym_tab_global->string_len
+ - pars_sym_tab_global->next_char_pos);
if (len == 0) {
return(0);
}
diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc
index e94c9f82173..939f2b78369 100644
--- a/storage/innobase/row/row0ftsort.cc
+++ b/storage/innobase/row/row0ftsort.cc
@@ -1675,7 +1675,7 @@ row_fts_merge_insert(
/* Create bulk load instance */
ins_ctx.btr_bulk = UT_NEW_NOKEY(
BtrBulk(aux_index, trx, psort_info[0].psort_common->trx
- ->flush_observer));
+ ->get_flush_observer()));
/* Create tuple for insert */
ins_ctx.tuple = dtuple_create(heap, dict_index_get_n_fields(aux_index));
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index b7939249f79..e1394e5118c 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -1738,7 +1738,6 @@ row_merge_read_clustered_index(
mem_heap_t* mtuple_heap = NULL;
mtuple_t prev_mtuple;
mem_heap_t* conv_heap = NULL;
- FlushObserver* observer = trx->flush_observer;
double curr_progress = 0.0;
ib_uint64_t read_rows = 0;
ib_uint64_t table_total_rows = 0;
@@ -2334,9 +2333,8 @@ write_buffers:
bool skip_sort = skip_pk_sort
&& dict_index_is_clust(merge_buf[0]->index);
- for (ulint i = 0; i < n_index; i++, skip_sort = false) {
+ for (ulint k = 0, i = 0; i < n_index; i++, skip_sort = false) {
row_merge_buf_t* buf = merge_buf[i];
- merge_file_t* file = &files[i];
ulint rows_added = 0;
if (dict_index_is_spatial(buf->index)) {
@@ -2365,6 +2363,8 @@ write_buffers:
|| trx_id_check(row->fields[new_trx_id_col].data,
trx->id));
+ merge_file_t* file = &files[k++];
+
if (UNIV_LIKELY
(row && (rows_added = row_merge_buf_add(
buf, fts_index, old_table, new_table,
@@ -2372,6 +2372,15 @@ write_buffers:
conv_heap, &err,
&v_heap, eval_table, trx)))) {
+ /* Set the page flush observer for the
+ transaction when buffering the very first
+ record for a non-redo-logged operation. */
+ if (file->n_rec == 0 && i == 0
+ && innodb_log_optimize_ddl) {
+ trx->set_flush_observer(
+ new_table->space, stage);
+ }
+
/* If we are creating FTS index,
a single row can generate more
records for tokenized word */
@@ -2511,7 +2520,7 @@ write_buffers:
clust_btr_bulk = UT_NEW_NOKEY(
BtrBulk(index[i],
trx,
- observer/**/));
+ trx->get_flush_observer()));
} else {
clust_btr_bulk->latch();
}
@@ -2624,8 +2633,9 @@ write_buffers:
trx->error_key_num = i;
goto all_done;);
- BtrBulk btr_bulk(index[i], trx,
- observer);
+ BtrBulk btr_bulk(
+ index[i], trx,
+ trx->get_flush_observer());
err = row_merge_insert_index_tuples(
index[i], old_table,
@@ -4638,47 +4648,26 @@ row_merge_build_indexes(
}
trx_start_if_not_started_xa(trx, true);
+ ulint n_merge_files = 0;
- /* Check if we need a flush observer to flush dirty pages.
- Since we disable redo logging in bulk load, so we should flush
- dirty pages before online log apply, because online log apply enables
- redo logging(we can do further optimization here).
- 1. online add index: flush dirty pages right before row_log_apply().
- 2. table rebuild: flush dirty pages before row_log_table_apply().
-
- we use bulk load to create all types of indexes except spatial index,
- for which redo logging is enabled. If we create only spatial indexes,
- we don't need to flush dirty pages at all. */
- bool need_flush_observer = bool(innodb_log_optimize_ddl);
-
- if (need_flush_observer) {
- need_flush_observer = old_table != new_table;
-
- for (i = 0; i < n_indexes; i++) {
- if (!dict_index_is_spatial(indexes[i])) {
- need_flush_observer = true;
- }
+ for (ulint i = 0; i < n_indexes; i++)
+ {
+ if (!dict_index_is_spatial(indexes[i])) {
+ n_merge_files++;
}
}
- FlushObserver* flush_observer = NULL;
- if (need_flush_observer) {
- flush_observer = UT_NEW_NOKEY(
- FlushObserver(new_table->space, trx, stage));
-
- trx_set_flush_observer(trx, flush_observer);
- }
-
merge_files = static_cast<merge_file_t*>(
- ut_malloc_nokey(n_indexes * sizeof *merge_files));
+ ut_malloc_nokey(n_merge_files * sizeof *merge_files));
/* Initialize all the merge file descriptors, so that we
don't call row_merge_file_destroy() on uninitialized
merge file descriptor */
- for (i = 0; i < n_indexes; i++) {
+ for (i = 0; i < n_merge_files; i++) {
merge_files[i].fd = OS_FILE_CLOSED;
merge_files[i].offset = 0;
+ merge_files[i].n_rec = 0;
}
total_static_cost = COST_BUILD_INDEX_STATIC * n_indexes + COST_READ_CLUSTERED_INDEX;
@@ -4757,7 +4746,7 @@ row_merge_build_indexes(
" and create temporary files");
}
- for (i = 0; i < n_indexes; i++) {
+ for (i = 0; i < n_merge_files; i++) {
total_index_blocks += merge_files[i].offset;
}
@@ -4770,7 +4759,7 @@ row_merge_build_indexes(
/* Now we have files containing index entries ready for
sorting and inserting. */
- for (i = 0; i < n_indexes; i++) {
+ for (ulint k = 0, i = 0; i < n_indexes; i++) {
dict_index_t* sort_idx = indexes[i];
if (dict_index_is_spatial(sort_idx)) {
@@ -4849,13 +4838,13 @@ wait_again:
#ifdef FTS_INTERNAL_DIAG_PRINT
DEBUG_FTS_SORT_PRINT("FTS_SORT: Complete Insert\n");
#endif
- } else if (merge_files[i].fd != OS_FILE_CLOSED) {
+ } else if (merge_files[k].fd != OS_FILE_CLOSED) {
char buf[NAME_LEN + 1];
row_merge_dup_t dup = {
sort_idx, table, col_map, 0};
pct_cost = (COST_BUILD_INDEX_STATIC +
- (total_dynamic_cost * merge_files[i].offset /
+ (total_dynamic_cost * merge_files[k].offset /
total_index_blocks)) /
(total_static_cost + total_dynamic_cost)
* PCT_COST_MERGESORT_INDEX * 100;
@@ -4879,7 +4868,7 @@ wait_again:
}
error = row_merge_sort(
- trx, &dup, &merge_files[i],
+ trx, &dup, &merge_files[k],
block, &tmpfd, true,
pct_progress, pct_cost,
crypt_block, new_table->space_id,
@@ -4902,10 +4891,10 @@ wait_again:
if (error == DB_SUCCESS) {
BtrBulk btr_bulk(sort_idx, trx,
- flush_observer);
+ trx->get_flush_observer());
pct_cost = (COST_BUILD_INDEX_STATIC +
- (total_dynamic_cost * merge_files[i].offset /
+ (total_dynamic_cost * merge_files[k].offset /
total_index_blocks)) /
(total_static_cost + total_dynamic_cost) *
PCT_COST_INSERT_INDEX * 100;
@@ -4922,9 +4911,9 @@ wait_again:
error = row_merge_insert_index_tuples(
sort_idx, old_table,
- merge_files[i].fd, block, NULL,
+ merge_files[k].fd, block, NULL,
&btr_bulk,
- merge_files[i].n_rec, pct_progress, pct_cost,
+ merge_files[k].n_rec, pct_progress, pct_cost,
crypt_block, new_table->space_id,
stage);
@@ -4943,7 +4932,7 @@ wait_again:
}
/* Close the temporary file to free up space. */
- row_merge_file_destroy(&merge_files[i]);
+ row_merge_file_destroy(&merge_files[k++]);
if (indexes[i]->type & DICT_FTS) {
row_fts_psort_info_destroy(psort_info, merge_info);
@@ -4955,7 +4944,12 @@ wait_again:
ut_ad(sort_idx->online_status
== ONLINE_INDEX_COMPLETE);
} else {
- if (flush_observer) {
+ if (dict_index_is_spatial(indexes[i])) {
+ /* We never disable redo logging for
+ creating SPATIAL INDEX. Avoid writing any
+ unnecessary MLOG_INDEX_LOAD record. */
+ } else if (FlushObserver* flush_observer =
+ trx->get_flush_observer()) {
flush_observer->flush();
row_merge_write_redo(indexes[i]);
}
@@ -4997,7 +4991,7 @@ func_exit:
row_merge_file_destroy_low(tmpfd);
- for (i = 0; i < n_indexes; i++) {
+ for (i = 0; i < n_merge_files; i++) {
row_merge_file_destroy(&merge_files[i]);
}
@@ -5054,8 +5048,7 @@ func_exit:
DBUG_EXECUTE_IF("ib_index_crash_after_bulk_load", DBUG_SUICIDE(););
- if (flush_observer != NULL) {
- ut_ad(need_flush_observer);
+ if (FlushObserver* flush_observer = trx->get_flush_observer()) {
DBUG_EXECUTE_IF("ib_index_build_fail_before_flush",
error = DB_INTERRUPTED;
@@ -5067,7 +5060,7 @@ func_exit:
flush_observer->flush();
- UT_DELETE(flush_observer);
+ trx->remove_flush_observer();
if (trx_is_interrupted(trx)) {
error = DB_INTERRUPTED;
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 42b5d051c7d..c56694d4831 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
@@ -71,17 +71,6 @@ typedef std::set<
std::less<table_id_t>,
ut_allocator<table_id_t> > table_id_set;
-/** Set flush observer for the transaction
-@param[in/out] trx transaction struct
-@param[in] observer flush observer */
-void
-trx_set_flush_observer(
- trx_t* trx,
- FlushObserver* observer)
-{
- trx->flush_observer = observer;
-}
-
/*************************************************************//**
Set detailed error message for the transaction. */
void
@@ -172,7 +161,7 @@ trx_init(
trx->lock.table_cached = 0;
- trx->flush_observer = NULL;
+ ut_ad(trx->get_flush_observer() == NULL);
}
/** For managing the life-cycle of the trx_t instance that we get
@@ -870,6 +859,21 @@ static trx_rseg_t* trx_assign_rseg_low()
return(rseg);
}
+/** Set the innodb_log_optimize_ddl page flush observer
+@param[in,out] space tablespace
+@param[in,out] stage performance_schema accounting */
+void trx_t::set_flush_observer(fil_space_t* space, ut_stage_alter_t* stage)
+{
+ flush_observer = UT_NEW_NOKEY(FlushObserver(space, this, stage));
+}
+
+/** Remove the flush observer */
+void trx_t::remove_flush_observer()
+{
+ UT_DELETE(flush_observer);
+ flush_observer = NULL;
+}
+
/** Assign a rollback segment for modifying temporary tables.
@return the assigned rollback segment */
trx_rseg_t*
diff --git a/storage/mroonga/lib/mrn_context_pool.cpp b/storage/mroonga/lib/mrn_context_pool.cpp
index a6000df29e3..55af7d181e8 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/myisammrg/mysql-test/storage_engine/vcol.rdiff b/storage/myisammrg/mysql-test/storage_engine/vcol.rdiff
index d537967ef99..6c4971c63be 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 generated column 'b' in table 't1' ignored
--Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+-Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+-Warning 1906 The value specified for generated 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 generated column 'b' in table 't1' ignored
--Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+-Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+-Warning 1906 The value specified for generated 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 generated column 'b' in table 't1' ignored
--Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+-Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+-Warning 1906 The value specified for generated 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 generated column 'b' in table 't1' ignored
--Warning 1906 The value specified for generated column 'b' in table 't1' ignored
+-Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
+-Warning 1906 The value specified for generated column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1;
-a b
-1 2
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 13a729bd77b..8ebd1f9de0f 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -3750,20 +3750,32 @@ static int rocksdb_commit(handlerton* hton, THD* thd, bool commit_tx)
- For a COMMIT statement that finishes a multi-statement transaction
- For a statement that has its own transaction
*/
+ if (thd->slave_thread)
+ {
+ // An attempt to make parallel slave performant (not fully successful,
+ // see MDEV-15372):
- // First, commit without syncing. This establishes the commit order
- tx->set_sync(false);
- bool tx_had_writes = tx->get_write_count()? true : false ;
- if (tx->commit()) {
- DBUG_RETURN(HA_ERR_ROCKSDB_COMMIT_FAILED);
- }
- thd_wakeup_subsequent_commits(thd, 0);
+ // First, commit without syncing. This establishes the commit order
+ tx->set_sync(false);
+ bool tx_had_writes = tx->get_write_count()? true : false ;
+ if (tx->commit()) {
+ DBUG_RETURN(HA_ERR_ROCKSDB_COMMIT_FAILED);
+ }
+ thd_wakeup_subsequent_commits(thd, 0);
- if (tx_had_writes && rocksdb_flush_log_at_trx_commit == FLUSH_LOG_SYNC)
+ if (tx_had_writes && rocksdb_flush_log_at_trx_commit == FLUSH_LOG_SYNC)
+ {
+ rocksdb::Status s= rdb->FlushWAL(true);
+ if (!s.ok())
+ DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
+ }
+ }
+ else
{
- rocksdb::Status s= rdb->FlushWAL(true);
- if (!s.ok())
- DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
+ /* Not a slave thread */
+ if (tx->commit()) {
+ DBUG_RETURN(HA_ERR_ROCKSDB_COMMIT_FAILED);
+ }
}
} else {
/*
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/deadlock.test b/storage/rocksdb/mysql-test/rocksdb/t/deadlock.test
index 3be7fda9952..656be9eb3fc 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/deadlock.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/deadlock.test
@@ -3,6 +3,7 @@
--echo #
--source include/have_rocksdb.inc
+--source include/big_test.inc
--echo # Disable for valgrind because this takes too long
--source include/not_valgrind.inc
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/include/have_rocksdb.inc b/storage/rocksdb/mysql-test/rocksdb_stress/include/have_rocksdb.inc
new file mode 100644
index 00000000000..1f762d38c64
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/include/have_rocksdb.inc
@@ -0,0 +1,10 @@
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'rocksdb' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
+{
+ --skip Test requires engine RocksDB.
+}
+
+--disable_query_log
+# Table statistics can vary depending on when the memtables are flushed, so
+# flush them at the beginning of the test to ensure the test runs consistently.
+set global rocksdb_force_flush_memtable_now = true;
+--enable_query_log
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/include/have_rocksdb.opt b/storage/rocksdb/mysql-test/rocksdb_stress/include/have_rocksdb.opt
new file mode 100644
index 00000000000..36d7dda1609
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/include/have_rocksdb.opt
@@ -0,0 +1,12 @@
+--loose-enable-rocksdb
+--loose-enable-rocksdb_global_info
+--loose-enable-rocksdb_ddl
+--loose-enable-rocksdb_cf_options
+--loose-enable_rocksdb_perf_context
+--loose-enable_rocksdb_perf_context_global
+--loose-enable-rocksdb_index_file_map
+--loose-enable-rocksdb_dbstats
+--loose-enable-rocksdb_cfstats
+--loose-enable-rocksdb_lock_info
+--loose-enable-rocksdb_trx
+--loose-enable-rocksdb_locks
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/include/rocksdb_stress.inc b/storage/rocksdb/mysql-test/rocksdb_stress/include/rocksdb_stress.inc
index a8ac90fcc3f..3838987bf88 100644
--- a/storage/rocksdb/mysql-test/rocksdb_stress/include/rocksdb_stress.inc
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/include/rocksdb_stress.inc
@@ -9,11 +9,12 @@
let $MYSQL_BASEDIR = `SELECT @@BASEDIR`;
let $exec =
- python $MYSQL_BASEDIR/mysql-test/suite/rocksdb_stress/t/load_generator.py
- -L $MYSQL_TMP_DIR/load_generator.log -H $master_host -t $table
- -P $MASTER_MYPORT -n $num_records -m $max_records
- -l $num_loaders -c $num_checkers -r $num_requests
- -E $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ python
+ $MYSQL_BASEDIR/storage/rocksdb/mysql-test/rocksdb_stress/t/load_generator.py \
+ -L $MYSQL_TMP_DIR/load_generator.log -H $master_host -t $table \
+ -P $MASTER_MYPORT -n $num_records -m $max_records \
+ -l $num_loaders -c $num_checkers -r $num_requests \
+ -E $MYSQLTEST_VARDIR/tmp/mysqld.1.expect \
-D $reap_delay;
exec $exec;
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/my.cnf b/storage/rocksdb/mysql-test/rocksdb_stress/my.cnf
index fb985f5d1b4..780e46b4f22 100644
--- a/storage/rocksdb/mysql-test/rocksdb_stress/my.cnf
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/my.cnf
@@ -1,5 +1,5 @@
!include include/default_my.cnf
-!include suite/rocksdb/my.cnf
+!include ../storage/rocksdb/mysql-test/rocksdb/my.cnf
!include suite/rpl/my.cnf
[mysqld.1]
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/suite.opt b/storage/rocksdb/mysql-test/rocksdb_stress/suite.opt
new file mode 100644
index 00000000000..22c9d7a300e
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/suite.opt
@@ -0,0 +1,2 @@
+--plugin-load=$HA_ROCKSDB_SO --default-storage-engine=rocksdb
+
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm b/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm
new file mode 100644
index 00000000000..3423d34ded5
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm
@@ -0,0 +1,28 @@
+package My::Suite::Rocksdb;
+
+use My::SysInfo;
+
+#
+# Note: ../rocksdb_sys_vars/suite.pm file has a similar
+# function. If you modify this file, consider modifying that one, too.
+#
+@ISA = qw(My::Suite);
+use My::Find;
+use File::Basename;
+use strict;
+
+sub is_default { not $::opt_embedded_server }
+
+my $sst_dump=
+::mtr_exe_maybe_exists(
+ "$::bindir/storage/rocksdb$::opt_vs_config/sst_dump",
+ "$::path_client_bindir/sst_dump");
+return "RocksDB is not compiled, no sst_dump" unless $sst_dump;
+$ENV{MARIAROCKS_SST_DUMP}="$sst_dump";
+
+# Temporarily disable testing under valgrind, due to MDEV-12439
+return "RocksDB tests disabled under valgrind" if ($::opt_valgrind);
+
+
+bless { };
+
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb_stress/t/disabled.def
new file mode 100644
index 00000000000..42b2f661a8d
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/t/disabled.def
@@ -0,0 +1,2 @@
+rocksdb_stress_crash: Client scipt seems to hang on terminal input in MariaDB
+rocksdb_stress: Client scipt seems to hang on terminal input in MariaDB
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress.test b/storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress.test
index 307211a124d..e48b0c47ae3 100644
--- a/storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress.test
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress.test
@@ -30,4 +30,4 @@ ENGINE=RocksDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
--let $num_requests = 10000
--let $reap_delay = 0
---source suite/rocksdb_stress/include/rocksdb_stress.inc
+--source include/rocksdb_stress.inc
diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress_crash.test b/storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress_crash.test
index 8ef4c73c3b0..3da3dc7b3c3 100644
--- a/storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress_crash.test
+++ b/storage/rocksdb/mysql-test/rocksdb_stress/t/rocksdb_stress_crash.test
@@ -31,4 +31,4 @@ ENGINE=RocksDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
--let $num_requests = 10000
--let $reap_delay = 180
---source suite/rocksdb_stress/include/rocksdb_stress.inc
+--source include/rocksdb_stress.inc
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index 467eed97a29..eedea78078d 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -7684,7 +7684,7 @@ int spider_get_sts(
int sts_sync_level,
uint flag
) {
- int get_type;
+ int get_type __attribute__ ((unused));
int error_num = 0;
bool need_to_get = TRUE;
DBUG_ENTER("spider_get_sts");
@@ -7841,7 +7841,7 @@ int spider_get_crd(
#endif
int crd_sync_level
) {
- int get_type;
+ int get_type __attribute__ ((unused));
int error_num = 0;
bool need_to_get = TRUE;
DBUG_ENTER("spider_get_crd");
@@ -9253,7 +9253,7 @@ int spider_discover_table_structure(
#endif
Open_tables_backup open_tables_backup;
TABLE *table_tables;
- 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/strings/json_lib.c b/strings/json_lib.c
index 6c94ce2271e..3763ac4ed54 100644
--- a/strings/json_lib.c
+++ b/strings/json_lib.c
@@ -1407,7 +1407,7 @@ int json_find_paths_next(json_engine_t *je, json_find_paths_t *state)
if (!json_key_matches(je, &key_name))
continue;
}
- if ((uint) (cur_step - state->paths[p_c].last_step) == state->cur_depth)
+ if (cur_step == state->paths[p_c].last_step + state->cur_depth)
path_found= TRUE;
else
{
@@ -1440,7 +1440,7 @@ int json_find_paths_next(json_engine_t *je, json_find_paths_t *state)
cur_step->n_item == state->array_counters[state->cur_depth])
{
/* Array item matches. */
- if ((uint) (cur_step - state->paths[p_c].last_step) == state->cur_depth)
+ if (cur_step == state->paths[p_c].last_step + state->cur_depth)
path_found= TRUE;
else
{
@@ -2094,5 +2094,3 @@ err_return:
return 1;
}
-
-
diff --git a/unittest/sql/mf_iocache-t.cc b/unittest/sql/mf_iocache-t.cc
index 464730ee08e..c83ed6a534c 100644
--- a/unittest/sql/mf_iocache-t.cc
+++ b/unittest/sql/mf_iocache-t.cc
@@ -358,7 +358,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", (ulong) (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);