summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-08-01 16:51:12 +0200
committerSergei Golubchik <sergii@pisem.net>2014-08-01 16:51:12 +0200
commit4b4de01fae3b2c8ff27e733da3e2e03e90fbbaed (patch)
treed3e974744cad9f159b17fe544b95ea910971057d /sql/item_timefunc.h
parentd8a9bb4585fae93240ca0f58f64294b85bab5892 (diff)
parent681fbcaf9255e1aa9f4ef458f8ef69f1a31eade2 (diff)
downloadmariadb-git-4b4de01fae3b2c8ff27e733da3e2e03e90fbbaed.tar.gz
5.3 merge
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index c086579e34b..455540c4b0d 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -413,16 +413,15 @@ protected:
public:
Item_func_seconds_hybrid() :Item_func_numhybrid() {}
Item_func_seconds_hybrid(Item *a) :Item_func_numhybrid(a) {}
- void fix_num_length_and_dec()
+ void fix_length_and_dec()
{
if (arg_count)
decimals= args[0]->temporal_precision(arg0_expected_type());
set_if_smaller(decimals, TIME_SECOND_PART_DIGITS);
max_length=17 + (decimals ? decimals + 1 : 0);
maybe_null= true;
+ cached_result_type= decimals ? DECIMAL_RESULT : INT_RESULT;
}
- void find_num_type()
- { cached_result_type= decimals ? DECIMAL_RESULT : INT_RESULT; }
double real_op() { DBUG_ASSERT(0); return 0; }
String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
bool date_op(MYSQL_TIME *ltime, uint fuzzydate) { DBUG_ASSERT(0); return true; }
@@ -470,11 +469,6 @@ protected:
public:
Item_func_time_to_sec(Item *item) :Item_func_seconds_hybrid(item) {}
const char *func_name() const { return "time_to_sec"; }
- void fix_num_length_and_dec()
- {
- maybe_null= true;
- Item_func_seconds_hybrid::fix_num_length_and_dec();
- }
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
bool check_vcol_func_processor(uchar *int_arg) { return FALSE;}
bool check_valid_arguments_processor(uchar *int_arg)