Commit graph

122 commits

Author SHA1 Message Date
Sergei Golubchik
853077ad7e Merge branch '10.0' into bb-10.1-merge
Conflicts:
	.bzrignore
	VERSION
	cmake/plugin.cmake
	debian/dist/Debian/control
	debian/dist/Ubuntu/control
	mysql-test/r/join_outer.result
	mysql-test/r/join_outer_jcl6.result
	mysql-test/r/null.result
	mysql-test/r/old-mode.result
	mysql-test/r/union.result
	mysql-test/t/join_outer.test
	mysql-test/t/null.test
	mysql-test/t/old-mode.test
	mysql-test/t/union.test
	packaging/rpm-oel/mysql.spec.in
	scripts/mysql_config.sh
	sql/ha_ndbcluster.cc
	sql/ha_ndbcluster_binlog.cc
	sql/ha_ndbcluster_cond.cc
	sql/item_cmpfunc.h
	sql/lock.cc
	sql/sql_select.cc
	sql/sql_show.cc
	sql/sql_update.cc
	sql/sql_yacc.yy
	storage/innobase/buf/buf0flu.cc
	storage/innobase/fil/fil0fil.cc
	storage/innobase/include/srv0srv.h
	storage/innobase/lock/lock0lock.cc
	storage/tokudb/CMakeLists.txt
	storage/xtradb/buf/buf0flu.cc
	storage/xtradb/fil/fil0fil.cc
	storage/xtradb/include/srv0srv.h
	storage/xtradb/lock/lock0lock.cc
	support-files/mysql.spec.sh
2014-12-02 22:25:16 +01:00
Alexey Botchkov
d0d6284cab MDEV-4045 Missing OGC Spatial functions.
Missing GIS functions added:
        IsRing()
        PointOnSurface
        PointOnSurface
        Relate
        Distance
        Intersection
        ConvexHull
   Other old OpenGis standard inconsistencies fixed.
2014-11-28 00:29:37 +04:00
Sergei Golubchik
3495801e2e 5.5 merge 2014-11-19 17:23:39 +01:00
Sergei Golubchik
84fc27fbef 5.3 merge 2014-11-18 17:36:51 +01:00
Alexey Botchkov
c9742ceac5 MDEV-6883 ST_WITHIN crashes server if (0,0) is matched to POLYGON((0 0)).
Fixed the case when a polygon contains a single-point ring.
2014-11-15 21:30:16 +04:00
Michael Widenius
70823e1d91 MDEV-5120 Test suite test maria-no-logging fails
The reason for the failure was a bug in an include file on debian that causes 'struct stat'
to have different sized depending on the environment.

This patch fixes so that we always include my_global.h or my_config.h before we include any other files.

Other things:
- Removed #include <my_global.h> in some include files; Better to always do this at the top level to have as few
  "always-include-this-file-first' files as possible.
- Removed usage of some include files that where already included by my_global.h or by other files.


client/mysql_plugin.c:
  Use my_global.h first
client/mysqlslap.c:
  Remove duplicated include files
extra/comp_err.c:
  Remove duplicated include files
include/m_string.h:
  Remove duplicated include files
include/maria.h:
  Remove duplicated include files
libmysqld/emb_qcache.cc:
  Use my_global.h first
plugin/semisync/semisync.h:
  Use my_pthread.h first
sql/datadict.cc:
  Use my_global.h first
sql/debug_sync.cc:
  Use my_global.h first
sql/derror.cc:
  Use my_global.h first
sql/des_key_file.cc:
  Use my_global.h first
sql/discover.cc:
  Use my_global.h first
sql/event_data_objects.cc:
  Use my_global.h first
sql/event_db_repository.cc:
  Use my_global.h first
sql/event_parse_data.cc:
  Use my_global.h first
sql/event_queue.cc:
  Use my_global.h first
sql/event_scheduler.cc:
  Use my_global.h first
sql/events.cc:
  Use my_global.h first
