1. 29 Oct, 2009 1 commit
    • Kristofer Pettersson's avatar
      Bug#38551 query cache can still consume [very little] cpu time even when it is off. · ddcdacb2
      Kristofer Pettersson authored
            
      When the query cache is disabled, the server shouldn't attempt to take the 
      query cache mutex.
                                   
      By using the command line option --query_cache_type=0, the user can disable
         
      (backport from mysql-pe)
      
      
      mysql-test/t/query_cache_disabled-master.opt:
        * added test case for bug38551
      mysql-test/t/query_cache_disabled.test:
        * added test case for bug38551
      sql/set_var.cc:
        * Added before-trigger to verify that query_cache_type wasn't turned off or on during
        runtime.
      sql/set_var.h:
        * Changed order on how the enumeration is processed. By first projecting the
        character representation of the variable to a temporary integer we can have
        one function instead of two to check if the value is valid.
      sql/share/errmsg-utf8.txt:
        * Added error message for query cache disabled state
      sql/sql_cache.cc:
        * If the query cache is disabled at start up, shorten the execution path and avoid
        grabbing the query cache mutex each time the invalidate interface methods are called.
      sql/sql_cache.h:
        * Added new methods to set the query cache into a disabled state.
      ddcdacb2
  2. 28 Oct, 2009 2 commits
  3. 27 Oct, 2009 5 commits
  4. 26 Oct, 2009 1 commit
  5. 25 Oct, 2009 1 commit
  6. 23 Oct, 2009 10 commits
  7. 22 Oct, 2009 18 commits
    • Luis Soares's avatar
      post-merge fixes: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge · 676832e0
      Luis Soares authored
      rpl.rpl_heartbeat_basic and rpl.rpl_cross_version set as experimental.
      676832e0
    • Luis Soares's avatar
      manual merge: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge · f1bb8c3c
      Luis Soares authored
      Conflicts
      =========
      
      Text conflict in .bzr-mysql/default.conf
      Text conflict in libmysqld/CMakeLists.txt
      Text conflict in libmysqld/Makefile.am
      Text conflict in mysql-test/collections/default.experimental
      Text conflict in mysql-test/extra/rpl_tests/rpl_row_sp006.test
      Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result
      Text conflict in mysql-test/suite/rpl/r/rpl_loaddata.result
      Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
      Text conflict in mysql-test/suite/rpl/r/rpl_row_create_table.result
      Text conflict in mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
      Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result
      Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
      Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result
      Text conflict in mysql-test/t/mysqlbinlog.test
      Text conflict in sql/CMakeLists.txt
      Text conflict in sql/Makefile.am
      Text conflict in sql/log_event_old.cc
      Text conflict in sql/rpl_rli.cc
      Text conflict in sql/slave.cc
      Text conflict in sql/sql_binlog.cc
      Text conflict in sql/sql_lex.h
      21 conflicts encountered.
      
      NOTE
      ====
       mysql-5.1-rpl-merge has been made a mirror of mysql-next-mr:
       - "mysql-5.1-rpl-merge$ bzr pull ../mysql-next-mr"
      
       This is the first cset (merge/...) committed after pulling 
       from mysql-next-mr.
      f1bb8c3c
    • Alexander Nozdrin's avatar
      Automerge from mysql-next-mr. · 20eac04d
      Alexander Nozdrin authored
      20eac04d
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk. · 75116feb
      Alexander Nozdrin authored
      75116feb
    • Alexander Nozdrin's avatar
      Fix default.conf. · 2fc2acd7
      Alexander Nozdrin authored
      2fc2acd7
    • Alexander Nozdrin's avatar
      f3d58bae
    • Alexander Nozdrin's avatar
      Fix build failure on Linux. · f8ec9027
      Alexander Nozdrin authored
      f8ec9027
    • Alexander Nozdrin's avatar
      Automerge from mysql-next-mr-runtime. · d18d2dc8
      Alexander Nozdrin authored
      d18d2dc8
    • Alexander Nozdrin's avatar
      Backporting a patch for Bug#43138. That patch had been already backported · 9434e604
      Alexander Nozdrin authored
      to 5.1 partially. This patch brings what was left to mysql-next-mr.
      
      Original revisions in 6.0:
      ------------------------------------------------------------
      revno: 2617.31.26
      committer: Alexander Nozdrin <alik@sun.com>
      branch nick: 6.0-rt-bug43138.3
      timestamp: Thu 2009-04-30 19:31:30 +0400
      message:
        Fix for Bug#43138: DROP DATABASE failure does not clean up message list.
        
        The problem was that the high-level function mysql_rm_db() invoked
        low-level mysql_rm_table_part2(), which reported low-level error
        (Unknown table) if SE refused to delete a table. Also when
        mysql_rm_table_part2() reported an error, it didn't add corresponding
        warning into the list (because it is used from other places where such
        behaviour is required).
        
        The fix is to
          1. Remove no_warnings_for_error usage from sql_table.cc
          2. Improve internal error handler support in THD, so that
             a stack of error handlers is allowed.
          3. Create an internal error handler (Drop_table_error_handler)
             to silence useless warnings.
          4. Use the handler in DROP DATABASE and DROP TABLE statements.
      ------------------------------------------------------------
      revno: 2617.69.38
      committer: Alexander Nozdrin <alik@sun.com>
      branch nick: mysql-next-bugfixing-bug37431
      timestamp: Mon 2009-08-24 21:52:09 +0400
      message:
        A test case for Bug#37431 (DROP TABLE does not report errors correctly).
      ------------------------------------------------------------
      revno: 2617.31.29
      committer: Dmitry Lenev <dlenev@mysql.com>
      branch nick: mysql-6.0-runtime
      timestamp: Fri 2009-05-01 17:37:34 +0400
      message:
        Follow-up for fix for bug "Bug#43138: DROP DATABASE failure
        does not clean up message list".
        
        Fixed drop.test failure under non-debug server by moving part
        of test dependent on debug-only feature to separate .test file,
        which won't be run for non-debug versions of server.
      ------------------------------------------------------------
      revno: 2617.45.17
      committer: Sergei Golubchik <serg@mysql.com>
      branch nick: 6.0-maria
      timestamp: Wed 2009-05-13 20:08:58 +0200
      message:
        followup for bug#43138
        if delete fails with a permission denied error, we want to show it
      ------------------------------------------------------------
      
      The patch was backported to 5.1 in scope of Bug#42364 by
      the following revision:
      ------------------------------------------------------------
      revno: 2497.975.3
      committer: Sergey Glukhov <Sergey.Glukhov@sun.com>
      branch nick: mysql-5.1-bugteam
      timestamp: Fri 2009-07-03 13:22:06 +0500
      message:
        Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
        enabled message storing into error message list
        for 'drop table' command
      ------------------------------------------------------------
      9434e604
    • Alexander Nozdrin's avatar
      Backporting patches for Bug#38347 (ALTER ROUTINE privilege · 72025253
      Alexander Nozdrin authored
      allows SHOW CREATE TABLE) from 6.0. Original revisions:
      ------------------------------------------------------------
      revno: 2617.31.8
      committer: Alexander Nozdrin <alik@sun.com>
      branch nick: 6.0-rt-bug38347
      timestamp: Thu 2009-03-26 09:08:24 +0300
      message:
        Patch for Bug#38347: ALTER ROUTINE privilege allows SHOW CREATE TABLE.
        
        If a user has any of the following privileges for a table (or the database
        if the table), he should be able to issue SHOW CREATE TABLE for the table:
          - CREATE
          - DROP
          - ALTER
          - DELETE
          - INDEX
          - INSERT
          - SELECT
          - UPDATE
          - TRIGGER
          - REFERENCES
          - GRANT OPTION
          - CREATE VIEW
          - SHOW VIEW
        
        Any other privilege (even SUPER) should not allow SHOW CREATE TABLE.
      ------------------------------------------------------------
      revno: 2617.31.11
      committer: Alexander Nozdrin <alik@sun.com>
      branch nick: 6.0-rt
      timestamp: Fri 2009-03-27 21:36:34 +0300
      message:
        Additional patch for Bug#38347 (ALTER ROUTINE privilege
        allows SHOW CREATE TABLE).
        
        The problem was that information_schema.test,
        information_schema_parameters.test and information_schema_routines.test
        failed with the first patch. That happened due to limitation in check_access():
        it allows only SELECT_ACL privilege for INFORMATION_SCHEMA tables.
        
        The patch is to request only SELECT_ACL privilege for INFORMATION_SCHEMA tables.
      ------------------------------------------------------------
      72025253
    • Konstantin Osipov's avatar
      Merge with next-mr-runtime. · bd83ad89
      Konstantin Osipov authored
      bd83ad89
    • Bjorn Munch's avatar
      null upmerge from trunk-mtr · c01fcec8
      Bjorn Munch authored
      c01fcec8
    • Bjorn Munch's avatar
      new merge from next-mr · e26a2f3b
      Bjorn Munch authored
      e26a2f3b
    • Bjorn Munch's avatar
      null merge from 5.1 · d5bfcd6a
      Bjorn Munch authored
      d5bfcd6a
    • Bjorn Munch's avatar
      new merge from trunk · 3a2434d4
      Bjorn Munch authored
      3a2434d4
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk-merge. · bcaa7524
      Alexander Nozdrin authored
      bcaa7524
    • Alexander Nozdrin's avatar
      469ce38b
    • Alexander Nozdrin's avatar
      Disable the test in mysql-trunk because of Bug#46931 · 33650539
      Alexander Nozdrin authored
      instead of making it experimental.
      33650539
  8. 21 Oct, 2009 2 commits
    • Konstantin Osipov's avatar
      Backport of revno 2630.28.10, 2630.28.31, 2630.28.26, 2630.33.1, · 8ec23470
      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.
      
      include/mysql.h:
        Add a new flag to MYSQL_METHODS::flush_use_result
        function pointer. This flag determines if all results
        should be flushed or only the first one:
            
        - if flush_all_results is TRUE, then cli_flush_use_result()
          will read/flush all pending results. I.e. it will read
          all packets while server status attribute indicates that
          there are more results. This is a new semantic, required
          to fix the bug.
                    
        - if flush_all_results is FALSE, the old sematic
          is preserved -- i.e. cli_flush_use_result() reads data
          until first EOF-packet.
      include/mysql.h.pp:
        Update the ABI with new calls (compatible changes).
      include/mysql_com.h:
        Add CLIENT_PS_OUT_PARAMS -- a client capability indicating that the client supportsю
      libmysql/libmysql.c:
        Add mysql_stmt_next_result() -- analogue of mysql_next_result() for binary protocol.
        Fix a minor bug in alloc_fields() -- not all members were copied over,
        and some only shallow-copied (catalog).
        Flush all results in mysql_stmt_close() (Bug#39519).
      libmysqld/lib_sql.cc:
        Rename send_fields() -> send_result_set_metadata().
        Refactoring: change prepare_for_send() so that it accepts only 
        what it really needs -- a number of elements in the list.
      mysql-test/r/ps.result:
        Update results: WL#4435.
      mysql-test/t/ps.test:
        WL#4435: A test case for an SQL-part of the problem.
      sql-common/client.c:
        Bug#39519.
        Implement new functionality in cli_flush_use_result():
        if flush_all_delete is TRUE, then it should read/flush
        all pending results.
      sql/Makefile.am:
        Add a new header sql_prepare.h to the list
        of build headers.
      sql/events.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/handler.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/mysql_priv.h:
        Move sql_prepare.cc-specific declarations to a new
        header - sql_prepare.h.
      sql/procedure.h:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/protocol.cc:
        Move the logic responsible for sending of one result
        set row to the Protocol class. Define a template
        for end-of-statement action. 
        Refactoring: change prepare_for_send() so that it accepts 
        only what it really needs -- a number of elements in the list.
        Rename send_fields() to send_result_set_metadata().
      sql/protocol.h:
        Update with new declarations (WL#4435).
        Rename send_fields() -> send_result_set_metadata().
        prepare_for_send() only needs the number of columns to send,
        and doesn't use the item list - update signature to require
        only what's needed.
        Add a new protocol type -- Protocol_local.
      sql/repl_failsafe.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/slave.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_acl.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_base.cc:
        Include sql_prepare.h (for Reprepare_observer).
      sql/sql_cache.cc:
        Extend the query cache flags block to be able
        to store a numeric id for the result format,
        not just a flag binary/non-binary.
      sql/sql_class.cc:
        Update to use the rename of Protocol::send_fields()
        to Protocol::send_result_set_metadata().
        Use Protocol::send_one_result_set_row().
      sql/sql_class.h:
        Move the declaration of Reprepare_observer to the 
        new header - sql_prepare.h.
        Update to the new signature of class Protocol::send_fields().
      sql/sql_connect.cc:
        Use a protocol template method instead of
        raw NET layer API at the end of a statement.
      sql/sql_cursor.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_error.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_handler.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
        Use new method Protocol::send_one_result_set_row().
      sql/sql_help.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_lex.cc:
        Initialize multi_statements variable.
        Add a handy constant for empty lex
        string.
      sql/sql_lex.h:
        Add a separate member for a standalone
        parsing option - multi-statements support.
      sql/sql_list.cc:
        sql_list.h is a standalone header now, 
        no need to include mysql_priv.h.
      sql/sql_list.h:
        Make sql_list.h a stand-alone header.
      sql/sql_parse.cc:
        Include sql_prepare.h for prepared
        statements- related declarations.
        Use a new Protocol template method to end
        each statement (send OK, EOF or ERROR to
        the client).
      sql/sql_prepare.cc:
        Implement Execute Direct API (WL#4264), 
        currently unused. It will be used by the service
        interface (Backup).
        Use a new header - sql_prepare.h.
        Add support for OUT parameters in the 
        binary and text protocol (prepared statements 
        only).
      sql/sql_prepare.h:
        Add a new header to contain (for now)
        all prepared statement- external
        related declarations.
      sql/sql_profile.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_repl.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_select.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_show.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_string.h:
        Add a way to convert a String to LEX_STRING.
      sql/sql_table.cc:
        Rename: Protocol::send_fields() -> 
        Protocol::send_result_set_metadata().
      sql/sql_update.cc:
        Remove an extraneous my_error(). The error
        is already reported in update_non_unique_table_error().
      sql/sql_yacc.yy:
        Support for multi-statements is an independent
        property of parsing, not derived from 
        the protocol type.
      tests/mysql_client_test.c:
        Add tests for WL#4435 (binary protocol).
      8ec23470
    • Alexander Nozdrin's avatar
      ff98b6a2