1. 06 Apr, 2022 4 commits
  2. 05 Apr, 2022 2 commits
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · 8d9c2561
      Marko Mäkelä authored
      8d9c2561
    • Otto Kekäläinen's avatar
      Deb: Sync Salsa-CI from Debian MariaDB 10.6 · 8c919330
      Otto Kekäläinen authored
      As MariaDB 10.5 has been removed from Debian Sid and MariaDB 10.6 has
      entered it, the Salsa-CI testing needs to adapt.
      
      To achieve this, essentially sync most the the salsa-ci.yml contents from
      https://salsa.debian.org/mariadb-team/mariadb-server/-/tree/debian/latest
      
      This includes removing Stretch builds, as Stretch does not support uring
      nor pmem libraries, which MariaDB 10.6 depends on.
      
      Also add a couple Lintian overrides to make Salsa-CI pass.
      
      NOTE TO MERGERS: This commit is made on 10.6 branch and can be merged to
      all later branches (10.7, 10.8, 10.9..) for now, but later somebody needs
      to go in and update all the testing stages to do the upgrade testing
      correctly for 10.6->10.7->10.8->10.9 etc.
      8c919330
  3. 04 Apr, 2022 5 commits
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-28237 Assertion `0' failed in row_upd_sec_index_entry on DELETE · db655e13
      Thirunarayanan Balathandayuthapani authored
      - InnoDB bulk insert operation fails to rollback when it detect
      DB_DUPLICATE_KEY error. It leads to orphaned records in primary
      indexes. Consecutive update/delete operation assumes that record
      should exist in secondary index and it leads to failure.
      db655e13
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-28138 MariaDB Assertion Failed in mtr_buf_t::has_space · b678f881
      Thirunarayanan Balathandayuthapani authored
      - After MDEV-24621, InnoDB does buffer the insert bulk operation
      for all indexes expect spatial one. But it leads to search the
      primary key lookup and it leads to failure. So InnoDB should avoid
      bulk insert when table has spatial index involved.
      b678f881
    • Vlad Lesin's avatar
      MDEV-26322 Last binlog file and position are "empty" in mariabackup --prepare output · 6a3545dd
      Vlad Lesin authored
      The issue is caused by 59a0236d commit.
      The initial intention of the commit was to speed up
      "mariabackup --prepare".
      
      The call stack of binlog position reading is the following:
      ▾ trx_rseg_mem_restore
        ▾ trx_rseg_array_init
            ▾ trx_lists_init_at_db_start
                  ▸ srv_start
      Both trx_lists_init_at_db_start() and trx_rseg_mem_restore() contain
      special cases for srv_operation == SRV_OPERATION_RESTORE condition, and
      on this condition only rseg headers are read to parse binlog position.
      Performance impact is not so big.
      
      The solution is to revert 59a0236d.
      6a3545dd
    • Daniel Black's avatar
      MDEV-28231: innodb: format string warning on aix UINT64PFx (ib_id_t) · 7f5a3cd2
      Daniel Black authored
      ib_id_t is a uint64. On AIX this isn't a long long unsigned and to
      prevent the compile warnings and potential wrong type, the UINT64PFx
      defination is corrected.
      
      As INT64PF is unused (last use, xtradb in 10.2), it is removed to
      remove the confusion that INT64PF and UINT64PFx would be different
      types otherwise.
      7f5a3cd2
    • Dmitry Shulga's avatar
      MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*) · cd56b40f
      Dmitry Shulga authored
      This bug report is not about ASAN Use After Free issue. This bug is
      about missed calling of the method LEX::cleanup_lex_after_parse_error
      that should happen on parse error.
      
      Aforementioned method calls sphead::restore_thd_mem_root to clean up
      resources acquired on processing a stored routine. Particularly,
      the method sp_head::restore_tht_mem_root is called to restore
      an original mem root and reset LEX::sphead into nullptr.
      
      The method LEX::cleanup_lex_after_parse_error is invoked by the macros
      MYSQL_YYABORT. Unfortunately, some rules of grammar for handling
      user variables in SQL use YYABORT instead of MYSQL_YYABORT to handle
      parser errors. As a consequence, in case a statement with setting of
      a user variable is called inside a stored routine, it results in
      assert failure in sp_head destructor.
      
      To fix the issue the macros YYABORT should be replaced by MYSQL_YYABORT
      in those grammar rules that handle assignment of user variables.
      cd56b40f
  4. 02 Apr, 2022 1 commit
  5. 01 Apr, 2022 3 commits
  6. 31 Mar, 2022 3 commits
    • Nayuta Yanagisawa's avatar
      MDEV-28005 Deprecate Spider plugin variables regarding UDFs · f78fdf08
      Nayuta Yanagisawa authored
      Configuring UDFs via plugin variables looks not a good idea.
      The more variables Spider has, the more complex it becomes.
      Further, I expect that only a few users use Spider UDFs.
      
      Deprecate the following plugin variables regarding Spider UDFs:
      
      * spider_udf_ds_bulk_insert_rows
      * spider_udf_ds_table_loop_mode
      * spider_udf_ds_use_real_table
      * spider_udf_ct_bulk_insert_interval
      * spider_udf_ct_bulk_insert_rows
      
      spider_udf_table_lock_mutex_count and spider_udf_table_mon_mutex_count
      are also for tweaking UDFs but they are already read-only. So,
      there is no need to deprecate them.
      f78fdf08
    • Nayuta Yanagisawa's avatar
      ef930dca
    • Nayuta Yanagisawa's avatar
      MDEV-27474 Spider: remove #WITH_PARTITION_STORAGE_ENGINE · f76da7f6
      Nayuta Yanagisawa authored
      "#ifdef WITH_PARTITION_STORAGE_ENGINE ... #endif" appears frequently
      in the Spider code base. However, there is no need to maintain such
      ifdefs because Spider is disabled if the partitioning engine is disabled.
      f76da7f6
  7. 30 Mar, 2022 6 commits
    • Rucha Deodhar's avatar
      MDEV-23479: Add a THD* argument to Item_func_or_sum::fix_length_and_dec() · 3eb1e11d
      Rucha Deodhar authored
      Fix: Added THD *thd argument in Item_func_or_sum::fix_length_and_dec() and in
      fix_length_and_dec() for all derived classes of Item_func_or_sum.
      3eb1e11d
    • Rucha Deodhar's avatar
      MDEV-27990: Incorrect behavior of JSON_OVERLAPS() on warning · 12abe61a
      Rucha Deodhar authored
      Analysis: In case of error while processing json document, we goto
      error label which eventually return 1 instead of 0.
      Fix: Return 0 in case of error instead of 1.
      12abe61a
    • Rucha Deodhar's avatar
      MDEV-27677: Implement JSON_OVERLAPS() · a653dde2
      Rucha Deodhar authored
      1) When at least one of the two json documents is of scalar type:
           1.a) If value and json document both are scalar, then return true
                if they have same type and value.
           1.b) If json document is scalar but other is array (or vice versa),
                then return true if array has at least one element of same type
                and value as scalar.
           1.c) If one is scalar and other is object, then return false because
                it can't be compared.
      
        2) When both arguments are of non-scalar type and below conditons
            are satisfied then return true:
            2.a) When both arguments are arrays:
                 Iterate over the value and json document. If there exists at
                 least one element in other array of same type and value as
                 that of element in value.
            2.b) If both arguments are objects:
                 Iterate over value and json document and if there exists at least
                 one key-value pair common between two objects.
            2.c) If either of json document or value is array and other is object:
                 Iterate over the array, if an element of type object is found,
                 then compare it with the object (which is the other arguemnt).
                 If the entire object matches i.e all they key value pairs match.
      a653dde2
    • Marko Mäkelä's avatar
      Merge 10.8 into 10.9 · 8680eedb
      Marko Mäkelä authored
      8680eedb
    • Marko Mäkelä's avatar
      Merge 10.7 into 10.8 · 5c69e936
      Marko Mäkelä authored
      5c69e936
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.7 · a4d75375
      Marko Mäkelä authored
      a4d75375
  8. 29 Mar, 2022 12 commits
  9. 28 Mar, 2022 4 commits
    • mkaruza's avatar
      MDEV-25912 wsrep does not identify checksummed events correctly · 97f237e6
      mkaruza authored
      For GTID consistenty, GTID events was artificialy added before
      replication happned. This event should not contain CHECKSUM calculated.
      Reviewed-by: default avatarJan Lindström <jan.lindstrom@mariadb.com>
      97f237e6
    • Vladislav Vaintroub's avatar
      MDEV-28178 Windows : sporadic ER_ERROR_ON_RENAME .. (errno: 13 "Permission denied") · 739002ee
      Vladislav Vaintroub authored
      On affected machine, the error happens sporadically in
      innodb.instant_alter_limit.
      
      Procmon shows SetRenameInformationFile failing with ERROR_ACCESS_DENIED.
      In this case, the destination file was previously opened rsp oplocked by
      Windows defender antivirus.
      
      The fix is to retry MoveFileEx on ERROR_ACCESS_DENIED.
      739002ee
    • Marko Mäkelä's avatar
      MDEV-27931: buf_page_is_corrupted() wrongly claims corruption · 303448bc
      Marko Mäkelä authored
      In commit 437da7bc (MDEV-19534),
      the default value of the global variable srv_checksum_algorithm
      in innochecksum was changed from SRV_CHECKSUM_ALGORITHM_INNODB
      to implied 0 (innodb_checksum_algorithm=crc32). As a result,
      the function buf_page_is_corrupted() would by default invoke
      buf_calc_page_crc32() in innochecksum, and crc32_inited would hold.
      
      This would cause "innochecksum" to fail on a particular page.
      
      The actual problem is older, introduced in 2011 in
      mysql/mysql-server@17e497bdb793bc6b8360aa1c626dcd8bb5cfad1b
      (MySQL 5.6.3). It should affect the validation of pages of old
      data files that were written with innodb_checksum_algorithm=innodb.
      When using innodb_checksum_algorithm=crc32 (the default setting
      since MariaDB Server 10.2), some valid pages would be rejected
      only because exactly one of the two checksum fields accidentally
      matches the innodb_checksum_algorithm=crc32 value.
      
      buf_page_is_corrupted(): Simplify the logic of non-strict
      checksum validation, by always invoking buf_calc_page_crc32().
      Remove a bogus condition that if only one of the checksum fields
      contains the value returned by buf_calc_page_crc32(), the page
      is corrupted.
      303448bc
    • Marko Mäkelä's avatar
      MDEV-28181 The innochecksum -w option was inadvertently removed · b2fa874e
      Marko Mäkelä authored
      In commit 7a4fbb55 (MDEV-25105)
      the innochecksum option --write (-w) was removed altogether.
      It should have been made a Boolean option, so that old data files
      may be converted to a format that is compatible with
      innodb_checksum_algorithm=strict_crc32 by executing the following:
      
      innochecksum -n -w ibdata* */*.ibd
      
      It would be better to use an older-version innochecksum
      for such a conversion, so that page checksums will be validated
      before updating the checksum.
      
      It never was possible for innochecksum to convert files to the
      innodb_checksum_algorithm=full_crc32 format that is the default
      for new InnoDB data files.
      b2fa874e