1. 27 Mar, 2008 4 commits
    • unknown's avatar
      Patch clean up. · d71bd5fa
      unknown authored
      Fixed interference between tests: Users were added but not properly removed.
      This caused later tests to fail.
      
      
      mysql-test/r/grant.result:
        Fixed interference between tests: Users were added but not properly removed.
        This caused later tests to fail.
      mysql-test/t/grant.test:
        Fixed interference between tests: Users were added but not properly removed.
        This caused later tests to fail.
      d71bd5fa
    • unknown's avatar
      Merge mysql.com:/Users/davi/mysql/mysql-5.1-bug33201 · d455ee29
      unknown authored
      into  mysql.com:/Users/davi/mysql/mysql-5.0-bugteam
      
      
      sql/sql_acl.cc:
        Auto merged
      d455ee29
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-bugteam · 5d66282e
      unknown authored
      into  mysql.com:/misc/mysql/34731/50-34731
      
      5d66282e
    • unknown's avatar
      Merge mysql.com:/misc/mysql/34731_/50-34731 · 35ef5948
      unknown authored
      into  mysql.com:/misc/mysql/34731/50-34731
      
      
      sql/opt_range.cc:
        Auto merged
      mysql-test/r/range.result:
        manual merge
      mysql-test/t/range.test:
        manual merge
      35ef5948
  2. 14 Mar, 2008 1 commit
  3. 13 Mar, 2008 1 commit
  4. 12 Mar, 2008 4 commits
  5. 11 Mar, 2008 1 commit
    • unknown's avatar
      BUG#31024: STOP SLAVE does not stop attempted connect()s · d6c738c0
      unknown authored
      Problem: if the IO slave thread is attempting to connect,
      STOP SLAVE waits for the attempt to finish. 
      It may take a long time.
      Fix: don't wait, stop the slave immediately.
      
      
      sql/slave.cc:
        Send a SIGALRM signal to the slave thread when stopping it (using
        pthread_kill()). This breaks current socket(), connect(), poll() etc.
        calls, and makes the subsequent thd->awake() call effective.
        
        Also, move the definition of KICK_SLAVE to slave.cc.
      sql/sql_repl.h:
        Removed KICK_SLAVE and inlined it in slave.cc because:
         - it was only called once, so better to make it local to where it is used
         - it needed to include a preprocessor conditional in the middle
      d6c738c0
  6. 10 Mar, 2008 3 commits
    • unknown's avatar
      Bug#34731: highest possible value for INT erroneously filtered by WHERE · 13e6025b
      unknown authored
      WHERE f1 < n ignored row if f1 was indexed integer column and
      f1 = TYPE_MAX ^ n = TYPE_MAX+1. The latter value when treated
      as TYPE overflowed (obviously). This was not handled, it is now.
      
      
      mysql-test/r/range.result:
        show that on an index int column, we no longer disregard
        a field val of TYPE_MAX in SELECT ... WHERE ... < TYPE_MAX+1
      mysql-test/t/range.test:
        show that on an index int column, we no longer disregard
        a field val of TYPE_MAX in SELECT ... WHERE ... < TYPE_MAX+1
      sql/opt_range.cc:
        Handle overflowing of int-types in range-optimizer.
        Unfortunately requires re-indentation of entire block.
        Overflow (err == 1) was handled, but only if
        field->cmp_type() != value->result_type(), which it
        just wasn't in our case.
      13e6025b
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 2c9fe71c
      unknown authored
      into  mysql.com:/misc/mysql/34749/50-34749
      
      
      mysql-test/r/func_misc.result:
        Auto merged
      mysql-test/t/func_misc.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      2c9fe71c
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · f1057cf4
      unknown authored
      into  mysql.com:/misc/mysql/29645/50-29645
      
      f1057cf4
  7. 08 Mar, 2008 1 commit
  8. 07 Mar, 2008 3 commits
    • unknown's avatar
      Bug #26622 MASTER_POS_WAIT does not work as documented · c5a92ca0
      unknown authored
      Affected tests fixing. After the fix for st_relay_log_info::wait_for_pos() that
      handles widely used select('master-bin.xxxx',pos) invoked by mysqltest
      there appeared to be four tests that either tried synchronizing when
      the slave was stopped or used incorrect synchronization method like
      to call `sync_with_master' from the current connection being to the
      master itself.
      
      Fixed with correcting the current connection or/and using the correct
      synchronization macro when possible.
      
      
      mysql-test/r/rpl_loaddata.result:
        results changed
      mysql-test/r/rpl_slave_status.result:
        results changed
      mysql-test/t/rpl_loaddata.test:
        fixing cleanup for two tests
      mysql-test/t/rpl_skip_error.test:
        fixing cleanup for two tests
      mysql-test/t/rpl_slave_status.test:
        fixing cleanup
      mysql-test/t/rpl_temporary.test:
        fixing synchronizations to use the intended correct macro.
      c5a92ca0
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 44704088
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B34909-5.0-opt
      
      44704088
    • unknown's avatar
      Bug #34909: mysqldump returns a 0 status on error when using · 159c34bf
      unknown authored
        --master-data
      
      No error code was returned by mysqldump if it detects that binary
      logging is not enabled on the server.
      Fixed by returning error code.
      
      
      client/mysqldump.c:
        Bug #34909: add error code
      mysql-test/r/mysqldump-no-binlog.result:
        Bug #34909: test case
      mysql-test/t/mysqldump-no-binlog-master.opt:
        Bug #34909: test case
      mysql-test/t/mysqldump-no-binlog.test:
        Bug #34909: test case
      159c34bf
  9. 06 Mar, 2008 2 commits
    • unknown's avatar
      Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 4b9aa6a4
      unknown authored
      into  mysql.com:/home/psergey/mysql-5.0-bug34945
      
      4b9aa6a4
    • unknown's avatar
      Bug#26622 MASTER_POS_WAIT does not work as documented · 16d529d3
      unknown authored
      MASTER_POS_WAIT return values are different than expected when the server is not a slave. 
      It returns -1 instead of NULL.
      
      Fixed with correcting  st_relay_log_info::wait_for_pos() to return the proper
      value in the case of rli info is not inited.
      
      
      mysql-test/r/rpl_master_pos_wait.result:
        results changed
      mysql-test/t/rpl_master_pos_wait.test:
        the new test to check that select master_pos_wait() to a server does 
        not have master info returns NULL as specified.
      sql/slave.cc:
        changing the return value to correspond the specification.
      16d529d3
  10. 05 Mar, 2008 2 commits
    • unknown's avatar
      Fix for bug #34889: mysql_client_test::test_mysql_insert_id test fails · 5c94cde7
      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.
      5c94cde7
    • unknown's avatar
      Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0 · e1e509b7
      unknown authored
      into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
      
      e1e509b7
  11. 03 Mar, 2008 5 commits
    • unknown's avatar
      Raise the version number after cloning 5.0.58 · d336e13b
      unknown authored
      d336e13b
    • unknown's avatar
      BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql" · 2caf10ee
      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
      2caf10ee
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/bug31781/my50 · bcf0b119
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      bcf0b119
    • unknown's avatar
      Fix for bug #31781: multi-table UPDATE with temp-pool enabled fails · 810c40ab
      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.
      810c40ab
    • unknown's avatar
      test case fix · c024555a
      unknown authored
      c024555a
  12. 02 Mar, 2008 1 commit
    • unknown's avatar
      Bug#22438 · 658c9617
      unknown authored
      
      mysql-test/r/mysqldump.result:
        updated result
      mysql-test/t/mysqldump.test:
        hide master_log_pos number
      658c9617
  13. 01 Mar, 2008 1 commit
  14. 29 Feb, 2008 7 commits
    • unknown's avatar
      wrong merge fix · 88790657
      unknown authored
      88790657
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · a1003a6c
      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
      a1003a6c
    • unknown's avatar
      test fix · cdcbcc5a
      unknown authored
      
      mysql-test/r/symlink.result:
        result fix
      cdcbcc5a
    • unknown's avatar
      Fixed bug #34830: mixed table and field names in Item_ref · fe65567e
      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)
      fe65567e
    • unknown's avatar
      after merge fix · c2b51c23
      unknown authored
      c2b51c23
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · 88cee26e
      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
      88cee26e
    • unknown's avatar
      Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(ver 4.1,5.0) · 69289dbf
      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.
      69289dbf
  15. 28 Feb, 2008 4 commits
    • unknown's avatar
      Post-merge fix for Bug 33851. The initialization order of members · bc489574
      unknown authored
      must match the order which they were declared in the class definition. 
      
      
      sql/item.cc:
        Fix initialization order, parameter was the last one declared.
      bc489574
    • unknown's avatar
      Merge host.loc:/home/uchum/work/PP/5.0-opt-34620 · e427a847
      unknown authored
      into  host.loc:/home/uchum/work/5.0-opt
      
      e427a847
    • unknown's avatar
      Fixed bug #34620: item_row.cc:50: Item_row::illegal_method_call(const char*): · d05c8d38
      unknown authored
                        Assertion `0' failed
      
      If ROW item is a part of an expression that also has
      aggregate function calls (COUNT/SUM/AVG...), a
      "splitting" with an Item::split_sum_func2 function
      is applied to that ROW item.
      Current implementation of Item::split_sum_func2
      replaces this Item_row with a newly created
      Item_aggregate_ref reference to it.
      Then the row cache tries to work with the
      Item_aggregate_ref object as with the Item_row object:
      row cache calls row-emulation methods such as cols and
      element_index. Item_aggregate_ref (like it's parent
      Item_ref) inherits dummy implementations of those
      methods from the hierarchy root Item, and call to
      them leads to failed assertions and wrong data
      output.
      
      Row-emulation virtual functions (cols, element_index, addr,
      check_cols, null_inside and bring_value) of Item_ref have
      been overloaded to forward calls to an underlying item
      reference.
      
      
      
      
      mysql-test/r/row.result:
        Added test case for bug #34620.
      mysql-test/t/row.test:
        Added test case for bug #34620.
      sql/item.h:
        Fixed bug #34620.
        Row-emulation virtual functions (cols, element_index, addr,
        check_cols, null_inside and bring_value) of Item_ref have
        been overloaded to forward calls to an underlying item
        reference.
      d05c8d38
    • unknown's avatar
      Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210 · 8d4c99e3
      unknown authored
      The problem is that passing anything other than a integer to a limit
      clause in a prepared statement would fail. This limitation was introduced
      to avoid replication problems (e.g: replicating the statement with a
      string argument would cause a parse failure in the slave).
      
      The solution is to convert arguments to the limit clause to a integer
      value and use this converted value when persisting the query to the log.
      
      
      mysql-test/r/limit.result:
        Update test case result.
      mysql-test/r/ps.result:
        Add test case result for Bug#33851
      mysql-test/r/rpl_user_variables.result:
        Test case result for replication of prepared statement with
        limit clause.
      mysql-test/t/limit.test:
        Test parameters to limit clause.
      mysql-test/t/ps.test:
        Add test case for Bug#33851
      mysql-test/t/rpl_user_variables.test:
        Test replication of a parameter which value is converted.
      sql/item.cc:
        Convert value to integer if it's a parameter to a limit clause.
      sql/item.h:
        Flag signal that item is a parameter to a limit clause.
      sql/item_func.cc:
        Const member functions, object is not mutated.
      sql/sql_class.h:
        Const member functions, object is not mutated.
      sql/sql_yacc.yy:
        Flag that item is a parameter to a limit clause.
      8d4c99e3