mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1 sql/ha_innodb.cc: Auto merged sql/opt_range.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_udf.cc: Auto merged sql/sql_yacc.yy: Auto merged storage/myisam/rt_split.c: Auto merged storage/myisam/sp_key.c: Auto merged storage/ndb/src/kernel/SimBlockList.cpp: Auto merged storage/ndb/src/ndbapi/Ndb.cpp: Auto merged
This commit is contained in:
commit
8128e3e417
39 changed files with 529 additions and 88 deletions
|
|
@ -257,18 +257,17 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
|
|||
int n_dim;
|
||||
uchar *source_cur, *cur1, *cur2;
|
||||
uchar *new_page;
|
||||
int err_code = 0;
|
||||
|
||||
uint nod_flag = mi_test_if_nod(page);
|
||||
uint full_length = key_length + (nod_flag ? nod_flag :
|
||||
info->s->base.rec_reflength);
|
||||
|
||||
int max_keys = (mi_getint(page)-2) / (full_length);
|
||||
int err_code= 0;
|
||||
uint nod_flag= mi_test_if_nod(page);
|
||||
uint full_length= key_length + (nod_flag ? nod_flag :
|
||||
info->s->base.rec_reflength);
|
||||
int max_keys= (mi_getint(page)-2) / (full_length);
|
||||
|
||||
n_dim = keyinfo->keysegs / 2;
|
||||
|
||||
if (!(coord_buf= my_alloca(n_dim * 2 * sizeof(double) * (max_keys + 1 + 4) +
|
||||
sizeof(SplitStruct) * (max_keys + 1))))
|
||||
if (!(coord_buf= (double*) my_alloca(n_dim * 2 * sizeof(double) *
|
||||
(max_keys + 1 + 4) +
|
||||
sizeof(SplitStruct) * (max_keys + 1))))
|
||||
return -1;
|
||||
|
||||
task= (SplitStruct *)(coord_buf + n_dim * 2 * (max_keys + 1 + 4));
|
||||
|
|
@ -311,8 +310,7 @@ int rtree_split_page(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key,
|
|||
cur1 = rt_PAGE_FIRST_KEY(page, nod_flag);
|
||||
cur2 = rt_PAGE_FIRST_KEY(new_page, nod_flag);
|
||||
|
||||
n1 = 0;
|
||||
n2 = 0;
|
||||
n1= n2 = 0;
|
||||
for (cur = task; cur < stop; ++cur)
|
||||
{
|
||||
uchar *to;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,11 @@ static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims,
|
|||
double *mbr, int top);
|
||||
static int sp_mbr_from_wkb(uchar (*wkb), uint size, uint n_dims, double *mbr);
|
||||
|
||||
|
||||
static void get_double(double *d, const byte *pos)
|
||||
{
|
||||
float8get(*d, pos);
|
||||
}
|
||||
|
||||
uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
|
||||
const byte *record, my_off_t filepos)
|
||||
{
|
||||
|
|
@ -80,7 +84,7 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
|
|||
else if (keyseg->type == HA_KEYTYPE_DOUBLE)
|
||||
{
|
||||
double nr;
|
||||
float8get(nr, pos);
|
||||
get_double(&nr, pos);
|
||||
if (isnan(nr))
|
||||
{
|
||||
bzero(key, length);
|
||||
|
|
@ -138,7 +142,7 @@ static int sp_add_point_to_mbr(uchar *(*wkb), uchar *end, uint n_dims,
|
|||
{
|
||||
if ((*wkb) > end - 8)
|
||||
return -1;
|
||||
float8get(ord, (*wkb));
|
||||
get_double(&ord, *wkb);
|
||||
(*wkb)+= 8;
|
||||
if (ord < *mbr)
|
||||
float8store((char*) mbr, ord);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue