MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alexey Botchkov Date:May 12 2009 3:24pm
Subject:bzr commit into mysql-5.1 branch (holyfoot:2660) Bug#44753
View as plain text  
#At file:///home/hf/work/mysql_common/mysql-5.1-wl1326/ based on revid:holyfoot@stripped

 2660 Alexey Botchkov	2009-05-12
      Bug#44753      nan error in union function
           The 'slicescan' algorithm fails if it meets a sequence of
           points in a polygon with exactly same coordinates.
           Fixed by separately checking if (y1 - y0 == 0.0)
      
           Makefiles also fixed to make the windows build possible.
      
      per-file comments:
        libmysqld/CMakeLists.txt
           sql/stacktrace.cc removed
      
        sql/CMakeLists.txt
           sql/gcalc_slicescan.cc and sql/gcalc_tools.cc added to the package
      
        sql/gcalc_slicescan.cc
      Bug#44753      nan error in union function
           GET_DX_DY function fixed to handle (0,0) case properly

    modified:
      libmysqld/CMakeLists.txt
      sql/CMakeLists.txt
      sql/gcalc_slicescan.cc
=== modified file 'libmysqld/CMakeLists.txt'
--- a/libmysqld/CMakeLists.txt	2009-05-12 14:02:28 +0000
+++ b/libmysqld/CMakeLists.txt	2009-05-12 15:19:33 +0000
@@ -185,9 +185,8 @@ SET(LIBMYSQLD_SOURCES emb_qcache.cc libm
            ../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
            ../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
            ../sql/partition_info.cc ../sql/sql_connect.cc 
-           ../sql/scheduler.cc ../sql/stacktrace.c
+           ../sql/scheduler.cc ../sql/event_parse_data.cc
            ../sql/gcalc_slicescan.cc ../sql/gcalc_tools.cc
-           ../sql/event_parse_data.cc
            ${GEN_SOURCES}
            ${LIB_SOURCES})
 

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2008-10-23 15:59:22 +0000
+++ b/sql/CMakeLists.txt	2009-05-12 15:19:33 +0000
@@ -74,6 +74,7 @@ ADD_EXECUTABLE(mysqld
                rpl_rli.cc rpl_mi.cc sql_servers.cc
                sql_connect.cc scheduler.cc 
                sql_profile.cc event_parse_data.cc
+               gcalc_slicescan.cc gcalc_tools.cc
                ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
                ${PROJECT_SOURCE_DIR}/sql/sql_yacc.h
                ${PROJECT_SOURCE_DIR}/include/mysqld_error.h

=== modified file 'sql/gcalc_slicescan.cc'
--- a/sql/gcalc_slicescan.cc	2008-12-24 16:54:44 +0000
+++ b/sql/gcalc_slicescan.cc	2009-05-12 15:19:33 +0000
@@ -163,8 +163,14 @@ void gcalc_heap::reset()
   m_n_points= 0;
 }
 
-#define GET_DX_DY(dxdy, p0, p1) \
-  ((*dxdy= (p1->x - p0->x)/(p1->y - p0->y))>DBL_MAX || (*dxdy)<-DBL_MAX)
+inline int GET_DX_DY(double *dxdy,
+                     const gcalc_heap::info *p0, const gcalc_heap::info *p1)
+{
+  double dy= p1->y - p0->y;
+  return (dy == 0.0) ||
+         (*dxdy= (p1->x - p0->x)/dy)>DBL_MAX ||
+         (*dxdy)<-DBL_MAX;
+}
 
 gcalc_scan_iterator::gcalc_scan_iterator(size_t blk_size) :
   gcalc_dyn_list(blk_size,


Attachment: [text/bzr-bundle] bzr/holyfoot@mysql.com-20090512151933-52o1i2umgprbrk2i.bundle
Thread
bzr commit into mysql-5.1 branch (holyfoot:2660) Bug#44753Alexey Botchkov12 May