1. 15 Apr, 2020 2 commits
  2. 14 Apr, 2020 2 commits
  3. 13 Apr, 2020 5 commits
  4. 12 Apr, 2020 1 commit
  5. 10 Apr, 2020 1 commit
    • Sergey Vojtovich's avatar
      MDEV-21599 - plugins.server_audit fails sporadically in buildbot · 06219c2a
      Sergey Vojtovich authored
      Fixed a couple of race conditions in the test case to ensure stable order
      of events. Also removed all sleeps. Test execution time is down from 18s
      to 0.15s.
      
      On disconnect audit event is triggered after control is returned to
      mysqltest client. Which means mysqltest may issue more commands
      concurrently before disconnect is actually logged.
      
      Similar problem happens with regular query execution: an event is
      triggered after control is returner to the client. Which may end
      up with unstable order of events in different connections.
      
      Delayed insert rows are enqueued separately and can either be combined
      into single event or go as separate events. Reduced number of inserted
      rows to 1 to stabilize result.
      
      Also backported 2b3f6ab4 from 10.5.
      06219c2a
  6. 08 Apr, 2020 3 commits
    • Varun Gupta's avatar
      MDEV-22191: Range access is not picked when index_merge_sort_union is turned off · c1394ab6
      Varun Gupta authored
      When index_merge_sort_union is turned off only ror scans were considered for range
      scans, which is wrong.
      To fix the problem ensure both ror scans and non ror scans are considered for range
      access
      c1394ab6
    • Julius Goryavsky's avatar
      MDEV-20676: systemd script not working · c8e0c524
      Julius Goryavsky authored
      When trying to start mariadb via systemctl, WSREP failed
      to start mysqld for wsrep recovery, because the binary
      "galera-recovery" is neither searching the mysqld in the
      same folder as the binary itself nor in the path variable
      but instead expects the root to be /usr/local/mysql.
      
      This fix changes the current directory to the desired
      directory before starting mysqld.
      c8e0c524
    • Sergei Golubchik's avatar
      fix rocksdb compression detection · d565895b
      Sergei Golubchik authored
      cmake module name is BZip2, not BZIP2.
      variable names are WITH_ROCKSDB_zstd and WITH_ROCKSDB_snappy.
      it's SNAPPY_FOUND in older cmake (and both in newer cmake).
      also, make it verbose.
      d565895b
  7. 07 Apr, 2020 2 commits
    • Vlad Lesin's avatar
      MDEV-21168: Active XA transactions stop slave from working after backup · 5836191c
      Vlad Lesin authored
      was restored.
      
      Optionally rollback prepared XA's on "mariabackup --prepare".
      
      The fix MUST NOT be ported on 10.5+, as MDEV-742 fix solves the issue for
      slaves.
      5836191c
    • Rasmus Johansson's avatar
      MDEV-22176 Add JUnit support to MTR to generate XML test result · 5720db2b
      Rasmus Johansson authored
      A new parameter has been added called xml-report, with which the
      filename of the XML file is given to which the XML result is
      written. There is also xml-package for adding a package value in
      the XML output. Example usage:
      ./mysql-test-run.pl main.events_bugs innodb.count_distinct
      main.explain_json innodb.file_format_defaults json.json_no_table
      --suite=main,innodb,json --force --xml-report=build123456789.xml
      --xml-package=simpletestrun
      5720db2b
  8. 05 Apr, 2020 3 commits
  9. 04 Apr, 2020 1 commit
    • Igor Babaev's avatar
      MDEV-21673 Calling stored procedure twice in the same session causes MariaDB to crash · 21b87437
      Igor Babaev authored
      This bug could happen only with a stored procedure containing queries with
      more than one reference to a CTE that used local variables / parameters.
      
      This bug was the result of an incomplete merge of the fix for the bug
      MDEV-17154. The merge covered usage of parameter markers occurred in a CTE
      that was referenced more than once, but missed coverage of local variables.
      21b87437
  10. 03 Apr, 2020 3 commits
  11. 02 Apr, 2020 4 commits
    • Aleksey Midenkov's avatar
      MDEV-20515 multi-update tries to position updated table by null reference · 0932c580
      Aleksey Midenkov authored
      Cause
      
      Join tmp table inserts null row because of OUTER JOIN, that's
      expected. Since `multi_update::prepare2()` converted
      `Item_temptable_rowid` into `Item_field` (28dbdf3d)
      `multi_update::send_data()` accesses join tmp record directly and
      treats it as a normal row ignoring null status of ref field. NULL ref
      field is then treated as normal in `multi_update::do_updates()` which
      tries to position updated table by reference 0.
      
      Note that reference 0 may be valid reference and the first row of
      table can be wrongly updated (see multi_update.test).
      
      Fix
      
      Do not add row into multi-update tmp table in case of null ref
      field. Join tmp table does not have null_row status at this time (as
      well as `STATUS_NULL_ROW`) and cannot be skipped by these properties
      (see first comment in multi_update::send_data()). But it has all null
      fields (including the ref field).
      0932c580
    • Aleksey Midenkov's avatar
      MDEV-21688 Assertion or ER_WARN_DATA_OUT_OF_RANGE upon ALTER on previously versioned table · ba34f409
      Aleksey Midenkov authored
      Earlier skip of history row. Cleanup of dead code for VTMD.
      ba34f409
    • Aleksey Midenkov's avatar
      MDEV-21342 Assertion in set_ok_status() upon spatial field error on system-versioned table · 44c6c7a9
      Aleksey Midenkov authored
      SQL_SELECT::check_quick() returns error status only
      test_quick_select() returns -1. Fix error handling when lower frames
      throw error, but it is ignored by test_quick_select(). Fix return
      status for out-of-memory errors which are obviously must be processed
      as error in upper frames.
      44c6c7a9
    • Nikita Malyavin's avatar
      MDEV-17091 - Assertion failed after dropping versioning · 9149017b
      Nikita Malyavin authored
      Assertion `old_part_id == m_last_part' failed in ha_partition::update_row or `part_id == m_last_part' in ha_partition::delete_row upon UPDATE/DELETE after dropping versioning
      
      PRIMARY KEY change hadn't been treated as partition reorganization in case of partitioning by KEY() (without parameters).
      
      * set `*partition_changed= true` in the described case.
      * since add/drop system versioning does not affect alter_info->key_list, it required separate attention
      9149017b
  12. 01 Apr, 2020 8 commits
    • Sergey Vojtovich's avatar
      MDEV-21348 - column compression memory leak · b40b3720
      Sergey Vojtovich authored
      The Storage-Engine Independent Column Compression does not call
      deflateEnd() when deflate() does not return Z_STREAM_END.
      
      This for instance happens when the data is already (externally)
      compressed and deflate() needs more space than the original data.
      
      This patch is based on contribution by Martijn Broenland.
      b40b3720
    • Sergey Vojtovich's avatar
      A better fix for edd7e7c8 · 05e4a87c
      Sergey Vojtovich authored
      05e4a87c
    • Marko Mäkelä's avatar
      MDEV-19740: Have MYSQL_MAINTAINER_MODE only enable -Werror · 31eaa202
      Marko Mäkelä authored
      Let us enable all GCC and clang warnings independently of the
      MYSQL_MAINTAINER_MODE setting for both Debug and RelWithDebInfo
      builds, and have MYSQL_MAINTAINER_MODE only enable -Werror.
      
      The default setting of MYSQL_MAINTAINER_MODE=AUTO will continue
      to apply the -Werror only to CMAKE_BUILD_TYPE=Debug. To build
      a debug version without -Werror, MYSQL_MAINTAINER_MODE=OFF can
      be used.
      31eaa202
    • Oleksandr Byelkin's avatar
      MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error · cb4da5da
      Oleksandr Byelkin authored
      Added indication of truncated string for "s" and "M" formats
      cb4da5da
    • Marko Mäkelä's avatar
      MDEV-22035 Memory leak in main.mysqltest · a1846b7a
      Marko Mäkelä authored
      The test main.mysqltest could crash or hang with
      cmake -DWITH_ASAN=ON builds. The reason appears to be
      a memory leak, which was found out by manually invoking
      
      echo --replace_regex a > file
      ASAN_OPTIONS=log_path=/dev/shm/asan mysqltest ... < file
      
      and then examining the /dev/shm/asan.* file.
      a1846b7a
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.1 · f813131c
      Marko Mäkelä authored
      f813131c
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · bc862c4e
      Marko Mäkelä authored
      bc862c4e
    • Marko Mäkelä's avatar
      MDEV-13626: Improve innodb.xa_recovery_debug · b1742a5c
      Marko Mäkelä authored
      Improve the test that was imported and adapted for MariaDB in
      commit fb217449.
      
      row_undo_step(): Move the DEBUG_SYNC point from trx_rollback_for_mysql().
      This DEBUG_SYNC point is executed after rolling back one row.
      
      trx_rollback_for_mysql(): Clarify the comments that describe the scenario,
      and remove the DEBUG_SYNC point.
      
      If the statement "if (trx->has_logged_persistent())" and its body are
      removed from trx_rollback_for_mysql(), then the test
      innodb.xa_recovery_debug will fail because the transaction would still
      exist in the XA PREPARE state. If we allow the XA COMMIT statement
      to succeed in the test, we would observe an incorrect state of the
      XA transaction where the table would contain row (1,NULL). Depending
      on whether the XA transaction was committed, the table should either
      be empty or contain the record (1,1). The intermediate state of
      (1,NULL) should never be observed after completed recovery.
      b1742a5c
  13. 31 Mar, 2020 2 commits
    • Marko Mäkelä's avatar
      MDEV-13626: Import and adapt innodb.xa_recovery_debug · fb217449
      Marko Mäkelä authored
      Adapt the test that was added in
      mysql/mysql-server@6b65d9032cbb6c1016cb09d056df6885e3d25dc6
      but omitted in commit 2e814d47.
      
      Instead of triggering a log checkpoint, we will only trigger
      a redo log flush before killing the server.
      Note: the mtr.commit() call in trx_rollback_for_mysql()
      will not actually make the undo log header page state change durable.
      A call to log_write_up_to(mtr.commit_lsn(), true) would do that.
      
      It is unclear what the originally reported bug scenario was.
      As long as innobase_rollback_by_xid() will not return without
      ensuring that the redo log has been durably written, we should be safe.
      fb217449
    • mkaruza's avatar
      MDEV-22021: Galera database could get inconsistent with rollback to savepoint · 2d16452a
      mkaruza authored
      When binlog is disabled, WSREP will not behave correctly when
      SAVEPOINT ROLLBACK is executed since we don't register handlers for such case.
      Fixed by registering WSREP handlerton for SAVEPOINT related commands.
      2d16452a
  14. 30 Mar, 2020 3 commits
    • Eugene Kosov's avatar
      MDEV-22074 UBSAN: applying zero offset to null pointer in hash.c · 50014876
      Eugene Kosov authored
      The fix: return fast when no work should be performed.
      50014876
    • Eugene Kosov's avatar
      MDEV-22069 UBSAN: runtime error: member access within null pointer of type... · edd7e7c8
      Eugene Kosov authored
      MDEV-22069 UBSAN: runtime error: member access within null pointer of type 'MY_DIR_HANDLE' in mysys/my_lib.c
      
      This is an error handling bug. When opendir() fails dirh is NULL and
      we shouldn't try to free it.
      edd7e7c8
    • Marko Mäkelä's avatar
      MDEV-20590 Introduce a file format constraint to ALTER TABLE · b092d35f
      Marko Mäkelä authored
      If a table is altered using the MDEV-11369/MDEV-15562/MDEV-13134
      ALGORITHM=INSTANT, it can force the table to use a non-canonical
      format:
      
      * A hidden metadata record at the start of the clustered index
      is used to store each column's DEFAULT value. This makes it possible
      to add new columns that have default values without rebuilding the table.
      
      * Starting with MDEV-15562 in MariaDB Server 10.4, a BLOB in the
      hidden metadata record is used to store column mappings. This makes
      it possible to drop or reorder columns without rebuilding the table.
      This also makes it possible to add columns to any position or drop
      columns from any position in the table without rebuilding the table.
      
      If a column is dropped without rebuilding the table, old records
      will contain garbage in that column's former position, and new records
      will be written with NULL values, empty strings, or dummy values.
      
      This is generally not a problem. However, there may be cases where
      users may want to avoid putting a table into this format.
      For example, users may want to ensure that future UPDATE operations
      after an ADD COLUMN will be performed in-place, to reduce write
      amplification. (Instantly added columns are essentially always
      variable-length.) Users might also want to avoid bugs similar to
      MDEV-19916, or they may want to be able to export tables to
      older versions of the server.
      
      We will introduce the option innodb_instant_alter_column_allowed,
      with the following values:
      
      * never (0): Do not allow instant add/drop/reorder,
      to maintain format compatibility with MariaDB 10.x and MySQL 5.x.
      If the table (or partition) is not in the canonical format, then
      any ALTER TABLE (even one that does not involve instant column
      operations) will force a table rebuild.
      
      * add_last (1, default in 10.3): Store a hidden metadata record that
      allows columns to be appended to the table instantly (MDEV-11369).
      In 10.4 or later, if the table (or partition) is not in this format,
      then any ALTER TABLE (even one that does not involve column changes)
      will force a table rebuild.
      
      Starting with 10.4:
      
      * add_drop_reorder (2, default): Like 'add_last', but allow the
      metadata record to store a column map, to support instant
      add/drop/reorder of columns (MDEV-15562).
      b092d35f