1. 02 Dec, 2019 1 commit
  2. 29 Nov, 2019 5 commits
  3. 28 Nov, 2019 3 commits
  4. 27 Nov, 2019 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-19781 fixups · 96c6b2b6
      Vladislav Vaintroub authored
      - It is not enough to have  and DeleteSymlinks actions
      because within the same installation some exes executables can be both
      added and removed, which needs both adding and removing some symlinks.
      
      Instead of CreateSymlinks, there is now FixSymlinks function, which
      goes through the list, and adds or removes the symlinks as needed.
      
      - Implemented rollback for symlink custom action.
      
      - Generate list of symlinks in C++ file, using CMake, rather than storing
      lists as MSI properties.
      96c6b2b6
  5. 26 Nov, 2019 4 commits
  6. 25 Nov, 2019 4 commits
    • Marko Mäkelä's avatar
      MDEV-20190 Instant operation fails when add column and collation change on non-indexed column · f9ceb0a6
      Marko Mäkelä authored
      We must relax too strict debug assertions. For latin1_swedish_ci,
      mtype=DATA_CHAR or mtype=DATA_VARCHAR will be used instead of
      mtype=DATA_MYSQL or mtype=DATA_VARMYSQL. Likewise, some changes of
      dtype_get_charset_coll() do not affect the data type encoding,
      but only any indexes that are defined on the column.
      
      Charset::same_encoding(): Check whether two charset-collations have
      the same character set encoding.
      
      dict_col_t::same_encoding(): Check whether two character columns
      have the same character set encoding.
      
      dict_col_t::same_type(): Check whether two columns have a compatible
      data type encoding.
      
      dict_col_t::same_format(), dict_table_t::instant_column(): Do not
      compare mtype or the charset-collation of prtype directly.
      Rely on dict_col_t::same_type() instead.
      
      dtype_get_charset_coll(): Narrow the return type to uint16_t.
      
      This is a refined version of a fix that was developed by
      Thirunarayanan Balathandayuthapani.
      f9ceb0a6
    • Aleksey Midenkov's avatar
      Merge 10.3 into 10.4 · a34c34d9
      Aleksey Midenkov authored
      a34c34d9
    • Aleksey Midenkov's avatar
      MDEV-18727 improve DML operation of System Versioning (10.4) · 33f55789
      Aleksey Midenkov authored
      UPDATE, DELETE: replace linear search of current/historical records
      with vers_setup_conds().
      
      Additional DML cases in view.test
      33f55789
    • seppo's avatar
      MDEV-21096 async slave crash with gtid_log_pos table access (#1413) · 4111a530
      seppo authored
      The original crash happened when async replication IO thread was updating mysql.gtid_slave_pos table. Operations on this table should remain node local, but it appears that protection (THD::wsrep_ignore_table flag) to prevent wsrep replication for this table mas missing for innodb write_row() and update_row().
      It was somewhat difficult to reproduce the issue, because mtr seems to create the affected table mysql.gtid_log_pos as of Aria engine type, and Aria engine operations will not be replicated anyhow. It looks, though, that in release installation, mysql.gtid_slave_pos table is of InnoDB engine.
      It was possible to trigger somewhat related problem by running test galera.galera_as_slave_gtid with configuration: gtid_pos_auto_engines=InnoDB. However, this test mode, causes earlier crash when replication background thread creates aditional table: mysql.gtid_slave_pos_InnoDB, and this table create triggered wsrep TOI replication, which also failed for assertion. Actually, async replication IO and background threads should not replicate anything to cluster.
      
      This pull request contains new test galera.galera_as_slave_gtid_auto_engine, which basically just runs galera.galera_as_slave_gtid with configuration of gtid_pos_auto_engines=InnoDB.
      Test galera.galera_as_slave_gtid is also modified for better code reuse.
      Actual fix for MDEV-21096 is in storage/innobase/handler/ha_innodb.cc, where THD::wsrep_ignore_table flag is now honored before wsrep key population.
      There is additional fix in sql/service_wsrep.cc where async replication IO and background threads are marked as non-local. This fences these threads out of wsrep replication altogether. Note that this change, actually makes the use of THD::wsrep_ignore-table redundant. We may want to refactor THD::wsrep_ignore_table out in the future, if there is no other use case for it in sight.
      4111a530
  7. 23 Nov, 2019 1 commit
    • Igor Babaev's avatar
      MDEV-19919 Assertion `!prebuilt->index->is_primary()' failed · f9528821
      Igor Babaev authored
                 in row_search_idx_cond_check
      
      For a single table query with ORDER BY and several sargable range
      conditions the optimizer may choose an execution plan that employs
      a rowid filter. In this case it is important to build the filter before
      calling the function JOIN_TAB::sort_table() that creates sort index
      for the result set, because when this is index created the filter has
      to be already filled. After the sort index has been created the
      filter must be deactivated. If not to do this the innodb function
      row_search_idx_cond_check() is getting confused when it has to read rows
      from the created sort index by using ha_rnd_pos().
      The order of actions mentioned above is needed also when processing a
      join query if sorting is performed for the first non constant table in
      the chosen execution plan.
      f9528821
  8. 22 Nov, 2019 3 commits
  9. 21 Nov, 2019 1 commit
  10. 20 Nov, 2019 5 commits
  11. 19 Nov, 2019 2 commits
  12. 18 Nov, 2019 4 commits
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 589a1235
      Marko Mäkelä authored
      589a1235
    • Marko Mäkelä's avatar
      MDEV-13564 follow-up: Remove unused code · 39d8652c
      Marko Mäkelä authored
      DropIndex, CreateIndex: Remove. The file row0trunc.cc only exists
      in MariaDB Server 10.3 so that the crash recovery of TRUNCATE TABLE
      operations from older 10.2 and 10.3 servers will work. This dead code
      was being used for implementing the MySQL 5.7 WL#6501 TRUNCATE TABLE
      that was replaced with a backup-safe implementation in MDEV-13564.
      39d8652c
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 613e1307
      Marko Mäkelä authored
      613e1307
    • Marko Mäkelä's avatar
      MDEV-21069 Crash on DROP TABLE if the data file is corrupted · b80df9eb
      Marko Mäkelä authored
      buf_read_ibuf_merge_pages(): Discard any page numbers that are
      outside the current bounds of the tablespace, by invoking the
      function ibuf_delete_recs() that was introduced in MDEV-20934.
      This could avoid an infinite change buffer merge loop on
      innodb_fast_shutdown=0, because normally the change buffer merge
      would only be attempted if a page was successfully loaded into
      the buffer pool.
      
      dict_drop_index_tree(): Add the parameter trx_t*.
      To prevent the DROP TABLE crash, do not invoke btr_free_if_exists()
      if the entire .ibd file will be dropped. Thus, we will avoid a crash
      if the BTR_SEG_LEAF or BTR_SEG_TOP of the index is corrupted,
      and we will also avoid unnecessarily accessing the to-be-dropped
      tablespace via the buffer pool.
      
      In MariaDB 10.2, we disable the DROP TABLE fix if innodb_safe_truncate=0,
      because the backup-unsafe MySQL 5.7 WL#6501 form of TRUNCATE TABLE
      requires that the individual pages be freed inside the tablespace.
      b80df9eb
  13. 17 Nov, 2019 1 commit
  14. 16 Nov, 2019 1 commit
  15. 15 Nov, 2019 4 commits
    • Sergei Petrunia's avatar
      MDEV-20611: MRR scan over partitioned InnoDB table produces "Out of memory" error · 86167e90
      Sergei Petrunia authored
      Fix partitioning and DS-MRR to work together
      
      - In ha_partition::index_end(): take into account that ha_innobase (and
        other engines using DS-MRR) will have inited=RND when initialized for
        DS-MRR scan.
      - In ha_partition::multi_range_read_next(): if the MRR scan is using
        HA_MRR_NO_ASSOCIATION mode, it is not guaranteed that the partition's
        handler will store anything into *range_info.
      - In DsMrr_impl::choose_mrr_impl(): ha_partition will inquire partitions
        about how much memory their MRR implementation needs by passing
        *buffer_size=0. DS-MRR code didn't know about this (actually it used
        uint for buffer size calculation and would have an under-flow).
        Returning *buffer_size=0 made ha_partition assume that partitions do
        not need MRR memory and pass the same buffer to each of them.
      
        Now, this is fixed. If DS-MRR gets *buffer_size=0, it will return
        the amount of buffer space needed, but not more than about
        @@mrr_buffer_size.
      
      * Fix ha_{innobase,maria,myisam}::clone. If ha_partition uses MRR on its
        partitions, and partition use DS-MRR, the code will call handler->clone
        with TABLE (*NOT partition*) name as an argument.
        DS-MRR has no way of knowing the partition name, so the solution was
        to have the ::clone() function for the affected storage engine to ignore
        the name argument and get it elsewhere.
      86167e90
    • Vladislav Vaintroub's avatar
      Fix a couple of clang-cl warnings · 009674dc
      Vladislav Vaintroub authored
      009674dc
    • Vladislav Vaintroub's avatar
      MDEV-21062 Buildbot, Windows - sporadically missing lines from mtr's "exec" · 6df0bb7d
      Vladislav Vaintroub authored
      
      Provide own version of popen/pclose, in attempt to workaround
      sporadic erratic behavior of UCRT's one.
      6df0bb7d
    • Sergei Golubchik's avatar
      update create_w_max_indexes_128.result · bd2b05df
      Sergei Golubchik authored
      using create_w_max_indexes_64.result as a template
      bd2b05df