1. 26 Dec, 2019 1 commit
    • Varun Gupta's avatar
      MDEV-21318: Wrong results with window functions and implicit grouping · 891609b5
      Varun Gupta authored
      The issue here is for degenerate joins we should execute the window
      function but it is not getting executed in all the cases.
      
      To get the window function values window function needs to be executed
      always. This currently does not happen in few cases
      where the join would return 0 or 1 row like
        1) IMPOSSIBLE WHERE
        2) MIN/MAX optimization
        3) EMPTY CONST TABLE
      
      The fix is to make sure that window functions get executed
      and the temporary table is setup for the execution of window functions
      891609b5
  2. 24 Dec, 2019 2 commits
  3. 23 Dec, 2019 5 commits
  4. 21 Dec, 2019 2 commits
  5. 20 Dec, 2019 3 commits
  6. 19 Dec, 2019 1 commit
  7. 18 Dec, 2019 7 commits
  8. 17 Dec, 2019 3 commits
  9. 16 Dec, 2019 2 commits
  10. 13 Dec, 2019 3 commits
    • Anel Husakovic's avatar
      PR #1127 and PR #1150 · 8129ff14
      Anel Husakovic authored
      PR#1127: Fix is_check_constraints.result to be compatibile with 10.3
      
      The patch is done according to the original patch for MDEV-14474
      1edd09c325525cba33152 and not one which is merged on server
      d526679e.
      This patch includes:
      - Rename from `is_check_constraint` to `is_check_constraints` to tests
      and results
      - Per review, change the order of fields in IS check_constraints table by adding
      the column `table_name` before `constraint_name`. According to the standard
      2006 there is no `table_name` column.
      - Original patch and one in `10.3` supports embedded server this patch doesn't
      support. After the merge `10.3` will not support also.
      - Don't use patch c8b8b01b61 to change the length of `CHECK_CLAUSE` field
      
      PR#1150: MDEV-18440: Information_schema.check_constraints possible data leak
      
      This patch is extension of PR 1127 and includes:
      - Check for table grants
      - Additional test according to the MDEV specification
      Signed-off-by: default avatarVicențiu Ciorbaru <vicentiu@mariadb.org>
      8129ff14
    • Sergei Golubchik's avatar
      tokudb: disable check_huge_pages_in_practice() · 794911a2
      Sergei Golubchik authored
      crashes on Debian 10
      794911a2
    • Sergei Golubchik's avatar
      tokudb: fix to compile with gcc 9.2.0 · 91c3d998
      Sergei Golubchik authored
      91c3d998
  11. 12 Dec, 2019 2 commits
    • Eugene Kosov's avatar
      MDEV-20950 Reduce size of record offsets · f0aa073f
      Eugene Kosov authored
      offset_t: this is a type which represents one record offset.
      It's unsigned short int.
      
      a lot of functions: replace ulint with offset_t
      
      btr_pcur_restore_position_func(),
      page_validate(),
      row_ins_scan_sec_index_for_duplicate(),
      row_upd_clust_rec_by_insert_inherit_func(),
      row_vers_impl_x_locked_low(),
      trx_undo_prev_version_build():
        allocate record offsets on the stack instead of waiting for rec_get_offsets()
        to allocate it from mem_heap_t. So, reducing  memory allocations.
      
      RECORD_OFFSET, INDEX_OFFSET:
        now it's less convenient to store pointers in offset_t*
        array. One pointer occupies now several offset_t. And those constant are start
        indexes into array to places where to store pointer values
      
      REC_OFFS_HEADER_SIZE: adjusted for the new reality
      
      REC_OFFS_NORMAL_SIZE:
        increase size from 100 to 300 which means less heap allocations.
        And sizeof(offset_t[REC_OFFS_NORMAL_SIZE]) now is 600 bytes which
        is smaller than previous 800 bytes.
      
      REC_OFFS_SEC_INDEX_SIZE: adjusted for the new reality
      
      rem0rec.h, rem0rec.ic, rem0rec.cc:
        various arguments, return values and local variables types were changed to
        fix numerous integer conversions issues.
      
      enum field_type_t:
        offset types concept was introduces which replaces old offset flags stuff.
        Like in earlier version, 2 upper bits are used to store offset type.
        And this enum represents those types.
      
      REC_OFFS_SQL_NULL, REC_OFFS_MASK: removed
      
      get_type(), set_type(), get_value(), combine():
        these are convenience functions to work with offsets and it's types
      
      rec_offs_base()[0]:
        still uses an old scheme with flags REC_OFFS_COMPACT and REC_OFFS_EXTERNAL
      
      rec_offs_base()[i]:
        these have type offset_t now. Two upper bits contains type.
      f0aa073f
    • Vlad Lesin's avatar
      MDEV-21255: Deadlock of parallel slave and mariabackup (with failed log · beec9c0e
      Vlad Lesin authored
      copy thread)
      
      mariabackup hangs waiting until innodb redo log thread read log till certain
      LSN, and it waits under FTWRL. If there is redo log read error in the thread,
      it is finished, and main thread knows nothing about it, what leads to hanging.
      As it hangs under FTWRL, slave threads on server side can be blocked due
      to MDL lock conflict.
      
      The fix is to finish mariabackup with error message on innodb redo log read
      failure.
      beec9c0e
  12. 11 Dec, 2019 6 commits
  13. 10 Dec, 2019 3 commits
    • Marko Mäkelä's avatar
      Cleanup test sys_vars.innodb_buffer_pool_size_basic · f2d3b2ee
      Marko Mäkelä authored
      When using huge pages, the innodb_buffer_pool_size cannot necessarily
      be restored. Simplify things by restarting the server.
      f2d3b2ee
    • Marko Mäkelä's avatar
      MDEV-14482 - Cache line contention on ut_rnd_interval() · 41e6a154
      Marko Mäkelä authored
      InnoDB RNG maintains global state, causing otherwise unnecessary bus
      traffic. Even worse, this is cross-mutex traffic. That is, different
      mutexes suffer from contention.
      
      Fixed delay of 4 was verified to give best throughput by OLTP update
      index and read-write benchmarks on Intel Broadwell (2/20/40) and
      ARM (1/46/46).
      
      This is a backport of ce047900 from
      MariaDB Server 10.3.
      41e6a154
    • Marko Mäkelä's avatar
      MDEV-21256: Replace the 64-bit LCG with a 32-bit Galois LFSR · b1f2d3a8
      Marko Mäkelä authored
      We should not need anywhere near 32 bits of entropy, so we might
      just limit ourselves to a 32-bit random number generator.
      
      Also, it might be cheaper to use exclusive-or, bit shifting and
      conditional jumps, instead of multiplication and addition.
      
      We use relaxed atomic operations on the global random number generator
      state in order in an attempt to silence any warnings about race conditions.
      There is an obvious race condition between the load and store in
      ut_rnd_gen(), but we do not think that it matters much that the
      state of the random number generator could 'stutter'.
      
      This change seems makes the 'uncompress_ops' nondeterministic
      in innodb_zip.cmp_per_index after the restart. It looks like
      there is an inherent race condition in the test, because the
      table could be opened for InnoDB statistics recalculation
      already before innodb_cmp_per_index_enabled was set. We might
      end up having uncompress_ops anywhere between 0 and 9, or perhaps
      even more. Let us remove that part of the test.
      b1f2d3a8