1. 15 Feb, 2018 5 commits
    • Marko Mäkelä's avatar
      MDEV-15323 Follow-up to MDEV-14905: Skip FTS processing if innodb_read_only · 5ab46028
      Marko Mäkelä authored
      fts_cmp_set_sync_doc_id(), fts_load_stopword(): Start the transaction
      in read-only mode if innodb_read_only is set.
      
      fts_update_sync_doc_id(), fts_commit_table(), fts_sync(),
      fts_optimize_table(): Return DB_READ_ONLY if innodb_read_only is set.
      
      fts_doc_fetch_by_doc_id(), fts_table_fetch_doc_ids():
      Remove the code to start an internal transaction or to roll back,
      because this is a read-only operation.
      5ab46028
    • Marko Mäkelä's avatar
      Dead code removal: sess_t · 27ea2963
      Marko Mäkelä authored
      The session object is not really needed for anything.
      We can directly create and free the dummy purge_sys->query->trx.
      27ea2963
    • Marko Mäkelä's avatar
      MDEV-14905 Fulltext index modification committed during shutdown · 7baea2ef
      Marko Mäkelä authored
      If CREATE TABLE...FULLTEXT INDEX was initiated right before shutdown,
      then the function fts_load_stopword() could commit modifications
      after shutdown was initiated, causing an assertion failure in
      the function trx_purge_add_update_undo_to_history().
      
      Mark as internal all the read/write transactions that
      modify fulltext indexes, so that they will be ignored by
      the assertion that guards against transaction commits
      after shutdown has been initiated.
      
      fts_optimize_free(): Invoke trx_commit_for_mysql() just in case,
      because in fts_optimize_create() we started the transaction as
      internal, and fts_free_for_backgruond() would assert that the
      flag is clear. Transaction commit would clear the flag.
      7baea2ef
    • Marko Mäkelä's avatar
      MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow... · 5fe9b4a7
      Marko Mäkelä authored
      MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow the storage engine to cleanup open connections
      
      Also, allow the MariaDB 10.2 server to link InnoDB dynamically
      against ha_innodb.so (which is what mysql-test-run.pl expects
      to exist, instead of the default name ha_innobase.so).
      
      wsrep_load_data_split(): Instead of referring to innodb_hton_ptr,
      check the handlerton::db_type. This was recently broken by me in
      MDEV-11415.
      
      innodb_lock_schedule_algorithm: Define as a weak global symbol,
      so that WITH_WSREP will not depend on InnoDB being linked statically.
      I tested this manually. Notably, running a test that only does
      	SET GLOBAL wsrep_on=1;
      with a static or dynamic InnoDB and
      	./mtr --mysqld=--loose-innodb-lock-schedule-algorithm=fcfs
      will crash with SIGSEGV at shutdown. With the default VATS
      combination the wsrep_on is properly refused for both the
      static and dynamic InnoDB.
      
      ha_close_connection(): Do invoke the method also for plugins
      for which UNINSTALL PLUGIN was deferred due to open connections.
      Thanks to @svoj for pointing this out.
      
      thd_to_trx(): Return a pointer, not a reference to a pointer.
      
      check_trx_exists(): Invoke thd_set_ha_data() for assigning a transaction.
      
      log_write_checkpoint_info(): Remove an unused DEBUG_SYNC point
      that would cause an assertion failure on shutdown after deferred
      UNINSTALL PLUGIN.
      
      This was tested as follows:
      
      cmake -DWITH_WSREP=1 -DPLUGIN_INNOBASE:STRING=DYNAMIC \
      -DWITH_MARIABACKUP:BOOL=OFF ...
      make
      cd mysql-test
      ./mtr innodb.innodb_uninstall
      5fe9b4a7
    • Sauron's avatar
      Prevent building WSREP without INNODB · 8db54f1a
      Sauron authored
      8db54f1a
  2. 14 Feb, 2018 2 commits
  3. 13 Feb, 2018 4 commits
  4. 12 Feb, 2018 3 commits
    • Marko Mäkelä's avatar
      MDEV-15270 Mariabackup should not try to use doublewrite buffer · 00f0c039
      Marko Mäkelä authored
      When Mariabackup gets a bad read of the first page of the system
      tablespace file, it would inappropriately try to apply the doublewrite
      buffer and write changes back to the data file (to the source file)!
      This is very wrong and must be prevented.
      
      The correct action would be to retry reading the system tablespace
      as well as any other files whose first page was read incorrectly.
      Fixing this was not attempted.
      
      xb_load_tablespaces(): Shorten a bogus message to be more relevant.
      The message can be displayed by --backup or --prepare.
      
      xtrabackup_backup_func(), os_file_write_func(): Add a missing space
      to a message.
      
      Datafile::restore_from_doublewrite(): Do not even attempt the
      operation in Mariabackup.
      
      recv_init_crash_recovery_spaces(): Do not attempt to restore the
      doublewrite buffer in Mariabackup (--prepare or --export), because
      all pages should have been copied correctly in --backup already,
      and because --backup should ignore the doublewrite buffer.
      
      SysTablespace::read_lsn_and_check_flags(): Do not attempt to initialize
      the doublewrite buffer in Mariabackup.
      
      innodb_make_page_dirty(): Correct the bounds check.
      
      Datafile::read_first_page(): Correct the name of the parameter.
      00f0c039
    • Marko Mäkelä's avatar
      MDEV-13869 MariaDB slow start · 33f70c4d
      Marko Mäkelä authored
      When code from MySQL 5.7.9 was merged to MariaDB 10.2.2
      in commit 2e814d47
      an assignment validate=true was inadvertently added to the function
      dict_check_sys_tables().
      
      This causes InnoDB to open every single .ibd file on startup, even
      when no crash recovery was needed.
      
      Simply removing the assignment would make some tests fail. We do the
      best to retain almost the same level of inconsistency detection.
      In the test innodb.table_flags, access to one of the tables will not
      be blocked despite inconsistent flags.
      
      dict_check_sys_tables(): Remove the problematic assignment, and skip
      validation in normal startup.
      
      dict_load_table_one(): If the .ibd file cannot be opened, mark the
      table as corrupted and unreadable.
      
      fil_node_open_file(): Validate FSP_SPACE_FLAGS with the expected
      flags. If reading the tablespace fails, invalidate node->handle
      instead of letting it remain stale. This bug was caught by a
      fil_validate() assertion failure.
      
      fsp_flags_try_adjust(): If the tablespace file is invalid, do nothing.
      33f70c4d
    • Elena Stepanova's avatar
      7a106d19
  5. 11 Feb, 2018 1 commit
  6. 10 Feb, 2018 5 commits
  7. 09 Feb, 2018 6 commits
  8. 08 Feb, 2018 14 commits