1. 17 Oct, 2019 1 commit
  2. 16 Oct, 2019 1 commit
  3. 15 Oct, 2019 1 commit
    • Aleksey Midenkov's avatar
      MDEV-20812 Unexpected ER_ROW_IS_REFERENCED_2 upon DELETE from versioned table with FK · 7ae0be25
      Aleksey Midenkov authored
      MDEV-16210 original case was wrongly allowed versioned DELETE from
      referenced table where reference is by non-primary key. InnoDB UPDATE
      has optimization for new rows not changing its clustered index
      position. In this case InnoDB doesn't update all secondary indexes and
      misses the one holding the referenced key. The fix was to disable this
      optimization for versioned DELETE. In case of versioned DELETE we
      forcely update all secondary indexes and therefore check them for
      constraints.
      
      But the above fix raised another problem with versioned DELETE on
      foreign table side. In case when there was no corresponding record in
      referenced table (illegal foreign reference can be done with "set
      foreign_key_checks=off") there was spurious constraint check (because
      versioned DELETE is actually UPDATE) and hence the operation failed
      with constraint error.
      
      MDEV-16210 tried to fix the above problem by checking foreign table
      instead of referenced table and that at least was illegal.
      
      Constraint check is done by row_ins_check_foreign_constraint() no
      matter what kind of table is checked, referenced or foreign
      (controlled by check_ref argument).
      
      Referenced table is checked by row_upd_check_references_constraints().
      Foreign table is checked by row_ins_check_foreign_constraints().
      
      Current fix rolls back the wrong fix for the above problem and
      disables referenced table check for DELETE on foreign side by
      introducing `check_foreign` argument which when set to *false* skips
      row_ins_check_foreign_constraints() call.
      7ae0be25
  4. 12 Oct, 2019 5 commits
    • Marko Mäkelä's avatar
      MDEV-20814 Assertion index->is_instant() failed on trivial upgrade from 10.1 · fa6c6062
      Marko Mäkelä authored
      rec_init_offsets(): Relax the assertion that was added in
      commit 01f45bec
      to catch ROW_FORMAT=REDUNDANT records that have fewer fields
      than expected.
      
      This assertion would fail when accessing the records of the
      built-in InnoDB table SYS_INDEXES. The column MERGE_THRESHOLD
      had been effectively instantly added in MariaDB Server 10.2
      (and MySQL 5.7), but is_instant() does not hold for that index.
      Relax the assertion, so that it will not fail in this case.
      fa6c6062
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · bb450b1f
      Marko Mäkelä authored
      bb450b1f
    • Marko Mäkelä's avatar
      MDEV-20813 Assertion failure in buf_flush_init_for_writing() for... · 361e8284
      Marko Mäkelä authored
      MDEV-20813 Assertion failure in buf_flush_init_for_writing() for innodb_immediate_scrub_data_uncompressed=ON
      
      The assertion that was added in
      commit c0c003be
      to augment the fix of MDEV-20805 turns out to be invalid when
      innodb_immediate_scrub_data_uncompressed is enabled.
      In this mode, fsp_init_file_page() will be invoked on data pages
      that have been freed, causing writes of almost-all-zero pages.
      
      btr_page_free(): Adjust the comment.
      
      buf_flush_init_for_writing(): Disable the assertion with a note
      that it should be re-enabled in MDEV-15528.
      361e8284
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 8e3d85e1
      Marko Mäkelä authored
      8e3d85e1
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 2227dec4
      Marko Mäkelä authored
      2227dec4
  5. 11 Oct, 2019 14 commits
    • Julius Goryavsky's avatar
      MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1 · 2ae02c29
      Julius Goryavsky authored
      When the mysqld_multi script passes the --defaults-group-suffix
      option to mysqld, it must remove the initial substring with the
      group name ("mysqld") from option value, because otherwise substring
      "mysqld" will be added to the group name and then the group name
      will contain the word "mysqld" twice, which is wrong, because
      mysqld itself adds the suffix received to the group name.
      2ae02c29
    • Julius Goryavsky's avatar
      MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1 · 4ca0abe9
      Julius Goryavsky authored
      When the mysqld_multi script passes the --defaults-group-suffix
      option to mysqld, it must remove the initial substring with the
      group name ("mysqld") from option value, because otherwise substring
      "mysqld" will be added to the group name and then the group name
      will contain the word "mysqld" twice, which is wrong, because
      mysqld itself adds the suffix received to the group name.
      4ca0abe9
    • Julius Goryavsky's avatar
      MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1 · 0ecc85c5
      Julius Goryavsky authored
      When the mysqld_multi script passes the --defaults-group-suffix
      option to mysqld, it must remove the initial substring with the
      group name ("mysqld") from option value, because otherwise substring
      "mysqld" will be added to the group name and then the group name
      will contain the word "mysqld" twice, which is wrong, because
      mysqld itself adds the suffix received to the group name.
      0ecc85c5
    • Marko Mäkelä's avatar
      Fix -std=c++98 -Wzero-length-array · 38736928
      Marko Mäkelä authored
      This is another follow-up fix to
      commit b393e2cb
      which turned out to be still broken.
      
      Replace the C++11 keyword 'constexpr' with #define.
      
      debug_sync_t::str: Remove the zero-length array.
      Replace sync->str with reinterpret_cast<char*>(&sync[1]).
      38736928
    • Marko Mäkelä's avatar
      After-merge fix: Correct an assertion · 1e1b53cc
      Marko Mäkelä authored
      During IMPORT TABLESPACE, we do invoke
      buf_flush_init_for_writing() with block==NULL and newest_lsn!=0.
      1e1b53cc
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 966d97b5
      Marko Mäkelä authored
      966d97b5
    • Marko Mäkelä's avatar
      Fix CMAKE_BUILD_TYPE=Debug · 1fd1ef25
      Marko Mäkelä authored
      Remove unused variables and type mismatch that was introduced
      in commit b393e2cb
      
      Also, fix a typo in the documentation of the parameter, and
      update the test.
      1fd1ef25
    • Marko Mäkelä's avatar
      MDEV-20805 follow-up: Catch writes of bogus pages · c0c003be
      Marko Mäkelä authored
      buf_flush_init_for_writing(): Assert that FIL_PAGE_TYPE is set
      except when creating a new data file with a dummy first page.
      
      buf_dblwr_create(): Ensure that FIL_PAGE_TYPE on all pages
      will be initialized. Reset buf_dblwr_being_created at the end.
      c0c003be
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.1 · cbfd6882
      Marko Mäkelä authored
      cbfd6882
    • Marko Mäkelä's avatar
      MDEV-20805 ibuf_add_free_page() is not initializing FIL_PAGE_TYPE first · ea61b796
      Marko Mäkelä authored
      In the function recv_parse_or_apply_log_rec_body() there are debug checks
      for validating the state of the page when redo log records are being
      applied. Most notably, FIL_PAGE_TYPE should be set before anything else
      is being written to the page.
      
      ibuf_add_free_page(): Set FIL_PAGE_TYPE before performing any other changes.
      ea61b796
    • Marko Mäkelä's avatar
      MDEV-19455: Avoid SET DEBUG_DBUG='-d,...' construct · 4ebaf813
      Marko Mäkelä authored
      Apply the correct pattern for debug instrumentation:
      
      SET @save_dbug=@@debug_dbug;
      SET debug_dbug='+d,...';
      ...
      SET debug_dbug=@save_dbug;
      
      Numerous tests use statements of the form
      
      SET debug_dbug='-d,...';
      
      which will inadvertently enable all DBUG tracing output,
      causing unnecessary waste of resources.
      4ebaf813
    • Marko Mäkelä's avatar
      MDEV-20804 Speed up main.index_merge_innodb · 5ef12244
      Marko Mäkelä authored
      The test main.index_merge_innodb is taking very much time,
      especially on later versions (10.2 and 10.3).
      
      Some of this could be attributed to the use of INSERT...SELECT,
      which is time-consumingly creating explicit record locks in InnoDB
      for the locking read in the SELECT part.
      
      In 10.3 and later, some slowness can be attributed to MDEV-12288,
      which makes the InnoDB purge thread spend time to reset transaction
      identifiers in the inserted records. If we prevent purge from
      running before all tables are dropped, the test seems to be
      10% faster on an unoptimized debug build on 10.5. (A proper fix
      would be to implement MDEV-515 and stop writing row-level undo log
      records for inserts into an empty table or partition.)
      
      At the same time, it should not hurt to make main.index_merge_myisam
      to use the sequence engine. Not only could it be a little faster,
      but the test would be slightly more readable.
      5ef12244
    • Nikita Malyavin's avatar
      MDEV-18546 ASAN heap-use-after-free in innobase_get_computed_value / row_purge · 350e46a8
      Nikita Malyavin authored
      the bug was already fixed in MDEV-17005, so now only test is added
      350e46a8
    • Nikita Malyavin's avatar
  6. 10 Oct, 2019 8 commits
    • Marko Mäkelä's avatar
      MDEV-19783: Relax an assertion · 4cdb72f2
      Marko Mäkelä authored
      btr_page_get_split_rec_to_left(): Assert that in the leftmost leaf page,
      if the metadata record exists, index->is_instant() must hold.
      The assertion of commit 01f45bec
      could fail during innobase_instant_try().
      4cdb72f2
    • Marko Mäkelä's avatar
      MDEV-19783: Add more assertions · 01f45bec
      Marko Mäkelä authored
      btr_page_get_split_rec_to_left(): Assert that in the leftmost leaf page,
      the metadata record exists if and only if index->is_instant().
      
      page_validate(): Correct the wording of a message.
      
      rec_init_offsets(): Assert that whenever a record is in "instant ALTER"
      format, index->is_instant() must hold.
      01f45bec
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 7f84e3ad
      Marko Mäkelä authored
      7f84e3ad
    • Marko Mäkelä's avatar
      MDEV-20788: Bogus assertion failure for PAGE_FREE list · 6d7a8269
      Marko Mäkelä authored
      In MDEV-11369 (instant ADD COLUMN) in MariaDB Server 10.3,
      we introduced the hidden metadata record that must be the
      first record in the clustered index if and only if
      index->is_instant() holds.
      
      To catch MDEV-19783, in
      commit ed0793e0 and
      commit 99dc40d6
      we added some assertions to find cases where
      the metadata record is missing while it should not be, or a
      record exists when it should not. Those assertions were invalid
      when traversing the PAGE_FREE list. That list can contain anything;
      we must only be able to determine the successor and the size of
      each garbage record in it.
      
      page_validate(), page_simple_validate_old(), page_simple_validate_new():
      Do not invoke page_rec_get_next_const() for traversing the PAGE_FREE
      list, but instead use a lower-level accessor that does not attempt to
      validate the REC_INFO_MIN_REC_FLAG.
      
      page_copy_rec_list_end_no_locks(),
      page_copy_rec_list_start(), page_delete_rec_list_start():
      Add assertions.
      
      btr_page_get_split_rec_to_left(): Remove a redundant return value,
      and make the output parameter the return value.
      
      btr_page_get_split_rec_to_right(), btr_page_split_and_insert(): Clean up.
      6d7a8269
    • Aleksey Midenkov's avatar
      Fix compilation 2 (GCC 9) · 545c5452
      Aleksey Midenkov authored
      Fixed warning: -Woverloaded-virtual for GCC 9 (Clang treats it differently)
      
      Caused by c9cba597
      545c5452
    • Aleksey Midenkov's avatar
      Fix Mroonga compilation · 3c78d1b6
      Aleksey Midenkov authored
      Fixed warnings: -Woverloaded-virtual, -Winconsistent-missing-override
      
      Caused by c9cba597
      3c78d1b6
    • Jan Lindström's avatar
      Fix compiler error when using -Wconversion. · cb3f856e
      Jan Lindström authored
      /mariadb/10.3/wsrep/wsrep_gtid.c:45:26: error: conversion from 'long int' to 'unsigned int' may change value [-Werror=conversion]
         45 |                 offset = endptr - str;
      cb3f856e
    • Michael Widenius's avatar
  7. 09 Oct, 2019 10 commits