An error occurred fetching the project authors.
  1. 24 Nov, 2009 1 commit
  2. 23 Nov, 2009 1 commit
    • Konstantin Osipov's avatar
      Backport of: · 777c3034
      Konstantin Osipov authored
      ------------------------------------------------------------
      revno: 2630.13.2
      committer: Davi Arnaut <davi@sun.com>
      branch nick: WL4284-6.0
      timestamp: Thu 2008-07-03 18:26:51 -0300
      message:
      Remove unused USING_TRANSACTIONS macro which unnecessarily
      cumbers the code. This macro is a historical leftover and
      has no practical use since its unconditionally defined.
      777c3034
  3. 20 Nov, 2009 1 commit
    • Konstantin Osipov's avatar
      Backport of: · 948ee7e5
      Konstantin Osipov authored
      revno: 2476.784.2
      committer: davi@moksha.local
      timestamp: Thu 2007-09-27 16:56:27 -0300 
      message:
      Bug#28870 check that table locks are released/reset
          
      The problem is that some mysql_lock_tables error paths are not
      resetting the tables lock type back to TL_UNLOCK. If the lock
      types are not reset properly, a table might be returned to the
      table cache with wrong lock_type.
            
      The proposed fix is to ensure that the tables lock type is always
      properly reset when mysql_lock_tables fails. This is a
      incompatible change with respect to the process state information.
      948ee7e5
  4. 10 Nov, 2009 3 commits
    • Davi Arnaut's avatar
      Backport of Bug#15192 to mysql-next-mr · a7bbc779
      Davi Arnaut authored
      ------------------------------------------------------------
      revno: 2597.4.17
      revision-id: sp1r-davi@mysql.com/endora.local-20080328174753-24337
      parent: sp1r-anozdrin/alik@quad.opbmk-20080328140038-16479
      committer: davi@mysql.com/endora.local
      timestamp: Fri 2008-03-28 14:47:53 -0300
      message:
        Bug#15192 "fatal errors" are caught by handlers in stored procedures
      
        The problem is that fatal errors (e.g.: out of memory) were being
        caught by stored procedure exception handlers which could cause
        the execution to not be stopped due to a continue handler.
      
        The solution is to not call any exception handler if the error is
        fatal and send the fatal error to the client.
      a7bbc779
    • Davi Arnaut's avatar
      Backport of Bug#41860 to mysql-next-mr · 5783428f
      Davi Arnaut authored
      ------------------------------------------------------------
      revno: 3317
      revision-id: davi.arnaut@sun.com-20090522170916-fzc5ca3tjs9roy1t
      parent: patrick.crews@sun.com-20090522152933-ole8s3suy4zqyvku
      committer: Davi Arnaut <Davi.Arnaut@Sun.COM>
      branch nick: 41860-6.0
      timestamp: Fri 2009-05-22 14:09:16 -0300
      message:
        Bug#41860: Without Windows named pipe
      
        The problem was that the patch for Bug#10374 broke named pipe
        and shared memory transports on Windows due to a failure to
        implement a dummy poll method for transports other than BSD
        sockets. Another problem was that mysqltest lacked support
        for named pipe and shared memory connections, which lead to
        misleading test cases that were supposed run common queries
        over both transports.
      
        The solution is to properly implement, at the VIO layer, the
        poll and is_connected methods. The is_connected method is
        implemented for every suppported transport and the poll one
        only where it makes sense. Furthermore, support for named pipe
        and shared memory connections is added to mysqltest as to
        enable testing of both transports using the test suite.
      5783428f
    • Davi Arnaut's avatar
      Backport of Bug#10374 to mysql-next-mr · 58706b3f
      Davi Arnaut authored
      ------------------------------------------------------------
      revno: 2597.37.3
      revision-id: sp1r-davi@mysql.com/endora.local-20080328123626-16430
      parent: sp1r-anozdrin/alik@quad.opbmk-20080327125300-11290
      committer: davi@mysql.com/endora.local
      timestamp: Fri 2008-03-28 09:36:26 -0300
      message:
        Bug#10374 GET_LOCK does not let connection to close on the server side if it's aborted
      
        The problem is that the server doesn't detect aborted connections which
        are waiting on a lock or sleeping (user sleep), wasting system resources
        for a connection that is already dead.
      
        The solution is to peek at the connection every five seconds to verify if
        the connection is not aborted. A aborted connection is detect by polling
        the connection socket for available data to be read or end of file and in
        case of eof, the wait is aborted and the connection killed.
      58706b3f
  5. 02 Nov, 2009 1 commit
  6. 21 Oct, 2009 1 commit
    • Konstantin Osipov's avatar
      Backport of revno 2630.28.10, 2630.28.31, 2630.28.26, 2630.33.1, · d4632dff
      Konstantin Osipov authored
      2630.39.1, 2630.28.29, 2630.34.3, 2630.34.2, 2630.34.1, 2630.29.29,
      2630.29.28, 2630.31.1, 2630.28.13, 2630.28.10, 2617.23.14 and
      some other minor revisions.
      
      This patch implements: 
      
      WL#4264 "Backup: Stabilize Service Interface" -- all the
      server prerequisites except si_objects.{h,cc} themselves (they can
      be just copied over, when needed).
      
      WL#4435: Support OUT-parameters in prepared statements.
      
      (and all issues in the initial patches for these two
      tasks, that were discovered in pushbuild and during testing).
      
      Bug#39519: mysql_stmt_close() should flush all data
      associated with the statement.
      
      After execution of a prepared statement, send OUT parameters of the invoked
      stored procedure, if any, to the client.
      
      When using the binary protocol, send the parameters in an additional result
      set over the wire.  When using the text protocol, assign out parameters to
      the user variables from the CALL(@var1, @var2, ...) specification.
      
      The following refactoring has been made:
        - Protocol::send_fields() was renamed to Protocol::send_result_set_metadata();
        - A new Protocol::send_result_set_row() was introduced to incapsulate
          common functionality for sending row data.
        - Signature of Protocol::prepare_for_send() was changed: this operation
          does not need a list of items, the number of items is fully sufficient.
      
      The following backward incompatible changes have been made:
        - CLIENT_MULTI_RESULTS is now enabled by default in the client;
        - CLIENT_PS_MULTI_RESUTLS is now enabled by default in the client.
      d4632dff
  7. 20 Oct, 2009 1 commit
    • Tatiana A. Nurnberg's avatar
      Bug#28141: Control C on query waiting on lock causes ERROR 1053 (server shutdown) · 3f42e4bd
      Tatiana A. Nurnberg authored
      If a thread is killed in the server, we throw "shutdown" only if one is actually in
      progress; otherwise, we throw "query interrupted".
      
      Control-C in the mysql command-line client is "incremental" now.
      First Control-C sends KILL QUERY (when connected to 5.0+ server, otherwise, see next)
      Next  Control-C sends KILL CONNECTION
      Next  Control-C aborts client.
      
      As the first two steps only pertain to an existing query,
      Control-C will abort the client right away if no query is running.
      
      client will give more detailed/consistent feedback on Control-C now.
      3f42e4bd
  8. 16 Oct, 2009 2 commits
    • Konstantin Osipov's avatar
      311fe126
    • Georgi Kodinov's avatar
      Bug #40877: multi statement execution fails in 5.1.30 · 8f6f3dba
      Georgi Kodinov authored
            
      Implemented the server infrastructure for the fix:
      
      1. Added a function LEX_STRING *thd_query_string(THD) to return
      a LEX_STRING structure instead of char *.
      This is the function that must be called in innodb instead of 
      thd_query()
      
      2. Did some encapsulation in THD : aggregated thd_query and 
      thd_query_length into a LEX_STRING and made accessor and mutator 
      methods for easy code updating. 
      
      3. Updated the server code to use the new methods where applicable.
      8f6f3dba
  9. 15 Oct, 2009 1 commit
  10. 14 Oct, 2009 2 commits
    • Konstantin Osipov's avatar
      Backport of: · 64dbe379
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2617.22.5
      committer: Konstantin Osipov <kostja@sun.com>
      branch nick: mysql-6.0-runtime
      timestamp: Tue 2009-01-27 05:08:48 +0300
      message:
        Remove non-prefixed use of HASH.
        Always use my_hash_init(), my_hash_inited(), my_hash_search(),
        my_hash_element(), my_hash_delete(), my_hash_free() rather
        than non-prefixed counterparts (hash_init(), etc).
        Remove the backward-compatible defines.
      64dbe379
    • Jorgen Loland's avatar
      Bug#47280 - strange results from count(*) with order by multiple · bf0aa2bd
      Jorgen Loland authored
                  columns without where/group
                           
      Simple SELECT with implicit grouping used to return many rows if
      the query was ordered by the aggregated column in the SELECT
      list. This was incorrect because queries with implicit grouping
      should only return a single record.
                                    
      The problem was that when JOIN:exec() decided if execution needed
      to handle grouping, it was assumed that sum_func_count==0 meant
      that there were no aggregate functions in the query. This
      assumption was not correct in JOIN::exec() because the aggregate
      functions might have been optimized away during JOIN::optimize().
                        
      The reason why queries without ordering behaved correctly was
      that sum_func_count is only recalculated if the optimizer chooses
      to use temporary tables (which it does in the ordered case).
      Hence, non-ordered queries were correctly treated as grouped.
                        
      The fix for this bug was to remove the assumption that
      sum_func_count==0 means that there is no need for grouping. This
      was done by introducing variable "bool implicit_grouping" in the
      JOIN object.
      bf0aa2bd
  11. 13 Oct, 2009 1 commit
    • Konstantin Osipov's avatar
      Introduce thd->query_cache_tls (thread · ea6a22bf
      Konstantin Osipov authored
      local storage for query cache). 
      We need more than one pointer in a thread to
      represent the query cache and net->query_cache_query can not be used
      any more (due to ABI compatibility issues and to different life
      time of NET and THD).
      This is a backport of the following patch from 6.0:
      ----------------------------------------------------------
      revno: 2476.1157.2
      committer: kostja@bodhi.(none)
      timestamp: Sat 2007-06-16 13:29:24 +0400
      ea6a22bf
  12. 12 Oct, 2009 1 commit
  13. 09 Oct, 2009 2 commits
    • Dmitry Lenev's avatar
      This patch is prerequisite for the 2nd milestone of WL#148 "Foreign keys" · d4669dc4
      Dmitry Lenev authored
      storing and restoring information about foreign keys in the .FRM files and
      properly displaying it in SHOW CREATE TABLE output and I_S tables.
      
      The idea of this patch is to change type of Key_part_spec::field_name and
      Key::name to LEX_STRING in order to avoid extra strlen() calls during
      semantic analysis and statement execution, particularly, in code to be
      implemented on the 2nd milestone of WL#148.
      
      Note that since we are not using LEX_STRING everywhere yet (e.g. in
      Create_field and KEY) and we want to limit scope of our changes we
      have to do strlen() in places where we create Key and Key_part_spec
      instances from objects using plain (char*) for strings. These calls
      will go away during the process of further (char*) -> LEX_STRING
      refactoring.
      
      We have introduced these changes in 6.0 and backported them to 5.5
      tree to make people aware of these changes as early as possible and
      to simplify merges with mysql-fk and mysql-6.1-fk trees.
      
      No test case is needed since this patch does not introduce any
      user visible changes.
      d4669dc4
    • Jon Olav Hauglid's avatar
      Bug #44651 "have_community_features" variable should be renamed · 0eccb932
      Jon Olav Hauglid authored
                 "have_profiling"
      
      1) Renamed have_community_features server system variable to
      have_profiling.
      2) Removed eable-community-features configure option and
      ENABLE_COMMUNITY_FEATURES macro.
      3) Removed COMMUNITY_SERVER macro and replaced its usage by 
      ENABLED_PROFILING.
      
      Only --enable-profiling is now needed to enable profiling.
      It was the only existing "community feature", so there was
      no need for both configure options.
      
      Using --enable-community-features will give a warning message
      since it no longer exists.
      0eccb932
  14. 29 Sep, 2009 2 commits
    • Ingo Struewing's avatar
      WL#4259 - Debug Sync Facility · 21586dfb
      Ingo Struewing authored
      Backport from 6.0 to 5.1.
      Only those sync points are included, which are used in debug_sync.test.
      
        The Debug Sync Facility allows to place synchronization points
        in the code:
        
        open_tables(...)
        
        DEBUG_SYNC(thd, "after_open_tables");
        
        lock_tables(...)
        
        When activated, a sync point can
        
        - Send a signal and/or
        - Wait for a signal
        
        Nomenclature:
        
        - signal:            A value of a global variable that persists
                             until overwritten by a new signal. The global
                             variable can also be seen as a "signal post"
                             or "flag mast". Then the signal is what is
                             attached to the "signal post" or "flag mast".
        
        - send a signal:     Assign the value (the signal) to the global
                             variable ("set a flag") and broadcast a
                             global condition to wake those waiting for
                             a signal.
        
        - wait for a signal: Loop over waiting for the global condition until
                             the global value matches the wait-for signal.
        
        Please find more information in the top comment in debug_sync.cc
        or in the worklog entry.
      21586dfb
    • Alfranio Correia's avatar
      WL#4828 and BUG#45747 · 5280dc82
      Alfranio Correia authored
      NOTE: Backporting the patch to next-mr.
      
      WL#4828 Augment DBUG_ENTER/DBUG_EXIT to crash MySQL in different functions
      -------
      
      The assessment of the replication code in the presence of faults is extremely
      import to increase reliability. In particular, one needs to know if servers
      will either correctly recovery or print out appropriate error messages thus
      avoiding unexpected problems in a production environment.
      
      In order to accomplish this, the current patch refactories the debug macros
      already provided in the source code and introduces three new macros that
      allows to inject faults, specifically crashes, while entering or exiting a
      function or method. For instance, to crash a server while returning from
      the init_slave function (see module sql/slave.cc), one needs to do what
      follows:
      
      1 - Modify the source replacing DBUG_RETURN by DBUG_CRASH_RETURN;
      
        DBUG_CRASH_RETURN(0);
      
      2 - Use the debug variable to activate dbug instructions:
      
        SET SESSION debug="+d,init_slave_crash_return";
      
      The new macros are briefly described below:
      
      DBUG_CRASH_ENTER (function) is equivalent to DBUG_ENTER which registers the
      beginning of a function but in addition to it allows for crashing the server
      while entering the function if the appropriate dbug instruction is activate.
      In this case, the dbug instruction should be "+d,function_crash_enter".
      
      DBUG_CRASH_RETURN (value) is equivalent to DBUG_RETURN which notifies the
      end of a function but in addition to it allows for crashing the server
      while returning from the function if the appropriate dbug instruction is
      activate. In this case, the dbug instruction should be
      "+d,function_crash_return". Note that "function" should be the same string
      used by either the DBUG_ENTER or DBUG_CRASH_ENTER.
      
      DBUG_CRASH_VOID_RETURN (value) is equivalent to DBUG_VOID_RETURN which
      notifies the end of a function but in addition to it allows for crashing
      the server while returning from the function if the appropriate dbug
      instruction is activate. In this case, the dbug instruction should be
      "+d,function_crash_return". Note that "function" should be the same string
      used by either the DBUG_ENTER or DBUG_CRASH_ENTER.
      
      To inject other faults, for instance, wrong return values, one should rely
      on the macros already available. The current patch also removes a set of
      macros that were either not being used or were redundant as other macros
      could be used to provide the same feature. In the future, we also consider
      dynamic instrumentation of the code.
      
      
      BUG#45747 DBUG_CRASH_* is not setting the strict option
      ---------
            
      When combining DBUG_CRASH_* with "--debug=d:t:i:A,file" the server crashes
      due to a call to the abort function in the DBUG_CRASH_* macro althought the
      appropriate keyword has not been set.
      5280dc82
  15. 28 Sep, 2009 2 commits
    • Martin Hansson's avatar
      · 99bb6acb
      Martin Hansson authored
      Bug#46958: Assertion in Diagnostics_area::set_ok_status, 
      trigger, merge table
                  
      The problem with break statements is that they have very
      local effects. Hence a break statement within the inner loop
      of a nested-loops join caused execution to proceed to the
      next table even though a serious error occurred. The problem
      was fixed by breaking out the inner loop into its own
      method. The change empowers all errors to terminate the
      execution.
                  
      The errors that will now halt multi-DELETE execution
      altogether are 
        - triggers returning errors
        - handler errors
        - server being killed
      99bb6acb
    • Georgi Kodinov's avatar
      Ported WL#3220 to mysql-next-mr. · 7aa8cd7a
      Georgi Kodinov authored
      7aa8cd7a
  16. 26 Sep, 2009 1 commit
  17. 23 Sep, 2009 1 commit
  18. 10 Sep, 2009 2 commits
  19. 31 Jul, 2009 1 commit
    • Gleb Shchepa's avatar
      Bug# 30946: mysqldump silently ignores --default-character-set · e642140b
      Gleb Shchepa authored
                  when used with --tab
      
      1) New syntax: added CHARACTER SET clause to the
        SELECT ... INTO OUTFILE (to complement the same clause in
        LOAD DATA INFILE).
        mysqldump is updated to use this in --tab mode.
      
      2) ESCAPED BY/ENCLOSED BY field parameters are documented as
         accepting CHAR argument, however SELECT .. INTO OUTFILE
         silently ignored rests of multisymbol arguments.
         For the symmetrical behavior with LOAD DATA INFILE the
         server has been modified to fail with the same error:
      
           ERROR 42000: Field separator argument is not what is
                        expected; check the manual
      
      3) Current LOAD DATA INFILE recognizes field/line separators
         "as is" without converting from client charset to data
         file charset. So, it is supposed, that input file of
         LOAD DATA INFILE consists of data in one charset and
         separators in other charset. For the compatibility with
         that [buggy] behaviour SELECT INTO OUTFILE implementation
         has been saved "as is" too, but the new warning message
         has been added:
      
           Non-ASCII separator arguments are not fully supported
      
         This message warns on field/line separators that contain
         non-ASCII symbols.
      e642140b
  20. 24 Jul, 2009 1 commit
    • Gleb Shchepa's avatar
      Bug #38816: kill + flush tables with read lock + stored · 6aea4ceb
      Gleb Shchepa authored
                  procedures causes crashes!
      
      The problem of that bugreport was mostly fixed by the
      patch for bug 38691.
      However, attached test case focused on another crash or
      valgrind warning problem: SHOW PROCESSLIST query accesses
      freed memory of SP instruction that run in a parallel
      connection.
      
      Changes of thd->query/thd->query_length in dangerous
      places have been guarded with the per-thread
      LOCK_thd_data mutex (the THD::LOCK_delete mutex has been
      renamed to THD::LOCK_thd_data).
      6aea4ceb
  21. 22 Jul, 2009 1 commit
  22. 10 Jun, 2009 1 commit
  23. 08 Jun, 2009 1 commit
  24. 05 Jun, 2009 1 commit
    • Davi Arnaut's avatar
      Bug#44672: Assertion failed: thd->transaction.xid_state.xid.is_null() · f3e86099
      Davi Arnaut authored
      The problem is that when a optimization of read-only transactions
      (bypass 2-phase commit) was implemented, it removed the code that
      reseted the XID once a transaction wasn't active anymore:
      
      sql/sql_parse.cc:
      
      -  bzero(&thd->transaction.stmt, sizeof(thd->transaction.stmt));
      -  if (!thd->active_transaction())
      -    thd->transaction.xid_state.xid.null();
      +  thd->transaction.stmt.reset();
      
      This mostly worked fine as the transaction commit and rollback
      functions (in handler.cc) reset the XID once the transaction is
      ended. But those functions wouldn't reset the XID in case of
      a empty transaction, leading to a assertion when a new starting
      a new XA transaction.
      
      The solution is to ensure that the XID state is reset when empty
      transactions are ended (by either commit or rollback). This is
      achieved by reorganizing the code so that the transaction cleanup
      routine is invoked whenever a transaction is ended.
      f3e86099
  25. 30 May, 2009 1 commit
  26. 29 May, 2009 1 commit
    • Kristofer Pettersson's avatar
      Bug#44658 Create procedure makes server crash when user does not have ALL privilege · a6455554
      Kristofer Pettersson authored
      MySQL crashes if a user without proper privileges attempts to create a procedure.
      
      The crash happens because more than one error state is pushed onto the Diagnostic
      area. In this particular case the user is denied to implicitly create a new user
      account with the implicitly granted privileges ALTER- and EXECUTE ROUTINE.
      
      The new account is needed if the original user account contained a host mask.
      A user account with a host mask is a distinct user account in this context.
      An alternative would be to first get the most permissive user account which
      include the current user connection and then assign privileges to that
      account. This behavior change is considered out of scope for this bug patch.
      
      The implicit assignment of privileges when a user creates a stored routine is a
      considered to be a feature for user convenience and as such it is not
      a critical operation. Any failure to complete this operation is thus considered
      non-fatal (an error becomes a warning).
      
      The patch back ports a stack implementation of the internal error handler interface.
      This enables the use of multiple error handlers so that it is possible to intercept
      and cancel errors thrown by lower layers. This is needed as a error handler already
      is used in the call stack emitting the errors which needs to be converted.
      a6455554
  27. 05 May, 2009 1 commit
  28. 30 Apr, 2009 1 commit
  29. 25 Mar, 2009 2 commits
    • Ramil Kalimullin's avatar
      Fix for bug#35383: binlog playback and replication breaks · cf6c7262
      Ramil Kalimullin authored
      due to name_const substitution
      
      Problem:
      "In general, statements executed within a stored procedure
      are written to the binary log using the same rules that
      would apply were the statements to be executed in standalone
      fashion. Some special care is taken when logging procedure
      statements because statement execution within procedures
      is not quite the same as in non-procedure context".
      
      For example, each reference to a local variable in SP's
      statements is replaced by NAME_CONST(var_name, var_value).
      Queries like
      "CREATE TABLE ... SELECT FUNC(local_var ..."
      are logged as
      "CREATE TABLE ... SELECT FUNC(NAME_CONST("local_var", var_value) ..."
      that leads to differrent field names and
      might result in "Incorrect column name" if var_value is long enough.
      
      Fix: in 5.x we'll issue a warning in such a case.
      In 6.0 we should get rid of NAME_CONST().
      
      Note: this issue and change should be described in the documentation
      ("Binary Logging of Stored Programs").
      cf6c7262
    • Tatiana A. Nurnberg's avatar
      Bug#43748: crash when non-super user tries to kill the replication threads · de8042d0
      Tatiana A. Nurnberg authored
      Fine-tuning. Broke out comparison into method by
      suggestion of Davi. Clarified comments. Reverting
      test-case which I find too brittle; proper test
      case in 5.1+.
      de8042d0
  30. 05 Mar, 2009 2 commits