diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-07-31 10:19:06 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-07-31 10:39:51 +0200 |
commit | 387c9d17071644dde4a4f2850a1feb9c88457780 (patch) | |
tree | 7b6611c2e2329d4d8cd1000ba672c74efa790e8a | |
parent | a48739e6ee4acf664a388fa82aac83f258cc5c22 (diff) | |
download | mariadb-git-bb-10.10-MDEV-28632.tar.gz |
wip version for explicit_def_tsbb-10.10-MDEV-28632
-rw-r--r-- | mysql-test/std_data/mdev29078-mysql-bin.000001 | bin | 920 -> 920 bytes | |||
-rw-r--r-- | sql/log_event.cc | 17 |
2 files changed, 12 insertions, 5 deletions
diff --git a/mysql-test/std_data/mdev29078-mysql-bin.000001 b/mysql-test/std_data/mdev29078-mysql-bin.000001 Binary files differindex 541b8710f7d..efcbb0c9832 100644 --- a/mysql-test/std_data/mdev29078-mysql-bin.000001 +++ b/mysql-test/std_data/mdev29078-mysql-bin.000001 diff --git a/sql/log_event.cc b/sql/log_event.cc index 9c0c719e828..30d9ec36b4a 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2343,14 +2343,21 @@ void Format_description_log_event::deduct_options_written_to_bin_log() OPTION_NO_FOREIGN_KEY_CHECKS | OPTION_RELAXED_UNIQUE_CHECKS; if (!server_version_split.version_is_valid() || server_version_split.kind == master_version_split::KIND_MYSQL || - server_version_split < Version(10,5,2)) - return; - options_written_to_bin_log|= OPTION_IF_EXISTS; - if (server_version_split < Version(10,10,0)) + server_version_split < Version(10,3,0)) return; + if (server_version_split >= Version(10,5,2)) + options_written_to_bin_log|= OPTION_IF_EXISTS; + if (server_version_split[0] == 10) + { + const static char v[10]={99,99,99,36,26,17,9,5,4,2}; + if (server_version_split[1] < 10 && + server_version_split[2] < v[server_version_split[1]]) + return; + } options_written_to_bin_log|= OPTION_EXPLICIT_DEF_TIMESTAMP; - DBUG_ASSERT(options_written_to_bin_log == OPTIONS_WRITTEN_TO_BIN_LOG); + DBUG_ASSERT(server_version_split < Version(10,5,2) || + options_written_to_bin_log == OPTIONS_WRITTEN_TO_BIN_LOG); } /** |