Commit 5b83aee3 authored by Alexey Botchkov's avatar Alexey Botchkov

bug #857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON

        actually only testcase added as the bug was fixed already.

modified:
  mysql-test/r/gis-precise.result
bug #857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON
        test result updated.
  mysql-test/t/gis-precise.test
bug #857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON
        test case added.
  sql/gcalc_tools.cc
        superfluous variable removed.
parent dca6ff48
...@@ -428,3 +428,6 @@ ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPO ...@@ -428,3 +428,6 @@ ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPO
SELECT ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT('MULTIPOINT( 4 0 , 6 9 , 5 1, 1 4 )') ); SELECT ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT('MULTIPOINT( 4 0 , 6 9 , 5 1, 1 4 )') );
ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT('MULTIPOINT( 4 0 , 6 9 , 5 1, 1 4 )') ) ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT('MULTIPOINT( 4 0 , 6 9 , 5 1, 1 4 )') )
1 1
SELECT ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') , POLYGONFROMTEXT(' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) '));
ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') , POLYGONFROMTEXT(' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) '))
0
...@@ -303,3 +303,6 @@ SELECT ST_TOUCHES( GEOMETRYFROMTEXT(' LINESTRING( 1 1 , 1 4 , 5 0 , 8 3 ) ') , P ...@@ -303,3 +303,6 @@ SELECT ST_TOUCHES( GEOMETRYFROMTEXT(' LINESTRING( 1 1 , 1 4 , 5 0 , 8 3 ) ') , P
SELECT ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT(' MULTIPOINT( 5 8 , 5 2 , 1 8 , 3 0 , 3 0 , 7 8 ) ') ); SELECT ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT(' MULTIPOINT( 5 8 , 5 2 , 1 8 , 3 0 , 3 0 , 7 8 ) ') );
SELECT ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT('MULTIPOINT( 4 0 , 6 9 , 5 1, 1 4 )') ); SELECT ST_EQUALS( MULTIPOINTFROMTEXT(' MULTIPOINT( 5 1 , 6 9 , 1 4 , 4 0 ) ') , MULTIPOINTFROMTEXT('MULTIPOINT( 4 0 , 6 9 , 5 1, 1 4 )') );
#bug 857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON
SELECT ST_WITHIN( MULTIPOINTFROMTEXT(' MULTIPOINT( 2 9 , 2 9 , 4 9 , 9 1 ) ') , POLYGONFROMTEXT(' POLYGON( ( 2 2 , 2 8 , 8 8 , 8 2 , 2 2 ) , ( 4 4 , 4 6 , 6 6 , 6 4 , 4 4 ) ) '));
...@@ -766,7 +766,9 @@ int ca_counter= 0; ...@@ -766,7 +766,9 @@ int ca_counter= 0;
int Gcalc_operation_reducer::count_slice(Gcalc_scan_iterator *si) int Gcalc_operation_reducer::count_slice(Gcalc_scan_iterator *si)
{ {
Gcalc_point_iterator pi(si); Gcalc_point_iterator pi(si);
#ifdef TMP_BLOCK
const Gcalc_heap::Info *event_point= NULL; const Gcalc_heap::Info *event_point= NULL;
#endif /*TMP_BLOCK*/
int prev_state= 0; int prev_state= 0;
int sav_prev_state; int sav_prev_state;
active_thread *prev_range= NULL; active_thread *prev_range= NULL;
...@@ -858,8 +860,10 @@ int Gcalc_operation_reducer::count_slice(Gcalc_scan_iterator *si) ...@@ -858,8 +860,10 @@ int Gcalc_operation_reducer::count_slice(Gcalc_scan_iterator *si)
{ {
active_thread *cur_t= *cur_t_hook; active_thread *cur_t= *cur_t_hook;
#ifdef TMP_BLOCK
if (!event_point && events->event != scev_intersection) if (!event_point && events->event != scev_intersection)
event_point= events->pi; event_point= events->pi;
#endif /*TMP_BLOCK*/
if (events->event == scev_single_point) if (events->event == scev_single_point)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment