diff options
author | Dmitry Shulga <Dmitry.Shulga@Sun.COM> | 2010-07-23 18:15:56 +0700 |
---|---|---|
committer | Dmitry Shulga <Dmitry.Shulga@Sun.COM> | 2010-07-23 18:15:56 +0700 |
commit | 32372a756f95c26f762c8a80ccfeaebb8d59e269 (patch) | |
tree | 9381a32bdc4bdb5795dd8183ce6760294f74dc6e /sql/protocol.cc | |
parent | 49d327ebf763dca23969ac4afe814617815d1411 (diff) | |
parent | 11f6e6904627512c566902197eef9b2c474df3f8 (diff) | |
download | mariadb-git-32372a756f95c26f762c8a80ccfeaebb8d59e269.tar.gz |
Merge 5.1-bugteam -> 5.1-bug-42496
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index dfb78462f13..db5e15b2acd 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -1010,16 +1010,12 @@ bool Protocol_text::store(MYSQL_TIME *tm) #endif char buff[40]; uint length; - length= my_sprintf(buff,(buff, "%04d-%02d-%02d %02d:%02d:%02d", - (int) tm->year, - (int) tm->month, - (int) tm->day, - (int) tm->hour, - (int) tm->minute, - (int) tm->second)); + length= sprintf(buff, "%04d-%02d-%02d %02d:%02d:%02d", + (int) tm->year, (int) tm->month, + (int) tm->day, (int) tm->hour, + (int) tm->minute, (int) tm->second); if (tm->second_part) - length+= my_sprintf(buff+length,(buff+length, ".%06d", - (int)tm->second_part)); + length+= sprintf(buff+length, ".%06d", (int) tm->second_part); return net_store_data((uchar*) buff, length); } @@ -1053,13 +1049,11 @@ bool Protocol_text::store_time(MYSQL_TIME *tm) char buff[40]; uint length; uint day= (tm->year || tm->month) ? 0 : tm->day; - length= my_sprintf(buff,(buff, "%s%02ld:%02d:%02d", - tm->neg ? "-" : "", - (long) day*24L+(long) tm->hour, - (int) tm->minute, - (int) tm->second)); + length= sprintf(buff, "%s%02ld:%02d:%02d", tm->neg ? "-" : "", + (long) day*24L+(long) tm->hour, (int) tm->minute, + (int) tm->second); if (tm->second_part) - length+= my_sprintf(buff+length,(buff+length, ".%06d", (int)tm->second_part)); + length+= sprintf(buff+length, ".%06d", (int) tm->second_part); return net_store_data((uchar*) buff, length); } |