sql/field.cc:
  Use my_global.h first
  Remove duplicated include files
sql/field_conv.cc:
  Use my_global.h first
sql/filesort.cc:
  Use my_global.h first
  Remove duplicated include files
sql/gstream.cc:
  Use my_global.h first
sql/ha_ndbcluster.cc:
  Use my_global.h first
sql/ha_ndbcluster_binlog.cc:
  Use my_global.h first
sql/ha_ndbcluster_cond.cc:
  Use my_global.h first
sql/ha_partition.cc:
  Use my_global.h first
sql/handler.cc:
  Use my_global.h first
sql/hash_filo.cc:
  Use my_global.h first
sql/hostname.cc:
  Use my_global.h first
sql/init.cc:
  Use my_global.h first
sql/item.cc:
  Use my_global.h first
sql/item_buff.cc:
  Use my_global.h first
sql/item_cmpfunc.cc:
  Use my_global.h first
sql/item_create.cc:
  Use my_global.h first
sql/item_geofunc.cc:
  Use my_global.h first
sql/item_inetfunc.cc:
  Use my_global.h first
sql/item_row.cc:
  Use my_global.h first
sql/item_strfunc.cc:
  Use my_global.h first
sql/item_subselect.cc:
  Use my_global.h first
sql/item_sum.cc:
  Use my_global.h first
sql/item_timefunc.cc:
  Use my_global.h first
sql/item_xmlfunc.cc:
  Use my_global.h first
sql/key.cc:
  Use my_global.h first
sql/lock.cc:
  Use my_global.h first
sql/log.cc:
  Use my_global.h first
sql/log_event.cc:
  Use my_global.h first
sql/log_event_old.cc:
  Use my_global.h first
sql/mf_iocache.cc:
  Use my_global.h first
sql/mysql_install_db.cc:
  Remove duplicated include files
sql/mysqld.cc:
  Remove duplicated include files
sql/net_serv.cc:
  Remove duplicated include files
sql/opt_range.cc:
  Use my_global.h first
sql/opt_subselect.cc:
  Use my_global.h first
sql/opt_sum.cc:
  Use my_global.h first
sql/parse_file.cc:
  Use my_global.h first
sql/partition_info.cc:
  Use my_global.h first
sql/procedure.cc:
  Use my_global.h first
sql/protocol.cc:
  Use my_global.h first
sql/records.cc:
  Use my_global.h first
sql/records.h:
  Don't include my_global.h
  Better to do this at the upper level
sql/repl_failsafe.cc:
  Use my_global.h first
sql/rpl_filter.cc:
  Use my_global.h first
sql/rpl_gtid.cc:
  Use my_global.h first
sql/rpl_handler.cc:
  Use my_global.h first
sql/rpl_injector.cc:
  Use my_global.h first
sql/rpl_record.cc:
  Use my_global.h first
sql/rpl_record_old.cc:
  Use my_global.h first
sql/rpl_reporting.cc:
  Use my_global.h first
sql/rpl_rli.cc:
  Use my_global.h first
sql/rpl_tblmap.cc:
  Use my_global.h first
sql/rpl_utility.cc:
  Use my_global.h first
sql/set_var.cc:
  Added comment
sql/slave.cc:
  Use my_global.h first
sql/sp.cc:
  Use my_global.h first
sql/sp_cache.cc:
  Use my_global.h first
sql/sp_head.cc:
  Use my_global.h first
sql/sp_pcontext.cc:
  Use my_global.h first
sql/sp_rcontext.cc:
  Use my_global.h first
sql/spatial.cc:
  Use my_global.h first
sql/sql_acl.cc:
  Use my_global.h first
sql/sql_admin.cc:
  Use my_global.h first
sql/sql_analyse.cc:
  Use my_global.h first
sql/sql_audit.cc:
  Use my_global.h first
sql/sql_base.cc:
  Use my_global.h first
sql/sql_binlog.cc:
  Use my_global.h first
