1. 14 Oct, 2022 2 commits
  2. 13 Oct, 2022 2 commits
  3. 12 Oct, 2022 2 commits
    • Nikita Malyavin's avatar
      MDEV-29753 An error is wrongly reported during INSERT with vcol index · 128356b4
      Nikita Malyavin authored
      See also commits aa8a31da and 64678c for a Bug #22990029 fix.
      
      In this scenario INSERT chose to check if delete unmarking is available for
      a just deleted record. To build an update vector, it needed to calculate
      the vcols as well. Since this INSERT was not IGNORE-flagged, recalculation
      failed.
      
      Solutiuon: temporarily set abort_on_warning=true, while calculating the
      column for delete-unmarked insert.
      128356b4
    • Nikita Malyavin's avatar
      MDEV-29299 SELECT from table with vcol index reports warning · 3cd2c1e8
      Nikita Malyavin authored
      As of now innodb does not store trx_id for each record in secondary index.
      The idea behind is following: let us store only per-page max_trx_id, and
      delete-mark the records when they are deleted/updated.
      
      If the read starts, it rememders the lowest id of currently active
      transaction. Innodb refers to it as trx->read_view->m_up_limit_id.
      See also ReadView::open.
      
      When the page is fetched, its max_trx_id is compared to m_up_limit_id.
      If the value is lower, and the secondary index record is not delete-marked,
      then this page is just safe to read as is. Else, a clustered index could be
      needed ato access. See page_get_max_trx_id call in row_search_mvcc, and the
      corresponding switch (row_search_idx_cond_check(...)) below.
      
      Virtual columns are required to be updated in case if the record was
      delete-marked. The motivation behind it is documented in
      Row_sel_get_clust_rec_for_mysql::operator() near
      row_sel_sec_rec_is_for_clust_rec call.
      
      This was basically a description why virtual column computation can
      normally happen during SELECT, and, generally, a vcol index access.
      
      Sometimes stats tables are updated by innodb. This starts a new
      transaction, and it can happen that it didn't finish to the moment of
      SELECT execution, forcing virtual columns recomputation. If the result was
      a something that normally outputs a warning, like division by zero, then
      it could be outputted in a racy manner.
      
      The solution is to suppress the warnings when a column is computed
      for the described purpose.
      ignore_wrnings argument is added innobase_get_computed_value.
      Currently, it is only true for a call from
      row_sel_sec_rec_is_for_clust_rec.
      3cd2c1e8
  4. 11 Oct, 2022 9 commits
  5. 10 Oct, 2022 3 commits
  6. 09 Oct, 2022 6 commits
  7. 07 Oct, 2022 5 commits
  8. 06 Oct, 2022 5 commits
  9. 05 Oct, 2022 6 commits
    • Marko Mäkelä's avatar
      f600690c
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 65d0c57c
      Marko Mäkelä authored
      65d0c57c
    • Aleksey Midenkov's avatar
      MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status · 074e3582
      Aleksey Midenkov authored
                 upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED
      
      Missed set return status to 1.
      074e3582
    • Aleksey Midenkov's avatar
      MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table · 0779e2cb
      Aleksey Midenkov authored
      When f.ex. table is partitioned by HASH(a) and we rename column `a' to
      `b' partitioning filter stays unchanged: HASH(a). That's the wrong
      behavior.
      
      The patch updates partitioning filter in accordance to the new columns
      names. That includes partition/subpartition expression and
      partition/subpartition field list.
      0779e2cb
    • Aleksey Midenkov's avatar
      MDEV-28576 Ability to manipulate List<const char *> · 4eb8c35b
      Aleksey Midenkov authored
      For "const char *" replace() and after() accepted const as "T *" and
      passed forward "void *". This cannot be cast implicitly, so we better
      use "const void *" instead of "void *" in the input interface. This
      way we avoid problems with using List for any const type.
      4eb8c35b
    • Vlad Lesin's avatar
      MDEV-27927 row_sel_try_search_shortcut_for_mysql() does not latch a page,... · c0eda62a
      Vlad Lesin authored
      MDEV-27927 row_sel_try_search_shortcut_for_mysql() does not latch a page, violating read view isolation
      
      btr_search_guess_on_hash() would only acquire an index page latch if it
      is invoked with ahi_latch=NULL. If it's invoked from
      row_sel_try_search_shortcut_for_mysql() with ahi_latch!=NULL, a page
      will not be latched, and row_search_mvcc() will get a pointer to the
      record, which can be changed by some other transaction before the record
      was stored in result buffer with row_sel_store_mysql_rec() call.
      
      ahi_latch argument of btr_cur_search_to_nth_level_func() and
      btr_pcur_open_with_no_init_func() is used only for
      row_sel_try_search_shortcut_for_mysql().
      btr_cur_search_to_nth_level_func(..., ahi_latch !=0, ...) is invoked
      only from btr_pcur_open_with_no_init_func(..., ahi_latch !=0, ...),
      which, in turns, is invoked only from
      row_sel_try_search_shortcut_for_mysql().
      
      I suppose that separate case with ahi_latch!=0 was intentionally
      implemented to protect row_sel_store_mysql_rec() call in
      row_search_mvcc() just after row_sel_try_search_shortcut_for_mysql()
      call. After the ahi_latch was moved from row_seach_mvcc() to
      row_sel_try_search_shortcut_for_mysql(), there is no need in it at all
      if btr_search_guess_on_hash() latches a page unconditionally. And if
      btr_search_guess_on_hash() latched the page, any access to the record in
      row_sel_try_search_shortcut_for_mysql() after btr_pcur_open_with_no_init()
      call will be protected with the page latch.
      
      The fix is to remove ahi_latch argument from
      btr_pcur_open_with_no_init_func(), btr_cur_search_to_nth_level_func()
      and btr_search_guess_on_hash().
      
      There will not be test, as to test it we need to freeze some SELECT
      execution in the point between row_sel_try_search_shortcut_for_mysql()
      and row_sel_store_mysql_rec() calls in row_search_mvcc(), and to change
      the record in some other transaction to let row_sel_store_mysql_rec() to
      store changed record in result buffer. Buf we can't do this with the
      fix, as the page will be latched in btr_search_guess_on_hash() call.
      c0eda62a