1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Added GIS extension

BitKeeper/etc/ignore:
  Added myisam/rt_test myisam/sp_test to the ignore list
This commit is contained in:
unknown
2002-02-22 15:24:42 +04:00
parent 3d5dc65dfd
commit 32a08516c9
31 changed files with 3674 additions and 48 deletions

View File

@ -459,6 +459,44 @@ bool String::replace(uint32 offset,uint32 arg_length,const String &to)
return FALSE;
}
// added by Holyfoot for "geometry" needs
int String::reserve(uint32 space_needed, uint32 grow_by)
{
if (Alloced_length < str_length + space_needed)
{
if (realloc(Alloced_length + max(space_needed, grow_by) - 1))
return TRUE;
}
return FALSE;
}
void String::qs_append(const char *str)
{
int len = strlen(str);
memcpy(Ptr + str_length, str, len + 1);
str_length += len;
}
void String::qs_append(double d)
{
char *buff = Ptr + str_length;
sprintf(buff,"%.14g", d);
str_length += strlen(buff);
}
void String::qs_append(double *d)
{
double ld;
float8get(ld, d);
qs_append(ld);
}
void String::qs_append(const char &c)
{
Ptr[str_length] = c;
str_length += sizeof(c);
}
int sortcmp(const String *x,const String *y)
{
@ -805,3 +843,5 @@ int wild_compare(String &match,String &wild, char escape)
DBUG_RETURN(wild_compare(match.ptr(),match.ptr()+match.length(),
wild.ptr(), wild.ptr()+wild.length(),escape));
}