1. 23 Nov, 2006 1 commit
    • unknown's avatar
      Fix for BUG##24415: Instance manager test im_daemon_life_cycle · cf9038e9
      unknown authored
      fails randomly.
      
      The problem was that the test case used command line tool (mysql)
      without specifying connect_timeout argument. In some cases,
      this lead to hanging of the test case.
      
      The fix is to specify --connect_timeout=1 when starting mysql.
      
      Also, the patch contains polishing and various cleanups to simplify
      analyzing of the problems further.
      
      The patch affects only test suite, no server codebase has been
      touched.
      
      
      mysql-test/lib/mtr_im.pl:
        Remember PID of the IM-spawner -- a process, that is
        used to fork IM-angel.
      mysql-test/lib/mtr_io.pl:
        Trim \n from the PID.
      mysql-test/lib/mtr_process.pl:
        Don't complain if it was IM-spawner, who died.
      mysql-test/r/im_daemon_life_cycle.result:
        Update the result file.
      mysql-test/r/im_life_cycle.result:
        Update the result file.
      mysql-test/t/im_daemon_life_cycle.imtest:
        Polishing: add more comments, be more verbose.
      mysql-test/t/im_life_cycle.imtest:
        Polishing: be more verbose.
      mysql-test/t/im_utils.imtest:
        Polishing: be more verbose.
      mysql-test/t/kill_n_check.sh:
        Log messages to the extrenal file so that they can be analyzed
        if test case failed.
      mysql-test/t/wait_for_process.sh:
        Log messages to the extrenal file so that they can be analyzed
        if test case failed.
      mysql-test/t/wait_for_socket.sh:
        Log messages to the extrenal file so that they can be analyzed
        if test case failed.
      mysql-test/t/log.sh:
        Dummy script to facilitate logging from test-scripts.
      mysql-test/t/utils.sh:
        A bunch of auxilary functions to facilitate logging.
      cf9038e9
  2. 22 Nov, 2006 4 commits
  3. 21 Nov, 2006 4 commits
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · 413e0f0b
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159
      
      
      413e0f0b
    • unknown's avatar
      Fix after manual merge. · fdc37f06
      unknown authored
      
      mysql-test/r/ps.result:
        Fix after manual merge: update for different error message.
      mysql-test/t/ps.test:
        Fix after manual merge: use right error codes.
      fdc37f06
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug23159 · 596e29c2
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159
      
      
      mysql-test/r/ps.result:
        Manual merge.
      mysql-test/t/ps.test:
        Manual merge.
      sql/mysqld.cc:
        Manual merge.
      sql/set_var.cc:
        Manual merge.
      596e29c2
    • unknown's avatar
      BUG#23159: prepared_stmt_count should be status variable · 7a45fb54
      unknown authored
      Make Prepared_stmt_count a global status variable, accessible via
      SHOW STATUS LIKE 'Prepared_stmt_count';.  Documentation should be
      updated.
      
      
      mysql-test/r/ps.result:
        Update result for bug#16365: Prepared Statements: DoS with too many
        open statements, according to bug#23159: prepared_stmt_count should be
        status variable.
      mysql-test/t/ps.test:
        Update test case for bug#16365: Prepared Statements: DoS with too many
        open statements, according to bug#23159: prepared_stmt_count should be
        status variable.
      sql/mysqld.cc:
        Add Prepared_stmt_count as global status variable.
      sql/set_var.cc:
        Remove prepared_stmt_count as system variable.
      7a45fb54
  4. 17 Nov, 2006 6 commits
  5. 16 Nov, 2006 4 commits
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · a4823607
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
      
      
      sql/item_strfunc.cc:
        Auto merged
      mysql-test/r/func_str.result:
        Manual merge.
      mysql-test/t/func_str.test:
        Manual merge.
      a4823607
    • unknown's avatar
      Add 5.0 part of fix for bug 17047. · af22eb35
      unknown authored
      
      mysql-test/r/func_str.result:
        Add result for bug#17047: CHAR() and IN() can return NULL without
        signaling NULL result.
      mysql-test/t/func_str.test:
        Add test case for bug#17047: CHAR() and IN() can return NULL without
        signaling NULL result.
      sql/item_strfunc.cc:
        Add Item_str_func::fix_fields() implementation, and set maybe_null to
        TRUE if we are in the SQL mode that requires some functions to return
        null even if they normally do not.
      sql/item_strfunc.h:
        Add declaration of Item_str_func::fix_fields().
        Do not reset maybe_null in Item_func_char::fix_length_and_dec().
      af22eb35
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug17047 · ec845335
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      mysql-test/r/func_in.result:
        Manual merge.  Add "End of 5.0 tests".
      mysql-test/t/func_in.test:
        Manual merge.  Add "End of 5.0 tests".
      ec845335
    • unknown's avatar
      BUG#17047: CHAR() and IN() can return NULL without signaling NULL result · e40e8052
      unknown authored
      The problem was that some functions (namely IN() starting with 4.1, and
      CHAR() starting with 5.0) were returning NULL in certain conditions,
      while they didn't set their maybe_null flag.  Because of that there could
      be some problems with 'IS NULL' check, and statements that depend on the
      function value domain, like CREATE TABLE t1 SELECT 1 IN (2, NULL);.
      
      The fix is to set maybe_null correctly.
      
      
      mysql-test/r/func_in.result:
        Add result for bug#17047: CHAR() and IN() can return NULL without
        signaling NULL result.
      mysql-test/t/func_in.test:
        Add test case for bug#17047: CHAR() and IN() can return NULL without
        signaling NULL result.
      sql/item_cmpfunc.cc:
        Remove assignment to maybe_null, as it was already set in fix_fields()
        based on all arguments, not only on the first.
      e40e8052
  6. 13 Nov, 2006 3 commits
    • unknown's avatar
      Bug#23703 (DROP TRIGGER needs an IF EXISTS) · 541e9c9a
      unknown authored
      This change set implements the DROP TRIGGER IF EXISTS functionality.
      
      This fix is considered a bug and not a feature, because without it,
      there is no known method to write a database creation script that can create
      a trigger without failing, when executed on a database that may or may not
      contain already a trigger of the same name.
      
      Implementing this functionality closes an orthogonality gap between triggers
      and stored procedures / stored functions (which do support the DROP IF
      EXISTS syntax).
      
      In sql_trigger.cc, in mysql_create_or_drop_trigger,
      the code has been reordered to:
      - perform the tests that do not depend on the file system (access()),
      - get the locks (wait_if_global_read_lock, LOCK_open)
      - call access()
      - perform the operation
      - write to the binlog
      - unlock (LOCK_open, start_waiting_global_read_lock)
      
      This is to ensure that all the code that depends on the presence of the
      trigger file is executed in the same critical section,
      and prevents race conditions similar to the case fixed by Bug 14262 :
      
      - thread 1 executes DROP TRIGGER IF EXISTS, access() returns a failure
      - thread 2 executes CREATE TRIGGER
      - thread 2 logs CREATE TRIGGER
      - thread 1 logs DROP TRIGGER IF EXISTS
      
      The patch itself is based on code contributed by the MySQL community,
      under the terms of the Contributor License Agreement (See Bug 18161).
      
      
      mysql-test/r/rpl_trigger.result:
        DROP TRIGGER IF EXISTS
      mysql-test/r/trigger.result:
        DROP TRIGGER IF EXISTS
      mysql-test/t/rpl_trigger.test:
        DROP TRIGGER IF EXISTS
      mysql-test/t/trigger.test:
        DROP TRIGGER IF EXISTS
      sql/sql_trigger.cc:
        DROP TRIGGER IF EXISTS
      sql/sql_yacc.yy:
        DROP TRIGGER IF EXISTS
      541e9c9a
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 1031c460
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg23651
      
      
      sql/item_func.cc:
        Auto merged
      1031c460
    • unknown's avatar
      Fix for bug bug#23651 "Server crashes when trigger which uses · fc83f787
      unknown authored
      stored function invoked from different connections".
      
      Invocation of trigger which was using stored function from different
      connections caused server crashes (for non-debug server this happened
      in highly concurrent environment, but debug server failed on assertion
      in relatively simple scenario).
      
      Item_func_sp was not safe to use in triggers (in other words for
      re-execution from different threads) as artificial TABLE object
      pointed by Item_func_sp::dummy_table referenced incorrect THD
      object. To fix the problem we force re-initialization of this
      object for each re-execution of statement.
      
      
      mysql-test/r/trigger.result:
        Added test for bug#23651 "Server crashes when trigger which uses
        stored function invoked from different connections".
      mysql-test/t/trigger.test:
        Added test for bug#23651 "Server crashes when trigger which uses
        stored function invoked from different connections".
      sql/item_func.cc:
        To make Item_func_sp safe for usage in triggers (in other words safe
        for re-execution in different threads) we need to ensure that artificial
        TABLE object pointed by Item_func_sp::dummy_table references correct
        THD object. To achieve this we simply force its re-initialization for
        each re-execution of statement.
      fc83f787
  7. 12 Nov, 2006 1 commit
  8. 11 Nov, 2006 3 commits
    • unknown's avatar
      Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1 · 3af223ed
      unknown authored
      into  mysql.com:/Users/kent/mysql/bk/mysql-5.0
      
      
      3af223ed
    • unknown's avatar
      mysql-test-run.pl: · c6d31783
      unknown authored
        Test for base directory when a RPM install corrected
      
      
      mysql-test/mysql-test-run.pl:
        Test for base directory when a RPM install corrected
      c6d31783
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 75a0878f
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime
      
      
      configure.in:
        Auto merged
      include/my_time.h:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/rename.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      mysql-test/t/im_daemon_life_cycle.imtest:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/time.cc:
        Auto merged
      mysql-test/t/rename.test:
        Use local (resolve a conflict)
      75a0878f
  9. 10 Nov, 2006 14 commits