diff options
author | unknown <jimw@mysql.com> | 2005-08-24 15:50:58 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-08-24 15:50:58 -0700 |
commit | da13a76a289a7f75089c738cb08745e7dd82f619 (patch) | |
tree | d1cebeb5bc16f53aaf69f81ac3286a2365c098fc /sql/lex.h | |
parent | a7ce02bcf7540b044019e98b7c0a349f48ff6269 (diff) | |
download | mariadb-git-da13a76a289a7f75089c738cb08745e7dd82f619.tar.gz |
Make SYSDATE() behave as in Oracle: always the current datetime, not the
datetime of when the current statement began. This also makes SYSDATE()
not safe in replication. (Bug #12562)
mysql-test/r/func_time.result:
Add new results
mysql-test/t/func_time.test:
Add tests for new SYSDATE() behavior
sql/item_timefunc.cc:
Add Item_func_sysdate_local implementation
sql/item_timefunc.h:
Add Item_func_sysdate_local, so SYSDATE() can behave differently
than NOW().
sql/lex.h:
SYSDATE() is no longer an alias for NOW().
sql/sql_yacc.yy:
Handle SYSDATE()
Diffstat (limited to 'sql/lex.h')
-rw-r--r-- | sql/lex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/lex.h b/sql/lex.h index 7b6d86e327e..4bf3671e5be 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -751,7 +751,7 @@ static SYMBOL sql_functions[] = { { "SUBSTRING_INDEX", SYM(SUBSTRING_INDEX)}, { "SUBTIME", F_SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_subtime)}, { "SUM", SYM(SUM_SYM)}, - { "SYSDATE", SYM(NOW_SYM)}, + { "SYSDATE", SYM(SYSDATE)}, { "SYSTEM_USER", SYM(USER)}, { "TAN", F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_tan)}, { "TIME_FORMAT", F_SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_time_format)}, |