1. 20 May, 2020 11 commits
    • Sujatha's avatar
      MDEV-22451: SIGSEGV in __memmove_avx_unaligned_erms/memcpy from _my_b_write on... · 450a5b33
      Sujatha authored
      MDEV-22451: SIGSEGV in __memmove_avx_unaligned_erms/memcpy from _my_b_write on CREATE after RESET MASTER
      
      Merge branch '10.1' into 10.2
      450a5b33
    • Marko Mäkelä's avatar
      MDEV-19114 post-push fix: SIGSEGV on INSERT · 22a6fa57
      Marko Mäkelä authored
      ins_node_create_entry_list(): Create dummy empty tuples for
      corrupted or incomplete indexes, to avoid dereferencing a NULL
      dict_field_t::col pointer in row_build_index_entry_low().
      
      This issue was found by a crash in the test gcol.innodb_virtual_basic
      when merging the fix to 10.5.
      22a6fa57
    • Sujatha's avatar
      MDEV-22451: SIGSEGV in __memmove_avx_unaligned_erms/memcpy from _my_b_write on... · 836d7089
      Sujatha authored
      MDEV-22451: SIGSEGV in __memmove_avx_unaligned_erms/memcpy from _my_b_write on CREATE after RESET MASTER
      
      Analysis:
      ========
      RESET MASTER TO # command deletes all binary log files listed in the index
      file, resets the binary log index file to be empty, and creates a new binary
      log with number #. When the user provided binary log number is greater than
      the max allowed value '2147483647' server fails to generate a new binary log.
      The RESET MASTER statement marks the binlog closure status as
      'LOG_CLOSE_TO_BE_OPENED' and exits. Statements which follow RESET MASTER
      try to write to binary log they find the log_state != LOG_CLOSED and
      proceed to write to binary log cache and it results in crash.
      
      Fix:
      ===
      During MYSQL_BIN_LOG open, if generation of new binary log name fails then the
      "log_state" needs to be marked as "LOG_CLOSED". With this further statements
      will find binary log as closed and they will skip writing to the binary log.
      836d7089
    • Rasmus Johansson's avatar
      MDEV-22631 fix · ed29782a
      Rasmus Johansson authored
      ed29782a
    • Rasmus Johansson's avatar
      MDEV-22631 fix · a6b4d4be
      Rasmus Johansson authored
      a6b4d4be
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · e380f447
      Marko Mäkelä authored
      e380f447
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-22633 Assertion failed in prepare_inplace_alter_table_dict · 1893a137
      Thirunarayanan Balathandayuthapani authored
      prepare_inplace_alter_table_dict(): In the error handling, relax
      a debug assertion for the case that we did not execute
      dict_stats_wait_bg_to_stop_using_table() yet.
      1893a137
    • Marko Mäkelä's avatar
      MDEV-22258 Limit innodb_encryption_threads to 255 · 6b2c8cac
      Marko Mäkelä authored
      For no good reason, innodb_encryption_threads was limited to
      4,294,967,295. Expectedly, the server would crash if such an
      insane value was specified. Let us limit the maximum to 255.
      
      The encryption threads are not doing much useful work.
      They are basically only dirtying pages by performing
      dummy writes via the redo log. The encryption key rotation
      or the in-place addition or removal of encryption
      will take place in the page cleaner.
      
      In a quick test on a 20-core CPU (40 threads in total),
      the sweet spot on an otherwise idle server seemed to be
      innodb_encryption_threads=16 for the test
      encryption.encrypt_and_grep. The new limit 255 should be
      more than enough for even bigger servers.
      6b2c8cac
    • Yury Kurlykov's avatar
      MDEV-22629 Remove fts_indexes field from struct fts_update_t (#1537) · d2900d91
      Yury Kurlykov authored
      fts_indexes field in fts_update_t never used. So replace fts_update_t
      with doc_id_t in the code
      d2900d91
    • Marko Mäkelä's avatar
      dd95935e
    • Jan Lindström's avatar
      MDEV-18838 : galera.galera_toi_truncate: Test failure: mysqltest: query 'reap'... · ad0f85bc
      Jan Lindström authored
      MDEV-18838 : galera.galera_toi_truncate: Test failure: mysqltest: query 'reap' succeeded - should have failed with errno 1213
      
      Test cleanup.
      ad0f85bc
  2. 19 May, 2020 12 commits
  3. 18 May, 2020 5 commits
  4. 17 May, 2020 3 commits
  5. 16 May, 2020 1 commit
  6. 15 May, 2020 8 commits
    • Marko Mäkelä's avatar
      MDEV-13626: Make test more robust · 3f12a596
      Marko Mäkelä authored
      In commit b1742a5c we forgot
      FLUSH TABLES, potentially causing errors for MyISAM system tables.
      3f12a596
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · fc0960aa
      Marko Mäkelä authored
      fc0960aa
    • Marko Mäkelä's avatar
      MDEV-22544 Inconsistent and Incorrect rw-lock stats · c8dd4117
      Marko Mäkelä authored
      The rw_lock_stats were incorrectly updated.
      While global statistics have limited usefulness, we cannot
      remove them from a GA version. This contribution is slightly
      improving performance in write workloads.
      c8dd4117
    • Alexander Barkov's avatar
      MDEV-22579 No error when inserting DEFAULT(non_virtual_column) into a virtual column · 3df29727
      Alexander Barkov authored
      The code erroneously allowed both:
      INSERT INTO t1 (vcol) VALUES (DEFAULT);
      INSERT INTO t1 (vcol) VALUES (DEFAULT(non_virtual_column));
      
      The former is OK, but the latter is not.
      Adding a new virtual method in Item:
      
      virtual bool vcol_assignment_allowed_value() const { return false; }
      
      Item_null, Item_param and Item_default_value override it.
      
      Item_default_value overrides it in the way to:
      - allow DEFAULT
      - disallow DEFAULT(col)
      3df29727
    • Marko Mäkelä's avatar
      MDEV-22456 Dropping the adaptive hash index may cause DDL to lock up InnoDB · ad6171b9
      Marko Mäkelä authored
      If the InnoDB buffer pool contains many pages for a table or index
      that is being dropped or rebuilt, and if many of such pages are
      pointed to by the adaptive hash index, dropping the adaptive hash index
      may consume a lot of time.
      
      The time-consuming operation of dropping the adaptive hash index entries
      is being executed while the InnoDB data dictionary cache dict_sys is
      exclusively locked.
      
      It is not actually necessary to drop all adaptive hash index entries
      at the time a table or index is being dropped or rebuilt. We can let
      the LRU replacement policy of the buffer pool take care of this gradually.
      For this to work, we must detach the dict_table_t and dict_index_t
      objects from the main dict_sys cache, and once the last
      adaptive hash index entry for the detached table is removed
      (when the garbage page is evicted from the buffer pool) we can free
      the dict_table_t and dict_index_t object.
      
      Related to this, in MDEV-16283, we made ALTER TABLE...DISCARD TABLESPACE
      skip both the buffer pool eviction and the drop of the adaptive hash index.
      We shifted the burden to ALTER TABLE...IMPORT TABLESPACE or DROP TABLE.
      We can remove the eviction from DROP TABLE. We must retain the eviction
      in the ALTER TABLE...IMPORT TABLESPACE code path, so that in case the
      discarded table is being re-imported with the same tablespace identifier,
      the fresh data from the imported tablespace will replace any stale pages
      in the buffer pool.
      
      rpl.rpl_failed_drop_tbl_binlog: Remove the test. DROP TABLE can
      no longer be interrupted inside InnoDB.
      
      fseg_free_page(), fseg_free_step(), fseg_free_step_not_header(),
      fseg_free_page_low(), fseg_free_extent(): Remove the parameter
      that specifies whether the adaptive hash index should be dropped.
      
      btr_search_lazy_free(): Lazily free an index when the last
      reference to it is dropped from the adaptive hash index.
      
      buf_pool_clear_hash_index(): Declare static, and move to the
      same compilation unit with the bulk of the adaptive hash index
      code.
      
      dict_index_t::clone(), dict_index_t::clone_if_needed():
      Clone an index that is being rebuilt while adaptive hash index
      entries exist. The original index will be inserted into
      dict_table_t::freed_indexes and dict_index_t::set_freed()
      will be called.
      
      dict_index_t::set_freed(), dict_index_t::freed(): Note that
      or check whether the index has been freed. We will use the
      impossible page number 1 to denote this condition.
      
      dict_index_t::n_ahi_pages(): Replaces btr_search_info_get_ref_count().
      
      dict_index_t::detach_columns(): Move the assignment n_fields=0
      to ha_innobase_inplace_ctx::clear_added_indexes().
      We must have access to the columns when freeing the
      adaptive hash index. Note: dict_table_t::v_cols[] will remain
      valid. If virtual columns are dropped or added, the table
      definition will be reloaded in ha_innobase::commit_inplace_alter_table().
      
      buf_page_mtr_lock(): Drop a stale adaptive hash index if needed.
      
      We will also reduce the number of btr_get_search_latch() calls
      and enclose some more code inside #ifdef BTR_CUR_HASH_ADAPT
      in order to benefit cmake -DWITH_INNODB_AHI=OFF.
      ad6171b9
    • Marko Mäkelä's avatar
      Amend af784385: Avoid vtable overhead · ff66d65a
      Marko Mäkelä authored
      When neither MSAN nor Valgrind are enabled, declare
      Field::mark_unused_memory_as_defined() as an empty inline function,
      instead of declaring it as a virtual function.
      ff66d65a
    • Eugene Kosov's avatar
      span cleanup · 1cac6d48
      Eugene Kosov authored
      1cac6d48
    • Monty's avatar
      Fix for using uninitialized memory · af784385
      Monty authored
      MDEV-22073 MSAN use-of-uninitialized-value in
      collect_statistics_for_table()
      
      Other things:
      innodb.analyze_table was changed to mainly test statistic
      collection. Was discussed with Marko.
      af784385