1. 07 Dec, 2016 3 commits
  2. 06 Dec, 2016 5 commits
  3. 05 Dec, 2016 5 commits
    • Ronak Jain's avatar
      fixes MDEV-11354 twin include · d036be72
      Ronak Jain authored
      d036be72
    • Elena Stepanova's avatar
      MDEV-9038 Binlog encryption tests · 611f9160
      Elena Stepanova authored
      - created binlog_encryption test suite and added it to the default list
      - moved some tests from rpl, binlog and multisource suites to extra
        so that they could be re-used in different suites
      - made minor changes in include files
      611f9160
    • Marko Mäkelä's avatar
      MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes · 9199d727
      Marko Mäkelä authored
      crashes server
      
      This bug is the result of merging the Oracle MySQL follow-up fix
      BUG#22963169 MYSQL CRASHES ON CREATE FULLTEXT INDEX
      without merging the base bug fix:
      Bug#79475 Insert a token of 84 4-bytes chars into fts index causes
      server crash.
      
      Unlike the above mentioned fixes in MySQL, our fix will not change
      the storage format of fulltext indexes in InnoDB or XtraDB
      when a character encoding with mbmaxlen=2 or mbmaxlen=3
      and the length of a word is between 128 and 84*mbmaxlen bytes.
      The Oracle fix would allocate 2 length bytes for these cases.
      
      Compatibility with other MySQL and MariaDB releases is ensured by
      persisting the used maximum length in the SYS_COLUMNS table in the
      InnoDB data dictionary.
      
      This fix also removes some unnecessary strcmp() calls when checking
      for the legacy default collation my_charset_latin1
      (my_charset_latin1.name=="latin1_swedish_ci").
      
      fts_create_one_index_table(): Store the actual length in bytes.
      This metadata will be written to the SYS_COLUMNS table.
      
      fts_zip_initialize(): Initialize only the first byte of the buffer.
      Actually the code should not even care about this first byte, because
      the length is set as 0.
      
      FTX_MAX_WORD_LEN: Define as HA_FT_MAXCHARLEN * 4 aka 336 bytes,
      not as 254 bytes.
      
      row_merge_create_fts_sort_index(): Set the actual maximum length of the
      column in bytes, similar to fts_create_one_index_table().
      
      row_merge_fts_doc_tokenize(): Remove the redundant parameter word_dtype.
      Use the actual maximum length of the column. Calculate the extra_size
      in the same way as row_merge_buf_encode() does.
      9199d727
    • Elena Stepanova's avatar
      ead6d0de
    • Elena Stepanova's avatar
  4. 02 Dec, 2016 5 commits
  5. 29 Nov, 2016 2 commits
  6. 28 Nov, 2016 1 commit
  7. 25 Nov, 2016 3 commits
    • Marko Mäkelä's avatar
      MDEV-11349 (2/2) Fix some bogus-looking Valgrind warnings · a68d1352
      Marko Mäkelä authored
      buf_block_init(): Initialize buf_page_t::flush_type.
      For some reason, Valgrind 3.12.0 would seem to flag some
      bits in adjacent bitfields as uninitialized, even though only
      the two bits of flush_type were left uninitialized. Initialize
      the field to get rid of many warnings.
      
      buf_page_init_low(): Initialize buf_page_t::old.
      For some reason, Valgrind 3.12.0 would seem to flag all 32
      bits uninitialized when buf_page_init_for_read() invokes
      buf_LRU_add_block(bpage, TRUE). This would trigger bogus warnings
      for buf_page_t::freed_page_clock being uninitialized.
      (The V-bits would later claim that only "old" is initialized
      in the 32-bit word.) Perhaps recent compilers
      (GCC 6.2.1 and clang 4.0.0) generate more optimized x86_64 code
      for bitfield operations, confusing Valgrind?
      
      mach_write_to_1(), mach_write_to_2(), mach_write_to_3():
      Rewrite the assertions that ensure that the most significant
      bits are zero. Apparently, clang 4.0.0 would optimize expressions
      of the form ((n | 0xFF) <= 0x100) to (n <= 0x100). The redundant
      0xFF was added in the first place in order to suppress a
      Valgrind warning. (Valgrind would warn about comparing uninitialized
      values even in the case when the uninitialized bits do not affect
      the result of the comparison.)
      a68d1352
    • Kristian Nielsen's avatar
      3bec0b32
    • Marko Mäkelä's avatar
      MDEV-11349 (1/2) Fix some clang 4.0 warnings · 8da33e3a
      Marko Mäkelä authored
      In InnoDB and XtraDB functions that declare pointer parameters as nonnull,
      remove nullness checks, because GCC would optimize them away anyway.
      
      Use #ifdef instead of #if when checking for a configuration flag.
      
      Clang says that left shifts of negative values are undefined.
      So, use ~0U instead of ~0 in a number of macros.
      
      Some functions that were defined as UNIV_INLINE were declared as
      UNIV_INTERN. Consistently use the same type of linkage.
      
      ibuf_merge_or_delete_for_page() could pass bitmap_page=NULL to
      buf_page_print(), conflicting with the __attribute__((nonnull)).
      8da33e3a
  8. 24 Nov, 2016 1 commit
  9. 23 Nov, 2016 3 commits
    • Kristian Nielsen's avatar
      021f78f6
    • Kristian Nielsen's avatar
      Fix optimistic parallel replication for TokuDB. · 660a2928
      Kristian Nielsen authored
      Make TokuDB report row lock waits with thd_rpl_deadlock_check(). This allows
      parallel replication to properly detect conflicts, and kill and retry the
      offending transaction.
      660a2928
    • Kristian Nielsen's avatar
      fix bogus stalls in the lock tree for low concurrency applications · d145d1b6
      Kristian Nielsen authored
      Merge into the MariaDB tree the pull request from Rich Prohaska for
      PerconaFT. These changes are needed to get parallel replication to
      work with TokuDB. Once the pull request is accepted by Percona and the new upstream version enters MariaDB, this commit can be superseded.
      
      Original commit message from Rich Prohaska:
      
          1. Fix the release before wait race
      
          The release before wait race occurs when a lock is released by transaction A after transaction B tried to acquire it but before transaction B has a chance to register it's pending lock request.  There are several ways to fix this problem, but we want to optimize for the common situation of minimal lock conflicts, which is what the lock acquisition algorithm currently does.  Our solution to the release before wait race is for transaction B to retry its lock request after its lock request has been added to the pending lock set.
      
          2. Fix the retry race
      
          The retry race occurs in the current lock retry algorithm which assumes that if some transaction is running lock retry, then my transaction does not also need to run it.  There is a chance that some pending lock requests will be skipped, but these lock requests will eventually time out.  For applications with small numbers of concurrent transactions, timeouts will frequently occur, and the application throughput will be very small.
      
          The solution to the retry race is to use a group retry algorithm.  All threads run through the retry logic.  Sequence numbers are used to group retries into batches such that one transaction can run the retry logic on behalf of several transactions.  This amortizes the retry cost.  The sequence numbers also ensure that when a transaction releases its locks, all of the pending lock requests that it is blocking are retried.
      
          3. Implement a mechanism to find and kill a pending lock request
      
          Tags lock requests with a client id, use the client id as a key into the pending lock requests sets to find a lock request, complete the lock request with a lock timeout error.
      
          Copyright (c) 2016, Rich Prohaska
          All rights reserved.
      
          Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
      
          1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
      
          2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
      
          THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
      d145d1b6
  10. 22 Nov, 2016 2 commits
  11. 16 Nov, 2016 1 commit
  12. 15 Nov, 2016 1 commit
  13. 14 Nov, 2016 1 commit
  14. 09 Nov, 2016 1 commit
  15. 08 Nov, 2016 1 commit
  16. 07 Nov, 2016 1 commit
  17. 04 Nov, 2016 4 commits