1. 04 May, 2007 8 commits
    • unknown's avatar
      post merge (5.0-opt -> 5.1-opt) fixes · 517181bc
      unknown authored
      517181bc
    • unknown's avatar
      Merge magare.gmz:/home/kgeorge/mysql/work/B27531-5.0-opt · e4beed3c
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/work/B27531-5.1-opt
      
      
      mysql-test/r/cast.result:
        Auto merged
      mysql-test/r/join_outer.result:
        Auto merged
      mysql-test/t/cast.test:
        Auto merged
      mysql-test/t/join_outer.test:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_select.h:
        Auto merged
      mysql-test/r/subselect.result:
        merge of 5.0-opt -> 5.1-opt
      mysql-test/t/subselect.test:
        merge of 5.0-opt -> 5.1-opt
      e4beed3c
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 01f69e13
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      01f69e13
    • unknown's avatar
      Bug#28181 Access denied to 'information_schema when select into out file (regression) · e8163b6c
      unknown authored
      allow select into out file from I_S if user has FILE privilege
      otherwise issue an error
      
      
      mysql-test/r/outfile.result:
        test result
      mysql-test/t/outfile.test:
        test case
      sql/sql_parse.cc:
        allow select into out file from I_S if user has FILE privilege
        otherwise issue an error
      e8163b6c
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 93e68f08
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B27807-5.0-opt
      
      93e68f08
    • unknown's avatar
      Merge moonbone.local:/mnt/gentoo64/work/23656-bug-4.1-opt-mysql · 255d8ef3
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/23656-bug-5.0-opt-mysql
      
      
      mysql-test/r/cast.result:
        Auto merged
      mysql-test/t/cast.test:
        Auto merged
      sql/item_func.cc:
        Manual merge
      255d8ef3
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 766224b4
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B27807-5.0-opt
      
      
      sql/sql_select.cc:
        Auto merged
      mysql-test/r/subselect.result:
        merge to 5.0-opt
      mysql-test/t/subselect.test:
        merge to 5.0-opt
      766224b4
    • unknown's avatar
      Bug #27807. · e5655cbe
      unknown authored
      Non-correlated scalar subqueries may get executed
      in EXPLAIN at the optimization phase if they are
      part of a right hand sargable expression.
      If the scalar subquery uses a temp table to 
      materialize its results it will replace the 
      subquery structure from the parser with a simple
      select from the materialization table.
      As a result the EXPLAIN will crash as the 
      temporary materialization table is not to be shown
      in EXPLAIN at all.
      Fixed by preserving the original query structure
      right after calling optimize() for scalar subqueries
      with temp tables executed during EXPLAIN.
      
      
      mysql-test/r/subselect.result:
        Bug #27807: test case
      mysql-test/t/subselect.test:
        Bug #27807: test case
      sql/item_subselect.cc:
        Bug #27807: preserve the join structure
      sql/sql_select.cc:
        Bug #27807: introduce initialization function for tmp_join
      sql/sql_select.h:
        Bug #27807: introduce initialization function for tmp_join
      e5655cbe
  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. 02 May, 2007 1 commit
    • unknown's avatar
      Fixed bug #28188: performance degradation for outer join queries to which · 57fb3374
      unknown authored
      'not exists' optimization is applied.
      
      In fact 'not exists' optimization did not work anymore after the patch
      introducing the evaluate_join_record function had been applied.
      
      Corrected the evaluate_join_record function to respect the 'not_exists'
      optimization.
      
      
      mysql-test/r/join_outer.result:
        Added a test case for bug #28188.
      mysql-test/t/join_outer.test:
        Added a test case for bug #28188.
      sql/sql_select.cc:
        Fixed bug #28188: performance degradation for outer join queries to which
        'not exists' optimization is applied.
        
        Corrected the evaluate_join_record function to respect the 'not_exists'
        optimization.
      57fb3374
  4. 01 May, 2007 2 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · 2207e8d5
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
      
      2207e8d5
    • unknown's avatar
      Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt · 90d71ac9
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
      
      
      mysql-test/r/olap.result:
        Auto merged
      mysql-test/r/type_datetime.result:
        Auto merged
      mysql-test/t/type_datetime.test:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      90d71ac9
  5. 30 Apr, 2007 5 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · 5957bac2
      unknown authored
      into  mysql.com:/home/hf/work/27123/my51-27123
      
      
      mysql-test/r/partition.result:
        Auto merged
      mysql-test/t/partition.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/key.cc:
        Auto merged
      sql/field.h:
        merging
      5957bac2
    • unknown's avatar
      merging fix · 3462eaf0
      unknown authored
      3462eaf0
    • unknown's avatar
      Post-merge fix. · b77f95e8
      unknown authored
      b77f95e8
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-4.1-opt · 6d899411
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug24856
      
      
      sql/item_func.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      mysql-test/r/olap.result:
        Manual merge.
      mysql-test/t/olap.test:
        Manual merge.
      6d899411
    • unknown's avatar
      Fix in comments. · 9094bead
      unknown authored
      9094bead
  6. 29 Apr, 2007 19 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
      'no DBUG_RETURN' warning fixed · 278f5910
      unknown authored
      
      storage/ndb/src/mgmapi/mgmapi.cpp:
        DBUG_ENTER requires DBUG_CHECK_TIMEDOUT_RET
      278f5910
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 54ba417d
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/16377-bug-5.0-opt-mysql
      
      54ba417d
    • unknown's avatar
      type_datetime.result, type_datetime.test: · 6f1bf91b
      unknown authored
        The test case for the bug#27590 is altered.
      
      
      mysql-test/t/type_datetime.test:
        The test case for the bug#27590 is altered.
      mysql-test/r/type_datetime.result:
        The test case for the bug#27590 is altered.
      6f1bf91b
    • unknown's avatar
      merging fix · 5d1b0374
      unknown authored
      5d1b0374
    • unknown's avatar
      Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt · 93321f8d
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
      
      
      BitKeeper/deleted/.del-CMakeLists.txt~1:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/include/mix1.inc:
        merging
      mysql-test/r/innodb_mysql.result:
        merging
      93321f8d
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1 · 63c98169
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
      
      
      BitKeeper/deleted/.del-CMakeLists.txt~1:
        Auto merged
      mysql-test/r/type_datetime.result:
        Auto merged
      mysql-test/r/windows.result:
        Auto merged
      mysql-test/t/windows.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/field.h:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_subselect.h:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/include/mix1.inc:
        merging
      mysql-test/r/innodb_mysql.result:
        merging
      63c98169
    • unknown's avatar
      Merge mysql.com:/d2/hf/mrg/mysql-4.1-opt · fb581eff
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
      
      fb581eff
    • unknown's avatar
      merging fix · 80ae3874
      unknown authored
      80ae3874
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0 · e943ab6e
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
      
      
      CMakeLists.txt:
        Auto merged
      sql/ha_innodb.cc:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        merging
      mysql-test/t/innodb_mysql.test:
        merging
      e943ab6e
    • 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
      Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt · 9fedd2e6
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
      
      
      mysql-test/r/alter_table.result:
        Auto merged
      mysql-test/r/distinct.result:
        Auto merged
      mysql-test/r/heap.result:
        Auto merged
      mysql-test/r/ps_2myisam.result:
        Auto merged
      mysql-test/r/ps_3innodb.result:
        Auto merged
      mysql-test/r/ps_4heap.result:
        Auto merged
      mysql-test/r/ps_5merge.result:
        Auto merged
      mysql-test/r/ps_7ndb.result:
        Auto merged
      mysql-test/r/query_cache.result:
        Auto merged
      BitKeeper/deleted/.del-CMakeLists.txt~1:
        Auto merged
      BitKeeper/deleted/.del-ps_6bdb.result:
        Auto merged
      mysql-test/t/alter_table.test:
        Auto merged
      mysys/my_error.c:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/field.h:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_cmpfunc.h:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/key.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/include/mix1.inc:
        merging
      mysql-test/r/group_by.result:
        SCCS merged
      mysql-test/r/innodb_mysql.result:
        merging
      mysql-test/r/join.result:
        merging
      mysql-test/r/subselect.result:
        merging
      mysql-test/r/type_datetime.result:
        SCCS merged
      mysql-test/r/windows.result:
        SCCS merged
      mysql-test/t/group_by.test:
        SCCS merged
      mysql-test/t/join.test:
        merging
      mysql-test/t/subselect.test:
        merging
      mysql-test/t/type_datetime.test:
        merging
      mysql-test/t/windows.test:
        SCCS merged
      sql/item_timefunc.cc:
        merging
      sql/sql_base.cc:
        SCCS merged
      storage/innobase/handler/ha_innodb.cc:
        merging
      9fedd2e6
    • unknown's avatar
    • unknown's avatar
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · 15f33137
      unknown authored
      into  gshchepa.loc:/home/uchum/work/bk-trees/mysql-5.0-opt-13191
      
      
      sql/key.cc:
        Patch to eliminate compilation errors under VC after bug #13191 fix.
      15f33137
    • unknown's avatar
    • unknown's avatar
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · ab91b0e4
      unknown authored
      into  gshchepa.loc:/home/uchum/work/bk-trees/mysql-5.0-opt-13191
      
      
      mysql-test/r/innodb_mysql.result:
        SCCS merged
      mysql-test/t/innodb_mysql.test:
        SCCS merged
      sql/field.cc:
        Merge with 4.1, fix of bug #13191.
      sql/field.h:
        Merge with 4.1, fix of bug #13191.
      sql/key.cc:
        Merge with 4.1, fix of bug #13191.
      ab91b0e4
    • 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
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · 2f518198
      unknown authored
      into  gshchepa.loc:/home/uchum/work/bk-trees/mysql-5.0-opt
      
      2f518198
    • unknown's avatar
      Adjusted results after the fix for bug #20710. · 91267fe3
      unknown authored
      91267fe3
  7. 28 Apr, 2007 3 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
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · 48d7b6ca
      unknown authored
      into  gshchepa.loc:/home/uchum/work/bk-trees/mysql-5.0-opt
      
      48d7b6ca
    • 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
  8. 27 Apr, 2007 1 commit
    • unknown's avatar
      Additional fix for the bug#27590. · 72f471c7
      unknown authored
      
      tests/mysql_client_test.c:
        Fixed failing build on the windows platform.
      mysql-test/r/ps_7ndb.result:
        The result of the adjusted test case after fix for bug#27590.
      mysql-test/r/ps_6bdb.result:
        The result of the adjusted test case after fix for bug#27590.
      sql/item_cmpfunc.cc:
        A warning is fixed.
      72f471c7