Commit graph

13 commits

Author SHA1 Message Date
unknown
6d54b5771b Bug #30286 spatial index cause corruption and server crash!
As the result of DOUBLE claculations can be bigger
than DBL_MAX constant we use in code, we shouldn't use this constatn
as a biggest possible value.
Particularly the rtree_pick_key function set 'min_area= DBL_MAX' relying
that any rtree_area_increase result will be less so we return valid
key. Though in rtree_area_increase function we calculate the area
of the rectangle, so the result can be 'inf' if the rectangle is
huge enough, which is bigger than DBL_MAX.

Code of the rtree_pick_key modified so we always return a valid key.


myisam/rt_index.c:
  Bug #30286 spatial index cause corruption and server crash!
  
  always set the best_key with the first key we get, so we always return
  somthing valid.
myisam/rt_mbr.c:
  Bug #30286 spatial index cause corruption and server crash!
  
  function comment extended
mysql-test/r/gis-rtree.result:
  Bug #30286 spatial index cause corruption and server crash!
  test result
mysql-test/t/gis-rtree.test:
  Bug #30286 spatial index cause corruption and server crash!
  test case
2007-10-05 15:40:32 +05:00
unknown
0b235009e6 Bug#17877 - Corrupted spatial index
CHECK TABLE could complain about a fully intact spatial index.
A wrong comparison operator was used for table checking. 
The result was that it checked for non-matching spatial keys. 
This succeeded if at least two different keys were present, 
but failed if only the matching key was present.

I fixed the key comparison.


myisam/mi_check.c:
  Bug#17877 - Corrupted spatial index
  Fixed the comparison operator for checking a spatial index.
  Using MBR_EQUAL | MBR_DATA to compare for equality and
  include the data pointer in the comparison. The latter
  finds the index entry that points to the current record.
  This is necessary for non-unique indexes.
  
  The old operator, SEARCH_SAME, is unknown to the rtree
  search functions and handled like MBR_DISJOINT.
myisam/mi_key.c:
  Bug#17877 - Corrupted spatial index
  Added a missing DBUG_RETURN.
myisam/rt_index.c:
  Bug#17877 - Corrupted spatial index
  Included the data pointer in the copy of the search key.
  This is necessary for searching the index entry that points
  to a specific record if the search_flag contains MBR_DATA.
myisam/rt_mbr.c:
  Bug#17877 - Corrupted spatial index
  Extended the RT_CMP() macro with an assert for an 
  unexpected comparison operator.
mysql-test/r/gis-rtree.result:
  Bug#17877 - Corrupted spatial index
  The test result.
mysql-test/t/gis-rtree.test:
  Bug#17877 - Corrupted spatial index
  The test case.
2006-06-28 14:27:37 +02:00
unknown
bc6652db9b Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)


client/mysql.cc:
  Fix compiler warnings
client/mysqltest.c:
  Fix wrong counting of lines
  Remove compiler warnings
heap/hp_hash.c:
  Fix compiler warnings
innobase/dict/dict0load.c:
  Fix compiler warnings
innobase/include/mem0mem.h:
  Fix compiler warnings
libmysql/client_settings.h:
  Fix compiler warnings
myisam/ft_nlq_search.c:
  Add comments about compiler warnings
myisam/rt_index.c:
  Add comments about compiler warnings
myisam/rt_mbr.c:
  Add comments about compiler warnings
mysql-test/r/ps.result:
  Test case for bug#6094
mysql-test/t/ps.test:
  Test case for bug#6094
mysys/hash.c:
  Fix compiler warnings
mysys/my_handler.c:
  Add comments about compiler warnings
mysys/my_thr_init.c:
  Add comments about compiler warnings
ndb/include/mgmapi/mgmapi.h:
  Fix compiler warnings
regex/main.c:
  Fix compiler warnings
sql/item.h:
  Fix compiler warnings
sql/item_func.h:
  Add comments about compiler warnings
