1. 27 May, 2010 2 commits
  2. 26 May, 2010 4 commits
    • Tor Didriksen's avatar
      Bug #53445 Build with -Wall and fix warnings that it generates · 85da8956
      Tor Didriksen authored
      Add -Wall to gcc/g++
      Fix most warnings reported in dbg and opt mode.
      
      
      cmd-line-utils/libedit/filecomplete.c:
        Remove unused auto variables.
      configure.cmake:
        Add -Wall to gcc.
      extra/comp_err.c:
        Cast to correct type.
      extra/perror.c:
        Fix segfault (but warnings about deprecated features remain)
      extra/yassl/taocrypt/include/runtime.hpp:
        Comparing two literals was reported as undefined behaviour.
      include/my_global.h:
        Add a template for aligning character buffers.
      mysys/lf_alloc-pin.c:
        Initialize pointer.
      sql/mysqld.cc:
        Use UNINIT_VAR rather than LINT_INIT.
      sql/partition_info.cc:
        Use UNINIT_VAR rather than LINT_INIT.
      sql/rpl_handler.cc:
        Use char[] rather than unsigned long[] array for placement buffer.
      sql/spatial.cc:
        Use char[] rather than unsigned void*[] array for placement buffer.
      sql/spatial.h:
        Use char[] rather than unsigned void*[] array for placement buffer.
      sql/sql_partition.cc:
        Initialize auto variable.
      sql/sql_table.cc:
        Initialize auto variables.
        Add parens around assignment within if()
      sql/sys_vars.cc:
        Use UNINIT_VAR.
      storage/innobase/os/os0file.c:
        Init first slot in auto variable.
      storage/myisam/mi_create.c:
        Use UNINIT_VAR rather than LINT_INIT.
      storage/myisam/mi_open.c:
        Remove (wrong) casting.
      storage/myisam/mi_page.c:
        Remove (wrong) casting.
      storage/myisam/mi_search.c:
        Cast to uchar* rather than char*.
      strings/ctype-ucs2.c:
        Use UNINIT_VAR rather than LINT_INIT.
        Add (uchar*) casting.
      85da8956
    • Alexander Nozdrin's avatar
    • Alexander Nozdrin's avatar
      de0f63c1
    • Mattias Jonsson's avatar
      pre push fix of test results · 3fb49262
      Mattias Jonsson authored
      3fb49262
  3. 25 May, 2010 5 commits
  4. 24 May, 2010 2 commits
  5. 21 May, 2010 4 commits
    • Jon Olav Hauglid's avatar
      merge from mysql-trunk-runtime · 923da1e8
      Jon Olav Hauglid authored
      923da1e8
    • Alexander Nozdrin's avatar
      Backporting a test case for Bug#30036 (SHOW TABLE TYPES causes the debug client · 5e4a4020
      Alexander Nozdrin authored
      to crash) from mysql-6.0-codebase.
      5e4a4020
    • Alexander Nozdrin's avatar
      Fix for Bug#52923 (Inadequate documentation of "Can't get hostname for your address" error). · 9003fb7c
      Alexander Nozdrin authored
      The thing is that on some platforms (e.g. Mac OS X) sockaddr_in / sockaddr_in6
      contain a non-standard field (sin_len / sin6_len), that must be set.
      
      The problem was that only standard fields were set, thus getnameinfo() returned
      EAI_SYSTEM instead of EAI_NONAME.
      
      The fix is to introduce configure-time checks (for GNU auto-tools and CMake) for
      those additional fields and to set them if they are available.
      9003fb7c
    • Dmitry Lenev's avatar
      Follow-up for the fix for bug #46947 "Embedded SELECT without · 705b98df
      Dmitry Lenev authored
      FOR UPDATE is causing a lock".
       
      This patch tries to address problems which were exposed 
      during backporting of original patch to 5.1 tree.
       
      - It ensures that we don't change locking behavior of simple
        SELECT statements on InnoDB tables when they are executed
        under LOCK TABLES ... READ and with @@innodb_table_locks=0.
        Also we no longer pass TL_READ_DEFAULT/TL_WRITE_DEFAULT 
        lock types, which are supposed to be parser-only, to 
        handler::start_stmt() method.
      - It makes check_/no_concurrent_insert.inc auxiliary scripts 
        more robust against changes in test cases that use them
        and also ensures that they don't unnecessarily change 
        environment of caller.
      
      mysql-test/include/check_concurrent_insert.inc:
        Reset DEBUG_SYNC facility before and after using it in
        auxiliary script. This makes this script more robust against
        changes in test cases calling it. It also ensures that script
        does not unnecessarily change environment of caller.
      mysql-test/include/check_no_concurrent_insert.inc:
        Reset DEBUG_SYNC facility before and after using it in
        auxiliary script. This makes this script more robust against
        changes in test cases calling it. It also ensures that script
        does not unnecessarily change environment of caller.
      mysql-test/r/innodb-lock.result:
        Added coverage for LOCK TABLES ... READ behavior in
        @@innodb_table_locks = 0 mode. This test also checks
        that an appropriate type of lock is passed to
        handler::start_stmt() method.
      mysql-test/t/innodb-lock.test:
        Added coverage for LOCK TABLES ... READ behavior in
        @@innodb_table_locks = 0 mode. This test also checks
        that an appropriate type of lock is passed to
        handler::start_stmt() method.
      sql/sql_base.cc:
        Since we no longer set TL_READ as lock type for tables used  
        in simple SELECT right in the parser, in order to preserve  
        behavior for such statements on InnoDB tables when in  
        LOCK TABLES mode with @innodb_table_locks = 0,  
        check_lock_and_start_stmt() had to be changed to convert  
        TL_READ_DEFAULT to an appropriate type of read lock before  
        passing it to handler::start_stmt() method.  
        We do similar thing for TL_WRITE_DEFAULT as this lock type  
        is also supposed to be parser-only type.  
        As consequence read_lock_type_for_table() had to be  
        adjusted to behave properly when it is called from  
        check_lock_and_start_stmt() in prelocked mode.
      705b98df
  6. 20 May, 2010 2 commits
  7. 19 May, 2010 4 commits
  8. 18 May, 2010 4 commits
  9. 17 May, 2010 2 commits
  10. 16 May, 2010 2 commits
  11. 14 May, 2010 3 commits
    • Alexander Nozdrin's avatar
      Patch for Bug#27863 (excessive memory usage for many small queries in a · 6facd4cb
      Alexander Nozdrin authored
      multiquery packet).
      
      Background:
      
        - a query can contain multiple SQL statements;
      
        - the server frees resources allocated to process a query when the
          whole query is handled. In other words, resources allocated to process
          one SQL statement from a multi-statement query are freed when all SQL
          statements are handled.
      
      The problem was that the parser allocated a buffer of size of the whole
      query for each SQL statement in a multi-statement query. Thus, if a query
      had many SQL-statements (so, the query was long), but each SQL statement
      was short, ther parser tried to allocate huge amount of memory (number of
      small SQL statements * length of the whole query).
      
      The memory was allocated for a so-called "cpp buffer", which is intended to
      store pre-processed SQL statement -- SQL text without version specific
      comments.
      
      The fix is to allocate memory for the "cpp buffer" once for all SQL
      statements (once for a query).
      6facd4cb
    • Konstantin Osipov's avatar
      Committing on behalf of Valdislav Vaintroub (reviewed and · d1dd2d11
      Konstantin Osipov authored
      approved):
      
      3161 Vladislav Vaintroub       2010-04-29                 
       Bug#53196 : CMake builds don't support 'make tags' and 
      'make ctags' targets.  
         - Added tags and ctags targets
      
      
      CMakeLists.txt:
        Add tags and ctags targets.
      cmake/Makefile.am:
        Add a cmake file to build tags.
      cmake/tags.cmake:
        Build tags and ctags.
      d1dd2d11
    • Alexander Nozdrin's avatar
      Patch for Bug#21818 (Return value of ROW_COUNT() is incorrect · 4333980a
      Alexander Nozdrin authored
      for ALTER TABLE, LOAD DATA).
      
      ROW_COUNT is now assigned according to the following rules:
      
        - In my_ok():
          - for DML statements: to the number of affected rows;
          - for DDL statements: to 0.
      
        - In my_eof(): to -1 to indicate that there was a result set.
      
          We derive this semantics from the JDBC specification, where int
          java.sql.Statement.getUpdateCount() is defined to (sic) "return the
          current result as an update count; if the result is a ResultSet
          object or there are no more results, -1 is returned".
      
        - In my_error(): to -1 to be compatible with the MySQL C API and
          MySQL ODBC driver.
      
        - For SIGNAL statements: to 0 per WL#2110 specification. Zero is used
          since that's the "default" value of ROW_COUNT in the diagnostics area.
      
      sql/protocol.cc:
        Fix a typo.
      sql/sql_class.h:
        - Introduce THD::get_row_count_func() / THD::set_row_count_func();
        - Remove the CF_HAS_ROW_COUNT define
      sql/sql_parse.cc:
        CF_HAS_ROW_COUNT was eliminated.
      4333980a
  12. 13 May, 2010 3 commits
  13. 12 May, 2010 3 commits