mirror of
https://github.com/MariaDB/server.git
synced 2026-05-09 16:44:29 +02:00
Merge magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B30825-5.1-opt mysql-test/r/gis-rtree.result: Auto merged mysql-test/r/gis.result: Auto merged mysql-test/t/gis.test: Auto merged BitKeeper/deleted/.del-bdb_gis.result: Auto merged BitKeeper/deleted/.del-bdb_gis.test: Auto merged sql/sql_table.cc: Auto merged mysql-test/r/innodb_gis.result: merged 5.0-opt -> 5.1-opt mysql-test/t/innodb_gis.test: merged 5.0-opt -> 5.1-opt sql/field.cc: merged 5.0-opt -> 5.1-opt sql/field.h: merged 5.0-opt -> 5.1-opt sql/sql_select.h: merged 5.0-opt -> 5.1-opt sql/sql_yacc.yy: merged 5.0-opt -> 5.1-opt sql/table.cc: merged 5.0-opt -> 5.1-opt
This commit is contained in:
commit
c5dfd3e193
12 changed files with 140 additions and 39 deletions
30
sql/field.cc
30
sql/field.cc
|
|
@ -8031,36 +8031,6 @@ uint Field_blob::is_equal(Create_field *new_field)
|
|||
|
||||
#ifdef HAVE_SPATIAL
|
||||
|
||||
uint Field_geom::get_key_image(uchar *buff, uint length, imagetype type)
|
||||
{
|
||||
uchar *blob;
|
||||
const char *dummy;
|
||||
MBR mbr;
|
||||
ulong blob_length= get_length(ptr);
|
||||
Geometry_buffer buffer;
|
||||
Geometry *gobj;
|
||||
const uint image_length= SIZEOF_STORED_DOUBLE*4;
|
||||
|
||||
if (blob_length < SRID_SIZE)
|
||||
{
|
||||
bzero(buff, image_length);
|
||||
return image_length;
|
||||
}
|
||||
get_ptr(&blob);
|
||||
gobj= Geometry::construct(&buffer, (char*) blob, blob_length);
|
||||
if (!gobj || gobj->get_mbr(&mbr, &dummy))
|
||||
bzero(buff, image_length);
|
||||
else
|
||||
{
|
||||
float8store(buff, mbr.xmin);
|
||||
float8store(buff + 8, mbr.xmax);
|
||||
float8store(buff + 16, mbr.ymin);
|
||||
float8store(buff + 24, mbr.ymax);
|
||||
}
|
||||
return image_length;
|
||||
}
|
||||
|
||||
|
||||
void Field_geom::sql_type(String &res) const
|
||||
{
|
||||
CHARSET_INFO *cs= &my_charset_latin1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue