summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-11-08 17:37:19 +0100
committerSergei Golubchik <serg@mariadb.org>2014-12-04 16:09:34 +0100
commit227510e039b4ec6bff3096a4b9b39847551dab1a (patch)
tree2c40cbba45ca53e688d3f5cd388dbcd032c82984 /sql/item_timefunc.cc
parentd1522af72dad1965b8a8a37415545014ba743f49 (diff)
downloadmariadb-git-227510e039b4ec6bff3096a4b9b39847551dab1a.tar.gz
parser cleanup: don't store field properties in LEX, use Create_field directly
length/dec/charset are still in LEX, because they're also used for CAST and dynamic columns. also 1. fix "MDEV-7041 COLLATION(CAST('a' AS CHAR BINARY)) returns a wrong result" 2. allow BINARY modifier in stored function RETURN clause 3. allow "COLLATION without CHARSET" in SP/SF (parameters, RETURN, DECLARE) 4. print correct variable name in error messages for stored routine parameters
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 389d9d5380c..c9d99908014 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1628,8 +1628,8 @@ bool Item_func_curtime::fix_fields(THD *thd, Item **items)
{
if (decimals > TIME_SECOND_PART_DIGITS)
{
- my_error(ER_TOO_BIG_PRECISION, MYF(0), decimals, func_name(),
- TIME_SECOND_PART_DIGITS);
+ my_error(ER_TOO_BIG_PRECISION, MYF(0), static_cast<ulonglong>(decimals),
+ func_name(), TIME_SECOND_PART_DIGITS);
return 1;
}
return Item_timefunc::fix_fields(thd, items);
@@ -1690,8 +1690,8 @@ bool Item_func_now::fix_fields(THD *thd, Item **items)
{
if (decimals > TIME_SECOND_PART_DIGITS)
{
- my_error(ER_TOO_BIG_PRECISION, MYF(0), decimals, func_name(),
- TIME_SECOND_PART_DIGITS);
+ my_error(ER_TOO_BIG_PRECISION, MYF(0), static_cast<ulonglong>(decimals),
+ func_name(), TIME_SECOND_PART_DIGITS);
return 1;
}
return Item_temporal_func::fix_fields(thd, items);