1. 09 Feb, 2017 5 commits
  2. 08 Feb, 2017 7 commits
  3. 07 Feb, 2017 2 commits
  4. 06 Feb, 2017 2 commits
    • Jan Lindström's avatar
      MDEV-11707: Fix incorrect memset() for structures containing · e53dfb24
      Jan Lindström authored
      dynamic class GenericPolicy<TTASEventMutex<GenericPolicy> >'; vtable
      
      Instead using mem_heap_alloc and memset, use mem_heap_zalloc
      directly.
      e53dfb24
    • Jan Lindström's avatar
      MDEV-11759: Encryption code in MariaDB 10.1/10.2 causes · ddf2fac7
      Jan Lindström authored
      compatibility problems
      
      Pages that are encrypted contain post encryption checksum on
      different location that normal checksum fields. Therefore,
      we should before decryption check this checksum to avoid
      unencrypting corrupted pages. After decryption we can use
      traditional checksum check to detect if page is corrupted
      or unencryption was done using incorrect key.
      
      Pages that are page compressed do not contain any checksum,
      here we need to fist unencrypt, decompress and finally
      use tradional checksum check to detect page corruption
      or that we used incorrect key in unencryption.
      
      buf0buf.cc: buf_page_is_corrupted() mofified so that
      compressed pages are skipped.
      
      buf0buf.h, buf_block_init(), buf_page_init_low():
      removed unnecessary page_encrypted, page_compressed,
      stored_checksum, valculated_checksum fields from
      buf_page_t
      
      buf_page_get_gen(): use new buf_page_check_corrupt() function
      to detect corrupted pages.
      
      buf_page_check_corrupt(): If page was not yet decrypted
      check if post encryption checksum still matches.
      If page is not anymore encrypted, use buf_page_is_corrupted()
      traditional checksum method.
      
      If page is detected as corrupted and it is not encrypted
      we print corruption message to error log.
      If page is still encrypted or it was encrypted and now
      corrupted, we will print message that page is
      encrypted to error log.
      
      buf_page_io_complete(): use new buf_page_check_corrupt()
      function to detect corrupted pages.
      
      buf_page_decrypt_after_read(): Verify post encryption
      checksum before tring to decrypt.
      
      fil0crypt.cc: fil_encrypt_buf() verify post encryption
      checksum and ind fil_space_decrypt() return true
      if we really decrypted the page.
      
      fil_space_verify_crypt_checksum(): rewrite to use
      the method used when calculating post encryption
      checksum. We also check if post encryption checksum
      matches that traditional checksum check does not
      match.
      
      fil0fil.ic: Add missed page type encrypted and page
      compressed to fil_get_page_type_name()
      
      Note that this change does not yet fix innochecksum tool,
      that will be done in separate MDEV.
      
      Fix test failures caused by buf page corruption injection.
      ddf2fac7
  5. 05 Feb, 2017 1 commit
    • Marko Mäkelä's avatar
      Rewrite the innodb.log_file_size test with DBUG_EXECUTE_IF. · f1627045
      Marko Mäkelä authored
      Remove the debug parameter innodb_force_recovery_crash that was
      introduced into MySQL 5.6 by me in WL#6494 which allowed InnoDB
      to resize the redo log on startup.
      
      Let innodb.log_file_size actually start up the server, but ensure
      that the InnoDB storage engine refuses to start up in each of the
      scenarios.
      f1627045
  6. 04 Feb, 2017 2 commits
    • Marko Mäkelä's avatar
      MDEV-11985 Make innodb_read_only shutdown more robust · 20e83474
      Marko Mäkelä authored
      If InnoDB is started in innodb_read_only mode such that
      recovered incomplete transactions exist at startup
      (but the redo logs are clean), an assertion will fail at shutdown,
      because there would exist some non-prepared transactions.
      
      logs_empty_and_mark_files_at_shutdown(): Do not wait for incomplete
      transactions to finish if innodb_read_only or innodb_force_recovery>=3.
      Wait for purge to finish in only one place.
      
      trx_sys_close(): Relax the assertion that would fail first.
      
      trx_free_prepared(): Also free recovered TRX_STATE_ACTIVE transactions
      if innodb_read_only or innodb_force_recovery>=3.
      20e83474
    • Marko Mäkelä's avatar
      MDEV-11947 InnoDB purge workers fail to shut down · 9f0dbb31
      Marko Mäkelä authored
      srv_release_threads(): Actually wait for the threads to resume
      from suspension. On CentOS 5 and possibly other platforms,
      os_event_set() may be lost.
      
      srv_resume_thread(): A counterpart of srv_suspend_thread().
      Optionally wait for the event to be set, optionally with a timeout,
      and then release the thread from suspension.
      
      srv_free_slot(): Unconditionally suspend the thread. It is always
      in resumed state when this function is entered.
      
      srv_active_wake_master_thread_low(): Only call os_event_set().
      
      srv_purge_coordinator_suspend(): Use srv_resume_thread() instead
      of the complicated logic.
      9f0dbb31
  7. 03 Feb, 2017 1 commit
  8. 01 Feb, 2017 4 commits
  9. 31 Jan, 2017 6 commits
  10. 30 Jan, 2017 1 commit
  11. 27 Jan, 2017 4 commits
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 (test-only changes) · 1ebfecee
      Marko Mäkelä authored
      Adjust the 10.1 tests innodb.doublewrite and innodb.101_compatibility
      in the same way.
      1ebfecee
    • Marko Mäkelä's avatar
      Clean up a few tests that kill the server. · 4e82aaab
      Marko Mäkelä authored
      As noted in MDEV-8841, any test that kills the server must issue
      FLUSH TABLES, so that tables of crash-unsafe storage engines will
      not be corrupted. Consistently issue this statement after any
      call mtr.add_suppression() calls.
      
      Also, do not invoke shutdown_server directly, but use helpers instead.
      4e82aaab
    • Marko Mäkelä's avatar
      MDEV-11814 test fix · ea9caea8
      Marko Mäkelä authored
      Do not kill the server after call mtr.add_suppression(), because
      the procedure modifies a crash-unsafe table, and we do not want to
      corrupt that table.
      ea9caea8
    • Marko Mäkelä's avatar
      MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes · 732672c3
      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.
      732672c3
  12. 26 Jan, 2017 5 commits