1. 19 May, 2020 17 commits
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 2bf93a8f
      Marko Mäkelä authored
      2bf93a8f
    • Rasmus Johansson's avatar
    • Rasmus Johansson's avatar
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 79ed33c1
      Marko Mäkelä authored
      79ed33c1
    • Marko Mäkelä's avatar
      MDEV-22456: Fix cmake -DWITH_INNODB_AHI=OFF · a8f044e1
      Marko Mäkelä authored
      dict_index_remove_from_cache_low(): Add a missing #ifdef around
      dict_index_t::freed().
      a8f044e1
    • Marko Mäkelä's avatar
      MDEV-19114 gcol.innodb_virtual_debug: Assertion n_fields>0 failed · cb437417
      Marko Mäkelä authored
      This is a regression due to MDEV-16376
      commit 8dc70c86.
      To make dict_index_t::detach_columns() idempotent,
      we cleared dict_index_t::n_fields. But, this could
      cause trouble with purge after a secondary index
      creation failed (not even involving virtual columns).
      
      A better way is to clear the dict_field_t::col pointers
      that point to virtual columns that are being freed
      due to aborting index creation on an index that depends
      on a virtual column.
      
      Note: the v_cols[] of an existing dict_table_t object will
      never be modified. If any virtual columns are added or removed,
      ha_innobase::commit_inplace_alter_table() would invoke
      dict_table_remove_from_cache() and reload the table to dict_sys.
      Index creation is a special case where the dict_index_t points
      to virtual columns that do not yet exist in dict_table_t.
      cb437417
    • Marko Mäkelä's avatar
      MDEV-21936 Assertion !btr_search_own... in btr_search_drop_page_hash_index · 2e9f4cdc
      Marko Mäkelä authored
      This is a regression due to the cleanup
      commit 12f804ac.
      
      row_sel_open_pcur(): Remove the unnecessary parameter.
      It suffices for us to acquire the adaptive hash index latch
      only when btr_search_guess_on_hash() is called by
      btr_cur_search_to_nth_level_func(), in
      btr_pcur_open_with_no_init().
      
      This code seems to be a relic from the times when there was
      only one btr_search_latch, which was held in shared mode
      for longer periods of time. Another relic of that era was
      removed in commit e5980bf1.
      This clean-up was missed when the btr_search_latch was split in
      mysql/mysql-server/commit@ab17ab91ce18a47bb6c5c49e4dc0505ad488a448
      (MySQL 5.7.8).
      2e9f4cdc
    • Monty's avatar
      Move c++ code from my_atomic.h to my_atomic_wrapper.h · fa039784
      Monty authored
      This is because it breaks code that is using extern "C" when including
      my_atomic, which is the case with ha_s3.cc
      fa039784
    • Monty's avatar
      Don't run main.sp2 in emebedded server · f9144a42
      Monty authored
      f9144a42
    • Alexander Barkov's avatar
      MDEV-22591 Debug build crashes on EXECUTE IMMEDIATE '... WHERE ?' USING IGNORE · 996b9a9d
      Alexander Barkov authored
      Removing a wrong DBUG_ASSERT:
      When Item_param gets "unfixed" in cleanup(), its "fixed" gets assigned
      to false, while item_item keeps the value. So the assert was wrong.
      
      Perhaps, instead of removing the assert, it was possible to reset
      item_type to NO_VALUE in cleanup. But this is not very important:
      it's implemented in 10.4 in a better way:
      Item_param::is_fixed() always returns true and it does not need to be "unfixed".
      996b9a9d
    • Alexander Barkov's avatar
      MDEV-22610 Crash in INSERT INTO t1 (VALUES (DEFAULT) UNION VALUES (DEFAULT)) · f7079d29
      Alexander Barkov authored
      The fix for MDEV-21995 earlier fixed MDEV-22610. Adding tests only.
      f7079d29
    • Vlad Lesin's avatar
      MDEV-22554: "mariabackup --prepare" exits with code 0 even though innodb · 0f9bfcc3
      Vlad Lesin authored
      error is logged
      
      The fix is to set flag in ib::error::~error() and check it in
      mariabackup.
      
      ib::error::error() is replaced with ib::warn::warn() in
      AIO::linux_create_io_ctx() because of two reasons:
      
      1) if we leave it as is, then mariabackup MTR tests will fail with --mem
      option, because Linux AIO can not be used on tmpfs,
      
      2) when Linux AIO can not be initialized, InnoDB falls back to simulated
      AIO, so such sutiation is not fatal error, it should be treated as warning.
      0f9bfcc3
    • Alexander Barkov's avatar
      810b7f8e
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · a8406056
      Marko Mäkelä authored
      a8406056
    • Marko Mäkelä's avatar
      MDEV-22618 Assertion !dict_index_is_online_ddl ... in lock_table_locks_lookup · c93f8aca
      Marko Mäkelä authored
      lock_table_locks_lookup(): Relax the assertion.
      Locks must not exist while online secondary index creation is
      in progress. However, if CREATE UNIQUE INDEX has not been committed
      yet, but the index creation has been completed, concurrent DML
      transactions may acquire record locks on the index. Furthermore,
      such concurrent DML may cause duplicate key violation, causing
      the DDL operation to be rolled back. After that, the online_status
      may be ONLINE_INDEX_ABORTED or ONLINE_INDEX_ABORTED_DROPPED.
      
      So, the debug assertion may only forbid the state ONLINE_INDEX_CREATION.
      c93f8aca
    • Alexander Barkov's avatar
      MDEV-21995 Server crashes in Item_field::real_type_handler with table value constructor · 06fb78c6
      Alexander Barkov authored
      1. Code simplification:
      
      Item_default_value handled all these values:
      a. DEFAULT(field)
      b. DEFAULT
      c. IGNORE
      and had various conditions to distinguish (a) from (b) and from (c).
      
      Introducing a new abstract class Item_contextually_typed_value_specification,
      to handle (b) and (c), so the hierarchy now looks as follows:
      
      Item
        Item_result_field
          Item_ident
            Item_field
              Item_default_value                      - DEFAULT(field)
        Item_contextually_typed_value_specification
          Item_default_specification                  - DEFAULT
          Item_ignore_specification                   - IGNORE
      
      2. Introducing a new virtual method is_evaluable_expression() to
      determine if an Item is:
      - a normal expression, so its val_xxx()/get_date() methods can be called
      - or a just an expression substitute, whose value methods cannot be called.
      
      3. Disallowing Items that are not evalualble expressions in table value
         constructors.
      06fb78c6
    • Monty's avatar
      Fixed assert in Aria on SHOW PROCEDURE STATUS · 141cf43e
      Monty authored
      MDEV-18457 Assertion `(bitmap->map +
                 (bitmap->full_head_size/6*6)) <= full_head_end failed
      
      The problem was that full_head_size was not calculated correctly
      in the case when insert_order was inforced, which is the case
      for SHOW commands.
      141cf43e
  2. 18 May, 2020 14 commits
  3. 17 May, 2020 5 commits
    • Otto Kekäläinen's avatar
      Travis-CI: Remove builds that always fail to make CI useful again · c995090a
      Otto Kekäläinen authored
      Also clean away dead code that is not used and will never have any use
      on the 10.2 branch.
      c995090a
    • Otto Kekäläinen's avatar
      Travis-CI: Shorten deb build log to keep it under 4 MB · 8d056aff
      Otto Kekäläinen authored
      There is a 4 MB hard limit on Travis-CI and build output needs to be less
      than that. Silencing the 'make install' step gets rid of a lot of
      "Installing.." and "Missing.." and removing all mysql-test files will
      make the dh_missing warnings much shorter.
      
      Cherry-picked from 41952c85.
      8d056aff
    • Otto Kekäläinen's avatar
      Travis-CI: Add missing build dependency dh-exec · 9ddeccc2
      Otto Kekäläinen authored
      Backported from 30b44aae.
      9ddeccc2
    • Varun Gupta's avatar
      MDEV-22556: Incorrect result for window function when using encrypt-tmp-files=ON · 0a5668f5
      Varun Gupta authored
      The issue here is that end_of_file for encrypted temporary IO_CACHE (used by filesort) is updated
      using lseek.
      Encryption adds storage overhead and hides it from the caller by recalculating offsets and lengths.
      Two different IO_CACHE cannot possibly modify the same file
      because the encryption key is randomly generated and stored in the IO_CACHE.
      So when the tempfiles are encrypted DO NOT use lseek to change end_of_file.
      
      Further observations about updating end_of_file using lseek
      1) The end_of_file update is only used for binlog index files
      2) The whole point is to update file length when the file was modified via a different file descriptor.
      3) The temporary IO_CACHE files can never be modified via a different file descriptor.
      4) For encrypted temporary IO_CACHE, end_of_file should not be updated with lseek
      0a5668f5
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-21269 Parallel merging of fts index rebuild fails · 4f26aea5
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
        - During alter rebuild, document read from old table is tokenzied
      parallelly by innodb_ft_sort_pll_degree threads and stores it
      in respective merge files. While doing the parallel merge, InnoDB
      wrongly skips the root level selection of merging buffer records.
      So it leads to insertion of merge records in non-ascending order.
      
      Solution:
      ==========
        Build selection tree for the root level also. So that root of
      selection tree can always contain sorted buffer.
      4f26aea5
  4. 16 May, 2020 4 commits