1. 16 Feb, 2007 1 commit
    • unknown's avatar
      Bug#16630: The update fields of the INSERT .. SELECT .. ON DUPLICATE KEY · d5813a06
      unknown authored
      UPDATE contains wrong data if the SELECT employs a temporary table.
      
      If the UPDATE values of the INSERT .. SELECT .. ON DUPLICATE KEY UPDATE
      statement contains fields from the SELECT part and the select employs a
      temporary table then those fields will contain wrong values because they
      aren't corrected to get data from the temporary table.
      
      The solution is to add these fields to the selects all_fields list,
      to store pointers to those fields in the selects ref_pointer_array and
      to access them via Item_ref objects.
      
      The substitution for Item_ref objects is done in the new function called 
      Item_field::update_value_transformer(). It is called through the
      item->transform() mechanism at the end of the select_insert::prepare()
      function.
      
      
      sql/item.cc:
        Bug#16630: The update fields of the INSERT .. SELECT .. ON DUPLICATE KEY
        UPDATE contains wrong data if the SELECT employs a temporary table.
        The new method Item_field::update_value_transformer() is added. It
        substitutes fields in the update values list for references 
        (Item_ref objects) to them.
      sql/item.h:
        Bug#16630: The update fields of the INSERT .. SELECT .. ON DUPLICATE KEY
        UPDATE contains wrong data if the SELECT employs a temporary table.
        The update_value_transformer() method is added to the Item and to the
        Item_field classes.
      sql/sql_insert.cc:
        Bug#16630: The update fields of the INSERT .. SELECT .. ON DUPLICATE KEY
        UPDATE contains wrong data if the SELECT employs a temporary table.
        Traverse update values and substitute fields from the select for
        references (Item_ref objects) to them.
      sql/sql_select.cc:
        Bug#16630: The update fields of the INSERT .. SELECT .. ON DUPLICATE KEY
        UPDATE contains wrong data if the SELECT employs a temporary table.
        Traverse update values and substitute fields from the select for
        references (Item_ref objects) to them.
      mysql-test/r/insert_select.result:
        Added a test case for bug#16630: The update fields of the INSERT .. SELECT ..
        ON DUPLICATE KEY UPDATE contains wrong data if the SELECT employs a 
        temporary table.
      mysql-test/t/insert_select.test:
        Added a test case for bug#16630: The update fields of the INSERT .. SELECT ..
        ON DUPLICATE KEY UPDATE contains wrong data if the SELECT employs a 
        temporary table.
      d5813a06
  2. 09 Feb, 2007 3 commits
    • unknown's avatar
      Bug#23170: LAST_INSERT_ID isn't reset to 0 in INSERT .. SELECT when no rows were · dd6feec4
      unknown authored
      inserted.
      
      The select_insert::send_eof() function now resets LAST_INSERT_ID variable if
      no rows were inserted.
      
      
      mysql-test/t/insert_select.test:
        Added a test case for bug#23170: LAST_INSERT_ID isn't reset to 0 in INSERT .. SELECT when no rows were inserted.
      mysql-test/r/insert_select.result:
        Added a test case for bug#23170: LAST_INSERT_ID isn't reset to 0 in INSERT .. SELECT when no rows were inserted.
      sql/sql_insert.cc:
        Bug#23170: LAST_INSERT_ID isn't reset to 0 in INSERT .. SELECT when no rows were
        inserted.The select_insert::send_eof() function now resets LAST_INSERT_ID variable if
        no rows were inserted.
      dd6feec4
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0-opt · d4b4952f
      unknown authored
      into  macbook.gmz:/Users/kgeorge/mysql/work/B22344-5.0-opt
      
      
      d4b4952f
    • unknown's avatar
      79c51f21
  3. 08 Feb, 2007 3 commits
  4. 07 Feb, 2007 8 commits
    • unknown's avatar
      Fixed bug #25931. · 3609c3a4
      unknown authored
      View check option clauses were ignored for updates of multi-table
      views when the updates could not be performed on fly and the rows
      to update had to be put into temporary tables first.
      
      
      
      mysql-test/r/view.result:
        Added a test case for bug #25931.
      mysql-test/t/view.test:
        Added a test case for bug #25931.
        Adjusted another existed test case to have the correct result.
      sql/sql_update.cc:
        Fixed bug #25931.
        View check option clauses were ignored for updates of multi-table
        views when the updates could not be performed on fly and the rows
        to update had to be put into temporary tables first.
        Added the required check to multi_update::do_updates to fix the problem.
      3609c3a4
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1 · 75d614e0
      unknown authored
      into  poseidon.mysql.com:/home/tomas/mysql-4.1-ndb
      
      
      75d614e0
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 1daa0e44
      unknown authored
      into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
      
      
      sql/ha_ndbcluster.cc:
        Auto merged
      1daa0e44
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb · a11fb9eb
      unknown authored
      into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
      
      
      a11fb9eb
    • unknown's avatar
      Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0 · 7d678ab9
      unknown authored
      into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
      
      
      ndb/include/ndbapi/NdbIndexScanOperation.hpp:
        Auto merged
      ndb/include/ndbapi/NdbScanOperation.hpp:
        Auto merged
      ndb/src/ndbapi/NdbScanOperation.cpp:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/ha_ndbcluster.h:
        Auto merged
      7d678ab9
    • unknown's avatar
      NdbScanOperation.hpp, NdbScanOperation.cpp, ha_ndbcluster.cc: · c8f470ea
      unknown authored
        bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
      ha_ndbcluster.h:
        Removed stray mthod declaration
      
      
      sql/ha_ndbcluster.h:
        Removed stray mthod declaration
      ndb/include/ndbapi/NdbScanOperation.hpp:
        bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
      ndb/src/ndbapi/NdbScanOperation.cpp:
        bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
      sql/ha_ndbcluster.cc:
        bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
      c8f470ea
    • unknown's avatar
      bug#25821 Excessive partition pruning for multi-range index scan in NDB API:... · f3463a8c
      unknown authored
      bug#25821  Excessive partition pruning for multi-range index scan in NDB API: post-review fix, added default value
      
      
      
      f3463a8c
    • unknown's avatar
      Fixed bug #26124: SELECT from a view wrapper over a table · 3a54e593
      unknown authored
      with a column of the DATETIME type could return a wrong 
      result set if the WHERE clause included a BETWEEN condition
      on the column.
      Fixed the method Item_func_between::fix_length_and_dec
      where the aggregation type for BETWEEN predicates calculated
      incorrectly if the first argument was a view column of the
      DATETIME type.
      
      
      mysql-test/r/view.result:
        Added a test case for bug #26124.
      mysql-test/t/view.test:
        Added a test case for bug #26124.
      3a54e593
  5. 06 Feb, 2007 3 commits
    • unknown's avatar
      Fix for bug#25821 Excessive partition pruning for multi-range index scan in... · ba8a684d
      unknown authored
      Fix for bug#25821  Excessive partition pruning for multi-range index scan in NDB API: don't set distribution key if multi_range
      
      
      
      ba8a684d
    • unknown's avatar
      Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were · 976f0a39
      unknown authored
      updated.
      
      INSERT ... ON DUPLICATE KEY UPDATE reports that a record was updated when
      the duplicate key occurs even if the record wasn't actually changed
      because the update values are the same as those in the record.
      
      Now the compare_record() function is used to check whether the record was
      changed and the update of a record reported only if the record differs
      from the original one.
      
      
      sql/sql_update.cc:
        Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were
        updated.
        The compare_record() function was changed to non-static one.
      sql/sql_insert.cc:
        Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were
        updated.
        Now the compare_record() function is used to check whether the record was
        changed and the update of a record reported only if the record differs
        from the original one.
      sql/mysql_priv.h:
        Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were
        updated.
        Added the prototype of the compare_record() function.
      mysql-test/t/insert_select.test:
        Added a test case for bug#19978: INSERT .. ON DUPLICATE erroneously reports
        some records were updated.
      mysql-test/r/insert_select.result:
        Added a test case for bug#19978: INSERT .. ON DUPLICATE erroneously reports
        some records were updated.
      976f0a39
    • unknown's avatar
      Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison · c35ceeca
      unknown authored
       Ignoring error codes from type conversion allows default (wrong) values to
       go unnoticed in the formation of index search conditions.
       Fixed by correctly checking for conversion errors.
      
      
      mysql-test/r/select.result:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - test case
      mysql-test/t/select.test:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - test case
      sql/field.h:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - don't ignore coversion errors
      sql/field_conv.cc:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - don't ignore coversion errors
      sql/item.cc:
        Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
         - don't ignore coversion errors
      c35ceeca
  6. 05 Feb, 2007 1 commit
    • unknown's avatar
      Test and bug fixes and removed unneccessary files. · 9946ed16
      unknown authored
      
      mysys/my_getopt.c:
        Fixes problem with getting output lines from
        my_getopt in random places in tests.
      sql/sql_prepare.cc:
        Fixes problem with failing mysql_client_test
        on some machines. This is actually a problem
        with prepared statements.
      9946ed16
  7. 03 Feb, 2007 2 commits
  8. 02 Feb, 2007 11 commits
    • unknown's avatar
      Fix bug #24035. · e0d8e8fd
      unknown authored
      This performance degradation for UPDATEs could be observed in the update
      statements for which the search key cannot be converted to any valid
      value of the type of the search column, like for a  the condition
      int_fld=99999999999999999999999999, though it can be guaranteed here
      that there is no row with such a key value. 
      
      
      mysql-test/r/update.result:
        Added a test case for bug #24035.
      mysql-test/t/update.test:
        Added a test case for bug #24035.
      sql/opt_range.cc:
        Fix bug #24035.
        This performance degradation for could be observed in the update
        statements for which the search key cannot be converted to any valid
        value of the type of the search column, like for a  the condition
        int_fld=99999999999999999999999999, though it can be guaranteed here
        that there is no row with such a key value. 
        Now the function get_mm_leaf creates trees of the type SEL_ARG::IMPOSSIBLE 
        for such conditions that tells the range scan not to perform any search
        at all.
      e0d8e8fd
    • unknown's avatar
      Merge chilla.local:/home/mydev/mysql-4.1-axmrg · 8a9c521b
      unknown authored
      into  chilla.local:/home/mydev/mysql-5.0-axmrg
      
      
      sql/handler.cc:
        Auto merged
      sql/examples/ha_tina.cc:
        Auto merged
      sql/examples/ha_tina.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      mysql-test/Makefile.am:
        Manual merged
      8a9c521b
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 3c0aca02
      unknown authored
      into  chilla.local:/home/mydev/mysql-5.0-axmrg
      
      
      sql/item_func.cc:
        Auto merged
      3c0aca02
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 0dc19dad
      unknown authored
      into  chilla.local:/home/mydev/mysql-4.1-axmrg
      
      
      0dc19dad
    • unknown's avatar
      After merge fix · 98b9ac69
      unknown authored
      98b9ac69
    • unknown's avatar
      04cbadde
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0 · 9bb750f5
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      9bb750f5
    • unknown's avatar
      Valgrind errors · 84445bbb
      unknown authored
      added valgrind.supp to EXTRA_SCRIPTS(for pushbuild)
      
      
      84445bbb
    • unknown's avatar
      Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb · 61aee35c
      unknown authored
      into  dev3-63.(none):/home/zhl/mysql/tree-merge/5.0/mysql-5.0-ndb
      
      
      61aee35c
    • unknown's avatar
      Merge chilla.local:/home/mydev/mysql-4.1-axmrg · d03d2987
      unknown authored
      into  chilla.local:/home/mydev/mysql-5.0-axmrg
      
      
      include/my_pthread.h:
        Auto merged
      include/thr_alarm.h:
        Auto merged
      mysys/my_pthread.c:
        Auto merged
      mysys/my_thr_init.c:
        Auto merged
      d03d2987
    • unknown's avatar
      After merge fix · 5305cd7c
      unknown authored
      5305cd7c
  9. 01 Feb, 2007 8 commits
    • unknown's avatar
      Merge dev3-63.(none):/home/zhl/mysql/tree-merge/5.0/mysql-5.0-ndb-bj · 0e57035b
      unknown authored
      into  dev3-63.(none):/home/zhl/mysql/tree-merge/5.0/mysql-5.0-ndb
      
      
      ndb/src/mgmclient/CommandInterpreter.cpp:
        Auto merged
      ndb/src/ndbapi/Ndb.cpp:
        Auto merged
      0e57035b
    • unknown's avatar
      Merge chilla.local:/home/mydev/mysql-4.1-axmrg · cd4670a7
      unknown authored
      into  chilla.local:/home/mydev/mysql-5.0-axmrg
      
      
      BitKeeper/deleted/.del-valgrind.supp:
        Delete: mysql-test/valgrind.supp
      mysql-test/r/ps.result:
        SCCS merged
      mysql-test/r/symlink.result:
        Null merged
      mysql-test/t/ps.test:
        SCCS merged
      mysql-test/t/symlink.test:
        Null merged
      sql/field_conv.cc:
        Null merged
      sql/mysqld.cc:
        Null merged
      vio/viosslfactories.c:
        Null merged
      cd4670a7
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · da984b33
      unknown authored
      into  chilla.local:/home/mydev/mysql-5.0-axmrg
      
      
      BUILD/SETUP.sh:
        Auto merged
      configure.in:
        Auto merged
      da984b33
    • unknown's avatar
      Merge dev3-63.(none):/home/zhl/mysql/tree-merge/4.1/mysql-4.1-ndb-bj · bdd52e89
      unknown authored
      into  dev3-63.(none):/home/zhl/mysql/tree-merge/4.1/mysql-4.1-ndb
      
      
      bdd52e89
    • unknown's avatar
      Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail · a3083046
      unknown authored
      additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
      a3083046
    • unknown's avatar
      Bug#25844: "make test" does not find mysql-test-run.pl · 8c2c5271
      unknown authored
      Need to change directory before calling mysql-test-run.pl
      
      
      8c2c5271
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 5698114c
      unknown authored
      into  chilla.local:/home/mydev/mysql-4.1-axmrg
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      5698114c
    • unknown's avatar
      Valgrind error fixes · 2df29225
      unknown authored
      Notes:
      This patch doesn't fix all issues in the tree and we need jani's fix for that
      This patch shoud not be merged into 5.0
      
      
      mysql-test/r/ps.result:
        result fix
      mysql-test/r/symlink.result:
        result fix
      mysql-test/t/ps.test:
        test is moved to 'symlink' test
      mysql-test/t/symlink.test:
        test from 'ps' test
      sql/field_conv.cc:
        valgrind error fix: backport from 5.0
      sql/mysqld.cc:
        release of ssl_context
      vio/viosslfactories.c:
        release of ssl_context
      mysql-test/valgrind.supp:
        New BitKeeper file ``mysql-test/valgrind.supp''
        This file is backported from 5.0, added suppressing of OpenSSL errors
      2df29225