1. 25 Mar, 2008 2 commits
    • unknown's avatar
      Bug#20906 (Multiple assignments in SET in stored routine produce incorrect · 18801aa8
      unknown authored
      instructions)
      
      This bug can not be reproduced in the current version,
      adding the test case to the test suite for coverage, no code change.
      
      
      mysql-test/r/sp-code.result:
        Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
        instructions)
      mysql-test/t/sp-code.test:
        Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
        instructions)
      18801aa8
    • unknown's avatar
      information_schema.test, information_schema.result: · d62c9e33
      unknown authored
        Minor test case cleanup after bug#34529.
      
      
      mysql-test/r/information_schema.result:
        Minor test case cleanup after bug#34529.
      mysql-test/t/information_schema.test:
        Minor test case cleanup after bug#34529.
      d62c9e33
  2. 24 Mar, 2008 1 commit
  3. 23 Mar, 2008 1 commit
  4. 21 Mar, 2008 2 commits
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · a3558b5f
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B26461-5.0-opt
      
      
      a3558b5f
    • unknown's avatar
      Bug #26461: Intrinsic data type bool (1 byte) redefined to BOOL (4 bytes) · cebb6727
      unknown authored
      The bool data type was redefined to BOOL (4 bytes on windows).
      Removed the #define and fixed some of the warnings that were uncovered
      by this.
      Note that the fix also disables 2 warnings :
      4800 : 'type' : forcing value to bool 'true' or 'false' (performance warning)
      4805: 'operation' : unsafe mix of type 'type' and type 'type' in operation
      
      These warnings will be handled in a separate bug, as they are performance related or bogus.
      
      Fixed to int the return type of functions that return more than 
      2 distinct values.
      
      
      CMakeLists.txt:
        Bug #26461: disable the C4800 and C4805 warnings temporarily
      include/config-win.h:
        Bug #26461: 
         - no need for this define for Windows.
         - windows C++ compilers have a bool type
      include/my_global.h:
        Bug #26461: removed bool_defined (no longer needed)
      sql/handler.h:
        Bug #26461: bool functions must return boolean values
      sql/mysql_priv.h:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/procedure.h:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_acl.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_acl.h:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_analyse.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_analyse.h:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_base.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_db.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_delete.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_load.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_parse.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_prepare.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      sql/sql_update.cc:
        Bug #26461: fixed return type of functions that return more than
        2 distinct values.
      cebb6727
  5. 19 Mar, 2008 4 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/PA/5.0-opt-34763 · 070a2334
      unknown authored
      into  host.loc:/home/uchum/work/5.0-opt
      
      
      sql/item.cc:
        Auto merged
      070a2334
    • unknown's avatar
      Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY · 3c5894ba
      unknown authored
        
      When swapping out heap I_S tables to disk, this is done after plan refinement.
      Thus, READ_RECORD::file will still point to the (deleted) heap handler at start
      of execution. This causes segmentation fault if join buffering is used and the 
      query is a star query where the result is found to be empty before accessing
      some table. In this case that table has not been initialized (i.e. had its 
      READ_RECORD re-initialized) before the cleanup routine tries to close the handler.
      Fixed by updating READ_RECORD::file when changing handler.
      
      
      mysql-test/r/information_schema.result:
        Bug#34529: Test result.
      mysql-test/t/information_schema.test:
        Bug#34529: Test case.
      sql/sql_show.cc:
        Bug#34529: The fix.
      3c5894ba
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/bug34512/my50 · e12afb1e
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      e12afb1e
    • unknown's avatar
      Bug #33334 mysqltest_embedded crashes when disconnecting before reap. · 4018b139
      unknown authored
      Before breaking the connection we have to check that there's no query
        executing at the moment. Otherwise it can lead to crash in embedded server.
      
      
      client/mysqltest.c:
        Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
        
        Wait until the query thread is finished before we break the connection.
        Waiting part moved to a separate wait_query_thread_end() function
      mysql-test/r/flush.result:
        Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
        
        test result
      mysql-test/t/flush.test:
        Bug #33334 mysqltest_embedded crashes when disconnecting before reap.
        
        test case
      4018b139
  6. 14 Mar, 2008 1 commit
    • unknown's avatar
      Fixed bug #34763. · 9699767c
      unknown authored
      Queries like:
      
        SELECT ROW(1, 2) IN (SELECT t1.a, 2)
          FROM t1 GROUP BY t1.a
      
      or 
      
        SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2)
          FROM t1 GROUP BY t1.a
      
      lead to assertion failure in the
      Item_in_subselect::row_value_transformer method in debugging
      build, or to unexpected error message in release build:
      
        ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
                            reference in item list)
      
      Unexpected error message and assertion failure have been
      eliminated.
      
      
      mysql-test/r/subselect3.result:
        Added test case for bug #34763.
      mysql-test/t/subselect3.test:
        Added test case for bug #34763.
      sql/item.cc:
        Fixed bug #34763.
        The Item_ref::fix_fields method has been modified to silently
        ignore not fixed outer references: by the definition, those
        references should be fixed later by the call to the
        fix_inner_refs function.
      sql/item_subselect.cc:
        Fixed bug #34763.
        The Item_in_subselect::row_value_transformer method has been
        modified to eliminate assertion failure on not fixed outer
        references: by the definition those references are allowed in
        this context and should be fixed later by the call to the
        fix_inner_refs function.
      9699767c
  7. 13 Mar, 2008 1 commit
  8. 12 Mar, 2008 4 commits
  9. 10 Mar, 2008 2 commits
  10. 08 Mar, 2008 1 commit
  11. 07 Mar, 2008 3 commits
  12. 06 Mar, 2008 2 commits
    • unknown's avatar
      Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 8b5189c3
      unknown authored
      into  mysql.com:/home/psergey/mysql-5.0-bug34945
      
      
      8b5189c3
    • unknown's avatar
      Fix for bug #34512: CAST( AVG( double ) AS DECIMAL ) · 8270d987
      unknown authored
                          returns wrong results
      
      Casting AVG() to DECIMAL led to incorrect results when the arguments
      had a non-DECIMAL type, because in this case
      Item_sum_avg::val_decimal() performed the division by the number of
      arguments twice.
      
      Fixed by changing Item_sum_avg::val_decimal() to not rely on
      Item_sum_sum::val_decimal(), i.e. calculate sum and divide using
      DECIMAL arithmetics for DECIMAL arguments, and utilize val_real() with
      subsequent conversion to DECIMAL otherwise.
      
      
      mysql-test/r/func_group.result:
        Added a test case for bug #34512.
      mysql-test/t/func_group.test:
        Added a test case for bug #34512.
      sql/item_sum.cc:
        Do not use Item_sum_sum::val_decimal() in Item_sum_avg::val_decimal()
        because the first one, depending on the arguments type, may return
        either the sum of the arguments, or the average calculated by the
        virtual val_real() method of Item_sum_avg. Instead, do our own
        calculation based on the arguments type.
      8270d987
  13. 05 Mar, 2008 1 commit
    • unknown's avatar
      Fix for bug #34889: mysql_client_test::test_mysql_insert_id test fails · 0c1dd98e
      unknown authored
                          sporadically
      
      Under some circumstances, the mysql_insert_id() value after SELECT ...
      INSERT could return a wrong value. This could happen when the last
      SELECT ... INSERT did not involve an AUTO_INCREMENT column, but the
      value of mysql_insert_id() was changed by some previous statements.
      
      Fixed by checking the value of thd->insert_id_used in
      select_insert::send_eof() and returning 0 for mysql_insert_id() if it
      is not set.
      
      
      sql/sql_insert.cc:
        Do not return thd->last_insert_id unconditionally in
        select_insert::send_eof(). First check if thd->insert_id_used is
        non-zero, and return 0 otherwise.
      tests/mysql_client_test.c:
        Added a test case for bug #34889.
      0c1dd98e
  14. 03 Mar, 2008 5 commits
    • unknown's avatar
      Raise the version number after cloning 5.0.58 · 4d09306d
      unknown authored
      4d09306d
    • unknown's avatar
      BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql" · cd9f2d1c
      unknown authored
      - Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
        to before the late NULLs filtering code.
      - Backport function comments from 6.0.
      
      
      mysql-test/r/null_key.result:
        BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
        - Testcase
      mysql-test/t/null_key.test:
        BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
        - Testcase
      sql/sql_select.cc:
        BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
        - Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
          to before the late NULLs filtering code.
        - Backport function comments from 6.0
      cd9f2d1c
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/bug31781/my50 · 64bdb0bd
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      64bdb0bd
    • unknown's avatar
      Fix for bug #31781: multi-table UPDATE with temp-pool enabled fails · 162eadbe
      unknown authored
                          with errno 17
      
      my_create() did not perform any checks for the case when a file is
      successfully created by a call to open(), but the call to
      my_register_filename() later fails because the number of open files
      has exceeded the my_open_files limit. This can happen on platforms 
      which do not have getrlimit(), and hence we do not know the real limit
      for open files. In such a case an error was returned to a caller
      although the file has actually been created. Since callers assume
      my_create() to return an error only when it failed to create a file,
      they did not perform any cleanups, leaving an 'orphaned' file on the
      file system.
      
      Fixed by adding a check for the above case to my_create() and ensuring
      the newly created file is deleted before returning an error.
      
      Creating a deterministic test case in the test suite is impossible,
      because the exact steps required to reproduce the above situation
      depend on the platform and/or environment (OS per-user limits, queries
      executed by previous tests, startup parameters). The patch was
      manually tested on Windows using examples posted in the bug report.
      
      
      mysys/my_create.c:
        Ensure that, if the call to my_register_filename() in my_create()
        failed, but the previous open() called succeeded, the newly created
        file is deleted before returning an error.
      162eadbe
    • unknown's avatar
      test case fix · 2cb35cd6
      unknown authored
      2cb35cd6
  15. 01 Mar, 2008 1 commit
  16. 29 Feb, 2008 8 commits
    • unknown's avatar
      Merge host.loc:/home/uchum/work/PP/5.0-opt-34620 · d130b849
      unknown authored
      into  host.loc:/home/uchum/work/5.0-opt-34763
      
      
      d130b849
    • unknown's avatar
      wrong merge fix · 4e7c4ab9
      unknown authored
      4e7c4ab9
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · 4460f5a5
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      mysql-test/t/symlink.test:
        Auto merged
      mysql-test/r/symlink.result:
        after merge fix
      4460f5a5
    • unknown's avatar
      test fix · be59a0ea
      unknown authored
      
      mysql-test/r/symlink.result:
        result fix
      be59a0ea
    • unknown's avatar
      Fixed bug #34830: mixed table and field names in Item_ref · d276cd90
      unknown authored
                        and Item_direct_ref constructor calls.
      
      Order of ref->field_name and ref->table_name arguments
      is of Item_ref and Item_direct_ref in the fix_inner_refs
      function is inverted.
      
      
      sql/sql_select.cc:
        Fixed bug #34830: mixed table and field names in Item_ref
                          and Item_direct_ref constructor calls.
        
        Order of ref->field_name and ref->table_name arguments
        is of Item_ref and Item_direct_ref in the fix_inner_refs
        function is inverted. See definitions:
        
          Item_ref(Name_resolution_context *context_arg, Item **item,
                   const char *table_name_arg, const char *field_name_arg,
                   bool alias_name_used_arg= FALSE)
          and
        
          Item_direct_ref(Name_resolution_context *context_arg, Item **item,
                          const char *table_name_arg,
                          const char *field_name_arg,
                          bool alias_name_used_arg= FALSE)
      d276cd90
    • unknown's avatar
      after merge fix · fa9e35b4
      unknown authored
      fa9e35b4
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · 8bdb243f
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      sql/mysql_priv.h:
        Auto merged
      mysql-test/r/symlink.result:
        manual merge
      mysql-test/t/symlink.test:
        manual merge
      sql/mysqld.cc:
        manual merge
      sql/sql_parse.cc:
        manual merge
      8bdb243f
    • unknown's avatar
      Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(ver 4.1,5.0) · ab604259
      unknown authored
      added new function test_if_data_home_dir() which checks that
      path does not contain mysql data home directory.
      Using of mysql data home directory in
      DATA DIRECTORY & INDEX DIRECTORY is disallowed.
      
      
      mysql-test/r/symlink.result:
        test result
      mysql-test/t/symlink.test:
        test case
      sql/mysql_priv.h:
        new variable mysql_unpacked_real_data_home
      sql/mysqld.cc:
        new variable mysql_unpacked_real_data_home
      sql/sql_parse.cc:
        added new function test_if_data_home_dir() which checks that
        path does not contain mysql data home directory.
        Using of mysql data home directory in
        DATA DIRECTORY & INDEX DIRECTORY is disallowed.
      ab604259
  17. 28 Feb, 2008 1 commit