diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-07-02 22:12:12 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-07-02 22:12:12 +0200 |
commit | b4a0b2c2f862ab0de853dc34e1e56f6159043e45 (patch) | |
tree | 18a0c25fdc9ac0076da19247666414a46434b85e /sql/item_timefunc.cc | |
parent | 9809f05199aeb0b67991fac41bd86f38730768dc (diff) | |
download | mariadb-git-b4a0b2c2f862ab0de853dc34e1e56f6159043e45.tar.gz |
post-merge fixes.
most tests pass.
5.3 merge is next
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index d7cd2d459f4..5aa4db219e8 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -776,13 +776,12 @@ 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, + 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)); + l_time->second); str->append(intbuff, length); break; case 'S': @@ -791,12 +790,11 @@ 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, + length= sprintf(intbuff, "%02d:%02d:%02d", l_time->hour, l_time->minute, - l_time->second)); + l_time->second); str->append(intbuff, length); break; case 'U': @@ -3135,8 +3133,7 @@ String *Item_func_maketime::val_str(String *str) ltime.second= TIME_MAX_SECOND; 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)); + int len = (int)(ptr - buf) + 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); |