sql/sql_bootstrap.cc:
  Use my_global.h first
  Use my_global.h first
sql/sql_cache.cc:
  Use my_global.h first
sql/sql_class.cc:
  Use my_global.h first
sql/sql_client.cc:
  Use my_global.h first
sql/sql_connect.cc:
  Use my_global.h first
sql/sql_crypt.cc:
  Use my_global.h first
sql/sql_cursor.cc:
  Use my_global.h first
sql/sql_db.cc:
  Use my_global.h first
sql/sql_delete.cc:
  Use my_global.h first
sql/sql_derived.cc:
  Use my_global.h first
sql/sql_do.cc:
  Use my_global.h first
sql/sql_error.cc:
  Use my_global.h first
sql/sql_explain.cc:
  Use my_global.h first
sql/sql_expression_cache.cc:
  Use my_global.h first
sql/sql_handler.cc:
  Use my_global.h first
sql/sql_help.cc:
  Use my_global.h first
sql/sql_insert.cc:
  Use my_global.h first
sql/sql_lex.cc:
  Use my_global.h first
sql/sql_load.cc:
  Use my_global.h first
sql/sql_locale.cc:
  Use my_global.h first
sql/sql_manager.cc:
  Use my_global.h first
sql/sql_parse.cc:
  Use my_global.h first
sql/sql_partition.cc:
  Use my_global.h first
sql/sql_plugin.cc:
  Added comment
sql/sql_prepare.cc:
  Use my_global.h first
sql/sql_priv.h:
  Added error if we use this before including my_global.h
  This check is here becasue so many files includes sql_priv.h first.
sql/sql_profile.cc:
  Use my_global.h first
sql/sql_reload.cc:
  Use my_global.h first
sql/sql_rename.cc:
  Use my_global.h first
sql/sql_repl.cc:
  Use my_global.h first
sql/sql_select.cc:
  Use my_global.h first
sql/sql_servers.cc:
  Use my_global.h first
sql/sql_show.cc:
  Added comment
sql/sql_signal.cc:
  Use my_global.h first
sql/sql_statistics.cc:
  Use my_global.h first
sql/sql_table.cc:
  Use my_global.h first
sql/sql_tablespace.cc:
  Use my_global.h first
sql/sql_test.cc:
  Use my_global.h first
sql/sql_time.cc:
  Use my_global.h first
sql/sql_trigger.cc:
  Use my_global.h first
sql/sql_udf.cc:
  Use my_global.h first
sql/sql_union.cc:
  Use my_global.h first
sql/sql_update.cc:
  Use my_global.h first
sql/sql_view.cc:
  Use my_global.h first
sql/sys_vars.cc:
  Added comment
sql/table.cc:
  Use my_global.h first
sql/thr_malloc.cc:
  Use my_global.h first
sql/transaction.cc:
  Use my_global.h first
sql/uniques.cc:
  Use my_global.h first
sql/unireg.cc:
  Use my_global.h first
sql/unireg.h:
  Removed inclusion of my_global.h
storage/archive/ha_archive.cc:
  Added comment
storage/blackhole/ha_blackhole.cc:
  Use my_global.h first
storage/csv/ha_tina.cc:
  Use my_global.h first
storage/csv/transparent_file.cc:
  Use my_global.h first
storage/federated/ha_federated.cc:
  Use my_global.h first
storage/federatedx/federatedx_io.cc:
  Use my_global.h first
storage/federatedx/federatedx_io_mysql.cc:
  Use my_global.h first
storage/federatedx/federatedx_io_null.cc:
  Use my_global.h first
storage/federatedx/federatedx_txn.cc:
  Use my_global.h first
storage/heap/ha_heap.cc:
  Use my_global.h first
storage/innobase/handler/handler0alter.cc:
  Use my_global.h first
storage/maria/ha_maria.cc:
  Use my_global.h first
storage/maria/unittest/ma_maria_log_cleanup.c:
  Remove duplicated include files
