1. 24 Nov, 2007 1 commit
  2. 20 Nov, 2007 1 commit
  3. 19 Nov, 2007 1 commit
    • unknown's avatar
      Bug #30284 spatial key corruption. · da1efa33
      unknown authored
      SPATIAL key is fine actually, but the chk_key() function
      mistakenly returns error. It tries to compare checksums
      of btree and SPATIAL keys while the checksum for the SPATIAL isn't
      calculated (always 0). Same thing with FULLTEXT keys is handled
      using full_text_keys counter, so fixed by counting both
      SPATIAL and FULLTEXT keys in that counter.
      
      
      myisam/mi_check.c:
        Bug #30284 spatial key corruption
        
        full_text_keys counts both FULL_TEXT and SPATIAL keys
      mysql-test/r/gis.result:
        Bug #30284 spatial key corruption
        
        test result
      mysql-test/t/gis.test:
        Bug #30284 spatial key corruption.
        
        test case
      da1efa33
  4. 17 Nov, 2007 1 commit
  5. 14 Nov, 2007 1 commit
  6. 13 Nov, 2007 2 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1-opt · 9248b402
      unknown authored
      into  mysql.com:/home/hf/work/31305/my41-31305
      
      
      9248b402
    • unknown's avatar
      Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) · eb347921
      unknown authored
      max_length parameter for BLOB-returning functions must be big enough
      for any possible content. Otherwise the field created for a table
      will be too small.
      
      
      mysql-test/r/gis.result:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        test result
      mysql-test/t/gis.test:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        test case
      sql/field.cc:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        max_field_size used instead of numeric value
      sql/field.h:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        max_field_size constant defined
      sql/item_geofunc.cc:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        max_length parameter fixed
      eb347921
  7. 12 Nov, 2007 4 commits
    • unknown's avatar
      symlink.test, symlink.result: · 9f9ff461
      unknown authored
        Use proper variable for test.
      
      
      mysql-test/t/symlink.test:
        Use proper variable for test.
      mysql-test/r/symlink.result:
        Use proper variable for test.
      9f9ff461
    • unknown's avatar
      After merge fix. · 88701b45
      unknown authored
      88701b45
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.0 · a1e38552
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines
      
      
      mysys/my_symlink2.c:
        Auto merged
      mysql-test/r/symlink.result:
        SCCS merged
      mysql-test/t/symlink.test:
        SCCS merged
      a1e38552
    • unknown's avatar
      Bug #31305 myisam tables crash when they are near capacity. · cb927e2f
      unknown authored
      When we insert a record into MYISAM table which is almost 'full',
      we first write record data in the free space inside a file, and then
      check if we have enough space after the end of the file.
      So if we don't have the space, table will left corrupted.
      Similar error also happens when we updata MYISAM tables.
      
      Fixed by modifying write_dynamic_record and update_dynamic_record functions
      to check for free space before writing parts of a record
      
      
      BitKeeper/etc/ignore:
        Added libmysql_r/client_settings.h libmysqld/ha_blackhole.cc to the ignore list
      myisam/mi_dynrec.c:
        Bug #31305 myisam tables crash when they are near capacity.
        
        now we check space left in table in write_dynamic_record
        and update_dynamic_record functions.
        If we don't have enough room for the new (updated) record, return with the
        error.
      mysql-test/r/almost_full.result:
        New BitKeeper file ``mysql-test/r/almost_full.result''
      mysql-test/t/almost_full.test:
        New BitKeeper file ``mysql-test/t/almost_full.test''
      cb927e2f
  8. 10 Nov, 2007 1 commit
    • unknown's avatar
      Bug #32063 "create table like" works case-significant only in "embedded" server (libmysqld) · 06323c2b
      unknown authored
      in mysql_creata_like_table() we 'downcase' the complete path to the
      .frm file. It works fine in standalone case as there usually
      we only have './' as a path to the datahome, but doesn't work in
      the embedded server where we add the real path there, so if a
      directory has uppercase letters in it's name, it won't be found.
      
      Fixed by 'downcasing' only database/table pair.
      
      
      sql/sql_table.cc:
        Bug #32063 "create table like" works case-significant only in "embedded" server (libmysqld)
        
        do not lowercase the database directory
      06323c2b
  9. 08 Nov, 2007 1 commit
  10. 07 Nov, 2007 1 commit
    • unknown's avatar
      Fix for bug #32103: optimizer crash when join on int and mediumint with · 0a7a55d1
      unknown authored
      variable in where clause.
      
      Problem: the new_item() method of Item_uint used an incorrect
      constructor. "new Item_uint(name, max_length)" calls
      Item_uint::Item_uint(const char *str_arg, uint length) which assumes the
      first argument to be the string representation of the value, not the
      item's name. This could result in either a server crash or incorrect
      results depending on usage scenarios.
      
      Fixed by using the correct constructor in new_item():
      Item_uint::Item_uint(const char *str_arg, longlong i, uint length).
      
      
      mysql-test/r/select.result:
        Added a test case for bug #32103.
      mysql-test/t/select.test:
        Added a test case for bug #32103.
      sql/item.h:
        Use the correct constructor for Item_uint in Item_uint::new_item().
      0a7a55d1
  11. 06 Nov, 2007 1 commit
    • unknown's avatar
      BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE · ff4b438b
      unknown authored
      RENAME TABLE against a table with DATA/INDEX DIRECTORY overwrites
      the file to which the symlink points.
      
      This is security issue, because it is possible to create a table with
      some name in some non-system database and set DATA/INDEX DIRECTORY
      to mysql system database. Renaming this table to one of mysql system
      tables (e.g. user, host) would overwrite the system table.
      
      Return an error when the file to which the symlink points exist.
      
      
      mysql-test/r/symlink.result:
        A test case for BUG#32111.
      mysql-test/t/symlink.test:
        A test case for BUG#32111.
      mysys/my_symlink2.c:
        Return an error when the file to which the symlink points exist.
      ff4b438b
  12. 02 Nov, 2007 3 commits
  13. 30 Oct, 2007 3 commits
    • unknown's avatar
      Merge stella.local:/home2/mydev/mysql-4.1-amain · 967c06df
      unknown authored
      into  stella.local:/home2/mydev/mysql-4.1-axmrg
      
      
      967c06df
    • unknown's avatar
      BUG#11392 - fulltext search bug · b698b6fd
      unknown authored
      Fulltext boolean mode phrase search may crash server on platforms
      where size of pointer is not equal to size of unsigned integer
      (in other words some 64-bit platforms).
      
      The problem was integer overflow.
      
      Affects 4.1 only.
      
      
      myisam/ft_boolean_search.c:
        my_match_t::beg is unsigned int, that means type of expression
        (m[0].beg - 1) has unsigned type too. It may happen that instr()
        finds substring in the beggining of passed string, returning
        m[0].beg equal to 0. In this case value of expression (m[0].beg - 1)
        is equal to MAX_UINT.
        
        This is not a problem on platforms where sizeof(pointer) equals to
        sizeof(uint). That means ptr[(uint)-1] = ptr[(uint)MAX_UINT] = ptr - 1.
        
        On some 64-bit platforms where sizeof(pointer) is 8 and sizeof(uint)
        is 4, wrong address gets accessed. In other words ptr[(uint)-1] is
        equal to ptr + MAX_UINT.
      mysql-test/r/fulltext.result:
        A test case for BUG#11392.
      mysql-test/t/fulltext.test:
        A test case for BUG#11392.
      b698b6fd
    • unknown's avatar
      Bug #31758 inet_ntoa, oct crashes server with null+filesort · e722393f
      unknown authored
      Item_func_inet_ntoa and Item_func_conv inherit 'maybe_null' flag from an
      argument, which is wrong.
      Both can be NULL with notnull arguments, so that's fixed.
      
      
      mysql-test/r/func_str.result:
        Bug #31758 inet_ntoa, oct crashes server with null+filesort
        
        test case
      mysql-test/t/func_str.test:
        Bug #31758 inet_ntoa, oct crashes server with null+filesort
        
        test result
      sql/item_strfunc.h:
        Bug #31758 inet_ntoa, oct crashes server with null+filesort
        
        missing maybe_null flags set for Item_func_inet_ntoa and Item_func_conv
      e722393f
  14. 29 Oct, 2007 1 commit
  15. 25 Oct, 2007 1 commit
    • unknown's avatar
      add new trigger to prevent certain naming clashes · 80241b44
      unknown authored
      
      BitKeeper/triggers/pre-commit.check-case.pl:
        catch duplicate file names, ignoring capitalisation, mostly to avoid changesets where a deleted file foobar and a deleted file FooBar break a tree on case insensitive file systems
      80241b44
  16. 24 Oct, 2007 2 commits
    • unknown's avatar
      Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines · 4fda18a3
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-4.1-engines
      
      
      4fda18a3
    • unknown's avatar
      BUG#31159 - fulltext search on ucs2 column crashes server · 660d6626
      unknown authored
      ucs2 doesn't provide required by fulltext ctype array. Crash
      happens because fulltext attempts to use unitialized ctype
      array.
      
      Fixed by converting ucs2 fields to compatible utf8 analogue.
      
      
      include/my_sys.h:
        Added a function to find compatible character set with ctype array
        available. Currently used by fulltext search to find compatible
        substitute for ucs2 collations.
      mysql-test/r/ctype_ucs.result:
        A test case for BUG#31159.
      mysql-test/t/ctype_ucs.test:
        A test case for BUG#31159.
      mysys/charset.c:
        Added a function to find compatible character set with ctype array
        available. Currently used by fulltext search to find compatible
        substitute for ucs2 collations.
      sql/item_func.cc:
        Convert ucs2 fields to utf8. Fulltext requires ctype array, but
        ucs2 doesn't provide it.
      660d6626
  17. 23 Oct, 2007 1 commit
  18. 19 Oct, 2007 1 commit
  19. 18 Oct, 2007 2 commits
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-opt · 78a13fa4
      unknown authored
      into  sin.intern.azundris.com:/misc/mysql/31588/41-31588
      
      
      78a13fa4
    • unknown's avatar
      Bug#31588: buffer overrun when setting variables · cd9d89a7
      unknown authored
      Buffer used when setting variables was not dimensioned to accomodate
      trailing '\0'. An overflow by one character was therefore possible.
      CS corrects limits to prevent such overflows.
      
      
      mysql-test/r/variables.result:
        Try to overflow buffer used for setting system variables.
        Unpatched server should throw a valgrind warning here.
        Actual value and error message irrelevant, only length counts.
      mysql-test/t/variables.test:
        Try to overflow buffer used for setting system variables.
      sql/set_var.cc:
        Adjust maximum number of characters we can store in 'buff' by one
        as strmake() will write a terminating '\0'.
      cd9d89a7
  20. 17 Oct, 2007 1 commit
  21. 16 Oct, 2007 1 commit
  22. 11 Oct, 2007 1 commit
    • unknown's avatar
      Fix for bug #31174: "Repair" command on MyISAM crashes with small · 1c7b80df
      unknown authored
      myisam_sort_buffer_size.
      
      An incorrect length of the sort buffer was used when calculating the
      maximum number of keys. When myisam_sort_buffer_size is small enough,
      this could result in the number of keys < number of
      BUFFPEK structures which in turn led to use of uninitialized BUFFPEKs.
      
      Fixed by correcting the buffer length calculation.
      
      
      myisam/sort.c:
        Use a correct buffer length when calculating the maximum number of keys.
        Assert that for each BUFFPEK structure there is at least one
        corresponding key. Otherwise we would fail earlier and not reach
        merge_buffers().
      mysql-test/r/repair.result:
        Added a test case for bug #31174.
      mysql-test/t/repair.test:
        Added a test case for bug #31174.
      1c7b80df
  23. 10 Oct, 2007 2 commits
  24. 05 Oct, 2007 3 commits
    • unknown's avatar
      Merge mysql.com:/home/hf/work/30955/my41-30955 · 77d786b5
      unknown authored
      into  mysql.com:/home/hf/work/30286/my41-30286
      
      
      77d786b5
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1-opt · c14e8c80
      unknown authored
      into  mysql.com:/home/hf/work/30286/my41-30286
      
      
      c14e8c80
    • unknown's avatar
      Bug #30286 spatial index cause corruption and server crash! · 6d54b577
      unknown authored
      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
      6d54b577
  25. 04 Oct, 2007 3 commits
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint · b055562b
      unknown authored
      into  sin.intern.azundris.com:/home/tnurnberg/30444/41-30444
      
      
      b055562b
    • unknown's avatar
      Backport of the 5.0 patch to 4.1 · 4d0ef0cc
      unknown authored
      Bug#28878: InnoDB tables with UTF8 character set and indexes cause  wrong result for DML
      When making key reference buffers over CHAR fields whitespace (0x20) must be used to fill in the remaining space in the field's buffer. This is what Field_string::store() does. Fixed Field_string::get_key_image() to do the same.
      
      
      mysql-test/r/innodb_mysql.result:
        Bug#28878: test case
      mysql-test/t/innodb_mysql.test:
        Bug#28878: test case
      sql/field.cc:
        Bug#28878: Fill with space instead of binary zeros.
      4d0ef0cc
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint · bb050c0e
      unknown authored
      into  sin.intern.azundris.com:/home/tnurnberg/30444/41-30444
      
      
      bb050c0e