1. 07 Dec, 2017 6 commits
    • Jan Lindström's avatar
      4d016e6e
    • Jan Lindström's avatar
      MDEV-14401: Stored procedure that declares a handler that catches... · ba576c5b
      Jan Lindström authored
      MDEV-14401: Stored procedure that declares a handler that catches ER_LOCK_DEADLOCK error causes thd->is_error() assertion
      
      This was missing bug fix from MySQL wsrep i.e. Galera.
      Problem was that if stored procedure declares a handler that
      catches deadlock error, then the error may have been
      cleared in method sp_rcontext::handle_sql_condition().
      Use wsrep_conflict_state correctly to determine is the
      error already sent to client.
      
      Add test case for both this bug and MDEV-12837: WSREP: BF
      lock wait long. Test requires both fixes to pass.
      ba576c5b
    • Jan Lindström's avatar
      MDEV-12837: WSREP: BF lock wait long · da3a3a68
      Jan Lindström authored
      Problem was a merge error from MySQL wsrep i.e. Galera.
      
      wsrep_on_check
      	New check function. Galera can't be enabled
      	if innodb-lock-schedule-algorithm=VATS.
      
      innobase_kill_query
      	In Galera async kill we could own lock mutex.
      
      innobase_init
      	If Variance-Aware-Transaction-Sheduling Algorithm (VATS) is
      	used on Galera we fall back to First-Come-First-Served (FCFS)
      	with notice to user.
      
      Changed innodb-lock-schedule-algorithm as read-only parameter
      as it was designed to be.
      
      lock_reset_lock_and_trx_wait
      	Use ib::hex() to print out transaction ID.
      
      lock_rec_other_has_expl_req,
      lock_rec_other_has_conflicting,
      RecLock::add_to_waitq
      lock_rec_lock_slow
      lock_table_other_has_incompatible
      lock_rec_insert_check_and_lock
      lock_prdt_other_has_conflicting
      
      	Change pointer to conflicting lock to normal pointer as this
      	pointer contents could be changed later.
      
      RecLock::create
      	Conclicting lock pointer is moved to last parameter with
      	default value NULL. This conflicting transaction could
      	be selected as victim in Galera if requesting transaction
      	is BF (brute force) transaction. In this case contents
      	of conflicting lock pointer will be changed. Use ib::hex() to print
      	transaction ids.
      da3a3a68
    • Monty's avatar
      Ensure that mysqladmin also works with MariaDB 10.3 + more · 3eaca005
      Monty authored
      Increase the number of status variabels that can be handled
      3eaca005
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 51c73a43
      Marko Mäkelä authored
      51c73a43
    • Marko Mäkelä's avatar
      Post-fix for MDEV-14587 · 447931c6
      Marko Mäkelä authored
      dict_stats_process_entry_from_defrag_pool(): Release the mutex
      447931c6
  2. 06 Dec, 2017 9 commits
    • Marko Mäkelä's avatar
      Follow-up fix to MDEV-13201 Assertion `srv_undo_sources || ...` failed on... · 77fb7ccb
      Marko Mäkelä authored
      Follow-up fix to MDEV-13201 Assertion `srv_undo_sources || ...` failed on shutdown during DDL operation
      
      Introduce the debug flag trx_t::persistent_stats to suppress the
      assertion for the updates of persistent statistics during fast
      shutdown.
      
      dict_stats_exec_sql(): Do execute the statement even though shutdown
      has been initiated.
      77fb7ccb
    • Marko Mäkelä's avatar
      MDEV-14511 Use fewer transactions for updating InnoDB persistent statistics · 7dc6066d
      Marko Mäkelä authored
      dict_stats_exec_sql(): Expect the caller to always provide a transaction.
      Remove some redundant assertions. The caller must hold dict_sys->mutex,
      but holding dict_operation_lock is only necessary for accessing
      data dictionary tables, which we are not accessing.
      
      dict_stats_save_index_stat(): Acquire dict_sys->mutex
      for invoking dict_stats_exec_sql().
      
      dict_stats_save(), dict_stats_update_for_index(), dict_stats_update(),
      dict_stats_drop_index(), dict_stats_delete_from_table_stats(),
      dict_stats_delete_from_index_stats(), dict_stats_drop_table(),
      dict_stats_rename_in_table_stats(), dict_stats_rename_in_index_stats(),
      dict_stats_rename_table(): Use a single caller-provided
      transaction that is started and committed or rolled back by the caller.
      
      dict_stats_process_entry_from_recalc_pool(): Let the caller provide
      a transaction object.
      
      ha_innobase::open(): Pass a transaction to dict_stats_init().
      
      ha_innobase::create(), ha_innobase::discard_or_import_tablespace():
      Pass a transaction to dict_stats_update().
      
      ha_innobase::rename_table(): Pass a transaction to
      dict_stats_rename_table(). We do not use the same transaction
      as the one that updated the data dictionary tables, because
      we already released the dict_operation_lock. (FIXME: there is
      a race condition; a lock wait on SYS_* tables could occur
      in another DDL transaction until the data dictionary transaction
      is committed.)
      
      ha_innobase::info_low(): Pass a transaction to dict_stats_update()
      when calculating persistent statistics.
      
      alter_stats_norebuild(), alter_stats_rebuild(): Update the
      persistent statistics as well. In this way, a single transaction
      will be used for updating the statistics of a whole table, even
      for partitioned tables.
      
      ha_innobase::commit_inplace_alter_table(): Drop statistics for
      all partitions when adding or dropping virtual columns, so that
      the statistics will be recalculated on the next handler::open().
      This is a refactored version of Oracle Bug#22469660 fix.
      
      RecLock::add_to_waitq(), lock_table_enqueue_waiting():
      Do not allow a lock wait to occur for updating statistics
      in a data dictionary transaction, such as DROP TABLE. Instead,
      return the previously unused error code DB_QUE_THR_SUSPENDED.
      
      row_merge_lock_table(), row_mysql_lock_table(): Remove dead code
      for handling DB_QUE_THR_SUSPENDED.
      
      row_drop_table_for_mysql(), row_truncate_table_for_mysql():
      Drop the statistics as part of the data dictionary transaction.
      After TRUNCATE TABLE, the statistics will be recalculated on
      subsequent ha_innobase::open(), similar to how the logic after
      the above-mentioned Oracle Bug#22469660 fix in
      ha_innobase::commit_inplace_alter_table() works.
      
      btr_defragment_thread(): Use a single transaction object for
      updating defragmentation statistics.
      
      dict_stats_save_defrag_stats(), dict_stats_save_defrag_stats(),
      dict_stats_process_entry_from_defrag_pool(),
      dict_defrag_process_entries_from_defrag_pool(),
      dict_stats_save_defrag_summary(), dict_stats_save_defrag_stats():
      Add a parameter for the transaction.
      
      dict_stats_empty_table(): Make public. This will be called by
      row_truncate_table_for_mysql() after dropping persistent statistics,
      to clear the memory-based statistics as well.
      7dc6066d
    • Sergei Petrunia's avatar
      MDEV-14563: Wrong query plan for query with no PK · 2c1e4d4d
      Sergei Petrunia authored
      Part #2: Don't use the new code for the clustered PK, it is handled
      in the special way right above.
      2c1e4d4d
    • Sergei Petrunia's avatar
      MDEV-14563: Wrong query plan for query with no PK · a6254e5e
      Sergei Petrunia authored
      TABLE_SHARE::init_from_binary_frm_image() calls handler_file->index_flags()
      before it has set TABLE_SHARE::primary_key (it is 0 while it should be
      MAX_KEY in my example).
      This causes MyRocks to report wrong index flags (it thinks it's a PK while
      it is not), which causes invalid query plans later on.
      
      Do the only thing that seems feasible: adjust field->part_of key to have
      correct value in ha_rocksdb::open.
      a6254e5e
    • Sergei Petrunia's avatar
      MDEV-14433: RocksDB may show empty or incorrect output with rocksdb_strict_collation_check=off · c3803914
      Sergei Petrunia authored
      Part#1: Set field->part_of_key correctly for PK fields.
      c3803914
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      b1cd5ca2
    • Marko Mäkelä's avatar
      e9bc0f75
  3. 05 Dec, 2017 3 commits
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 1d526f31
      Marko Mäkelä authored
      1d526f31
    • Marko Mäkelä's avatar
      MDEV-14587 dict_stats_process_entry_from_defrag_pool() fails to call... · 63cbb982
      Marko Mäkelä authored
      MDEV-14587 dict_stats_process_entry_from_defrag_pool() fails to call dict_table_close() when index==NULL
      
      dict_stats_process_entry_from_defrag_pool(): Simplify the logic,
      and always call dict_table_close() when dict_table_open() returned
      a non-NULL handle.
      63cbb982
    • Marko Mäkelä's avatar
      MDEV-13670/MDEV-14550 Error log flood : "InnoDB: page_cleaner: 1000ms... · d1ab8903
      Marko Mäkelä authored
      MDEV-13670/MDEV-14550 Error log flood :  "InnoDB: page_cleaner: 1000ms intended loop took N ms. The settings might not be optimal."
      
      Silence the error log output that was introduced in MySQL 5.7
      (MariaDB 10.2.2) if log_warnings=2 or less.
      
      We should still figure out what these messages really indicate
      and how to solve the problems.
      
      pc_sleep_if_needed(): Add a parameter for the current time,
      so that there will be fewer successive calls to ut_time_ms()
      with no I/O between them.
      
      buf_flush_page_cleaner_coordinator(): Exit the first loop
      whenever shutdown has been requested. At the start of the loop,
      call ut_time_ms() only once. Do not display the message if
      log_warnings=2 or less.
      d1ab8903
  4. 04 Dec, 2017 2 commits
  5. 03 Dec, 2017 2 commits
    • Monty's avatar
      MDEV-10688 rpl.rpl_row_log_innodb failed in buildbot · d7b0b8dd
      Monty authored
      Problem was that Binlog_checkpoint can happen at random times.
      Fixed by not write binlog_checkpoint for the rpl_log test.
      
      Other things:
      - Removed not used variable "$keep_gtid_events"
      - Added option for show_binlog_events to skip binlog_checkpoint
      d7b0b8dd
    • Monty's avatar
      resolve_stack_dump updated to match latest stack trace format · d9188ada
      Monty authored
      Originally only symbols withing [] where resolved. Now we resolve
      symbols also withing (+...)
      
      To make it easier to see where the resolved symbol comes from, we
      resolve the symbol 'in place' instead of just printing the resolved
      symbol alone.
      d9188ada
  6. 01 Dec, 2017 2 commits
  7. 30 Nov, 2017 1 commit
  8. 29 Nov, 2017 3 commits
  9. 28 Nov, 2017 3 commits
  10. 27 Nov, 2017 1 commit
  11. 24 Nov, 2017 8 commits