1. 01 Aug, 2020 3 commits
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 50a11f39
      Marko Mäkelä authored
      50a11f39
    • Otto Kekäläinen's avatar
      Unify config syntax in default files · 842da858
      Otto Kekäläinen authored
      - Include a link to the relevant KB article for more info
      - Use spaced around the equal sign for better readability and so that
        the examples are more aligned with the general style in the KB
      - Load plugins with just the base name, the .so is optional and excess
      842da858
    • Otto Kekäläinen's avatar
      MDEV-22980: Allow plugin-maturity=alpha so S3 plugin loads · afbd6181
      Otto Kekäläinen authored
      Verified by running before and after:
      
        mariadb --skip-column-names -e "select plugin_name, plugin_status,
        plugin_type, plugin_library, plugin_license from
        information_schema.all_plugins order by plugin_name, plugin_library"
      
      Nothing else but exactly this line changed so there are no side effects:
      
        -S3 NOT INSTALLED	STORAGE ENGINE	ha_s3.so	GPL
        +S3 ACTIVE	       STORAGE ENGINE	ha_s3.so	GPL
      
      Also enrich config file with link to KB and unify option syntax and
      standard comments.
      afbd6181
  2. 31 Jul, 2020 11 commits
  3. 30 Jul, 2020 16 commits
    • Marko Mäkelä's avatar
      MDEV-23334 Crash in rec_get_nth_cfield()/rec_offs_validate() · 6053eb1c
      Marko Mäkelä authored
      rec_get_nth_cfield(): Remove a bogus debug assertion.
      The function may be invoked by innobase_rec_to_mysql()
      for reporting a duplicate key error during CREATE UNIQUE INDEX
      or ALTER TABLE...ADD UNIQUE KEY, and in that case the record
      will be missing the 5-byte or 6-byte fixed header.
      
      It turns out that in every other code path leading to
      rec_get_nth_cfield() we either invoked rec_get_offsets()
      ourselves or asserted rec_offs_validate(). So, we can
      safely remove the assertion and make debug builds
      smaller and faster.
      6053eb1c
    • Krunal Bauskar's avatar
      MDEV-23030: ARM crash on Raspberry Pi 4 · c69520c9
      Krunal Bauskar authored
      MariaDB adopted a hardware optimized crc32c approach on ARM64 starting 10.5.
      Said implementation of crc32c needs support from target hardware for crc32
      and pmull instructions. Existing logic is checking only for crc32 support
      from target hardware through a runtime check and so if target hardware
      doesn't support pmull it would cause things to fail/crash.
      
      Expanded runtime check to ensure pmull support is also checked on the target
      hardware along with existing crc32.
      
      Thanks to Marko and Daniel for review.
      c69520c9
    • Jan Lindström's avatar
      Enable test for testing. · c3958ae4
      Jan Lindström authored
      c3958ae4
    • Vladislav Vaintroub's avatar
      MDEV-21101 skip test for embedded · 0435fcf9
      Vladislav Vaintroub authored
      0435fcf9
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-23332 Index online status assert failure in btr_search_drop_page_hash_index · 8a612314
      Thirunarayanan Balathandayuthapani authored
      Problem:
      ========
      In row_merge_drop_indexes(), InnoDB drops only the index from
      dictionary and frees the index pages but it maintains the index
      object if the table is being used by other DML threads. It sets
      the online status of the index to ONLINE_INDEX_ABORTED_DROPPED.
      Removing the index from dictionary doesn't remove the
      corressponding ahi entries of the index. When block is being
      reused, InnoDB tries to remove ahi entries for the block and
      it fails if index online status is ONLINE_INDEX_ABORTED_DROPPED.
      
      Fix:
      ====
      MDEV-22456 allows the index ahi entries to be dropped lazily.
      so checking online status in btr_search_drop_page_hash_index()
      is meaningless and should be removed.
      8a612314
    • Vladislav Vaintroub's avatar
      MDEV-21101 unexpected wait_timeout with pool-of-threads · 71015d84
      Vladislav Vaintroub authored
      Due to restricted size of the threadpool, execution of client queries can
      be delayed (queued) for a while. This delay was interpreted as client
      inactivity, and connection is closed, if client idle time + queue time
      exceeds wait_timeout.
      
      But users did not expect queue time to be included into wait_timeout.
      
      This patch changes the behavior. We don't close connection anymore,
      if there is some unread data present on connection,
      even if wait_timeout is exceeded. Unread data means that client
      was not idle, it sent a query, which we did not have time to process yet.
      71015d84
    • Marko Mäkelä's avatar
      MDEV-23339 innodb_force_recovery=2 may still abort the rollback of recovered transactions · c5d4dd25
      Marko Mäkelä authored
      trx_rollback_active(), trx_rollback_resurrected(): Replace
      an incorrect condition that we failed to replace in
      commit b68f1d84 (MDEV-21217).
      c5d4dd25
    • Alexander Barkov's avatar
      MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument · 6d3186e3
      Alexander Barkov authored
      Implementing dedicated fixing methods:
      - Type_handler_bit::Item_func_round_fix_length_and_dec()
      - Type_handler_bit::Item_func_int_val_fix_length_and_dec()
      - Type_handler_typelib::Item_func_round_fix_length_and_dec()
      
      because the inherited methods did not work well.
      
      Fixing:
      - Type_handler_typelib::Item_func_int_val_fix_length_and_dec
        It did not work well, because it used args[0]->max_length to
        calculate the result data type. In case of ENUM and SET it was
        not correct, because in FLOOR() and CEILING() context
        ENUM and SET return not more than 5 digits (65535 is the biggest
        possible value).
      
      Misc:
      - Changing the API of
          Type_handler_bit::Bit_decimal_notation_int_digits(const Item *item)
        to a more generic form:
          Type_handler_bit::Bit_decimal_notation_int_digits_by_nbits(uint nbits)
      
      - Fixing Type_handler_bit::Bit_decimal_notation_int_digits_by_nbits() to
        return the exact number of decimal digits for all nbits 1..64.
        The old implementation was approximate.
        This change gives better (more precise) data types.
      6d3186e3
    • Otto Kekäläinen's avatar
      Deb: Make RocksDB plugin depend on python3 as myrocks_hotbackup needs it · f99de891
      Otto Kekäläinen authored
      This fixes the Lintian error and thus the Lintian override can also be
      removed.
      f99de891
    • Otto Kekäläinen's avatar
      Deb: Proper DH_ and DEB_ flag use in debian/rules · a10f72aa
      Otto Kekäläinen authored
      - DEB_BUILD_HARDENING is only used with hardening-wrapper which is
        deprecated in Debian, so remove it
      - The word 'terse' should be checked in DEB_BUILD_OPTIONS and verbosity
        controlled by it
      a10f72aa
    • Otto Kekäläinen's avatar
      Deb: Stop suggesting tinyca, upstream project does not exist anymore · 497e7eda
      Otto Kekäläinen authored
      TinyCA has not been updated since 2016 and was removed from Debian in 2019
      and the dev site https://tinyca.alioth.debian.org/ is offline.
      
      See https://tracker.debian.org/pkg/tinyca
      497e7eda
    • Otto Kekäläinen's avatar
      Deb: Simplify and unify autobake-deb.sh · bdf82683
      Otto Kekäläinen authored
      - Remove excess build flag from debian/rules that does nothing, introduced
        wrongly in commit 7cbde2d0. Instead
        implement the embedded server build skipping on Travis-CI correctly.
      - Simplify structure by doing all Travis-CI slimdown in one step.
      - Remove unnecessary -e from sed, as it does nothing. When regex is needed,
        use -r. Move -i to last so it is close to the file name it has an
        argument.
      - Remove backwards compat checks that are no longer relevant as neither
        Debian Jessie (was before Stretch) nor Ubuntu Trusty (before Xenial)
        are supported nor built for anymore. For example the GCC 4.8 check
        if not relevant anymore, since Debian Jessie already has 4.9 and
        Ubuntu Xenial has 5.3 and there is no GCC < 4.8 around anymore.
      - Skip building ColumnStore on both Travis-CI and Gitlab-CI as it is
        way too slow (time) and big (disk space) to pass.
      bdf82683
    • Otto Kekäläinen's avatar
      Deb: Cleanup and document · 7a0fa9da
      Otto Kekäläinen authored
      - Remove unnecessary unused files
      - Remove duplicate encryption configuration sample from sources and
        re-use the identical file in RPM directory instead
      - Clean away harmful "default-character-set = utf8mb4" from client config
        as it is unnecassary (server enforces utf8mb4 anyway by default) and
        could cause issues with mysqlbinlog and other tools (MDEV-22981).
      - Update S3 plugin description to be long enough
      - Remove trailing whitespace from support-files and Debian packaging.
      - Clean away fixed Lintian issues
      - Clean away temporary Salsa-CI fixes now that 10.5.4 is out and is fixed
      - Apply wrap-and-sort -a -v
      7a0fa9da
    • Otto Kekäläinen's avatar
    • Otto Kekäläinen's avatar
      Use mktemp instead of deprecated tempfile · b8031e36
      Otto Kekäläinen authored
      This fixes the warning emitted during `/etc/init.d/mariadb restart`:
        WARNING: tempfile is deprecated; consider using mktemp instead.
      b8031e36
    • Otto Kekäläinen's avatar
      Fix spelling errors · ab48901d
      Otto Kekäläinen authored
      ab48901d
  4. 29 Jul, 2020 5 commits
    • Alexander Barkov's avatar
      MDEV-23320 Hex hybrid constants 0xHHHH work badly in rounding functions · 92499ae9
      Alexander Barkov authored
      - Type_handler_hex_hybrid did not override
        Type_handler_string_result::Item_func_round_fix_length_and_dec(),
        so the result type of ROUND(0xFFFFFFFFFFFFFFFF) was erroneously
        calculated ad DOUBLE with a wrong length.
        Overriding Item_func_round_fix_length_and_dec(), to calculated
        the result type as INT/BIGINT.
      
        Also, fixing Item_func_round::fix_arg_int() to use
        args[0]->decimal_precision() instead of args[0]->max_length
        when calculating this->max_length, to get a correct result
        for hex hybrids.
      
      - Type_handler_hex_hybrid::Item_func_int_val_fix_length_and_dec()
        called item->fix_length_and_dec_int_or_decimal(), which did not
        produce a correct result data type for hex hybrid.
        Implementing a dedicated code instead, to return INT UNSIGNED or
        BIGINT UNSIGNED depending in the number of digits in the arguments.
      92499ae9
    • Oleksandr Byelkin's avatar
      MDEV-21258: Can't uninstall plugin if the library file doesn't exist · 2107e3bb
      Oleksandr Byelkin authored
      Removing plugin from the mysql.plugin even if the plugin is not loaded
      2107e3bb
    • Eugene Kosov's avatar
      speed up my_timer_init() · 8ec877f4
      Eugene Kosov authored
      I run perf top during ./mtr testing and constantly see times()
      function there. It's so slow, that it has no sense to run it
      in a loop too many times.
      
      This patch speeds up -suite=innodb for me from 218s to 208s.
      9s of times() function!
      8ec877f4
    • Nikita Malyavin's avatar
      MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL (partition <name> is... · 34f2be3b
      Nikita Malyavin authored
      MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL (partition <name> is full) when rotation time for the last interval passed
      
      * remove one case of WARN_VERS_PART_FULL
      34f2be3b
    • Eugene Kosov's avatar
      MDEV-23245 MDEV-22898 Still getting assertion failure in file data0type.cc line 67 · 423de1e5
      Eugene Kosov authored
      Doesn't allow instant alter of a field which is a prefix part of some key
      
      is_part_of_a_key_prefix(): I hope the name of the function is clear
      
      ha_innobase::can_convert_string()
      ha_innobase::can_convert_varstring()
      ha_innobase::can_convert_blob(): it can't when field is_part_of_a_key_prefix()
      423de1e5
  5. 28 Jul, 2020 5 commits
    • Alexander Barkov's avatar
      MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() · 5b3b53ce
      Alexander Barkov authored
      Fixing functions CEILING and FLOOR to return
      - TIME for TIME input
      - DATETIME for DATETIME and TIMESTAMP input
      5b3b53ce
    • Jan Lindström's avatar
      galera_var_notify_cmd still hangs. · 69cf6302
      Jan Lindström authored
      69cf6302
    • Marko Mäkelä's avatar
      MDEV-22110 InnoDB unnecessarily writes unmodified pages · 05fa4558
      Marko Mäkelä authored
      At least since commit 6a7be48b
      InnoDB appears to be invoking buf_flush_note_modification() on pages
      that were exclusively latched but not modified in a mini-transaction.
      
      MTR_MEMO_MODIFY, mtr_t::modify(): Define not only in debug code,
      but also in release code. We will set the MTR_MEMO_MODIFY flag
      on the earliest mtr_t::m_memo entry that we find.
      
      MTR_LOG_NONE: Only use this mode in cases where the previous
      mode will be restored before anything is modified in the mini-transaction.
      
      MTR_MEMO_PAGE_X_MODIFY, MTR_MEMO_PAGE_SX_MODIFY: The allowed flag
      combinations that include MTR_MEMO_MODIFY.
      
      ReleaseBlocks: Only invoke buf_flush_note_modification()
      on those buffer pool blocks on which mtr_t::set_modified()
      and mtr_t::modify() were invoked.
      05fa4558
    • Marko Mäkelä's avatar
      MDEV-23304 Insert into TEMPORARY TABLE fails to invoke mtr_t::set_modified() · cf3c3cce
      Marko Mäkelä authored
      In MDEV-21724 or possibly already in MDEV-12353 a bug was introduced to
      the handling of temporary tables.
      
      Whether or not redo log will be written, mtr_t::set_modified()
      must be invoked to register any changes to a page.
      
      page_cur_insert_rec_low(): Invoke mtr_t::set_modified() also
      when skipping the redo log write.
      cf3c3cce
    • Marko Mäkelä's avatar
      MDEV-23308 CHECK TABLE attempts to access parent_right_page_no=FIL_NULL · 3c3f172f
      Marko Mäkelä authored
      mysql/mysql-server@e00ad49edc8b07317b52c9efd0810f2cbc57877a
      which introduced WL#6326 to MySQL 5.7.2 added a buffer page
      acquisition to CHECK TABLE code (solely for the purpose of
      obeying the changed latching order), but failed to check that
      a parent page actually exists. It would not necessarily exist in a
      corrupted index where a parent page is missing pointer records
      to child pages.
      3c3f172f