1. 04 May, 2007 1 commit
    • unknown's avatar
      Bug #27531: the 4.1 fix. · 0f88bd8c
      unknown authored
      When checking for applicability of join cache
      we must disable its usage only if there is no
      temp table in use.
      When a temp table is used we can use join
      cache (and it will not make the result-set 
      unordered) to fill the temp table. The filesort() 
      operation is then applied to the data in the temp 
      table and hence is not affected by join cache
      usage.
      Fixed by narrowing the condition for disabling 
      join cache to exclude the case where temp table
      is used.
      
      
      mysql-test/r/join.result:
        Bug #27531: test case
      mysql-test/t/join.test:
        Bug #27531: test case
      sql/sql_select.cc:
        Bug #27531: 
        Disable join cache only if not using temp table
      0f88bd8c
  2. 03 May, 2007 1 commit
    • unknown's avatar
      Bug#23656: Wrong conversion result of a DATETIME to integer using CAST function. · 4fd339b2
      unknown authored
      The generic string to int conversion was used by the Item_func_signed and
      the Item_func_unsigned classes to convert DATE/DATETIME values to the
      SIGNED/UNSIGNED type. But this conversion produces wrong results for such
      values.
      
      Now if the item which result has to be converted can return its result as
      longlong then the item->val_int() method is used to allow the item to carry
      out the conversion itself and return the correct result.
      This condition is checked in the Item_func_signed::val_int() and the
      Item_func_unsigned::val_int() functions.
      
      
      mysql-test/t/cast.test:
        Added a test case for the bug#23656: Wrong conversion result of a DATETIME to integer using CAST function.
      mysql-test/r/cast.result:
        Added a test case for the bug#23656: Wrong conversion result of a DATETIME to integer using CAST function.
      sql/item_func.cc:
        Bug#23656: Wrong conversion result of a DATETIME to integer using CAST function.
        Now if the item which result has to be converted can return its result as
        longlong then the item->val_int() method is used to allow the item to carry
        out the conversion itself and return the correct result.
        This condition is checked in the Item_func_signed::val_int() and the
        Item_func_unsigned::val_int() functions.
      4fd339b2
  3. 30 Apr, 2007 1 commit
  4. 29 Apr, 2007 5 commits
    • unknown's avatar
      Fixed bug #24856: the result set of a ROLLUP query with DISTINCT could lack · eec5a606
      unknown authored
      some rollup rows (rows with NULLs for grouping attributes) if GROUP BY
      list contained constant expressions.
      
      This happened because the results of constant expressions were not put
      in the temporary table used for duplicate elimination. In fact a constant
      item from the GROUP BY list of a ROLLUP query can be replaced for an
      Item_null_result object when a rollup row is produced . 
      
      Now the JOIN::rollup_init function wraps any constant item referenced in
      the GROYP BY list of a ROLLUP query into an Item_func object of a special
      class that is never detected as constant item. This ensures creation of
      fields for such  constant items in temporary tables and guarantees right
      results when the result of the rollup operation first has to be written
      into a temporary table, e.g. in the cases when duplicate elimination is
      required.  
      
      
      mysql-test/r/olap.result:
        Added a test case for bug #24856.
      mysql-test/t/olap.test:
        Added a test case for bug #24856.
      sql/item_func.h:
        Fixed bug #24856: the result set of a ROLLUP query with DISTINCT could lack
        some rollup rows (rows with NULLs for grouping attributes) if GROUP BY
        list contained constant expressions.
        
        Itroduced class Item_func_rollup_const derived from Item_func. The object of
        this class are never detected as constant items.
        We use them for wrapping constant items from the GROUP BY list of any ROLLUP
        query. This wrapping allows us to ensure writing constant items into temporary
        tables whenever the result of the ROLLUP operation has to be written into a
        temporary table, e.g. when ROLLUP is used together with DISTINCT in the SELECT
        list.
      sql/sql_select.cc:
        Fixed bug #24856: the result set of a ROLLUP query with DISTINCT could lack
        some rollup rows (rows with NULLs for grouping attributes) if GROUP BY
        list contained constant expressions.
        
        Now the JOIN::rollup_init function wraps any constant item referenced in
        the GROYP BY list of a ROLLUP query into an Item_func object of a special
        class that is never detected as constant item. This ensures creation of
        fields for such  constant items in temporary tables and guarantees right
        results when the result of the rollup operation first has to be written
        into a temporary table, e.g. in the cases when duplicate elimination is
        required.
      eec5a606
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1 · da3fe9a1
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-4.1-opt
      
      da3fe9a1
    • unknown's avatar
    • unknown's avatar
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · 1144a117
      unknown authored
      into  gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt-13191
      
      1144a117
    • unknown's avatar
      Adjusted results after the fix for bug #20710. · 91267fe3
      unknown authored
      91267fe3
  5. 28 Apr, 2007 2 commits
    • unknown's avatar
      Fixed bug #13191. · 08af9b11
      unknown authored
      INSERT...ON DUPLICATE KEY UPDATE may cause error 1032: 
      "Can't find record in ..." if we are inserting into
      InnoDB table unique index of partial key with
      underlying UTF-8 string field.
      
      This error occurs because INSERT...ON DUPLICATE uses a wrong
      procedure to copy string fields of multi-byte character sets
      for index search.
      
      
      mysql-test/t/innodb_mysql.test:
        Added test case for bug #13191.
      mysql-test/r/innodb_mysql.result:
        Added test case for bug #13191.
      sql/field.h:
        Fixed bug #13191.
        Field_string::get_key_image() virtual function was overloaded
        to implement copying of variable length character (UTF-8) fields.
        Field::get_key_image() function prototype has been changed to
        return byte size of copied data.
      sql/field.cc:
        Fixed bug #13191.
        Field_string::get_key_image() virtual function was overloaded
        to implement copying of variable length character (UTF-8) fields.
        Field::get_key_image() function prototype has been changed to
        return byte size of copied data.
      sql/key.cc:
        Fixed bug #13191.
        INSERT...ON DUPLICATE KEY UPDATE may cause error 1032: 
        "Can't find record in ...".
        This error occurs because INSERT...ON DUPLICATE uses
        a wrong procedure to copy field parts for index search.
        key_copy() function has been fixed.
      08af9b11
    • unknown's avatar
      Fixed bug #20710. · cd6db926
      unknown authored
      This bug occurs when error message length exceeds allowed limit: my_error()
      function outputs "%s" sequences instead of long string arguments.
      
      Formats like %-.64s are very common in errmsg.txt files, however my_error()
      function simply ignores precision of those formats.
      
      
      mysys/my_error.c:
        Fixed bug #20710.
        This bug occurs when error message length exceeds allowed limit: my_error()
        function output "%s" sequences instead of long string arguments.
        my_error() function has been fixed to accept formats like %-.64s.
      mysql-test/t/alter_table.test:
        Added test case for bug #20710.
      mysql-test/r/alter_table.result:
        Added test case for bug #20710.
      cd6db926
  6. 26 Apr, 2007 2 commits
  7. 24 Apr, 2007 2 commits
  8. 23 Apr, 2007 2 commits
  9. 20 Apr, 2007 1 commit
    • unknown's avatar
      Bug#27704: incorrect comparison of rows with NULL components · 986508fc
      unknown authored
      Support for NULL components was incomplete for row comparison,
      fixed.  Added support for abort_on_null at compare_row() like
      in 5.x
      
      
      sql/item_cmpfunc.h:
        Bug#27704: incorrect comparison of rows with NULL components
        Added support for abort_on_null at Item_bool_func2
        like in 5.x
      sql/item_cmpfunc.cc:
        Bug#27704: incorrect comparison of rows with NULL components
        Support for NULL components was incomplete for row comparison,
        fixed. Added support for abort_on_null at compare_row() like
        in 5.x
      mysql-test/t/row.test:
        Test case updated for Bug#27704 (incorrect comparison 
        of rows with NULL components)
      mysql-test/r/row.result:
        Test case updated for Bug#27704 (incorrect comparison 
        of rows with NULL components)
      mysql-test/r/subselect.result:
        Test case updated for Bug#27704 (incorrect comparison 
        of rows with NULL components)
      986508fc
  10. 19 Apr, 2007 1 commit
  11. 18 Apr, 2007 1 commit
  12. 17 Apr, 2007 3 commits
    • unknown's avatar
      Merge siva.hindu.god:/home/tsmith/m/bk/41 · 81615ee5
      unknown authored
      into  siva.hindu.god:/home/tsmith/m/bk/maint/41
      
      81615ee5
    • unknown's avatar
      Merge trift2.:/MySQL/M41/test-help-4.1 · d78bbe73
      unknown authored
      into  trift2.:/MySQL/M41/push-4.1
      
      d78bbe73
    • unknown's avatar
      Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE · b4308370
      unknown authored
      Added missed DROP privilege check on the original table for RENAME TABLE command.
      
      
      mysql-test/r/grant.result:
        Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
          - test result.
      mysql-test/t/grant.test:
        Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
          - test case.
      sql/sql_parse.cc:
        Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
          - added DROP privilege check on the original table for RENAME TABLE command.
      b4308370
  13. 14 Apr, 2007 1 commit
  14. 12 Apr, 2007 2 commits
    • unknown's avatar
      BUG#25951 - ignore/use index does not work with fulltext · e6c8d34c
      unknown authored
      IGNORE/USE/FORCE INDEX hints were honored when choosing FULLTEXT
      index.
      
      With this fix these hints are ignored. For regular indexes we may
      perform table scan instead of index lookup when IGNORE INDEX was
      specified. We cannot do this for FULLTEXT in NLQ mode.
      
      
      mysql-test/r/fulltext.result:
        A test case for bug#25951.
      mysql-test/t/fulltext.test:
        A test case for bug#25951.
      sql/item_func.cc:
        IGNOR/USE/FORCE INDEX hints should not be honored when choosing FULLTEXT
        index.
        
        Use proper bitmap, that is not modified by IGNORE/USE/FORCE INDEX hints.
      e6c8d34c
    • unknown's avatar
      Merge whalegate.ndb.mysql.com:/home/tomas/mysql-4.1-ndb · 92447690
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-4.1-opt
      
      92447690
  15. 11 Apr, 2007 4 commits
  16. 10 Apr, 2007 9 commits
    • unknown's avatar
      Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1 · 31f4583a
      unknown authored
      into  mysql.com:/home/kent/bk/tmp3/mysql-4.1-build
      
      31f4583a
    • unknown's avatar
      BUG#24342 - Incorrect results with query over MERGE table · d64d7f4a
      unknown authored
      MERGE engine may return incorrect values when several representations
      of equal keys are present in the index. For example "groß" and "gross"
      or "gross" and "gross " (trailing space), which are considered equal,
      but have different lengths.
      
      The problem was that key length was not recalculated after key lookup.
      
      Only MERGE engine is affected.
      
      
      myisam/mi_rkey.c:
        info->lastkey gets rewritten by mi_search. Later we recalculate found lastkey
        length. This is done to make sure that mi_rnext_same gets true, found (not
        searched) lastkey length. Searched and found key lengths may be different,
        for example in case searched key is "groß" and found is "gross" or in case
        a key has trailing spaces.
        
        Unfortunately we recalculate found lastkey length only for first
        underlying table. To recalculate found key length for non-first underlying
        table we need to know how much key segments were used to create this key.
        
        When mi_rkey is called for first underlying table of a merge table, store
        offset to last used key segment.
        
        Restore last_used_keyseg variable when mi_rkey is called for non-first
        underlying table.
      myisam/myisamdef.h:
        Added last_used_keyseg variable to MI_INFO. It is used by merge engine to calculate
        key length.
      myisammrg/myrg_rkey.c:
        Pass last used key segment returned by first table key read to other
        table key reads.
      mysql-test/r/merge.result:
        A test case for bug#24342.
      mysql-test/t/merge.test:
        A test case for bug#24342.
      d64d7f4a
    • unknown's avatar
      Update result(which mysterioulsy got lost) · b7069c27
      unknown authored
      b7069c27
    • unknown's avatar
      a18fcdbf
    • unknown's avatar
      Init dying to 1 just after passing the guard · c7abe519
      unknown authored
      c7abe519
    • unknown's avatar
      Add OPT_LOG_DIR · 6a7c5b71
      unknown authored
      6a7c5b71
    • unknown's avatar
      Merge pilot.blaudden:/home/msvensson/mysql/mysql-4.1 · d69bca68
      unknown authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
      
      d69bca68
    • unknown's avatar
      Add --logdir option ot mysqltest · faac6d79
      unknown authored
      faac6d79
    • unknown's avatar
      Merge 192.168.0.4:mysql/mysql-4.1-maint · d9534ea8
      unknown authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
      
      
      client/mysqltest.c:
        Auto merged
      mysql-test/r/mysqltest.result:
        Auto merged
      mysql-test/t/mysqltest.test:
        Auto merged
      d9534ea8
  17. 07 Apr, 2007 2 commits