1. 15 Jun, 2022 2 commits
  2. 14 Jun, 2022 1 commit
  3. 13 Jun, 2022 2 commits
    • Nayuta Yanagisawa's avatar
      MDEV-26127 Assertion `err != DB_DUPLICATE_KEY' failed or InnoDB: Failing... · 06e9ce79
      Nayuta Yanagisawa authored
      MDEV-26127 Assertion `err != DB_DUPLICATE_KEY' failed or InnoDB: Failing assertion: id != 0 on ALTER ... REBUILD PARTITION
      
      During rebuild of partition, the partitioning engine calls
      alter_close_table(), which does not unlock and close some table
      instances of the target table.
      Then, the engine fails to rename partitions because there are table
      instances that are still locked.
      
      Closing all the table instance of the target table fixes the bug.
      06e9ce79
    • Tuukka Pasanen's avatar
      MDEV-28642: Suspend obvious false-positive Lintian warnings · d4760d8c
      Tuukka Pasanen authored
      MariaDB codebase is huge and Lintian has lots of test than
      can fire false-positive warnings which leads to situation
      where real problems can't be spotted.
      
      Suspend obvious false-positive Lintian warnings and
      let Lintian problems that needs some love shine
      out.
      
      Suspends in package mariadb-test-data
      
      Supporting BSD family needs to use '/usr/bin/env perl' and not '/usr/bin/perl'
      Perl script are for testing and not for production in mariadb-test-data
      package:
       * incorrect-path-for-interpreter
      
      There is several files with national-encoding which are test file so they
      can't be in unicode charset
       * national-encoding
      
      Serveral test paths are intentionally repeated:
       * repeated-path-segment
      
      Suspends in package mariadb-test
      
      Supporting BSD family needs to use '/usr/bin/env perl' and not '/usr/bin/perl'
      Perl script are for testing and not for production in mariadb-test-data
      package:
       * incorrect-path-for-interpreter
      
      Suspends in package source package
      
      Remade some 'version-substvar-for-external-package' to use
      regex.
      
      MGroonga is missing source file 'jquery-ui-1.8.18.custom.js' correct
      lintian suspend with regex:
       * source-is-missing
      
      There is several files with very long line lenghts. Add suspends
      for those that can't be corrected in several places. Most
      of them are test result files, SQL test files or intentional
      long lines that can't be splitted.
        * very-long-line-length-in-source-file
      
      There is several autogenerated C++ files which probably should not
      be there but they should not do any harm:
       * source-contains-autogenerated-visual-c++-file
      d4760d8c
  4. 09 Jun, 2022 5 commits
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · a9d0bb12
      Marko Mäkelä authored
      a9d0bb12
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · c89e3b70
      Marko Mäkelä authored
      c89e3b70
    • Marko Mäkelä's avatar
      MDEV-28779: ALTER TABLE IMPORT TABLESPACE corrupts an encrypted table · 98293130
      Marko Mäkelä authored
      PageConverter::update_header(): Remove an unnecessary write.
      The field that was originally called FIL_PAGE_FILE_FLUSH_LSN only
      made sense for the first page of the system tablespace
      (initially, for the first page of each file of the system tablespace).
      It never had any meaning for .ibd files, and it lost its original
      meaning in MariaDB Server 10.8.1 when
      commit b07920b6 (MDEV-27199)
      removed the ability to start without ib_logfile0.
      
      If the most significant 32 bits of the LSN are nonzero, this
      unnecessary write would write the wrong encryption key identifier
      to the page. The first page of any file is never encrypted,
      so normally those bytes should be 0 for any .ibd file.
      98293130
    • Daniel Lewart's avatar
      MDEV-25577 mariadb-tzinfo-to-sql generates superfluous warnings · 2cd1edfc
      Daniel Lewart authored
      The zoneinfo directory is littered with non-timezone information files.
      
      These frequently contain extensions, not present in real timezone files.
      
      Alo leapseconds is frequently there and is not a timezone file.
      2cd1edfc
    • GuiXiaoDi's avatar
      mysql.server.sh fix for non-Red Hat platforms · 9c207c88
      GuiXiaoDi authored
      The else condition is meant to be here to define the functions
      if the Red Hat include file isn't there.
      
      Fixes: commit 467011bc / MDEV-26614
      
      RedHat -> Red Hat by Daniel Black
      9c207c88
  5. 08 Jun, 2022 5 commits
    • Tingyao Nian's avatar
      MDEV-22023 Update man page NAME section to say MariaDB instead of MySQL · 41456181
      Tingyao Nian authored
      Continue the effort of a previous commit (PR#2114) which changed the man
      pages titles from MariaDB to MySQL, to further update the man pages.
      
      Update the man page NAME sections to use mariadb-* instead of mysql* for
      MariaDB binaries that are drop-in replacements for MySQL equivalents,
      indicating that the commands are actually of the MariaDB version.
      
      Before:
          NAME
              mysql_upgrade - check tables for MariaDB upgrade
          ...
      
      After:
          NAME
              mariadb-upgrade - check tables for MariaDB upgrade (mysql_upgrade
              is now a symlink to mariadb-upgrade)
          ...
      
      All new code of the whole pull request, including one or several files
      that are either new files or modified ones, are contributed under the
      BSD-new license. I am contributing on behalf of my employer Amazon Web
      Services, Inc.
      41456181
    • Oleg Smirnov's avatar
      MDEV-28747 Index condition pushdown may be configured incorrectly · 5efadf8d
      Oleg Smirnov authored
      ha_innobase::build_template may initialize m_prebuilt->idx_cond
      even if there is no valid pushed_idx_cond_keyno.
      This potentially problematic piece of code was found while
      working on MDEV-27366
      5efadf8d
    • Marko Mäkelä's avatar
      Cleanup: Remove unused error code DB_FORCED_ABORT · 44ab6cba
      Marko Mäkelä authored
      MariaDB never supported this form of preemption via high-priority
      transactions. This error code shold not have been added in the
      first place, in commit 2e814d47.
      44ab6cba
    • Daniel Black's avatar
      MDEV-28243: AIX missing my_gethwaddr implementation · e8b0894d
      Daniel Black authored
      and failing spider partition test.
      
      With some small datatype changes to the Linux/Solaris my_gethwaddr implementation
      the hardware address of AIX can be returned. This is an important aspect
      in Spider (and UUID).
      
      Spider test change reviewed by Nayuta Yanagisawa.
      
      my_gethwaddr review by Monty in #2081
      e8b0894d
    • chansuke's avatar
      MDEV-25273: fix typo (s/strucures/structures/) · 960f0344
      chansuke authored
      960f0344
  6. 07 Jun, 2022 5 commits
    • Sergei Golubchik's avatar
      main.help: flush help tables after modifying them · 37ea0778
      Sergei Golubchik authored
      otherwise following tests that crash the server will see them
      corrupted
      37ea0778
    • Sergei Golubchik's avatar
      typo fixed: [[space]] -> [[:space:]] · 7c4efab9
      Sergei Golubchik authored
      7c4efab9
    • Sergei Petrunia's avatar
      MDEV-28749: restore_prev_nj_state() doesn't update cur_sj_inner_tables correctly · 19c72163
      Sergei Petrunia authored
      (Try 2) (Cherry-pick back into 10.3)
      
      The code that updates semi-join optimization state for a join order prefix
      had several bugs. The visible effect was bad optimization for FirstMatch or
      LooseScan strategies: they either weren't considered when they should have
      been, or considered when they shouldn't have been.
      
      In order to hit the bug, the optimizer needs to consider several different
      join prefixes in a certain order. Queries with "obvious" query plans which
      prune all join orders except one are not affected.
      
      Internally, the bugs in updates of semi-join state were:
      1. restore_prev_sj_state() assumed that
        "we assume remaining_tables doesnt contain @tab"
        which wasn't true.
      2. Another bug in this function: it did remove bits from
         join->cur_sj_inner_tables but never added them.
      3. greedy_search() adds tables into the join prefix but neglects to update
         the semi-join optimization state. (It does update nested outer join
         state, see this call:
           check_interleaving_with_nj(best_table)
         but there's no matching call to update the semi-join state.
         (This wasn't visible because most of the state is in the POSITION
          structure which is updated. But there is also state in JOIN, too)
      
      The patch:
      - Fixes all of the above
      - Adds JOIN::dbug_verify_sj_inner_tables() which is used to verify the
        state is correct at every step.
      - Renames advance_sj_state() to optimize_semi_joins().
        = Introduces update_sj_state() which ideally should have been called
          "advance_sj_state" but I didn't reuse the name to not create confusion.
      19c72163
    • Marko Mäkelä's avatar
      MDEV-25257 follow-up: full_crc32 format is garbage-free · 09177ead
      Marko Mäkelä authored
      In any files that were created in the
      innodb_checksum_algorithm=full_crc32 format
      (commit c0f47a4a)
      any unused data fields will have been zero-initialized
      (commit 3926673c).
      09177ead
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · ea1fbd03
      Marko Mäkelä authored
      ea1fbd03
  7. 06 Jun, 2022 3 commits
    • Monty's avatar
      Fixed bug in Aria read cache when doing check/repair · 4834a0d1
      Monty authored
      Reading the last page of table with "dynamic page" format would generate
      an error when reading after the last row. This was never noticed as
      when using Aria as a handler any error messages generated by
      _ma_set_fatal_error() was ignored.
      4834a0d1
    • Monty's avatar
      MDEV-28757 S3 tables can hang in SELECT · 54e501cf
      Monty authored
      If we got a read error from S3, we did not signal threads waiting
      to read blocks in the read-range. This caused these threads to
      hang forever.
      
      There is still one issue left that the S3 error will be logged as an
      'table is crashed' error instead of the IO error. This will be fixed
      by a larger patch in 10.6 that improves error reporting from Aria.
      
      There is no test case for this as it is very hard to repeat.
      I tested this with a patch that causes random read failures in S3
      used perl multi-threaded test with 8 threads to simulate reads.
      This patch fixes all found hangs.
      54e501cf
    • Monty's avatar
      Fixed crashing when using DBUG_PUSH_EMPTY · 392e744a
      Monty authored
      DBUG_PUSH_EMPTY is used by thr_mutex.cc.
      If there are 4G of DBUG_PUSH_EMPTY calls, then DBUG_POP_EMPTY will
      cause a crash when DBUGCloseFile() will try to free an object that
      was never allocated.
      392e744a
  8. 03 Jun, 2022 2 commits
  9. 02 Jun, 2022 5 commits
  10. 01 Jun, 2022 2 commits
  11. 30 May, 2022 8 commits
    • Monty's avatar
      Bug fixes for S3 · e7de50a8
      Monty authored
      - Fixed wrong DBUG_ASSERT when waiting for big-block-read
      - Update S3_pagecache_reads counter when reading a block from S3.
        Before this patch the variable value was always 0
      
      Reviewer: Oleksandr Byelkin <sanja@mariadb.com>
      e7de50a8
    • Monty's avatar
      Fixed bug in ma_loghandler.cc that could cause an assert · 9d10b710
      Monty authored
      The assert happens in 10.6 with the following command:
      
      ./mtr --no-reorder --verbose-restart main.update_ignore_216 main.upgrade_MDEV-19650 main.upgrade_MDEV-23102-1 main.upgrade_MDEV-23102-2 main.upgrade_geometrycolumn_procedure_definer main.upgrade_mdev_24363 main.varbinary sys_vars.aria_log_file_size_basic
      
      Reviewer: Oleksandr Byelkin <sanja@mariadb.com>
      9d10b710
    • Monty's avatar
      Remove compiler warning about unused variables · 131c318b
      Monty authored
      131c318b
    • Marko Mäkelä's avatar
      MDEV-28689, MDEV-28690: Incorrect error handling for ctrl_mutex · 863c3eda
      Marko Mäkelä authored
      comp_thread_ctxt_t: Remove ctrl_mutex, ctrl_cond, started. We do not
      actually need them for anything.
      
      destroy_worker_thread(): Split from destroy_worker_threads().
      
      create_worker_threads(): We already initialize
      thd->data_avail=FALSE and thd->cancelled=FALSE before
      invoking pthread_create(). If any thread creation fails,
      clean up by destroy_worker_thread().
      
      compress_worker_thread_func(): Assume that thd->started and
      thd->data_avail are already initialized.
      
      Reviewed by: Vladislav Vaintroub
      863c3eda
    • Masashi Tomooka's avatar
      MDEV-28599 EXCHANGE PARTITION on view causes ER_CHECK_NO_SUCH_TABLE instead of ER_WRONG_OBJECT · f7137a61
      Masashi Tomooka authored
      ER_CHECK_NO_SUCH_TABLE was raised because a view does not have
      the corresponding TABLE instance connected to TABLE_LIST and the
      server interprets the absence as the absence of the table itself.
      
      To fix the problem, we add a check to ensure that the target table
      to be swapped with a partition is not a view.
      
      Reviewed by: Nayuta Yanagisawa
      f7137a61
    • mkaruza's avatar
      MDEV-27862 Galera should replicate nextval()-related changes in sequences with... · ebbd5ef6
      mkaruza authored
      MDEV-27862 Galera should replicate nextval()-related changes in sequences with INCREMENT <> 0, at least NOCACHE ones with engine=InnoDB
      
      Sequence storage engine is not transactionl so cache will be written in
      stmt_cache that is not replicated in cluster. To fix this replicate
      what is available in both trans_cache and stmt_cache.
      
      Sequences will only work when NOCACHE keyword is used when sequnce is
      created. If WSREP is enabled and we don't have this keyword report error
      indicting that sequence will not work correctly in cluster.
      
      When binlog is enabled statement cache will be cleared in transaction
      before COMMIT so cache generated from sequence will not be replicated.
      We need to keep cache until replication.
      
      Tests are re-recorded because of replication changes that were
      introducted with this PR.
      Reviewed-by: default avatarJan Lindström <jan.lindstrom@mariadb.com>
      ebbd5ef6
    • Jan Lindström's avatar
      MDEV-20627 : Galera 4 not able to report proper wsrep_incoming_addresses · c8fabbed
      Jan Lindström authored
      wsrep_server_incoming_address function always returned value of the
      wsrep_node_incoming_address even when actual incoming address
      was resolved to inc_addr variable. Fixed by returning inc_addr
      if it does contain incoming address.
      c8fabbed
    • Sergei Golubchik's avatar
      2840d775