1. 16 May, 2020 5 commits
    • Otto Kekäläinen's avatar
      MDEV-21976: Re-disable main.udf, reverts mistake in merge b30a0131 · 5d85bc08
      Otto Kekäläinen authored
      This test was disabled in a135f0ab, but
      accidentally reverted during the merge in
      https://github.com/MariaDB/server/compare/0186b0a07760...b30a01314217
      
      Because it was a 3-way merge, the removal is not directly visible.
      It can be verified manually though:
      
        Line not changed:
        git diff a135f0ab..0186b0a0 mysql-test/unstable-tests
      
        Line removed:
        git diff a135f0ab..b30a0131 mysql-test/unstable-tests
      
      
      This commit fixes the Travis-CI build and makes the main 10.5 git branch
      green again on Travis-CI (and whatever else build environment that also
      is failing due to this test).
      
      Related: MDEV-22592
      5d85bc08
    • Otto Kekäläinen's avatar
      Deb: Create empty migrated-from-my.cnf-settings.conf for Buildbot tests · 91446c82
      Otto Kekäläinen authored
      The buildbot.askmonty.org has explicit tests that check that this file
      exists, thus to get tests pass, an empty placeholder must be created.
      Remove this once CI has been updated not to expect this file.
      91446c82
    • Otto Kekäläinen's avatar
      Deb: Stop using mariadb-service-convert · dab5698b
      Otto Kekäläinen authored
      We can't expect that users want to always convert their mysqld_safe
      settings on an upgrade. In its current form it will always run, and that
      seems unnecessary on every single installation.
      
      Also the script is buggy, leaks mysqld_safe output into the written file
      and since it gets syntax errors the whole mariadb.service will fail to
      work.
      dab5698b
    • Otto Kekäläinen's avatar
      Deb: Add manually dh_systemd_start snippets · 69964c44
      Otto Kekäläinen authored
      These do now show up automatically due to init and systemd customizations,
      so the handiest fix is to add them manually. This has been the praxis
      in downstream MariaDB packaging for a couple years now, and works fine.
      
      - Ensure service is loaded and started after installation,
        (fixes service start issues in Debian/Ubuntu upgrades where
        otherwise service mysql status stayed stopped)
      
      - Ensure service stopped before removal/purge
        (fixes unstopped processes detected by piuparts)
      
      - Ensure systemd daemon is reloaded after removal/purge when service
        has been removed
      69964c44
    • Otto Kekäläinen's avatar
      Deb: Add support for legacy init systems again · 764dd39c
      Otto Kekäläinen authored
      Partially reverts commit a4cc6fb9.
      
      While all current versions of Linux have systemd, support for traditional
      init.d is still needed e.g. on Linux subsystem on Windows, kFreeBSD and
      special variants of Debian/Ubuntu that for other reasons don't have
      systemd.
      
      Thus, re-introduce the init file that was remove, but this time with
      then name 'mariadb'.
      
      Supporting traditional sysv init in paraller with systemd is easy, since
      Debian has facilities for it.
      
      Also simplify and update salsa-ci.yml install/upgrade testing works
      for all previous MariaDB and MySQL releases without any excess quirks.
      
      Note that in fresh installs the salsa-ci.yml needs to run command
      'service mariadb status' to control the service, while on upgrades
      it is enough to run 'service mysql status', since the init.d/mysql
      file is left behind from previous install, along with some other
      config files such as /etc/default/mysql and /etc/mysql/* stuff.
      764dd39c
  2. 15 May, 2020 5 commits
    • Vladislav Vaintroub's avatar
      MDEV-22578 thread_pool_info crashes with clang6, using SSE instructions on unaligned memory · 69077dea
      Vladislav Vaintroub authored
      Apparently, in stats_reset_table(), the innocuous
      
        memset(&group->counters, 0, sizeof(group->counters));
      
      is converted by clang to SSE2 instructions.
      
      The problem is that "group" is not correctly aligned,
      despite  MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) in the thread_group_t
      declaration.
      
      It is not aligned because it was allocated with my_malloc, since
      commit fd9f1638, MDEV-5205. Previously all_groups was a
      statically allocated array.
      
      Fix is to remove MY_ALIGNED, and pad the struct instead.
      69077dea
    • Aleksey Midenkov's avatar
      Merge 10.4 into 10.5 · f2a94451
      Aleksey Midenkov authored
      f2a94451
    • Aleksey Midenkov's avatar
      MDEV-22563 Segfault on duplicate free of Item_func_in::array · a4996f95
      Aleksey Midenkov authored
      Same array instance in two Item_func_in instances. First Item_func_in
      instance is freed on table close. Second one is freed on
      cleanup_after_query().
      
      get_copy() depends on copy ctor for copying an item and hence does
      shallow copy for default copy ctor. Use build_clone() for deep copy of
      Item_func_in.
      a4996f95
    • Monty's avatar
      Fixed access to not initalized memory · 72789e4b
      Monty authored
      Most of the volations came from:
      sel_arg_range_seq_next(void*, st_key_multi_range*) (opt_range_mrr.cc:342)
      72789e4b
    • Jan Lindström's avatar
      MDEV-22494 : Galera assertion lock_sys.mutex.is_owned() at lock_trx_handle_wait_low · 523d67a2
      Jan Lindström authored
      Problem was that trx->lock.was_chosen_as_wsrep_victim variable was
      not set back to false after it was set true.
      
      wsrep_thd_bf_abort
      	Add assertions for correct mutex status and take necessary
      	mutexes before calling thd->awake_no_mutex().
      
      innobase_rollback_trx()
      	Reset trx->lock.was_chosen_as_wsrep_victim
      
      wsrep_abort_slave_trx()
      	Removed unused function.
      
      wsrep_innobase_kill_one_trx()
      	Added function comment, removed unnecessary parameters
      	and added debug assertions to enforce correct usage. Added
      	more debug output to help out on error analysis.
      
      wsrep_abort_transaction()
      	Added debug assertions and removed unused variables.
      
      trx0trx.h
      	Removed assert_trx_is_free macro and replaced it with
      	assert_freed() member function.
      
      trx_create()
      	Use above assert_free() and initialize wsrep variables.
      
      trx_free()
      	Use assert_free()
      
      trx_t::commit_in_memory()
      	Reset lock.was_chosen_as_wsrep_victim
      
      trx_rollback_for_mysql()
      	Reset trx->lock.was_chosen_as_wsrep_victim
      
      Add test case galera_bf_kill
      523d67a2
  3. 14 May, 2020 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-22555 Windows, packaging: binaries depend on vcruntime140_1.dll, which is not in MSI · 3bfe305c
      Vladislav Vaintroub authored
      When server is compiled with recent VS2019, then executables,
      have dependency on  vcruntime140_1.dll
      
      While we include the VC redistributable merge modules into our MSI package,
      those merge modules were stale (taken from older VS version, 2017)
      
      Since VS2019 brough new DLL dependency by introducing new exception handling
      https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64
      thus the old MSMs were not enough.
      
      The fix is to change logic in win/packaging/CMakeLists.txt to look up for
      the correct, new MSMs.
      
      The bug only affects 10.4,as we compile with static CRT before 10.4,
      and partly-statically(just vcruntime stub is statically linked, but not UCRT)
      after 10.4
      
      For the fix to work, it required also some changes on the build machine
      (vs_installer, modify VS2019 installation, add Individual Component
      "C++ 2019 Redistributable MSMs")
      3bfe305c
  4. 13 May, 2020 5 commits
  5. 12 May, 2020 6 commits
    • Alexander Barkov's avatar
      MDEV-20261 NULL passed to String::eq, SEGV, server crash, regression in 10.4 · 9f209681
      Alexander Barkov authored
      Type_handler_xxx::Item_const_eq() can handle only non-NULL values.
      The code in Item_basic_value::eq() did not take this into account.
      
      Adding a test to detect three different combinations:
      - Both values are NULLs, return true.
      - Only one value is NULL, return false.
      - Both values are not NULL, call Type_handler::Item_const_eq()
        to check equality.
      9f209681
    • Vlad Lesin's avatar
      MDEV-22398: mariabackup.innodb_xa_rollback fails on repeat · 218d20ff
      Vlad Lesin authored
      Flush LSN to system tablespace on innodb shutdown if XA is rolled back by
      mariabackup.
      218d20ff
    • Marko Mäkelä's avatar
      Merge mariadb-10.5.3 into 10.5 · 0186b0a0
      Marko Mäkelä authored
      0186b0a0
    • Daniel Bartholomew's avatar
      bump the VERSION · 9810e0a7
      Daniel Bartholomew authored
      9810e0a7
    • Marko Mäkelä's avatar
      Cleanup: Remove InnoDB wrappers of thd_charset(), thd_query_safe() · 0e6a5786
      Marko Mäkelä authored
      innobase_get_charset(), innobase_get_stmt_safe(): Remove.
      It is more efficient and readable to invoke thd_charset()
      and thd_query_safe() directly, without a non-inlined wrapper function.
      0e6a5786
    • Marko Mäkelä's avatar
      MDEV-22529 thd_query_safe() isn’t, causing InnoDB to hang · a2560b00
      Marko Mäkelä authored
      The function thd_query_safe() is used in the implementation of the
      following INFORMATION_SCHEMA views:
      
          information_schema.innodb_trx
          information_schema.innodb_locks
          information_schema.innodb_lock_waits
          information_schema.rocksdb_trx
      
      The implementation of the InnoDB views is in trx_i_s_common_fill_table().
      This function invokes trx_i_s_possibly_fetch_data_into_cache(),
      which will acquire lock_sys->mutex and trx_sys->mutex in order to
      protect the set of active transactions and explicit locks.
      While holding those mutexes, it will traverse the collection of
      InnoDB transactions. For each transaction, thd_query_safe() will be
      invoked.
      
      When called via trx_i_s_common_fill_table(), thd_query_safe()
      is acquiring THD::LOCK_thd_data while holding the InnoDB locks.
      This will cause a deadlock with THD::awake() (such as executing
      KILL QUERY), because THD::awake() could invoke lock_trx_handle_wait(),
      which attempts to acquire lock_sys->mutex while already holding
      THD::lock_thd_data.
      
      thd_query_safe(): Invoke mysql_mutex_trylock() instead of
      mysql_mutex_lock(). Return the empty string if the mutex
      cannot be acquired without waiting.
      a2560b00
  6. 11 May, 2020 11 commits
  7. 09 May, 2020 7 commits