storage/maria/unittest/test_file.c:
  Added comment
storage/myisam/ha_myisam.cc:
  Move sql_plugin.h first as this includes my_global.h
storage/myisammrg/ha_myisammrg.cc:
  Use my_global.h first
storage/oqgraph/oqgraph_thunk.cc:
  Use my_config.h and my_global.h first
  One could not include my_global.h before oqgraph_thunk.h (don't know why)
storage/spider/ha_spider.cc:
  Use my_global.h first
storage/spider/hs_client/config.cpp:
  Use my_global.h first
storage/spider/hs_client/escape.cpp:
  Use my_global.h first
storage/spider/hs_client/fatal.cpp:
  Use my_global.h first
storage/spider/hs_client/hstcpcli.cpp:
  Use my_global.h first
storage/spider/hs_client/socket.cpp:
  Use my_global.h first
storage/spider/hs_client/string_util.cpp:
  Use my_global.h first
storage/spider/spd_conn.cc:
  Use my_global.h first
storage/spider/spd_copy_tables.cc:
  Use my_global.h first
storage/spider/spd_db_conn.cc:
  Use my_global.h first
storage/spider/spd_db_handlersocket.cc:
  Use my_global.h first
storage/spider/spd_db_mysql.cc:
  Use my_global.h first
storage/spider/spd_db_oracle.cc:
  Use my_global.h first
storage/spider/spd_direct_sql.cc:
  Use my_global.h first
storage/spider/spd_i_s.cc:
  Use my_global.h first
storage/spider/spd_malloc.cc:
  Use my_global.h first
storage/spider/spd_param.cc:
  Use my_global.h first
storage/spider/spd_ping_table.cc:
  Use my_global.h first
storage/spider/spd_sys_table.cc:
  Use my_global.h first
storage/spider/spd_table.cc:
  Use my_global.h first
storage/spider/spd_trx.cc:
  Use my_global.h first
storage/xtradb/handler/handler0alter.cc:
  Use my_global.h first
storage/xtradb/handler/i_s.cc:
  Use my_global.h first
2014-09-30 20:31:14 +03:00
Sergei Golubchik
ff2e82f4a1 5.3 merge 2014-02-22 22:51:20 +01:00
Alexey Botchkov
820b1a6687 MDEV-5615 crash in Gcalc_function::add_operation.
The result is EMPTY for a buffer(line, -1), but we still
need one FALSE operation to be stored in the condition.
And we actually add it but forgot to alloc memory to store it.
2014-02-18 17:15:25 +04:00
Alexey Botchkov
508d40fbdb MDEV-4788 check mysql-5.5 changes in spatial.cc.
Additional patch for the 5.5.
2013-10-10 14:20:35 +05:00
Alexey Botchkov
ae82601035 MDEV-3856 Import of a large polygon fails/hangs.
The Gis_point::init_from_wkt called the String::realloc(),
        and this call is quite slow in the DEBUG mode. Which makes
        loading the huge polygon hang forever.
        Fixed by using the String::realloc(size, inc_size) version instead
        as it's done for other spatial features.
2013-10-09 17:30:50 +05:00
Igor Babaev
4eddb2c221 Merge 5.3->5.5.
In particular:
Merged the patch for bug mdev-4418 from 5.3 into 5.5.
Fixed a bug in the patch that should be backported to 5.3.
2013-08-18 19:58:51 -07:00
Igor Babaev
960720b10d Merge 5.2->5.3 2013-08-15 14:04:20 -07:00
Alexey Botchkov
9b67de4797 MDEV-4478 check mysql-5.5 changes in spatial.cc.
not_enough_points() introduced to check if the spatial object is incorrect.
2013-07-22 00:55:06 +05:00
Sergei Golubchik
005c7e5421 mysql-5.5.32 merge 2013-07-16 19:09:54 +02:00
Georgi Kodinov
00ee67dece merge 2013-03-28 17:41:22 +02:00
Georgi Kodinov
e927bda69f Addendum #1 to the fix for bug #16451878 : GEOMETRY QUERY CRASHES SERVER
Fixed the get_data_size() methods for multi-point features to check properly for end 
of their respective data arrays.
Extended the point checking function to take a 3d optional argument so cases where
there's additional data in each array element (besides the point data itself) can be
covered by the helper function.
Fixed the 3 cases where such offset was present to use the proper checking helper 
function.
Test cases added.
Fixed review comments.
2013-03-28 17:37:29 +02:00
Georgi Kodinov
0cbb7ddcd6 merge 5.1->5.5 2013-03-27 16:06:33 +02:00
Georgi Kodinov
e7c48834ff Bug #16451878: GEOMETRY QUERY CRASHES SERVER
The GIS WKB reader was checking for the presence of
enough data by first multiplying the number read (where
it could overflow) and only then comparing it to the
number of bytes available.
This can overflow and effectively turn off the check.
Fixed by:
1. Introducing a new function that does division only so
no overflow is possible.
2. Using the proper macros and parenthesizing them.
3. Doing an in-line division check in the only place where
the boundary check is done over a data structure other
than a dense points array.
2013-03-27 16:03:00 +02:00
Sergei Golubchik
6599fd3e9c 5.3 merge 2013-03-27 10:03:28 +01:00
Sergei Golubchik
e308d7417b 5.2 merge 2013-03-26 19:09:47 +01:00
Alexey Botchkov
045c498691 GEOMETRYCOLLECTION EMPTY handling fixed.
The get_mbr() method shouldn't return the error, rather an invalid MBR
          in this case.
2013-03-26 21:47:06 +04:00
Alexey Botchkov
ef737284b4 MDEV-4295 Server crashes in get_point on a query with Area, AsBinary, MultiPoint.
Need to check if the number of points is 0 for the polygon.
2013-03-19 17:25:58 +04:00
Alexey Botchkov
15a7335d77 MDEV-4296 Assertion `n_linear_rings > 0' fails in Gis_polygon::centroid_xy.
Forgotten DBUG_ASSERT should be replaced with the 'return error'.
2013-03-19 17:16:10 +04:00
Alexey Botchkov
589247ae86 MDEV-4252 geometry query crashes server.
Additional fixes for possible overflows in length-related
    calculations in 'spatial' implementations.
    Checks added to the ::get_data_size() methods.
    max_n_points decreased to occupy less 2G size. An
    object of that size is practically inoperable anyway.
2013-03-18 17:58:00 +04:00
Alexey Botchkov
511b943263 MDEV-4252 geometry query crashes server.
The bug was found by Alyssa Milburn.
      If the number of points of a geometry feature read from
      binary representation is greater than 0x10000000, then
      the (uint32) (num_points * 16) will cut the higher byte,
      which leads to various errors.
      Fixed by additional check if (num_points > max_n_points).
2013-03-10 23:08:05 +04:00
Alexey Botchkov
7fb55ee807 TODO-424 geometry query crashes server.
The bug was found by Alyssa Milburn.
        If the number of points of a geometry feature read from
        binary representation is greater than 0x10000000, then
        the (uint32) (num_points * 16) will cut the higher byte,
        which leads to various errors.
        Fixed by additional check if (num_points > max_n_points).
2013-03-06 01:45:25 +04:00
Murthy Narkedimilli
053d7e775c Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
unknown
3f59033536 Merge MariaDB 5.1.66 -> 5.2 -> 5.3 2012-11-09 10:11:20 +02:00
unknown
7c23d6d0c6 Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
Sergei Golubchik
ee9afef271 mysql-5.5.28 2012-10-16 13:04:42 +02:00
Alexander Barkov
444a081c83 Merging from 5.5 2012-08-17 13:18:56 +04:00
Alexander Barkov
5aec4e2b3b Backporting Bug 14100466 from 5.6. 2012-08-17 13:14:04 +04:00
Sergei Golubchik
0522307ed1 mysql-5.5 merge 2012-06-14 20:05:31 +02:00
Sergei Golubchik
7f6f53a8df 5.2 merge 2012-05-20 14:57:29 +02:00
Sergei Golubchik
0a8c9b98f6 merge with mysql-5.1.63 2012-05-17 12:12:33 +02:00
Sergei Golubchik
431e042b5d c 2012-05-21 15:30:25 +02:00
Joerg Bruehe
5be07ceadd Merge 5.5.24 back into main 5.5.
This is a weave merge, but without any conflicts.
In 14 source files, the copyright year needed to be updated to 2012.
2012-05-07 22:20:42 +02:00
Ramil Kalimullin
d371d53945 Auto-merge from mysql-5.1-security. 2012-03-05 22:36:56 +04:00
Ramil Kalimullin
8aea62fa8a Fix for BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS
Problem:      
lack of incoming geometry data validation may 
lead to a server crash when ISCLOSED() function called.

Solution:
necessary incoming data check added.


mysql-test/r/gis.result:
  Fix for BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS
    test result.
mysql-test/t/gis.test:
  Fix for BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS 
    test case.
sql/spatial.cc:
  Fix for BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS 
    check if a LINESTRING has at least one point as we 
  rely on that further.
2012-03-05 21:58:07 +04:00
Michael Widenius
6d4224a31c Merge with 5.2.
no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
2011-12-11 11:34:44 +02:00
Sergei Golubchik
effed09bd7 5.3->5.5 merge 2011-11-27 17:46:20 +01:00
Alexey Botchkov
7b08d99627 fixes to make compilers happy.
per-file comments:
  mysql-test/t/gis-precise.test
        number-to-string conversion differs on Windows.
        Have to tolerate this while GIS data is stored in doubles.
  sql/spatial.cc
        prev_x initialization added.
2011-11-24 16:26:13 +04:00
Michael Widenius
a8d03ab235 Initail merge with MySQL 5.1 (XtraDB still needs to be merged)
Fixed up copyright messages.
2011-11-21 19:13:14 +02:00
Alexey Botchkov
53ad390ff0 fix for 857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON
return GEOMETRYCOLLECTION EMPTY, not NULL for the query

per-file comments:
  mysql-test/r/gis.result
fix for 857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON
        test result updated.
  sql/spatial.cc
fix for 857050 ST_WITHIN returns wrong result with MULTIPOINT and POLYGON
        return of the Geometry::envelope() changed for the empty geometry.
2011-09-23 15:05:36 +05:00
Alexey Botchkov
5123f59ed2 fixed bugs
855485  ST_CROSSES returns different result than PostGIS for overlapping polygons
855487  ST_WITHIN returns wrong result for partially overlapping polygons
855492  ST_WITHIN returns TRUE on point on the edge of a polygon
855497  ST_ENVELOPE of GEOMETRYCOLLECTION EMPTY returns NULL and not GEOMETRYCOLLECTION EMPTY
855503  ST_EQUALS reports TRUE between a POLYGON and a MULTILINESTRING
855505  ST_TOUCHES reports TRUE for intersecting polygon and linestring

        Changed the way weird functions like Crosses or Touches treated.
        Added BORDER handling to the Gcalc_function.

per-file comments:
  mysql-test/r/gis-precise.result
        GIS bugs fixed.
        test result updated.
  mysql-test/t/gis-precise.test
        GIS bugs fixed.
        test cases added.
  sql/gcalc_slicescan.h
        GIS bugs fixed.
  sql/gcalc_tools.cc
        GIS bugs fixed.
  sql/gcalc_tools.h
        GIS bugs fixed.
  sql/item_create.cc
        GIS bugs fixed.
  sql/item_geofunc.cc
        GIS bugs fixed.
  sql/item_geofunc.h
        GIS bugs fixed.
  sql/spatial.cc
        GIS bugs fixed.
2011-09-22 18:53:36 +05:00
Alexey Botchkov
d0f2e1e551 bug 855336 ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
per-file comments:
  mysql-test/r/gis.result
bug 855336      ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
        test result updated.
  mysql-test/t/gis.test
bug 855336      ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
        test case added.
  sql/item_geofunc.cc
bug 855336      ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
        geom_length() call fixed.
  sql/spatial.cc
bug 855336      ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
        Geometry_collection::geom_length implemented.
  sql/spatial.h
bug 855336      ST_LENGTH does not work on GEOMETRYCOLLECTIONs fixed.
        Geometry_collection::geom_length declaration added.
2011-09-21 13:26:21 +05:00
Alexey Botchkov
6b64baf3b9 fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
per-file comments:
  mysql-test/r/gis.result
fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
        test result updated.
  mysql-test/t/gis.test
fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
        test case added.
  sql/gstream.cc
fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
        lookup_next_word() implemented.
  sql/gstream.h
fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
        lookup_next_word() added.
  sql/spatial.cc
fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
        name changed for the empty geometry.
  sql/spatial.h
fix for bug 848926 GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"
        declarations modified.
2011-09-21 12:50:03 +05:00
Alexey Botchkov
25b5019c34 bugs fixed
855253 Compiler error: gcalc_slicescan.cc:2036: error: suggest parentheses around comparison in operand of .|. in maria-5.3-gis
        850775 ST_AREA does not work on GEOMETRYCOLLECTIONs in maria-5.3-gis

per-file comments:
  mysql-test/r/gis.result
        test result updated.
  mysql-test/t/gis.test
        test case added for 850775.
  sql/gcalc_slicescan.cc
        compiler error fixed.
  sql/spatial.cc
        ST_AREA implementation for GEOMETRY_COLLECTION, POINT and LINESTRING.
  sql/spatial.h
        area() declarations added.
2011-09-21 09:29:37 +05:00
Alexey Botchkov
0249413a6a several bugs fixed here.
849789  Second assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
        849791  Fourth assertion `n > 0 && n < SINUSES_CALCULATED*2+1' in get_n_sincos
        849789  Second assertion `m_poly_borders->next' failed in Gcalc_operation_reducer::count_slice in maria-5.3-gis
        848901   Assertion `fabs(cur_isc->x-m_cur_intersection->x) + fabs(cur_isc->y-m_cur_intersection->y) < 0.000000000001' failed in Gcalc_scan_iterator::intersection_scan() in maria-5.3-gis
        
per-file comments:
  mysql-test/r/gis-precise.result
        test result updated.
  mysql-test/r/gis.result
        test result updated.
  sql/gcalc_slicescan.cc
        bugfixes.
  sql/gcalc_slicescan.h
        bugfixes.
  sql/gcalc_tools.cc
        bugfixes.
  sql/gcalc_tools.h
        bugfixes.
  sql/item_geofunc.cc
        bugfixes.
  sql/spatial.cc
        bugfixes.
2011-09-21 00:04:41 +05:00
Alexey Botchkov
eefff87652 bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
We didn't implement an empty geometry. And returning NULL instead of it is not
    quite correct. So here is the implementation of the empty value as GEOMETRYCOLLECTION().

per-file comments:
  mysql-test/r/gis-precise.result
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
    test result updated.

  mysql-test/r/gis.result
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
    test result updated.

  mysql-test/t/gis-precise.test
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
    test case added.

  mysql-test/t/gis.test
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
    test case added.

  sql/field.cc
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
    store GEOMETRYCOLLECTION() properly.

  sql/gcalc_tools.cc
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
    create the GEOMETRYCOLLECTION() for the empty result.

  sql/gstream.h
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
    next_symbol() added.

  sql/spatial.cc
bug 801466 ST_INTERSECTION() returns invalid value on empty intersection in maria-5.3-gis.
    code modified to handle 0 geometries in the GEOMETRYCOLLECTION properly.
2011-09-04 19:11:04 +05:00