List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:October 16 2007 3:21pm
Subject:Re: bk commit into 5.0 tree (gkodinov:1.2537) BUG#30825
View as plain text  
Hi!

One question, see below.

On Oct 10, kgeorge@stripped wrote:
> ChangeSet@stripped, 2007-10-10 16:26:02+03:00, gkodinov@stripped +14 -0
>   Bug #30825: Problems when putting a non-spatial index on a GIS column
>    Fixed the usage of spatial data (and Point in specific) with 
>    non-spatial indexes.
>    Several problems :
>      - The length of the Point class was not updated to include the 
>        spatial reference system identifier. Fixed by increasing with 4 
>        bytes.
>      - The storage length of the spatial columns was not accounting for
>        the length that is prepended to it. Fixed by treating the 
>        spatial data columns as blobs (and thus increasing the storage
>        length)
>      - When creating the key image for comparison in index read wrong
>        key image was created (the one needed for and r-tree search,
>        not the one for b-tree/other search). Fixed by treating the
>        spatial data columns as blobs (and creating the correct kind of
>        image based on the index type). 
> 
> diff -Nrup a/sql/sql_table.cc b/sql/sql_table.cc
> --- a/sql/sql_table.cc	2007-08-05 06:53:13 +03:00
> +++ b/sql/sql_table.cc	2007-10-10 16:26:00 +03:00
> @@ -1287,7 +1287,7 @@ static int mysql_prepare_table(THD *thd,
>  	  }
>            if (f_is_geom(sql_field->pack_flag) && sql_field->geom_type
> ==
>                Field::GEOM_POINT)
> -            column->length= 21;
> +            column->length= 25;

how did it work before ? wouldn't wrong length result in truncated POINT
values on disk ?

Regards / Mit vielen Grüssen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Developer
/_/  /_/\_, /___/\___\_\___/  MySQL GmbH, Dachauer Str. 37, D-80335 München
       <___/                  Geschäftsführer: Kaj Arnö - HRB
München 162140
Thread
bk commit into 5.0 tree (gkodinov:1.2537) BUG#30825kgeorge10 Oct
  • Re: bk commit into 5.0 tree (gkodinov:1.2537) BUG#30825Sergei Golubchik16 Oct
    • Re: bk commit into 5.0 tree (gkodinov:1.2537) BUG#30825Georgi Kodinov18 Oct