summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-03-17 11:54:36 +0100
committerSergei Golubchik <sergii@pisem.net>2011-03-17 11:54:36 +0100
commit8f6cb92581e6640cba8cd7b47cf94e4270e73650 (patch)
tree144a72d6706670d2b116acaf257e385b1709c58e /sql
parent4f1dbac62706afb40be110b54daaa0bc4905eca9 (diff)
downloadmariadb-git-8f6cb92581e6640cba8cd7b47cf94e4270e73650.tar.gz
lp:736358 Unexpected increased timestamp resolution with UNION
partial fix
Diffstat (limited to 'sql')
-rw-r--r--sql/item_timefunc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index b28daed202b..df4491e61e6 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -699,6 +699,8 @@ public:
collation.set(&my_charset_bin);
maybe_null= 1;
max_length= MAX_TIME_WIDTH;
+ if (decimals == NOT_FIXED_DEC)
+ decimals= args[0]->decimals;
if (decimals && decimals != NOT_FIXED_DEC)
max_length+= min(decimals, MAX_SEC_PART_DIGITS) + 1;
}