1. 18 Aug, 2021 2 commits
  2. 16 Aug, 2021 1 commit
    • Marko Mäkelä's avatar
      MDEV-26372 enforce-storage-engine=InnoDB has no usability as an option to mysqld-install-db · dc58303c
      Marko Mäkelä authored
      Creation of tables by the three names mysql.user, mysql.host, mysql.db
      was being blocked in the function row_mysql_is_system_table().
      
      Since commit 4abb8216 (MDEV-17658),
      mysql.user is a view, not a table. Since commit
      ead9a34a (MDEV-15851), mysql.host
      is not being created at all.
      
      Let us remove the special handling of table names in InnoDB,
      and allow mysql.db to be created in InnoDB. The special handling
      was originally added in commit e84ef2b7
      without any explanation.
      
      Reviewed by: Sergei Golubchik
      dc58303c
  3. 13 Aug, 2021 1 commit
    • Brandon Nesterenko's avatar
      MDEV-20215: binlog.show_concurrent_rotate failed in buildbot with wrong result · 46c3e7e3
      Brandon Nesterenko authored
      Problem:
      =======
      There are two issues that are addressed in this patch:
       1) SHOW BINARY LOGS uses caching to store the binary logs that exist
      in the log directory; however, if new events are written to the logs,
      the caching strategy is unaware. This is okay for users, as it is
      okay for SHOW to return slightly old data. The test, however, can
      result in inconsistent data. It runs two connections concurrently,
      where one shows the logs, and the other adds a new file. The output
      of SHOW BINARY LOGS then depends on when the cache is built, with
      respect to the time that the second connection rotates the logs.
       2) There is a race condition between RESET MASTER and SHOW BINARY
      LOGS. More specifically, where they both need the binary log lock to
      begin, SHOW BINARY LOGS only needs the lock to build its cache. If
      RESET MASTER is issued after SHOW BINARY LOGS has built its cache and
      before it has returned the results, the presented data may be
      incorrect.
      
      Solution:
      ========
       1) As it is okay for users to see stale data, to make the test
      consistent, use DEBUG_SYNC to force the race condition (problem 2) to
      make SHOW BINARY LOGS build a cache before RESET MASTER is called.
      Then, use additional logic from the next part of the solution to
      rebuild the cache.
       2) Use an Atomic_counter to keep track of the number of times RESET
      MASTER has been called. If the value of the counter changes after
      building the cache, the cache should be rebuilt and the analysis
      should be restarted.
      
      Reviewed By:
      ============
      Andrei Elkin: <andrei.elkin@mariadb.com>
      46c3e7e3
  4. 11 Aug, 2021 2 commits
  5. 06 Aug, 2021 1 commit
  6. 05 Aug, 2021 1 commit
  7. 02 Aug, 2021 5 commits
  8. 31 Jul, 2021 2 commits
    • Oleksandr Byelkin's avatar
      Merge branch '10.3' into 10.4 · 7841a7eb
      Oleksandr Byelkin authored
      7841a7eb
    • Sergei Golubchik's avatar
      MDEV-23752 SHOW EXPLAIN FOR thd waits for sleep · 2cdf8a93
      Sergei Golubchik authored
      fix main.processlist_notembedded test
      
      * before EXPLAINing `select sleep` wait for select to start
        (fixes "Target is not running an EXPLAINable command")
      * after killing sleep, wait for it to die
        (fixes test failures on --repeat when old sleep shows on a test rerun)
      
      * unify with 10.3, copy minor changes from there
        (`--echo End of 5.5` vs `--echo # End of 5.5`, etc)
      2cdf8a93
  9. 29 Jul, 2021 4 commits
    • Oleksandr Byelkin's avatar
    • Oleksandr Byelkin's avatar
      Merge branch '10.2' into 10.3 · 83d7e4fa
      Oleksandr Byelkin authored
      83d7e4fa
    • Nikita Malyavin's avatar
      MDEV-20154 Assertion `len <= col->len | ...` failed in row_merge_buf_add · 22709897
      Nikita Malyavin authored
      len was containing garbage, since vctempl->mysql_col_offset was
      containing old value while calling row_mysql_store_col_in_innobase_format
      from innobase_get_computed_value().
      
      It was not updated after the first ALTER TABLE call, because it's INPLACE
      logic considered there's nothing to update, and exited immediately from
      ha_innobase::inplace_alter_table().
      
      However, vcol metadata needs an update, since vcols structure is changed
      in mysql record.
      
      The regression was introduced by 12614af1. There, refcount==1 condition
      was removed, which turned out to be crucial, though racy. The idea was to
      update vc_templ after each (sequencing) ALTER TABLE.
      
      We should do the same another way, and there may be a plenty of solutions,
      but the simplest one is to add a following condition:
        if vcol structure is changed, drop vc_templ; it will be recreated on next
        ha_innobase::open() call.
      
      in prepare_inplace_alter_table. It is safe, since innodb inplace changes
      require at least HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, which
      guarantee MDL_EXCLUSIVE on this stage.
      
      alter_templ_needs_rebuild() also has to track the columns not indexed, to
      keep vc_templ correct.
      
      Note that vc_templ is always kept constructed and available after
      ha_innobase::open() call, even on INSERT, though no virtual columns are
      evaluated during that statement
      inside innodb.
      
      In the test case suplied, it will be recreated on the second ALTER TABLE.
      22709897
    • Marko Mäkelä's avatar
      Cleanup: Remove redundant conditions · 0e8981ef
      Marko Mäkelä authored
      ha_innobase::prepare_inplace_alter_table(): Remove always-true conditions.
      Near the start of the function, we would already have returned if
      no ALTER TABLE operation flags were set that would require special
      action from InnoDB.
      
      It turns out that the conditions were redundant already when they were
      introduced in mysql/mysql-server@241387a2b6b61fb8a4f78dc4ad0aaa289400c694
      and in commit 068c6197.
      
      Thanks to Nikita Malyavin for noticing this.
      0e8981ef
  10. 28 Jul, 2021 10 commits
  11. 27 Jul, 2021 11 commits