1. 19 May, 2010 8 commits
    • Vasil Dimov's avatar
      dc4a8b35
    • Alexander Nozdrin's avatar
      Another incarnation of the patch for Bug#30708 · 759d5bc5
      Alexander Nozdrin authored
      (make relies GNU extentions). The patch was partially
      backport from 6.0.
      
      Original comment:
      bug#30708: make relies GNU extensions.  Now that we no longer use
      BitKeeper we can safely remove the SCCS handling with no loss of
      functionality.
      759d5bc5
    • Alexander Nozdrin's avatar
    • Alexander Nozdrin's avatar
      Backport test cases for Bug#46198 and Bug#38054 · 5009ab85
      Alexander Nozdrin authored
      from 6.0 to trunk-bugfixing.
      5009ab85
    • Sunny Bains's avatar
      Merge changes from parent. · 68f13abf
      Sunny Bains authored
      68f13abf
    • Sunny Bains's avatar
      Fix a bug reported by PushBuild on OSX 10.6.3. It turned out to be a compiler · 553c9c36
      Sunny Bains authored
      bug. The code has been changed to work around it. To reprocude the bug simply
      revert this change and build the binary with:
      
      GCC Using built-in specs.
      Target: i686-apple-darwin10
      Configured with: /var/tmp/gcc/gcc-5659~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
      Thread model: posix
      gcc version 4.2.1 (Apple Inc. build 5659)
      
      export LDFLAGS='-g -arch i386'
      export CFLAGS='-g -no-cpp-precomp -arch i386 -O2'
      export CXXFLAGS='-g -no-cpp-precomp -arch i386 -O2'
      
      ./configure --enable-thread-safe-client --enable-local-infile --with-pic --with-client-ldflags=-static --with-mysqld-ldflags=-static --with-zlib-dir=bundled --without-ndb-debug --with-big-tables --with-ssl --with-readline --with-embedded-server --with-archive-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-partition --with-extra-charsets=all --with-innodb --with-ndbcluster --with-libevent --target=i386-apple-darwin --program-transform-name=
      
      Approved by Marko on IM.
      553c9c36
    • Marko Mäkelä's avatar
      Merge a change from mysql-5.1-innodb: · db70a821
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3472
      revision-id: marko.makela@oracle.com-20100519080743-5myf1g7v6pfysidt
      parent: marko.makela@oracle.com-20100519080152-h3555oqmu3wo95so
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Wed 2010-05-19 11:07:43 +0300
      message:
        Make UNIV_DEBUG Valgrind friendly. Use | instead of +,
        and mask out the dont-care bits in debug assertions.
      db70a821
    • Marko Mäkelä's avatar
      Merge a change from mysql-5.1-innodb: · 9bf086dc
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3471
      revision-id: marko.makela@oracle.com-20100519080152-h3555oqmu3wo95so
      parent: marko.makela@oracle.com-20100519075843-4gl3uijo6cwjtcf9
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Wed 2010-05-19 11:01:52 +0300
      message:
        Silence some more bogus Valgrind warnings on non-32-bit systems. (Bug #53307)
      9bf086dc
  2. 18 May, 2010 9 commits
    • Inaam Rana's avatar
      52223f72
    • Andrei Elkin's avatar
      f11008ba
    • Vasil Dimov's avatar
    • Vasil Dimov's avatar
      Add more valgrind checks for initialized memory. · e47300bd
      Vasil Dimov authored
      Author:	Marko
      e47300bd
    • Vasil Dimov's avatar
      Silence a valgrind warning caused by zlib: · fc56efda
      Vasil Dimov authored
      ==31182== Conditional jump or move depends on uninitialised value(s)
      ==31182==    at 0xA9188B: longest_match (deflate.c:1143)
      ==31182==    by 0xA92C19: deflate_slow (deflate.c:1595)
      ==31182==    by 0xA90C6B: deflate (deflate.c:790)
      ==31182==    by 0x9B447B: page_zip_compress (page0zip.c:1342)
      ==31182==    by 0x9A8540: page_cur_insert_rec_zip_reorg (page0cur.c:1174)
      ==31182==    by 0x9A8998: page_cur_insert_rec_zip (page0cur.c:1279)
      ==31182==    by 0x9214F9: page_cur_tuple_insert (page0cur.ic:264)
      ==31182==    by 0x9221A2: btr_cur_optimistic_insert (btr0cur.c:1314)
      ==31182==    by 0x9C99EB: row_ins_index_entry_low (row0ins.c:2087)
      ==31182==    by 0x9C9DFB: row_ins_index_entry (row0ins.c:2167)
      ==31182==    by 0x9CA057: row_ins_index_entry_step (row0ins.c:2252)
      ==31182==    by 0x9CA0FD: row_ins (row0ins.c:2384)
      ==31182==    by 0x9CA760: row_ins_step (row0ins.c:2494)
      ==31182==    by 0x8CBF7E: row_insert_for_mysql (row0mysql.c:1138)
      ==31182==    by 0x8BCF32: ha_innobase::write_row(unsigned char*) (ha_innodb.cc:4929)
      ==31182==    by 0x736E03: handler::ha_write_row(unsigned char*) (handler.cc:4682)
      fc56efda
    • Vasil Dimov's avatar
      Silence a valgrind warning caused by zlib: · ce003079
      Vasil Dimov authored
      innodb.innodb-zip                        [ fail ]  Found warnings/errors in server log file!
              Test ended at 2010-05-17 16:41:25
      line
      ==31182== Thread 13:
      ==31182== Conditional jump or move depends on uninitialised value(s)
      ==31182==    at 0xA9193F: longest_match (deflate.c:1143)
      ==31182==    by 0xA92C19: deflate_slow (deflate.c:1595)
      ==31182==    by 0xA90C6B: deflate (deflate.c:790)
      ==31182==    by 0x928A07: btr_store_big_rec_extern_fields (btr0cur.c:4092)
      ==31182==    by 0x9C9B90: row_ins_index_entry_low (row0ins.c:2119)
      ==31182==    by 0x9C9DFB: row_ins_index_entry (row0ins.c:2167)
      ==31182==    by 0x9CA057: row_ins_index_entry_step (row0ins.c:2252)
      ==31182==    by 0x9CA0FD: row_ins (row0ins.c:2384)
      ==31182==    by 0x9CA760: row_ins_step (row0ins.c:2494)
      ==31182==    by 0x8CBF7E: row_insert_for_mysql (row0mysql.c:1138)
      ==31182==    by 0x8BCF32: ha_innobase::write_row(unsigned char*) (ha_innodb.cc:4929)
      ==31182==    by 0x736E03: handler::ha_write_row(unsigned char*) (handler.cc:4682)
      ==31182==    by 0x5B0EEE: write_record(THD*, TABLE*, st_copy_info*) (sql_insert.cc:1670)
      ==31182==    by 0x5B129D: select_insert::send_data(List<Item>&) (sql_insert.cc:3279)
      ==31182==    by 0x5F31ED: end_send(JOIN*, st_join_table*, bool) (sql_select.cc:12428)
      ==31182==    by 0x5F9B9B: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:11632)
      ce003079
    • Marko Mäkelä's avatar
      Merge a change from mysql-5.1-innodb: · 7d23919f
      Marko Mäkelä authored
        ------------------------------------------------------------
        revno: 3468
        revision-id: marko.makela@oracle.com-20100518130658-rd00ql7h02ooakh1
        parent: marko.makela@oracle.com-20100514131050-mkhlvlui1u52irob
        committer: Marko Mäkelä <marko.makela@oracle.com>
        branch nick: 5.1-innodb
        timestamp: Tue 2010-05-18 16:06:58 +0300
        message:
          Work around Bug #53750 in innodb_bug48024.test
      7d23919f
    • Andrei Elkin's avatar
    • Andrei Elkin's avatar
      merging bug#50316 fixes · e29192ad
      Andrei Elkin authored
      e29192ad
  3. 17 May, 2010 4 commits
  4. 16 May, 2010 2 commits
  5. 14 May, 2010 5 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
    • Vasil Dimov's avatar
    • Vasil Dimov's avatar
      Add a debug assertion to make it clear that we expect · 1256e166
      Vasil Dimov authored
      to own the kernel mutex in fill_trx_row().
      1256e166
    • Marko Mäkelä's avatar
      Merge from mysql-5.1-innodb: · b6fa4b11
      Marko Mäkelä authored
      Post-merge fixes: Remove the MYSQL_VERSION_ID checks, because they only
      apply to the InnoDB Plugin. Fix potential race condition accessing
      trx->op_info and trx->detailed_error.
      ------------------------------------------------------------
      revno: 3466
      revision-id: marko.makela@oracle.com-20100514130815-ym7j7cfu88ro6km4
      parent: marko.makela@oracle.com-20100514130228-n3n42nw7ht78k0wn
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: mysql-5.1-innodb2
      timestamp: Fri 2010-05-14 16:08:15 +0300
      message:
        Make the InnoDB FOREIGN KEY parser understand multi-statements. (Bug #48024)
        Also make InnoDB thinks that /*/ only starts a comment. (Bug #53644).
      
        This fixes the bugs in the InnoDB Plugin.
      
        ha_innodb.h: Use trx_query_string() instead of trx_query() when
        available (MySQL 5.1.42 or later).
      
        innobase_get_stmt(): New function, to retrieve the currently running
        SQL statement.
      
        struct trx_struct: Remove mysql_query_str. Use innobase_get_stmt() instead.
      
        dict_strip_comments(): Add and observe the parameter sql_length. Treat
        /*/ as the start of a comment.
      
        dict_create_foreign_constraints(), row_table_add_foreign_constraints():
        Add the parameter sql_length.
      b6fa4b11
    • 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
  6. 13 May, 2010 2 commits
    • Vasil Dimov's avatar
      0ad0827f
    • Vasil Dimov's avatar
      Followup to Bug#51920, fix binlog.binlog_killed · 2d299d84
      Vasil Dimov authored
      This is a followup to the fix of
      
      Bug#51920 Innodb connections in row lock wait ignore KILL until lock wait
      timeout
      
      in that fix (rb://279) the behavior was changed to honor when a trx is
      interrupted during lock wait, but the returned error code was still
      "lock wait timeout" when it should be "interrupted".
      
      This change fixes the non-deterministically failing test binlog.binlog_killed,
      that failed like this:
      
      binlog.binlog_killed 'stmt'              [ fail ]
              Test ended at 2010-05-12 11:39:08
      
      CURRENT_TEST: binlog.binlog_killed
      mysqltest: At line 208: query 'reap' failed with wrong errno 1205: 'Lock wait timeout exceeded; try restarting transaction', instead of 0...
      
      Approved by:	Sunny Bains (rb://344)
      2d299d84
  7. 12 May, 2010 10 commits
    • Sunny Bains's avatar
      Cover the srv_suspend_thread() call by the kernel mutex. This change was · 49f5ce6d
      Sunny Bains authored
      forgotten when I reverted the kernel mutex split patch.
      49f5ce6d
    • Vasil Dimov's avatar
      Fix whitespace breakage introduced in · 2555cda8
      Vasil Dimov authored
      jimmy.yang@oracle.com-20100512153945-zg3suquj1ps6xn5z
      2555cda8
    • Jimmy Yang's avatar
      Check in patch for bug #53336, Improved InnoDB Transaction Reporting. · efc32dcf
      Jimmy Yang authored
      rb://335, Approved by Sunny Bains
      efc32dcf
    • Jonathan Perkin's avatar
    • Jonathan Perkin's avatar
      Remove comments. · 31f5867f
      Jonathan Perkin authored
      31f5867f
    • Jonathan Perkin's avatar
      Changes to build using CMake according to existing release packages: · ce2aabb7
      Jonathan Perkin authored
       - Update/fix file layouts for each package type, add new types for
         native package formats including deb, rpm and svr4.
      
       - Build all plugins, including debug versions
      
       - Update compiler flags to match current release
      
       - Add missing @VAR@ expansions
      
       - Install correct mysqclient library symlinks
      
       - Fix icc/ia64 builds
      
       - Fix install of libmysqld-debug
      
       - Don't include mysql_embedded
      
       - Remove unpackaged manual pages to avoid missing files warnings
      
       - Don't install mtr's test suite
      ce2aabb7
    • Jonathan Perkin's avatar
      Large number of changes to support building RPMs using CMake, along · 240176bf
      Jonathan Perkin authored
      with other merges from the old distribution-specific spec file.
      
       - update copyright notices
      
       - remove __os_install_post override, it was only necessary as a
         hack to build debuginfo packages - now that we no longer make
         them we can revert to the distribution macro which likely has
         other useful bits we might want
      
       - remove _unpackaged_files_terminate_build override, we want to
         know of any orphaned files
      
       - include native distribution support
      
       - no longer build separate debuginfo RPMs, instead just include
         debug/symbols in all binaries, which is more useful for support
      
       - include support for building commercial RPMs, requires a
         commercial source tree
      
       - remove cluster RPM support, we don't build them from this
         source tree
      
       - use CMake for building, and update package lists to match the
         new install layout/files.  Remove any options which were only
         useful for automake builds (e.g. yassl/zlib).
      
       - other minor cleanups
      240176bf
    • Marko Mäkelä's avatar
      Merge from mysql-5.1-innodb: · f8b9bb19
      Marko Mäkelä authored
        ------------------------------------------------------------
        revno: 3462
        revision-id: marko.makela@oracle.com-20100512104212-e2h9n1obxjb8tfg4
        parent: marko.makela@oracle.com-20100512060922-oh716ugpukfakwvh
        committer: Marko Mäkelä <marko.makela@oracle.com>
        branch nick: mysql-5.1-innodb
        timestamp: Wed 2010-05-12 13:42:12 +0300
        message:
          ha_innobase::add_index(): Reset trx->error_state in error handling.
          (Bug #53591)
      f8b9bb19
    • Vasil Dimov's avatar
      Fix the failing innodb.innodb test. · 18ef367e
      Vasil Dimov authored
      Support returning 512 and 511 pages for the buffer pool size, this
      is undeterministic and probably depends on alignment issues.
      
      The default buffer pool size is 8M (512) pages, which is set in
      include/default_mysqld.cnf. So the previous "replace_result 8192 8191"
      had no effect.
      18ef367e
    • Vasil Dimov's avatar