diff options
author | aelkin@mysql.com <> | 2006-03-10 16:47:56 +0200 |
---|---|---|
committer | aelkin@mysql.com <> | 2006-03-10 16:47:56 +0200 |
commit | d187d410d10a17598f1e4b44fc41212c689264d0 (patch) | |
tree | 67d0f445b3cd9e840e9096f915f396e07eabc134 /sql/mysqld.cc | |
parent | 579271a4617283c46b8c198359aedb7ce028893a (diff) | |
download | mariadb-git-d187d410d10a17598f1e4b44fc41212c689264d0.tar.gz |
BUG#15101 SYSDATE() disregards SET TIMESTAMP.
After the ChangeSet 1.1892.20.1 2005/08/24 (Bug #12562) SYSDATE() is not an alias
of NOW() and is unsafe for replication.
`SYSDATE()' backward compatible aliasing clashes with the idea #12562
fix. To make it safe-replicatable we have to either use RBR or to restore
the pre-5.0 style.
--sysdate-is-now command line flag was introduced to provide backward compatibility.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index bc30a2c981b..f1cffbfd657 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4578,6 +4578,7 @@ enum options_mysqld OPT_DATETIME_FORMAT, OPT_LOG_QUERIES_NOT_USING_INDEXES, OPT_DEFAULT_TIME_ZONE, + OPT_SYSDATE_IS_NOW, OPT_OPTIMIZER_SEARCH_DEPTH, OPT_OPTIMIZER_PRUNE_LEVEL, OPT_UPDATABLE_VIEWS_WITH_LIMIT, @@ -5935,6 +5936,10 @@ The minimum value for this variable is 4096.", (gptr*) &max_system_variables.net_wait_timeout, 0, GET_ULONG, REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT), 0, 1, 0}, + {"sysdate-is-now", OPT_SYSDATE_IS_NOW, + "Non-default flag to alias SYSDATE() to NOW() to be safe-replicatable. Since 5.0 SYSDATE returns a `dynamic' value different for different invocation even within a query", + (gptr*) &global_system_variables.sysdate_is_now, + 0, 0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0}, {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; |