1. 04 May, 2007 7 commits
    • unknown's avatar
      Merge magare.gmz:/home/kgeorge/mysql/work/B27531-5.0-opt · 27f581a0
      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
      27f581a0
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 1084f2d6
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      1084f2d6
    • unknown's avatar
      Bug#28181 Access denied to 'information_schema when select into out file (regression) · 13cfc477
      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
      13cfc477
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 3ebd2e55
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B27807-5.0-opt
      
      
      3ebd2e55
    • unknown's avatar
      Merge moonbone.local:/mnt/gentoo64/work/23656-bug-4.1-opt-mysql · 74c794d0
      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
      74c794d0
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · ad06c4c0
      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
      ad06c4c0
    • unknown's avatar
      Bug #27807. · 0ad4e1b2
      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
      0ad4e1b2
  2. 03 May, 2007 1 commit
    • unknown's avatar
      Bug#23656: Wrong conversion result of a DATETIME to integer using CAST function. · 1a0e3a28
      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.
      1a0e3a28
  3. 02 May, 2007 1 commit
    • unknown's avatar
      Fixed bug #28188: performance degradation for outer join queries to which · 8e8ece72
      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.
      8e8ece72
  4. 01 May, 2007 2 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · fe4dc96c
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
      
      
      fe4dc96c
    • unknown's avatar
      Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt · 0e20de49
      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
      0e20de49
  5. 30 Apr, 2007 5 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · cbaf2626
      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
      cbaf2626
    • unknown's avatar
      merging fix · 9be5c10f
      unknown authored
      9be5c10f
    • unknown's avatar
      Post-merge fix. · 5352b41d
      unknown authored
      5352b41d
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-4.1-opt · 532f2e84
      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.
      532f2e84
    • unknown's avatar
      Fix in comments. · c004ad09
      unknown authored
      c004ad09
  6. 29 Apr, 2007 19 commits
    • unknown's avatar
      Fixed bug #24856: the result set of a ROLLUP query with DISTINCT could lack · dd34042e
      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.
      dd34042e
    • unknown's avatar
      'no DBUG_RETURN' warning fixed · dd038260
      unknown authored
      
      storage/ndb/src/mgmapi/mgmapi.cpp:
        DBUG_ENTER requires DBUG_CHECK_TIMEDOUT_RET
      dd038260
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · ba967f5b
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/16377-bug-5.0-opt-mysql
      
      
      ba967f5b
    • unknown's avatar
      type_datetime.result, type_datetime.test: · d4b1b813
      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.
      d4b1b813
    • unknown's avatar
      merging fix · f7d50084
      unknown authored
      f7d50084
    • unknown's avatar
      Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt · e7eae895
      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
      e7eae895
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1 · e43d5bd2
      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
      e43d5bd2
    • unknown's avatar
      Merge mysql.com:/d2/hf/mrg/mysql-4.1-opt · ad429913
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
      
      
      ad429913
    • unknown's avatar
      merging fix · 95f51da2
      unknown authored
      95f51da2
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0 · d812bcb9
      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
      d812bcb9
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1 · 0cd6377f
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-4.1-opt
      
      
      0cd6377f
    • unknown's avatar
      Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt · 2031f557
      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
      2031f557
    • unknown's avatar
    • unknown's avatar
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · a925eadc
      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.
      a925eadc
    • unknown's avatar
    • unknown's avatar
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · edfa3dcf
      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.
      edfa3dcf
    • unknown's avatar
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · 25033826
      unknown authored
      into  gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt-13191
      
      
      25033826
    • unknown's avatar
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · cecc0495
      unknown authored
      into  gshchepa.loc:/home/uchum/work/bk-trees/mysql-5.0-opt
      
      
      cecc0495
    • unknown's avatar
      Adjusted results after the fix for bug #20710. · 3f169678
      unknown authored
      3f169678
  7. 28 Apr, 2007 3 commits
    • unknown's avatar
      Fixed bug #13191. · 98c0da4e
      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.
      98c0da4e
    • unknown's avatar
      Merge gshchepa.loc:/home/uchum/work/bk-trees/mysql-4.1-opt · fd14779b
      unknown authored
      into  gshchepa.loc:/home/uchum/work/bk-trees/mysql-5.0-opt
      
      
      fd14779b
    • unknown's avatar
      Fixed bug #20710. · f90870e9
      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.
      f90870e9
  8. 27 Apr, 2007 2 commits
    • unknown's avatar
      Additional fix for the bug#27590. · 51d19e32
      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.
      51d19e32
    • unknown's avatar
      Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-gca · 78ab9a9b
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
      
      
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
        Auto merged
      78ab9a9b