diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-08-12 22:05:23 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-08-12 22:05:23 +0200 |
commit | a91a23858de4b346ef6f419b05cd8d87ede51f78 (patch) | |
tree | bdbd2b3f4464f967fca27cbd44ba8921cc26fcc6 /sql/item_create.cc | |
parent | 847e0f152bc803bc850f11bc291f8f135bf06556 (diff) | |
download | mariadb-git-a91a23858de4b346ef6f419b05cd8d87ede51f78.tar.gz |
cleanup
* use sql_mode_for_dates() where appropriate.
* always specify an argument for sql_mode_for_dates()
(future-proof. easier to notice and fix if the caller
will start using thd from a local variable or an argument)
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 962ea73f320..4bd3d4f7e47 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -5815,10 +5815,7 @@ Item *create_temporal_literal(THD *thd, MYSQL_TIME_STATUS status; MYSQL_TIME ltime; Item *item= NULL; - ulonglong flags= thd->variables.sql_mode & - (MODE_NO_ZERO_IN_DATE | - MODE_NO_ZERO_DATE | - MODE_INVALID_DATES); + ulonglong flags= sql_mode_for_dates(thd); switch(type) { |