diff options
author | Mats Kindahl <mats@sun.com> | 2010-03-31 16:05:33 +0200 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2010-03-31 16:05:33 +0200 |
commit | 23d8586dbfdfdf02fa2f801b9dad91db53025a64 (patch) | |
tree | 19f32879e77ada23d733f35173a25f410d655ebe /sql/my_decimal.h | |
parent | d7dd2fc92f042596c2e72a96934bb207270e7419 (diff) | |
download | mariadb-git-23d8586dbfdfdf02fa2f801b9dad91db53025a64.tar.gz |
WL#5030: Split and remove mysql_priv.h
This patch:
- Moves all definitions from the mysql_priv.h file into
header files for the component where the variable is
defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r-- | sql/my_decimal.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 21669e82c44..abf4b178422 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -28,10 +28,17 @@ #ifndef my_decimal_h #define my_decimal_h +#if defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) +#include "sql_string.h" /* String */ +#endif + C_MODE_START #include <decimal.h> C_MODE_END +class String; +typedef struct st_mysql_time MYSQL_TIME; + #define DECIMAL_LONGLONG_DIGITS 22 #define DECIMAL_LONG_DIGITS 10 #define DECIMAL_LONG3_DIGITS 8 @@ -133,6 +140,12 @@ const char *dbug_decimal_as_string(char *buff, const my_decimal *val); #define dbug_decimal_as_string(A) NULL #endif +bool str_set_decimal(uint mask, const my_decimal *val, uint fixed_prec, + uint fixed_dec, char filler, String *str, + CHARSET_INFO *cs); + +extern my_decimal decimal_zero; + #ifndef MYSQL_CLIENT int decimal_operation_results(int result); #else @@ -289,7 +302,14 @@ int my_decimal_ceiling(uint mask, const my_decimal *from, my_decimal *to) } +inline bool str_set_decimal(const my_decimal *val, String *str, + CHARSET_INFO *cs) +{ + return str_set_decimal(E_DEC_FATAL_ERROR, val, 0, 0, 0, str, cs); +} + #ifndef MYSQL_CLIENT +class String; int my_decimal2string(uint mask, const my_decimal *d, uint fixed_prec, uint fixed_dec, char filler, String *str); #endif |