summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc24
1 files changed, 9 insertions, 15 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index feff03e704a..1c2c1cfe512 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -775,13 +775,11 @@ bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time,
str->append(hours_i < 12 ? "AM" : "PM",2);
break;
case 'r':
- length= my_sprintf(intbuff,
- (intbuff,
- ((l_time->hour % 24) < 12) ?
- "%02d:%02d:%02d AM" : "%02d:%02d:%02d PM",
- (l_time->hour+11)%12+1,
- l_time->minute,
- l_time->second));
+ length= sprintf(intbuff, ((l_time->hour % 24) < 12) ?
+ "%02d:%02d:%02d AM" : "%02d:%02d:%02d PM",
+ (l_time->hour+11)%12+1,
+ l_time->minute,
+ l_time->second);
str->append(intbuff, length);
break;
case 'S':
@@ -790,12 +788,8 @@ bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time,
str->append_with_prefill(intbuff, length, 2, '0');
break;
case 'T':
- length= my_sprintf(intbuff,
- (intbuff,
- "%02d:%02d:%02d",
- l_time->hour,
- l_time->minute,
- l_time->second));
+ length= sprintf(intbuff, "%02d:%02d:%02d",
+ l_time->hour, l_time->minute, l_time->second);
str->append(intbuff, length);
break;
case 'U':
@@ -3057,12 +3051,12 @@ String *Item_func_maketime::val_str(String *str)
char buf[28];
char *ptr= longlong10_to_str(hour, buf, args[0]->unsigned_flag ? 10 : -10);
int len = (int)(ptr - buf) +
- my_sprintf(ptr, (ptr, ":%02u:%02u", (uint)minute, (uint)second));
+ sprintf(ptr, ":%02u:%02u", (uint) minute, (uint) second);
make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
buf, len, MYSQL_TIMESTAMP_TIME,
NullS);
}
-
+
if (make_time_with_warn((DATE_TIME_FORMAT *) 0, &ltime, str))
{
null_value= 1;