1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge with new VARCHAR code

This commit is contained in:
monty@mysql.com
2004-12-06 19:18:35 +02:00
167 changed files with 3256 additions and 19115 deletions

View File

@ -98,10 +98,12 @@
implementation-defined.
*/
#include <decimal.h>
#include <my_global.h>
#include <m_ctype.h>
#include <myisampack.h>
#include <my_sys.h> /* for my_alloca */
#include <m_string.h>
#include <decimal.h>
typedef decimal_digit dec1;
typedef longlong dec2;
@ -308,7 +310,7 @@ static int str2dec(char *from, decimal *to, char **end, my_bool fixed)
char *s=from, *s1;
int i, intg, frac, error, intg1, frac1;
dec1 x,*buf;
LINT_INIT(error);
sanity(to);
while (my_isspace(&my_charset_latin1, *s))
@ -366,6 +368,7 @@ static int str2dec(char *from, decimal *to, char **end, my_bool fixed)
intg=intg1*DIG_PER_DEC1;
}
}
/* Error is guranteed to be set here */
to->intg=intg;
to->frac=frac;
@ -1354,6 +1357,8 @@ static int do_div_mod(decimal *from1, decimal *from2,
*start2, *stop2, *stop1, *stop0, norm2, carry, *start1;
dec2 norm_factor, x, guess, y;
LINT_INIT(error);
if (mod)
to=mod;