summaryrefslogtreecommitdiff
path: root/sql/my_decimal.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-10-01 13:15:29 +0200
committerSergei Golubchik <sergii@pisem.net>2012-10-01 13:15:29 +0200
commit416d0aebbfaaa00802d00105a0bd2faedb8b8f04 (patch)
tree5244b83a9f22d4d5899154c9a64a316111bbe6b6 /sql/my_decimal.h
parentadf6e145f77d2f7b049b977ee55ed12d05b96eac (diff)
downloadmariadb-git-416d0aebbfaaa00802d00105a0bd2faedb8b8f04.tar.gz
more fixes for test cases
mysql-test/suite/innodb/include/restart_and_reinit.inc: drop and recreate mysql.innodb* tables when deleting innodb table spaces mysql-test/t/ssl_8k_key-master.opt: with loose- prefix ssl errors are ignored sql-common/client.c: compiler warnings sql/field.cc: use the new function sql/item.cc: don't convert time to double or decimal via longlong, this loses sub-second part. Use dedicated functions. sql/item.h: incorrect cast_to_int type for params sql/item_strfunc.cc: use the new function sql/lex.h: unused sql/my_decimal.h: helper macro sql/sql_plugin.cc: workaround for a compiler warning sql/sql_yacc.yy: unused sql/transaction.cc: fix the merge for SERVER_STATUS_IN_TRANS_READONLY protocol flag storage/sphinx/CMakeLists.txt: compiler warnings
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r--sql/my_decimal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h
index bd03782cb18..3b104bbdee6 100644
--- a/sql/my_decimal.h
+++ b/sql/my_decimal.h
@@ -343,6 +343,10 @@ bool my_decimal2seconds(const my_decimal *d, ulonglong *sec, ulong *microsec);
my_decimal *seconds2my_decimal(bool sign, ulonglong sec, ulong microsec,
my_decimal *d);
+#define TIME_to_my_decimal(TIME, DECIMAL) \
+ seconds2my_decimal((TIME)->neg, TIME_to_ulonglong(TIME), \
+ (TIME)->second_part, (DECIMAL))
+
int my_decimal2int(uint mask, const decimal_t *d, bool unsigned_flag,
longlong *l);