summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-05-19 19:01:46 +0200
committerSergei Golubchik <sergii@pisem.net>2011-05-19 19:01:46 +0200
commit8ddcd0cda8e6e90a58e9ea64f0f3773ea0037f0b (patch)
tree4765748aeb7aafb09e259e1a355e28c11819e9c0 /sql/protocol.cc
parent5346cb8d2745acd660b301092458e231c9f53319 (diff)
downloadmariadb-git-8ddcd0cda8e6e90a58e9ea64f0f3773ea0037f0b.tar.gz
post-review changes 1
include/my_time.h: remove duplicate defines. cast to ulonglong to avoid overflow sql/field.cc: perform sign extension when reading packed TIME values sql/item_cmpfunc.cc: when converting a string to a date for the purpose of comparing it with another date, we should ignore strict sql mode. sql/item_timefunc.cc: better error message sql/item_timefunc.h: limit decimals appropriately sql/share/errmsg.txt: don't refer to an object as a "column" in error messages that are used not only for columns.
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 273e3b1fd28..9242b348f0b 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -1200,7 +1200,7 @@ bool Protocol_binary::store(MYSQL_TIME *tm, int decimals)
pos[5]= (uchar) tm->minute;
pos[6]= (uchar) tm->second;
DBUG_ASSERT(decimals == AUTO_SEC_PART_DIGITS ||
- (decimals >= 0 && decimals <= MAX_SEC_PART_DIGITS));
+ (decimals >= 0 && decimals <= TIME_SECOND_PART_DIGITS));
if (decimals != AUTO_SEC_PART_DIGITS)
tm->second_part= sec_part_truncate(tm->second_part, decimals);
int4store(pos+7, tm->second_part);
@@ -1242,7 +1242,7 @@ bool Protocol_binary::store_time(MYSQL_TIME *tm, int decimals)
pos[6]= (uchar) tm->minute;
pos[7]= (uchar) tm->second;
DBUG_ASSERT(decimals == AUTO_SEC_PART_DIGITS ||
- (decimals >= 0 && decimals <= MAX_SEC_PART_DIGITS));
+ (decimals >= 0 && decimals <= TIME_SECOND_PART_DIGITS));
if (decimals != AUTO_SEC_PART_DIGITS)
tm->second_part= sec_part_truncate(tm->second_part, decimals);
int4store(pos+8, tm->second_part);