sql/spatial.h:
  Add comments about compiler warnings
sql/sql_lex.h:
  Fix compiler warning
sql/sql_list.h:
  Fix compiler warning
sql/sql_parse.cc:
  Move testing of access rights of tables in CREATE ... SELECT to create_table_precheck() to fix privilege checking in CREATE ... SELECT
  (Bug #6094)
sql/sql_prepare.cc:
  Remove not needed empty line
sql/sql_string.h:
  Fix compiler warnings
strings/ctype-mb.c:
  Fix compiler warnings
2004-10-22 18:44:51 +03:00
unknown
d8a92015a2 Fix for bug #5532 (error 22 inserting GIS data)
This bug is the result of weird error happening with mi_float8get and double
arythmetic. I described that in 'Bug that looks potentially dangerous' email


myisam/rt_mbr.c:
  *ab_area was changed with the local variable just to make the function
  working without errors
mysql-test/r/gis.result:
  appropriate test result
mysql-test/t/gis.test:
  Test case
2004-09-15 19:46:42 +05:00
unknown
2a32bb2be3 portability fix 2004-06-03 02:13:19 +03:00
unknown
d55cb81cb0 Merging
myisam/rt_index.c:
  Auto merged
myisam/rt_index.h:
  Auto merged
myisam/rt_mbr.c:
  Auto merged
myisam/rt_mbr.h:
  Auto merged
myisam/rt_split.c:
  Auto merged
myisam/rt_test.c:
  Auto merged
sql/spatial.cc:
  Auto merged
2004-06-02 19:17:35 +05:00
unknown
21dea7fc0b wl 1562 (To improve RTree indexes)
some changes to make code nicer


include/myisampack.h:
  mi_sint1korr and similar things added to do conversion in an
  uniform way
myisam/rt_index.c:
  'if' simplified
myisam/rt_mbr.c:
  some fixes to make code nicer and smaller
myisam/rt_test.c:
  some modifications to extend test
mysql-test/r/gis-rtree.result:
  result became slightly different because of changes made
2004-06-02 19:11:57 +05:00
unknown
c690204c70 WL#1562 (Improving spatial code)
A set of changes improving our RTree indexes and fixed few bugs
found during the tests


myisam/rt_index.c:
  Algorythm for picking the branch to insert was fixed.
  pick_by_perimeter version of the algorythm added (mostly for testing
  purposes)
myisam/rt_index.h:
  minimal size of the page set to 1/3
  It noticeable increases searching performance
myisam/rt_key.c:
  counting of the size of the filled part of the page fixed
  rtree_choose_key moved to rt_index.c
myisam/rt_key.h:
  no need to make rtree_choose_key global
myisam/rt_mbr.c:
  operations for counting the perimeter of MBR added
myisam/rt_mbr.h:
  interface for rtree_perimeter_increase
myisam/rt_split.c:
  my_multi_malloc changed with my_alloca
sql/spatial.cc:
  LINESTRING object can consist of single point
2004-05-25 15:06:32 +05:00
unknown
3bf2e442ab WL#1163 To make spatial code optional
myisam spatial code isolated


myisam/mi_create.c:
  spatial code ifdef-ed
myisam/mi_key.c:
  spatial code ifdef-ed
myisam/mi_open.c:
  spatial code ifdef-ed
myisam/mi_range.c:
  spatial code ifdef-ed
myisam/mi_rkey.c:
  spatial code ifdef-ed
myisam/mi_rnext.c:
  spatial code ifdef-ed
myisam/mi_rnext_same.c:
  spatial code ifdef-ed
myisam/rt_index.c:
  spatial code ifdef-ed
myisam/rt_index.h:
  spatial code ifdef-ed
myisam/rt_key.c:
  spatial code ifdef-ed
myisam/rt_key.h:
  spatial code ifdef-ed
myisam/rt_mbr.c:
  spatial code ifdef-ed
myisam/rt_mbr.h:
  spatial code ifdef-ed
myisam/rt_split.c:
  spatial code ifdef-ed
myisam/rt_test.c:
  spatial code ifdef-ed
myisam/sp_defs.h:
  spatial code ifdef-ed
myisam/sp_key.c:
  spatial code ifdef-ed
myisam/sp_test.c:
  spatial code ifdef-ed
sql/spatial.cc:
  spatial code ifdef-ed
sql/spatial.h:
  spatial code ifdef-ed
sql/sql_yacc.yy:
  wrong error messages fixed
2004-03-12 18:51:03 +04:00
unknown
e2c7d5d7ec Windows build fix 2003-01-18 14:04:34 -08:00
unknown
61434bf8e8 Change client_flag to unsigned long (16 -> 32 bits) to handle more options.
Don't use new password format if mysql.user has old format
tables_priv was not reset on FLUSH PRIVILEGES if tables_priv was empty
Portability fixes for Windows


client/mysql.cc:
  Removed compiler warnings.
  Make quote handling simpler
include/config-win.h:
  Fix for myisam/rt_mbr.c
include/mysql.h:
  Change client_flag to unsigned long to handle more options.
libmysql/libmysql.c:
  Change client_flag to unsigned long to handle more options.
libmysqld/libmysqld.c:
  Change client_flag to unsigned long to handle more options.
myisam/rt_mbr.c:
  Portability fix for Windows
mysql-test/r/rpl_loaddata.result:
  Fix test case
sql/item_strfunc.cc:
  Don't use new password format if mysql.user has old format
sql/item_strfunc.h:
  Don't use new password format if mysql.user has old format
sql/mysql_priv.h:
  Don't use new password format if mysql.user has old format
sql/mysqld.cc:
  Don't use new password format if mysql.user has old format
sql/sql_acl.cc:
  Don't use new password format if mysql.user has old format.
  tables_priv was not reset on FLUSH PRIVILEGES if tables_priv was empty
sql/sql_class.h:
  Don't use new password format if mysql.user has old format
sql/sql_parse.cc:
  Change client_flag to unsigned long to handle more options.
sql/sql_yacc.yy:
  Don't use new password format if mysql.user has old format
strings/ctype-utf8.c:
  Remove compiler warnings
strings/ctype-win1250ch.c:
  Remove compiler warnings
tests/grant.res:
  Update results
2003-01-18 16:39:21 +02:00
unknown
3adee5046d MI_KEYSEG -> HA_KEYSEG
_mi_key_cmp -> ha_key_cmp


BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2002-04-25 15:10:29 +05:00
unknown
3d5dc65dfd This ChangeSet adds RTREE support into myisam library.
RTREEs will be used for GIS extension in MySQL


myisam/.cvsignore:
  Added sp_test and rt_test
myisam/Makefile.am:
  Added RTREE files
myisam/mi_create.c:
  Added RTREE/SPATIAL initialization
myisam/mi_delete.c:
  Switched to use virual function, instead of mi_ck_delete() direct call
myisam/mi_key.c:
  Added sp_make_key() call in the case of SPATIAL index type
myisam/mi_open.c:
  Added some new initialization actions which depend on key_alg being used: RTREE or BTREE
myisam/mi_range.c:
  Rtree estimation
myisam/mi_rkey.c:
  rtree
myisam/mi_rnext.c:
  rtree
myisam/mi_rnext_same.c:
  rtree
myisam/mi_static.c:
  New search flags for bounding rectungles
myisam/mi_test1.c:
  one now should always specify key_alg during keyinfo initializing: BTREE or RTREE
myisam/mi_test2.c:
  Added key_alg initializing
myisam/mi_test3.c:
  Added key_alg initialization
myisam/mi_update.c:
  Switched to virtual functions, instead of mi_ck_delete/mi_ck_write direct call
myisam/mi_write.c:
  Virtual function instead of mi_ck_write() direct call
myisam/myisamdef.h:
  Rtree additions
2002-02-20 14:11:21 +04:00