1. 15 Nov, 2007 1 commit
    • unknown's avatar
      A patch for BUG#19723: kill of active connection yields · 41bd3c87
      unknown authored
      different error code depending on platform.
      
      On Mac OS X, KILL statement issued to kill the current
      connection would return a different error code and message than on
      other platforms ('MySQL server has gone away' instead of 'Shutdown
      in progress').
      
      The reason for this difference was that on Mac OS X we have macro
      SIGNAL_WITH_VIO_CLOSE defined. This macro forces KILL
      implementation to close the communication socket of the thread
      that is being killed. SIGNAL_WITH_VIO_CLOSE macro is defined on
      platforms where just sending a signal is not a reliable mechanism
      to interrupt the thread from sleeping on a blocking system call.
      In a nutshell, closing the socket is a hack to work around an
      operating system bug and awake the blocked thread no matter what.
      
      However, if the thread that is being killed is the same
      thread that issued KILL statement, closing the socket leads to a
      prematurely lost connection. At the same time it is not necessary
      to close the socket in this case, since the thread in question
      is not inside a blocking system call.
      
      The fix, therefore, is to not close the socket if the thread that
      is being killed is the same that issued KILL statement, even with
      defined SIGNAL_WITH_VIO_CLOSE.
      
      
      mysql-test/r/kill.result:
        Update result file.
      mysql-test/t/kill.test:
        Added a test case for BUG#19723: kill of active connection yields
        different error code depending on platform.
      sql/sql_class.cc:
        Call close_active_vio() only if we're killing another thread.
      41bd3c87
  2. 14 Nov, 2007 3 commits
  3. 12 Nov, 2007 2 commits
    • unknown's avatar
      A patch for BUG#32172: information_schema test fails with · fea3b463
      unknown authored
      wait_condition timeout.
      
      The problem was that the event thread didn't manage to execute
      the event in 30 seconds on highly-loaded box. The fix is to
      increase timeout.
      
      This is a fix for the test suite.
      
      
      mysql-test/t/information_schema.test:
        Provide more time to execute an event.
      fea3b463
    • unknown's avatar
      Fix for a BUG#31898: 16M memory allocations for user variables · 87cd61c0
      unknown authored
      in stored procedure.
      
      The problem was that MySQL used unnecessarily large amounts of
      memory if user variables were used as an argument to CONCAT or
      CONCAT_WS -- 16M per each user variable used.
      
      Technically, it happened because MySQL used the following
      allocation strategy for string functions to avoid multiple
      realloc() calls: in the virtual operation fix_length_and_dec()
      the attribute max_length was calculated as a sum of max_length
      values for each argument.
      
      Although this approach worked well for small (or fixed) data types,
      there could be a problem if there as a user variable among
      the arguments of a string function -- max_length of the function
      would be 16M (as the max_length of a user variable is 16M).
      
      Both CONCAT() and CONCAT_WS() functions suffer from this problem.
      
      The fix is to do not use meta-data for allocating memory.
      The following strategy is proposed instead: allocate the exact
      length of the result string at the first record, double the amount
      of memory allocated when it is required.
      
      No test case for this bug because there is no way to test memory
      consumption in a robust way with our test suite.
      
      
      sql/item_strfunc.cc:
        Implement memory-wise allocation strategy.
      87cd61c0
  4. 06 Nov, 2007 2 commits
  5. 05 Nov, 2007 5 commits
  6. 02 Nov, 2007 4 commits
  7. 01 Nov, 2007 22 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · e2c03c71
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2
      
      e2c03c71
    • unknown's avatar
      A fix for Bug#32030 "DELETE does not return an error and deletes rows if · 9d4d6f47
      unknown authored
      error evaluating WHERE"
      
      DELETE with a subquery in WHERE clause would sometimes ignore subquery
      evaluation error and proceed with deletion.
      
      The fix is to check for an error after evaluation of the WHERE clause
      in DELETE.
      
      Addressed review comments.
      
      
      mysql-test/r/group_min_max.result:
        Update the test results to reflect the fix for Bug#32030.
      mysql-test/r/ps.result:
        Update test results (Bug#32030)
      mysql-test/t/group_min_max.test:
        Update the test case to reflect the fix for Bug#32030
      mysql-test/t/ps.test:
        Add a test case for Bug#32030
      sql/sql_delete.cc:
        Check for an error before calling send_ok(). Two different places are
        covered because the subquery code has slightly different execution
        paths depending on ps-protocol/old-protocol
      9d4d6f47
    • unknown's avatar
      Merge endora.local:/Users/davi/mysql/bugs/30882-5.1 · 80ae1ae8
      unknown authored
      into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
      
      
      sql/sql_parse.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      80ae1ae8
    • unknown's avatar
      Merge endora.local:/Users/davi/mysql/bugs/31850-5.1 · 662f6549
      unknown authored
      into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
      
      
      sql/sql_connect.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      662f6549
    • unknown's avatar
      Bug#30882 Dropping a temporary table inside a stored function may cause a server crash · c6fd10db
      unknown authored
      If a stored function that contains a drop temporary table statement
      is invoked by a create temporary table of the same name may cause
      a server crash. The problem is that when dropping a table no check
      is done to ensure that table is not being used by some outer query
      (or outer statement), potentially leaving the outer query with a
      reference to a stale (freed) table.
      
      The solution is when dropping a temporary table, always check if
      the table is being used by some outer statement as a temporary
      table can be dropped inside stored procedures.
      
      The check is performed by looking at the TABLE::query_id value for
      temporary tables. To simplify this check and to solve a bug related
      to handling of temporary tables in prelocked mode, this patch changes
      the way in which this member is used to track the fact that table is
      used/unused. Now we ensure that TABLE::query_id is zero for unused
      temporary tables (which means that all temporary tables which were
      used by a statement should be marked as free for reuse after it's
      execution has been completed).
      
      
      mysql-test/include/handler.inc:
        Add test case for side effect of Bug#30882
      mysql-test/r/handler_innodb.result:
        Add test case result for side effect of Bug#30882
      mysql-test/r/handler_myisam.result:
        Add test case result for side effect of Bug#30882
      mysql-test/r/sp-error.result:
        Add test case result for Bug#30882
      mysql-test/t/sp-error.test:
        Add test case for Bug#30882
      sql/event_db_repository.cc:
        Update close_thread_tables call, no more default values.
      sql/mysql_priv.h:
        Remove implicit default parameters values of the close_thread_tables
        function as no callers are using it.
      sql/slave.cc:
        Update close_thread_tables call, no more default values
      sql/sp_head.cc:
        Update close_thread_tables call, no more default values
      sql/sql_base.cc:
        Changed the approach to distinguishing currently unused temporary tables.
        Now we ensure that such tables always have TABLE::query_id set to 0 and
        use this fact to perform checks during opening and dropping of temporary
        tables. This means that we have to call close_thread_tables() even for
        statements which use only temporary tables. To make this call cheaper,
        we re-factored close_thread_tables() to not take LOCK_open unless there
        are open base tables.
      sql/sql_handler.cc:
        Properly close temporary tables associated with a handler.
      sql/sql_insert.cc:
        close_temporary_table is now merged into drop_temporary_table.
      sql/sql_parse.cc:
        Now the condition doesn't cover all cases because close_thread_tables()
        must be called even for statements that use only temporary tables.
      sql/sql_table.cc:
        Use drop_temporary_table which perform checks to verify if
        the table is not being used. Error path problem is due to
        a handler tables issue and is going to be addressed in bug
        31397.
      sql/table.h:
        Rename previously unused clear_query_id and document the usage of
        query_id and open_by_handler.
      c6fd10db
    • unknown's avatar
      Bug#31850 Test crashes in "embedded" server · cba71f3e
      unknown authored
      The mysql_change_user command fails to properly update the database pointer
      when no database is selected, leading to "use after free" errors. The same
      happens on the user privilege pointer in the thread security context.
      
      The solution is to properly reset and update the database name. Also update
      the user_priv pointer so that it doesn't point to freed memory.
      
      
      sql/sql_connect.cc:
        After a successful call to check_user() without specifying a new
        database name, the previous database thd->db) is freed but the
        pointer is not updated to NULL.
      sql/sql_parse.cc:
        Update the security_ctx->priv_user pointer as it is a alias for
        the user security_ctx->user pointer. Also remove unneeded cast,
        the x_free macro casts the argument.
      cba71f3e
    • unknown's avatar
      disable test · a65e368a
      unknown authored
      a65e368a
    • unknown's avatar
      Cleanup execute_ddl_log_recovery() to not generate an error if · b35ed746
      unknown authored
      there is nothing to recover.
      
      Discovered while working on Bug#12713
      
      
      sql/sql_table.cc:
        Use MYF(0) in my_open() in read_ddl_log_header() called from
        execute_ddl_log_recovery() called during the server start up to not
        generate an error if no ddl log exists. This is not an erroneous situation,
        in fact it's the case in any server statrtup. The error was lost
        anyway, since it was pushed into the stack of the artificial thd.
      b35ed746
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 57de123b
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-net_end
      
      57de123b
    • unknown's avatar
      Use Internal_error_handler mechanism to silence ER_TOO_MANY_FIELDS · 04754d29
      unknown authored
      error in mysql_create_frm instead of
      direct access to my_error() members.
      
      This is a pre-requisite for the patch for Bug#12713.
      
      
      sql/unireg.cc:
        Use Internal_error_handler mechanism to silence ER_TOO_MANY_FIELDS
        error in mysql_create_frm instead of
        direct access to my_error() members.
      04754d29
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 418aaee3
      unknown authored
      into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge
      
      418aaee3
    • unknown's avatar
      Use thd->is_error() instead of direct access to thd->net.report_error · 409862b9
      unknown authored
      in evaluate_join_record().
      
      A minor cleanup required for the fix for Bug#12713.
      
      
      sql/sql_select.cc:
        Use thd->is_error() instead of direct access to thd->net.report_error
        in evaluate_join_record()
      409862b9
    • unknown's avatar
      Fix a compilation warning. · 7d93d670
      unknown authored
      
      sql/sql_connect.cc:
        Fix a compilation warning (unused variable).
      7d93d670
    • unknown's avatar
      Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base · 6720816d
      unknown authored
      into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge
      
      
      sql/item_func.cc:
        Auto merged
      6720816d
    • unknown's avatar
      Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base · 05b053eb
      unknown authored
      into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge
      
      05b053eb
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 6fd41b50
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2
      
      
      sql/sql_parse.cc:
        Auto merged
      6fd41b50
    • unknown's avatar
      disable tests · c7cc2752
      unknown authored
      
      BitKeeper/etc/ignore:
        Added libmysql_r/client_settings.h to the ignore list
      c7cc2752
    • unknown's avatar
      Merge whalegate.ndb.mysql.com:/home/tomas/cge-5.1 · 4a1920cd
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
      
      4a1920cd
    • unknown's avatar
      Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1 · 04b56803
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
      
      04b56803
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb · 73bf8b0b
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/cge-5.1
      
      73bf8b0b
    • unknown's avatar
      Merge 10.102.0.1:/usr/local/mysql/mysql-5.0-ndb · ac1a4bbe
      unknown authored
      into  loke.(none):/home/knielsen/devel/mysql-5.1-new-ndb
      
      
      storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
        Null merge.
      ac1a4bbe
    • unknown's avatar
      Bug #31848: Test failure: Cluster has problems on insert with auto-increment · 9bb1fe68
      unknown authored
      Fix uninitialized variable causing failures for some interpreted update
      operations on gcc 4.2.1.
      
      
      ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
        Fix uninitialized variable causing failures for some interpreted update
        operations on gcc 4.2.1.
      9bb1fe68
  8. 31 Oct, 2007 1 commit