1. 21 Apr, 2017 3 commits
  2. 20 Apr, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12534 Use atomic operations whenever available · d34a67b0
      Marko Mäkelä authored
      Allow 64-bit atomic operations on 32-bit systems,
      only relying on HAVE_ATOMIC_BUILTINS_64, disregarding
      the width of the register file.
      
      Define UNIV_WORD_SIZE correctly on all systems, including Windows.
      In MariaDB 10.0 and 10.1, it was incorrectly defined as 4 on
      64-bit Windows.
      
      Define HAVE_ATOMIC_BUILTINS_64 on Windows
      (64-bit atomics are available on both 32-bit and 64-bit Windows
      platforms; the operations were unnecessarily disabled even on
      64-bit Windows).
      
      MONITOR_OS_PENDING_READS, MONITOR_OS_PENDING_WRITES: Enable by default.
      
      os_file_n_pending_preads, os_file_n_pending_pwrites,
      os_n_pending_reads, os_n_pending_writes: Remove.
      Use the monitor counters instead.
      
      os_file_count_mutex: Remove. On a system that does not support
      64-bit atomics, monitor_mutex will be used instead.
      d34a67b0
  3. 10 Apr, 2017 1 commit
    • Kristian Nielsen's avatar
      MDEV-11201: gtid_ignore_duplicates incorrectly ignores statements when GTID... · 88613e1d
      Kristian Nielsen authored
      MDEV-11201: gtid_ignore_duplicates incorrectly ignores statements when GTID replication is not enabled
      
      When master_use_gtid=no, the IO thread loads the slave GTID state from
      the master during connect. This races with the SQL thread when
      gtid_ignore_duplicates=1. If an event is in the relay log from before
      the new connect and has not been applied yet, moving the slave
      position causes the SQL thread to think that event should be skipped
      due to gtid_ignore_duplicates=1.
      
      This patch simply disables gtid_ignore_duplicates when not using GTID,
      which seems to be what one would expect.
      88613e1d
  4. 09 Apr, 2017 1 commit
  5. 05 Apr, 2017 2 commits
  6. 03 Apr, 2017 2 commits
    • Vladislav Vaintroub's avatar
      Compiling, Windows . Avoid unnecessary rebuilds with MSVC. · f2dc04ab
      Vladislav Vaintroub authored
      To export symbols from the mysqld.exe, use lib.exe with /DEF, rather than
      pre-link step when building mysqld.exe.
      
      This helps to avoid relinking all plugins, if mysqld.exe was recompiled
      but the list of its exports has not changed.
      
      Also removed unnecessary DEPENDS in some ADD_CUSTOM_COMMAND (gen_lex_token,
      gen_lex_hash etc). They confuse VS generator which tends to
      recreate headers and do unnecessary recompilations.
      f2dc04ab
    • Vladislav Vaintroub's avatar
      Windows : Fix compiling with VS2013 · ff6f4d7d
      Vladislav Vaintroub authored
      We do not use it now, but there is still no reason to break compilation
      for other users.
      ff6f4d7d
  7. 24 Mar, 2017 2 commits
  8. 21 Mar, 2017 2 commits
  9. 18 Mar, 2017 1 commit
    • Marko Mäkelä's avatar
      Clean up the test mentioned in MDEV-12052. · 4c35dce2
      Marko Mäkelä authored
      The test is not expected to crash. With a non-debug server,
      Valgrind completes in reasonable time without any failure.
      
      Also, it does not make sense to store and restore parameters
      when the parameters are already being restored by a server restart.
      4c35dce2
  10. 17 Mar, 2017 1 commit
  11. 16 Mar, 2017 3 commits
    • Sergei Golubchik's avatar
      compiler warning · 8971286a
      Sergei Golubchik authored
      8971286a
    • Monty's avatar
      Wait for slave threads to start during startup · 2d0c579a
      Monty authored
      - Before this patch during startup all slave threads was started without
        any check that they had started properly.
      - If one did a START SLAVE, STOP SLAVE or CHANGE MASTER as first command to the server
        there was a chance that server could access structures that where not
        properly  initialized which could lead to crashes in
        Log_event::read_log_event
      - Fixed by waiting for slave threads to start up properly also during
        server startup, like we do with START SLAVE.
      2d0c579a
    • Monty's avatar
      Removed wrong assert · e7f55fde
      Monty authored
      The following is an updated commit message for the following commit
      that was pushed before I had a chance to update the commit message:
      c5e25c8b
      
      Fixed dead locks when doing stop slave while slave was starting.
      
      - Added a separate lock for protecting start/stop/reset of a specific slave.
        This solves some possible dead locks when one calls stop slave while
        the slave is starting as the old run_locks was over used for other things.
      - Set hash->records to 0 before calling free of all hash elements.
        This was set to stop concurrent threads to loop over hash elements and
        access members that was already freed.
        This was a problem especially in start_all_slaves/stop_all_slaves
        as the mutex protecting the hash was temporarily released while a slave
        was started/stopped.
      - Because of change to hash->records during hash_reset(),
        any_slave_sql_running() will return 1 during shutdown as one can't
        loop over master_info_index->master_info_hash while hash_reset() of it
        is in progress.
        This also fixes a potential old bug in any_slave_sql_running() where
        during shutdown and ~Master_info_index(), my_hash_free() we could
        potentially try to access elements that was already freed.
      e7f55fde
  12. 15 Mar, 2017 1 commit
  13. 14 Mar, 2017 1 commit
    • Varun Gupta's avatar
      MDEV-6486: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' · adbe1c5f
      Varun Gupta authored
      failed with SELECT SQ, TEXT field
      
      The functon find_all_keys does call Item_subselect::walk, which calls walk() for the subquery
      The issue is that when a field is represented by Item_outer_ref(Item_direct_ref(Item_copy_string( ...))).
      Item_copy_string does have a pointer to an Item_field in Item_copy::item but does not implement Item::walk method, so we are not
      able to set the bitmap for that field. This is the reason why the assert fails.
      
      Fixed by adding the walk method to Item_copy class.
      adbe1c5f
  14. 13 Mar, 2017 2 commits
  15. 12 Mar, 2017 1 commit
  16. 10 Mar, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12091 Shutdown fails to wait for rollback of recovered transactions to finish · 032678ad
      Marko Mäkelä authored
      In the 10.1 InnoDB Plugin, a call os_event_free(buf_flush_event) was
      misplaced. The event could be signalled by rollback of resurrected
      transactions while shutdown was in progress. This bug was caught
      by cmake -DWITH_ASAN testing. This call was only present in the
      10.1 InnoDB Plugin, not in other versions, or in XtraDB.
      
      That said, the bug affects all InnoDB versions. Shutdown assumes the
      cessation of any page-dirtying activity, including the activity of
      the background rollback thread. InnoDB only waited for the background
      rollback to finish as part of a slow shutdown (innodb_fast_shutdown=0).
      The default is a clean shutdown (innodb_fast_shutdown=1). In a scenario
      where InnoDB is killed, restarted, and shut down soon enough, the data
      files could become corrupted.
      
      logs_empty_and_mark_files_at_shutdown(): Wait for the
      rollback to finish, except if innodb_fast_shutdown=2
      (crash-like shutdown) was requested.
      
      trx_rollback_or_clean_recovered(): Before choosing the next
      recovered transaction to roll back, terminate early if non-slow
      shutdown was initiated. Roll back everything on slow shutdown
      (innodb_fast_shutdown=0).
      
      srv_innodb_monitor_mutex: Declare as static, because the mutex
      is only used within one module.
      
      After each call to os_event_free(), ensure that the freed event
      is not reachable via global variables, by setting the relevant
      variables to NULL.
      032678ad
  17. 09 Mar, 2017 5 commits
  18. 08 Mar, 2017 10 commits