1. 22 Feb, 2007 1 commit
    • unknown's avatar
      Bug #24010: INSERT INTO ... SELECT fails on unique constraint with data · ddb5a563
      unknown authored
      it doesn't select.
      
      This bug was fixed along with bug #16861: User defined variable can 
      have a wrong value if a tmp table was used.
      
      There the fix consisted of Item_func_set_user_var overloading the method
      Item::save_in_field. Consider the query from the test case:
      
      
      INSERT INTO foo( bar, baz )
      SELECT 
        bar,
        @newBaz := 1 + baz
      FROM 
        foo
      WHERE 
        quux <= 0.1;
      
      Here the assignment expression '@newBaz := 1 + baz' is represented by an 
      Item_func_set_user_var. Its member method save_in_field, which writes the 
      value of this assignment into the result field, writes the val_xxx() value, 
      which is not updated at this point. In the fix introduced by the patch,
      the save_in_field method reads the actual variable value instead.
      
      See also comment for 
      ChangeSet@1.2368.1.3, 2007-01-09 23:24:56+03:00, evgen@moonbone.local +4 -0
      and comment for
      Item_func_set_user_var::save_in_field (item_func.cc)
      
      
      mysql-test/r/update.result:
        BUG#24010
        The correct, and expected, result
      mysql-test/t/update.test:
        BUG#24010
        The test case for this bug. When the bug is active, the INSERT ... SELECT 
        statement will try to insert the values <1, 2> which gives an error
      ddb5a563
  2. 12 Feb, 2007 11 commits
    • unknown's avatar
      Merge mysql.com:/home/hf/work/20691/my50-20691 · 4c2bc81a
      unknown authored
      into  mysql.com:/home/hf/work/25492/my50-25492
      
      
      sql/item.cc:
        Auto merged
      4c2bc81a
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · e7e25506
      unknown authored
      into  mysql.com:/home/hf/work/25492/my50-25492
      
      
      e7e25506
    • unknown's avatar
      Merge mysql.com:/home/hf/work/25492/my41-25492 · 04b64f00
      unknown authored
      into  mysql.com:/home/hf/work/25492/my50-25492
      
      
      libmysqld/lib_sql.cc:
        merging
      04b64f00
    • unknown's avatar
      bug #25492 (Invalid deallocation in mysql_stmt_fetch) · fd76e148
      unknown authored
      
      libmysqld/lib_sql.cc:
        code modified to prevent freeing of memory that wasn't malloc-ed.
        Now we check if MYSQL_STMT::result was used.
      fd76e148
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0 · dfe66b93
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      dfe66b93
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 5e84eb56
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      5e84eb56
    • unknown's avatar
      valgrind error fix · 7ca34a79
      unknown authored
      7ca34a79
    • unknown's avatar
      Fixed MacOSX/Intel linking problem · e307a46c
      unknown authored
       Common symbols with and without initialization
       cause the apple linker to exclude then from the
       list of global symbols.
      
      
      e307a46c
    • unknown's avatar
      Bug#24630 Subselect query crashes mysqld · 2572c826
      unknown authored
      The crash happens because second filling of the same I_S table happens in
      case of subselect with order by. table->sort.io_cache previously allocated
      in create_sort_index() is deleted during second filling
      (function get_schema_tables_result). There are two places where
      I_S table can be filled: JOIN::exec and create_sort_index().
      To fix the bug we should check if the table was already filled
      in one of these places and skip processing of the table in second.
      
      
      mysql-test/r/information_schema.result:
        test case
      mysql-test/t/information_schema.test:
        test case
      sql/mysql_priv.h:
        added new parameter 'executed_place' to function get_schema_tables_result()
      sql/sql_select.cc:
        added new parameter 'executed_place' to function get_schema_tables_result()
      sql/sql_show.cc:
        added more accurate check for cases when we need to refresh I_S table
      sql/table.cc:
        added more accurate check for cases when we need to refresh I_S table
      sql/table.h:
        added more accurate check for cases when we need to refresh I_S table
      2572c826
    • unknown's avatar
      bug #20691 (INSERT (DEFAULT) may insert garbage with NO DEFAULT NOT NULL field) · 07f36668
      unknown authored
      Some fields (GEOMETRY first of all) can't be handled properly in this
      case at all. So we return an error in this case
      
      
      mysql-test/r/default.result:
        result fixed
      mysql-test/r/gis.result:
        result fixed
      mysql-test/t/default.test:
        VIEW test added
      mysql-test/t/gis.test:
        testcase added
      sql/item.cc:
        set_defaults() changed with the 'reset()'
      07f36668
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · 1932ac9a
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26159
      
      
      1932ac9a
  3. 11 Feb, 2007 3 commits
    • unknown's avatar
      sql_view.cc: · 5e42c0de
      unknown authored
        Post fix for bug#12122.
      information_schema.result:
        Corrected test case after fixing bug#12122.
      
      
      sql/sql_view.cc:
        Post fix for bug#12122.
      mysql-test/r/information_schema.result:
        Corrected test case after fixing bug#12122.
      5e42c0de
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · a544b64f
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/12122-bug-5.0-opt-mysql
      
      
      a544b64f
    • unknown's avatar
      Fixed bug #26159. · 3e4f834d
      unknown authored
      A wrong order of statements in QUICK_GROUP_MIN_MAX_SELECT::reset
      caused a crash when a query with DISTINCT was executed by a loose scan
      for an InnoDB table that had been emptied. 
      
      
      mysql-test/r/innodb_mysql.result:
        Added a test case for bug #26159.
      mysql-test/t/innodb_mysql.test:
        Added a test case for bug #26159.
      sql/opt_range.cc:
        Fixed bug #26159.
        A wrong order of statements in QUICK_GROUP_MIN_MAX_SELECT::reset
        caused a crash when a query with DISTINCT was executed by a loose scan
        for an InnoDB table that had been emptied. 
        For an empty table quick_prefix_select->reset() was not called at all
        and thus some important initialization steps were missing.
      3e4f834d
  4. 09 Feb, 2007 7 commits
    • unknown's avatar
      Bug#12122: The MERGE algorithm isn't applicable if the ORDER BY clause is · 308da651
      unknown authored
      present.
      
      A view created with CREATE VIEW ... ORDER BY ... cannot be resolved with
      the MERGE algorithm, even when no other part of the CREATE VIEW statement
      would require the view to be resolved using the TEMPTABLE algorithm.
      
      The check for presence of the ORDER BY clause in the underlying select is 
      removed from the st_lex::can_be_merged() function.
      The ORDER BY list of the underlying select is appended to the ORDER BY list 
      
      
      mysql-test/t/view.test:
        Added a test case for bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
      mysql-test/r/view.result:
        Added a test case for bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
      sql/sql_lex.cc:
        Bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
        The st_lex::can_be_merged() function now allows views with the ORDER BY
        clause to be resolved using MERGE algorithm. The ORDER BY list of the view 
        is appended to the ORDER BY list of the embedding select.
      308da651
    • unknown's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · ce8c0ec2
      unknown authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26017
      
      
      ce8c0ec2
    • unknown's avatar
      Fixed bug #26017. · 7ab33d50
      unknown authored
      Objects of the class Item_equal contain an auxiliary member
      eval_item of the type cmp_item that is used only for direct 
      evaluation of multiple equalities. Currently a multiple equality
      is evaluated directly only in the cases when the equality holds
      at most for one row in the result set.
      The compare collation of eval_item was determined incorectly.
      It could lead to returning incorrect results for some queries.
      
      
      mysql-test/r/join_outer.result:
        Added a test case for bug #26017.
      mysql-test/t/join_outer.test:
        Added a test case for bug #26017.
      sql/item_cmpfunc.cc:
        Fixed bug #26017.
        Objects of the class Item_equal contain an auxiliary member
        eval_item of the type cmp_item that is used only for direct 
        evaluation of multiple equalities. Currently a multiple equality
        is evaluated directly only in the cases when the equality holds
        at most for one row in the result set.
        The compare collation of eval_item was determined incorrectly.
        It could lead to returning incorrect results for some queries.
      sql/item_cmpfunc.h:
        Fixed bug #26017.
        Removed the cmp_collation member from the Item_equal class as useless
        for the current implementation of the class.
      7ab33d50
    • 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 trift2.:/MySQL/M50/mysql-5.0 · 2abc977d
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      2abc977d
    • 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
  5. 08 Feb, 2007 4 commits
  6. 07 Feb, 2007 9 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 trift2.:/MySQL/M50/mysql-5.0 · 1c3b0707
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      1c3b0707
    • 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
  7. 06 Feb, 2007 4 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
      copy from test-extra-5.0 to main tree · 630091fe
      unknown authored
      
      BitKeeper/etc/ignore:
        Added mysql-test/mysql-test-run-shell to the ignore list
      mysql-test/suite/funcs_2/include/check_charset.inc:
        finished files with newline
      630091fe
    • 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
  8. 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