1. 14 Apr, 2022 2 commits
  2. 13 Apr, 2022 3 commits
    • Sergei Golubchik's avatar
      cleanup: un-inline dtype_get_mblen() · f7f0bc74
      Sergei Golubchik authored
      per Marko request
      f7f0bc74
    • Sergei Golubchik's avatar
      MDEV-27767 poor scaling with InnoDB and utf8mb3 because of charset stats · fc839644
      Sergei Golubchik authored
      Access the all_charsets[] array directly in a hot loop.
      This avoids get_charset() that increments a shared counter via
      my_collation_statistics_inc_use_count(), causing a scalability issue.
      
      Instead, call get_charset() when a table is opened (and InnoDB
      fills in dtype_t values) - this is enough, as charset is marked
      ready (MY_CS_READY) only once, on the first get_charset() call,
      after that it can be accessed directly.
      
      This also fixes a potential bug in InnoDB. It used to access charsets
      directly when filling dtype_t values. This wasn't preceded by any
      get_charset() call inside InnoDB. Normally the server would call
      get_charset() on reading the frm, but if the table was first opened
      from a purge thread InnoDB could, theoretically, access a not-ready
      charset in innobase_get_cset_width().
      fc839644
    • Oleksandr Byelkin's avatar
      MDEV-28266 Crash in Field_string::type_handler when calling procedures · 5615a78a
      Oleksandr Byelkin authored
      on_table_fill_finished() should always be done at the end of open()
      even if result is not Select_materialize but (for example)
      Select_fetch_into_spvars.
      5615a78a
  3. 12 Apr, 2022 4 commits
  4. 11 Apr, 2022 4 commits
  5. 10 Apr, 2022 2 commits
  6. 09 Apr, 2022 2 commits
  7. 08 Apr, 2022 1 commit
    • Nayuta Yanagisawa's avatar
      MDEV-27239 Spider: Assertion `thd->transaction->stmt.ha_list == __null ||... · d8463b64
      Nayuta Yanagisawa authored
      MDEV-27239 Spider: Assertion `thd->transaction->stmt.ha_list == __null || trans == &thd->transaction->stmt' failed in ha_commit_trans on BEGIN WORK after FTWRL
      
      The check on the SQL command type, in ha_spider::external_lock() is deleted
      by e954d9de. This resulted in the wrong call of spider_internal_start_trx()
      (and thus Ha_trx_info::register_ha()).
      
      I reverted the check and refactored ha_spider::external_lock().
      d8463b64
  8. 07 Apr, 2022 9 commits
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 6645b1d2
      Marko Mäkelä authored
      6645b1d2
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 7b957316
      Marko Mäkelä authored
      7b957316
    • Daniel Black's avatar
      deb: make --output-sync=target · dea4e178
      Daniel Black authored
      Rather than Debian logs containing a barely decipherable mix
      of build command and the output of some other command, we
      use the make option --output-sync=target. This make the compile
      line and the output stay together in the output stream.
      
      This option exists even in the make version in debian;stretch
      so should work everywhere.
      
      Test on debian:stretch, ubuntu:18.04, the two lowest version that
      use the debian/rules.
      dea4e178
    • Daniel Black's avatar
      MDEV-28153: Debian autobake to generate control · 8990ffe6
      Daniel Black authored
      Without doing the full build.
      
      Autobake now includes a dependency on lsb-release.
      
      As the BB CI images
      (https://github.com/MariaDB/mariadb.org-tools/blob/master/buildbot.mariadb.org/ci_build_images/debian.Dockerfile)
      have explicit dependencies, there's no point maintaining them in
      two places. We don't want do the full autobake-deb.sh there, just enough
      to have the control file containing the correct dependencies.
      
      Helps: https://github.com/MariaDB/mariadb.org-tools/pull/130
      8990ffe6
    • Jan Lindström's avatar
      MDEV-28247 : Disable background ibuf merge during Galera SST · 3c99a48d
      Jan Lindström authored
      This failure was caused by MDEV-25975, which removed the parameter
      innodb_disallow_writes.
      
      Added a check for wsrep_sst_disable_writes to the function
      ibuf_merge_in_background().
      3c99a48d
    • Daniel Black's avatar
      MDEV-28250 aix test case failure innodb_zip.innochecksum_3,4k,crc32,innodb · 4ee00a29
      Daniel Black authored
      As discovered by tracing, but also presenting in AIX fseeko
      documentation, seeking beyond the EOF is acceptable, as you can write
      there.
      
      To display the same error in AIX to other implementations that return
      errors on seek, we take the EFBIG error code on reading and error the
      same way.
      
      An AIX truss of an aspect of the test:
      
      truss extra/innochecksum --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
      
        statx("./mysql-test/var/log/innodb_zip.innochecksum_3-4k,crc32,innodb/mysqld.1/data//test/tab1.ibd", 0x0FFFFFFFFFFFF610, 176, 010) = 0
        kopen("./mysql-test/var/log/innodb_zip.innochecksum_3-4k,crc32,innodb/mysqld.1/data//test/tab1.ibd", O_RDONLY|O_LARGEFILE) = 3
        kfcntl(3, 12, 0x00000001100006C8)               = 0
        kfcntl(3, F_GETFL, 0x00000001100A6CF8)          = 67108864
        kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
        klseek(3, 0, 1, 0x0FFFFFFFFFFFF3F0)             = 0
        kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
        kread(3, "DEADBEEF\0\0\0\0FFFFFFFF".., 4096)    = 4096
        klseek(3, 0, 1, 0x0FFFFFFFFFFFF450)             = 0
        klseek(3, 17592186040320, 0, 0x0FFFFFFFFFFFF450) = 0
        klseek(3, 0, 1, 0x0FFFFFFFFFFFF3F0)             = 0
        kread(3, "DEADBEEF\0\0\0\0FFFFFFFF".., 4096)    Err#27 EFBIG
      
      An equivalent Linux trace:
      
      ltrace extra/innochecksum --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
      
        stat64(0x7fff10ea2dc3, 0x7fff10ea0670, 88, 0x8026be41)         = 0
        open64("./mysql-test/var/log/innodb_zip."..., 0, 02072403160)  = 3
        fcntl64(3, 6, 0x139f180, 1)                                    = 0
        fgetpos64(0x615000000080, 0x7fff10ea0760, 1, 0)                = 0
        fseeko64(0x615000000080, 0xffffffff000, 0, 5 <unfinished ...>
        pthread_getspecific(0, 0x4d0eb8, 0x7fff10ea0490, 0)            = 0x7f7b2806d000
        <... fseeko64 resumed> )                                       = 0
        fgetpos64(0x615000000080, 0x7fff10ea0760, 1, 1)                = 0
        feof(0x615000000080)                                           = 0
        feof(0x615000000080)                                           = 1
        Error: Unable to seek to necessary offset
      4ee00a29
    • Daniel Black's avatar
      e84e134a
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-27783 InnoDB: Failing assertion: table->get_ref_count() == 0 upon ALTER... · 27b0030b
      Thirunarayanan Balathandayuthapani authored
      MDEV-27783 InnoDB: Failing assertion: table->get_ref_count() == 0 upon ALTER TABLE ... MODIFY COLUMN
      
      - There is a race condition occurs between purge thread and DDL.
      So purge thread can increment n_ref_count even after DDL does
      purge_sys_t::stop_FTS().
      
      - dict_table_open_on_id for purge thread should check
      purge_sys.must_wait_FTS() before acquring the table.
      
      - purge_sys.stop_FTS() does acquire dict_sys.latch for setting
      the purge system flag and check table ref count on auxilary tables.
      27b0030b
    • Alexander Barkov's avatar
  9. 06 Apr, 2022 13 commits
    • Marko Mäkelä's avatar
      MDEV-26781 InnoDB hangs when using SUX_LOCK_GENERIC · 4e1ca388
      Marko Mäkelä authored
      The Shared/Update/Exclusive locks that were introduced in
      commit 03ca6495 (MDEV-24142)
      did not work correctly when a futex-like system call interface
      was not available.
      
      On all tested implementations (IBM AIX as well as FreeBSD and GNU/Linux
      with the futex interface artificially disabled), the old implementation
      would cause hangs in some SPATIAL INDEX tests (innodb_gis suite).
      On FreeBSD, a hang was also observed in an encryption test.
      
      We will simply emulate the futex system calls with a single mutex
      and two condition variables, one for each wait queue. The condition
      variables basically shadow the lock words and are used as wait queues,
      just like the futex system calls would be.
      
      The storage overhead of ssux_lock_impl will be increased by 32 bits
      when using SUX_LOCK_GENERIC. Compared to the futex-based implementation,
      the SUX_LOCK_GENERIC implementation has an overhead of
      sizeof(pthread_mutex_t)+2*sizeof(pthread_cond_t).
      
      rw_lock: Remove all SUX_LOCK_GENERIC extensions.
      
      pthread_mutex_wrapper: A simple wrapper of pthread_mutex that
      implements srw_spin_mutex and srw_mutex for SUX_LOCK_GENERIC.
      
      srw_mutex_impl: Define this also for SUX_LOCK_GENERIC, but in
      that case add the fields mutex, cond.
      
      ssux_lock_impl: Define for SUX_LOCK_GENERIC with a minimal difference:
      adding readers_cond.
      4e1ca388
    • Marko Mäkelä's avatar
      MDEV-25975: Merge 10.5 into 10.6 · ff994138
      Marko Mäkelä authored
      ff994138
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · 9d94c60f
      Marko Mäkelä authored
      9d94c60f
    • Marko Mäkelä's avatar
      MDEV-13005 after-merge fixup · fd6a464a
      Marko Mäkelä authored
      fd6a464a
    • Marko Mäkelä's avatar
      MDEV-25975: Merge 10.4 into 10.5 · 5d8dcfd8
      Marko Mäkelä authored
      5d8dcfd8
    • Marko Mäkelä's avatar
      MDEV-25975 merge fixup · cbdf62ae
      Marko Mäkelä authored
      cbdf62ae
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · cacb61b6
      Marko Mäkelä authored
      cacb61b6
    • Marko Mäkelä's avatar
      MDEV-25975: Merge 10.3 into 10.4 · d172df99
      Marko Mäkelä authored
      d172df99
    • Marko Mäkelä's avatar
      MDEV-23328 fixup: sign mismatch in format strings · f089f8d9
      Marko Mäkelä authored
      kill_one_thread(): Fix integer sign mismatch in some format strings.
      Some of this was introduced
      in commit 5c230b21
      f089f8d9
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · d6d66c6e
      Marko Mäkelä authored
      d6d66c6e
    • sjaakola's avatar
      MDEV-23328 Server hang due to Galera lock conflict resolution · d6758efb
      sjaakola authored
      Cherry-pick the sql_kill and sql_user_kill from ef2dbb8d
      
      Changed ER_CANNOT_USER to ER_KILL_DENIED_ERROR to match
      other kill denied user messages.
      
      Cherry-pick by Daniel Black.
      Reviewed-by: default avatarJan Lindström <jan.lindstrom@mariadb.com>
      d6758efb
    • Faustin Lammler's avatar
      Change MDBF mirror URL · aed87f1e
      Faustin Lammler authored
      As as discussed with @dbart we decided to move
      https://deb.mariadb.org/repo to https://deb.mariadb.org so that a
      request on https://deb.mariadb.org will end up directly in
      https://mirror.mariadb.org/repo.
      
      The same behavior was configured for rpms (https://rpm.mariadb.org -->
      https://mirror.mariadb.org/yum) this also makes the old yum.mariadb.org
      service transparently compatible with this new service (after DNS change
      to point to rpm.mariadb.org).
      
      See also: https://jira.mariadb.org/browse/MDBF-297
      aed87f1e
    • Marko Mäkelä's avatar
      MDEV-25975 innodb_disallow_writes causes shutdown to hang · e9735a81
      Marko Mäkelä authored
      We will remove the parameter innodb_disallow_writes because it is badly
      designed and implemented. The parameter was never allowed at startup.
      It was only internally used by Galera snapshot transfer.
      If a user executed
      SET GLOBAL innodb_disallow_writes=ON;
      the server could hang even on subsequent read operations.
      
      During Galera snapshot transfer, we will block writes
      to implement an rsync friendly snapshot, as follows:
      
      sst_flush_tables() will acquire a global lock by executing
      FLUSH TABLES WITH READ LOCK, which will block any writes
      at the high level.
      
      sst_disable_innodb_writes(), invoked via ha_disable_internal_writes(true),
      will suspend or disable InnoDB background tasks or threads that could
      initiate writes. As part of this, log_make_checkpoint() will be invoked
      to ensure that anything in the InnoDB buf_pool.flush_list will be written
      to the data files. This has the nice side effect that the Galera joiner
      will avoid crash recovery.
      
      The changes to sql/wsrep.cc and to the tests are based on a prototype
      that was developed by Jan Lindström.
      
      Reviewed by: Jan Lindström
      e9735a81