An error occurred fetching the project authors.
  1. 29 Aug, 2017 1 commit
    • Andrei Elkin's avatar
      MDEV-13437 InnoDB fails to return error for XA COMMIT or XA ROLLBACK in read-only mode · 888a8b69
      Andrei Elkin authored
      Assertions failed due to incorrect handling of the --tc-heuristic-recover
      option when InnoDB is in read-only mode either due to innodb_read_only=1
      or innodb_force_recovery>3. InnoDB failed to refuse a XA COMMIT or
      XA ROLLBACK operation, and there were errors in the error handling in
      the upper layer.
      
      This was fixed by making InnoDB XA operations respect the
      high_level_read_only flag. The InnoDB part of the fix and
      parts of the test main.tc_heuristic_recover were provided
      by Marko Mäkelä.
      
      LOCK_log mutex lock/unlock had to be added to fix MDEV-13438.
      The measure is confirmed by mysql sources as well.
      
      For testing of the conflicting option combination, mysql-test-run is
      made to export a new $MYSQLD_LAST_CMD. It holds the very last value
      generated by mtr.mysqld_start().  Even though the options have been
      also always stored in $mysqld->{'started_opts'} there were no access
      to them beyond the automatic server restart by mtr through the expect
      file interface.
      
      Effectively therefore $MYSQLD_LAST_CMD represents a more general
      interface to $mysqld->{'started_opts'} which can be used in wider
      scopes including server launch with incompatible options.
      
      Notice another existing method to restart the server with incompatible
      options relying on $MYSQLD_CMD is is aware of $mysqld->{'started_opts'}
      (the actual options that the server is launched by mtr). In order to use
      this method they would have to be provided manually.
      
      NOTE: When merging to 10.2, the file search_pattern_in_file++.inc
      should be replaced with the pre-existing search_pattern_in_file.inc.
      888a8b69
  2. 12 Jun, 2017 1 commit
  3. 09 Jun, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-13039 innodb_fast_shutdown=0 may fail to purge all undo log · 417434f1
      Marko Mäkelä authored
      When a slow shutdown is performed soon after spawning some work for
      background threads that can create or commit transactions, it is possible
      that new transactions are started or committed after the purge has finished.
      This is violating the specification of innodb_fast_shutdown=0, namely that
      the purge must be completed. (None of the history of the recent transactions
      would be purged.)
      
      Also, it is possible that the purge threads would exit in slow shutdown
      while there exist active transactions, such as recovered incomplete
      transactions that are being rolled back. Thus, the slow shutdown could
      fail to purge some undo log that becomes purgeable after the transaction
      commit or rollback.
      
      srv_undo_sources: A flag that indicates if undo log can be generated
      or the persistent, whether by background threads or by user SQL.
      Even when this flag is clear, active transactions that already exist
      in the system may be committed or rolled back.
      
      innodb_shutdown(): Renamed from innobase_shutdown_for_mysql().
      Do not return an error code; the operation never fails.
      Clear the srv_undo_sources flag, and also ensure that the background
      DROP TABLE queue is empty.
      
      srv_purge_should_exit(): Do not allow the purge to exit if
      srv_undo_sources are active or the background DROP TABLE queue is not
      empty, or in slow shutdown, if any active transactions exist
      (and are being rolled back).
      
      srv_purge_coordinator_thread(): Remove some previous workarounds
      for this bug.
      
      innobase_start_or_create_for_mysql(): Set buf_page_cleaner_is_active
      and srv_dict_stats_thread_active directly. Set srv_undo_sources before
      starting the purge subsystem, to prevent immediate shutdown of the purge.
      Create dict_stats_thread and fts_optimize_thread immediately
      after setting srv_undo_sources, so that shutdown can use this flag to
      determine if these subsystems were started.
      
      dict_stats_shutdown(): Shut down dict_stats_thread. Backported from 10.2.
      
      srv_shutdown_table_bg_threads(): Remove (unused).
      417434f1
  4. 19 May, 2017 1 commit
  5. 18 May, 2017 2 commits
    • Vicențiu Ciorbaru's avatar
      3c7af6c4
    • Marko Mäkelä's avatar
      Fix some __attribute__((nonnull)) misuse · 54bb04f7
      Marko Mäkelä authored
      This fixes warnings that were emitted when running InnoDB test
      suites on a debug server that was compiled with GCC 7.1.0 using
      the flags -O3 -fsanitize=undefined.
      
      thd_requested_durability(): XtraDB can call this with trx->mysql_thd=NULL.
      Remove the function in InnoDB, because it is not used there.
      
      calc_row_difference(): Do not call memcmp(o_ptr, NULL, 0).
      
      innobase_index_name_is_reserved(): This can be called with
      key_info=NULL, num_of_keys=0.
      
      innobase_dropping_foreign(), innobase_check_foreigns_low(),
      innobase_check_foreigns(): This can be called with
      drop_fk=NULL, n_drop_fk=0.
      
      rec_convert_dtuple_to_rec_comp(): Do not invoke memcpy(end, NULL, 0).
      54bb04f7
  6. 17 May, 2017 4 commits
    • Marko Mäkelä's avatar
      MDEV-12358 Work around what looks like a bug in GCC 7.1.0 · 9f89b94b
      Marko Mäkelä authored
      The parameter thr of the function btr_cur_optimistic_insert()
      is not declared as nonnull, but GCC 7.1.0 with -O3 is wrongly
      optimizing away the first part of the condition
      UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)
      when the function is being called by row_merge_insert_index_tuples()
      with thr==NULL.
      
      The fake_changes is an XtraDB addition. This GCC bug only appears
      to have an impact on XtraDB, not InnoDB.
      
      We work around the problem by not attempting to dereference thr
      when both BTR_NO_LOCKING_FLAG and BTR_NO_UNDO_LOG_FLAG are set
      in the flags. Probably BTR_NO_LOCKING_FLAG alone should suffice.
      
      btr_cur_optimistic_insert(), btr_cur_pessimistic_insert(),
      btr_cur_pessimistic_update(): Correct comments that disagree with
      usage and with nonnull attributes. No other parameter than thr can
      actually be NULL.
      
      row_ins_duplicate_error_in_clust(): Remove an unused parameter.
      
      innobase_is_fake_change(): Unused function; remove.
      
      ibuf_insert_low(), row_log_table_apply(), row_log_apply(),
      row_undo_mod_clust_low():
      Because we will be passing BTR_NO_LOCKING_FLAG | BTR_NO_UNDO_LOG_FLAG
      in the flags, the trx->fake_changes flag will be treated as false,
      which is the right thing to do at these low-level operations
      (change buffer merge, ALTER TABLE…LOCK=NONE, or ROLLBACK).
      This might be fixing actual XtraDB bugs.
      
      Other callers that pass these two flags are also passing thr=NULL,
      implying fake_changes=false. (Some callers in ROLLBACK are passing
      BTR_NO_LOCKING_FLAG and a nonnull thr. In these callers, fake_changes
      better be false, to avoid corruption.)
      9f89b94b
    • Marko Mäkelä's avatar
      Never pass NULL to innobase_get_stmt() · 4754f88c
      Marko Mäkelä authored
      4754f88c
    • Marko Mäkelä's avatar
      Silence bogus GCC 7 warnings -Wimplicit-fallthrough · 7972da8a
      Marko Mäkelä authored
      Do not silence uncertain cases, or fix any bugs.
      
      The only functional change should be that ha_federated::extra()
      is not calling DBUG_PRINT to report an unhandled case for
      HA_EXTRA_PREPARE_FOR_DROP.
      7972da8a
    • Marko Mäkelä's avatar
  7. 16 May, 2017 1 commit
  8. 15 May, 2017 1 commit
  9. 04 Mar, 2017 1 commit
  10. 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
  11. 27 Jan, 2017 1 commit
    • 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. 03 Jan, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-11694 InnoDB tries to create unused table SYS_ZIP_DICT · 80d5d145
      Marko Mäkelä authored
      MariaDB Server 10.0.28 and 10.1.19 merged code from Percona XtraDB
      that introduced support for compressed columns. Much but not all
      of this code was disabled by placing #ifdef HAVE_PERCONA_COMPRESSED_COLUMNS
      around it.
      
      Among the unused but not disabled code is code to access
      some new system tables related to compressed columns.
      
      The creation of these system tables SYS_ZIP_DICT and SYS_ZIP_DICT_COLS
      would cause a crash in --innodb-read-only mode when upgrading
      from an earlier version to 10.0.28 or 10.1.19.
      
      Let us remove all the dead code related to compressed columns.
      Users who already upgraded to 10.0.28 and 10.1.19 will have the two
      above mentioned empty tables in their InnoDB system tablespace.
      Subsequent versions of MariaDB Server will completely ignore those tables.
      80d5d145
  13. 02 Dec, 2016 1 commit
  14. 17 Nov, 2016 1 commit
  15. 31 Oct, 2016 1 commit
  16. 25 Oct, 2016 1 commit
  17. 14 Oct, 2016 1 commit
  18. 13 Oct, 2016 1 commit
  19. 27 Sep, 2016 1 commit
  20. 10 Aug, 2016 1 commit
  21. 23 Jun, 2016 2 commits
    • Jan Lindström's avatar
      Merge following commit from 5.5: · 26de9061
      Jan Lindström authored
      commit ef92aaf9
      Author: Jan Lindström <jan.lindstrom@mariadb.com>
      Date:   Wed Jun 22 22:37:28 2016 +0300
      
          MDEV-10083: Orphan ibd file when playing with foreign keys
      
          Analysis: row_drop_table_for_mysql did not allow dropping
          referenced table even in case when actual creating of the
          referenced table was not successfull if foreign_key_checks=1.
      
          Fix: Allow dropping referenced table even if foreign_key_checks=1
          if actual table create returned error.
      26de9061
    • Jan Lindström's avatar
      MDEV-10083: Orphan ibd file when playing with foreign keys · ef92aaf9
      Jan Lindström authored
      Analysis: row_drop_table_for_mysql did not allow dropping
      referenced table even in case when actual creating of the
      referenced table was not successfull if foreign_key_checks=1.
      
      Fix: Allow dropping referenced table even if foreign_key_checks=1
      if actual table create returned error.
      ef92aaf9
  22. 21 Jun, 2016 1 commit
  23. 14 Jun, 2016 1 commit
  24. 08 Jun, 2016 1 commit
  25. 26 Apr, 2016 1 commit
  26. 22 Apr, 2016 1 commit
  27. 18 Apr, 2016 1 commit
  28. 11 Mar, 2016 1 commit
  29. 16 Feb, 2016 2 commits
  30. 15 Feb, 2016 1 commit
  31. 08 Feb, 2016 1 commit
  32. 04 Feb, 2016 1 commit
  33. 03 Feb, 2016 2 commits