1. 21 Dec, 2022 1 commit
  2. 20 Dec, 2022 2 commits
    • Vlad Lesin's avatar
      MDEV-30225 RR isolation violation with locking unique search · 3ddc00dc
      Vlad Lesin authored
      Before the fix next-key lock was requested only if a record was
      delete-marked for locking unique search in RR isolation level.
      There can be several delete-marked records for the same unique key,
      that's why InnoDB scans the records until eighter non-delete-marked record
      is reached or all delete-marked records with the same unique key are
      scanned.
      
      For range scan next-key locks are used for RR to protect scanned range from
      inserting new records by other transactions. And this is the reason of why
      next-key locks are used for delete-marked records for unique searches.
      
      If a record is not delete-marked, the requested lock type was "not-gap".
      When a record is not delete-marked during lock request by trx 1, and
      some other transaction holds conflicting lock, trx 1 creates waiting
      not-gap lock on the record and suspends. During trx 1 suspending the
      record can be delete-marked. And when the lock is granted on conflicting
      transaction commit or rollback, its type is still "not-gap". So we have
      "not-gap" lock on delete-marked record for RR. And this let some other
      transaction to insert some record with the same unique key when trx 1 is
      not committed, what can cause isolation level violation.
      
      The fix is to set next-key locks for both delete-marked and
      non-delete-marked records for unique search in RR.
      3ddc00dc
    • Yuchen Pei's avatar
      MDEV-29562 Spider table charset error should happen correctly. · 3f63aa18
      Yuchen Pei authored
      When trying to create a spider table with banned charsets including
      utf32, utf16, ucs2 and utf16le[1], spider should emit an error
      immediately, rather than wait until a separate statement that
      establishes a connection (e.g. SELECT). This also applies to ALTER
      TABLE statement that changes charsets.
      
      [1] https://mariadb.com/kb/en/server-system-variables/#character_set_clientSigned-off-by: default avatarYuchen Pei <yuchen.pei@mariadb.com>
      Reviewed-by: default avatarNayuta Yanagisawa <nayuta.yanagisawa@mariadb.com>
      3f63aa18
  3. 19 Dec, 2022 1 commit
  4. 16 Dec, 2022 2 commits
    • Lena Startseva's avatar
      MDEV-27691: make working view-protocol · 0ca3aaa7
      Lena Startseva authored
      Excluded one case from view-protocol in gis.test
      0ca3aaa7
    • Marko Mäkelä's avatar
      MDEV-30242 MTR fails to report stack traces of all threads by default · 9f8fc983
      Marko Mäkelä authored
      An unfortunate change to the default behavior of the handling of
      core dumps was implemented in
      commit e9be5428
      by making MTR_PRINT_CORE=small the default value, that is, to
      only display the stack trace of one thread in crash reports.
      Many if not most failures that occur in regression tests are
      sporadic and involve race conditions or deadlocks. To be able to
      analyze such failures, having the stack traces of all active threads
      is a must, because CI environments typically do not save any core dumps.
      
      While the environment variable MTR_PRINT_CORE could be set in CI
      environments to compensate for the unfortunate change, it is better
      to revert to the old default (dumping all threads) so that
      no explicit action will be required from maintainers of independent
      CI systems. In that case, if something fails once in a blue moon,
      we can have some hope of diagnosing it based on the output.
      
      We fix this regression by defaulting the unset environment variable
      MTR_PRINT_CORE to "medium".
      9f8fc983
  5. 15 Dec, 2022 2 commits
    • musvaage's avatar
      debian typos · d0f6d467
      musvaage authored
      d0f6d467
    • Marko Mäkelä's avatar
      MDEV-30233 DROP DATABASE test fails: Directory not empty · c562ccf7
      Marko Mäkelä authored
      Some tests drop the default mtr database "test". This may fail due
      to the directory not being empty. InnoDB may not delete all tables
      immediately, due to the "background drop table queue" or its
      replacement in commit 1bd681c8
      (the purge of history would clean up after a DDL operation during
      which the server was killed).
      
      Let us try to avoid "drop database test" whenever it is easily possible.
      Where it is not, SET GLOBAL innodb_max_purge_lag_wait=0 will ensure
      that the replacement of the "background drop table queue" will have
      completed its job.
      c562ccf7
  6. 13 Dec, 2022 2 commits
    • Daniel Black's avatar
      MDEV-21187: log_slow_filter="" logs queries not using indexes · 697dbd15
      Daniel Black authored
      Consistent with MDEV-4206 and empty log_slow_filter still means
      no explict filtering. Since 21518ab2 however the
      log_queries_not_using_indexes became stored in the same variable.
      
      As we need to test for the absense of log_queries_not_using_indexes
      the SERVER_QUERY_NO_INDEX USED part of log_slow_statement, the empty
      criteria resulted in an always true to log queries not using indexes if
      log_slow_filter was set to empty.
      
      Adjusted the log_slow.test for MDEV-4206 as slow_log_query has been
      global and session for a while and it was relying on the MDEV-21187
      buggy behavior to detect a slow query.
      
      Reviewer: Monty
      697dbd15
    • Daniel Black's avatar
      MDEV-18591: mysql_install_db - pass --log-error to mysqld in install (#2363) · acfaa045
      Daniel Black authored
      Previously we parsed it out in mysql_install_db for use in the error
      message, but failed to pass it to mysqld in the bootstrap.
      
      Also match log_error as it might appear in the .cnf files.
      
      Thanks Michal Schorm for the test case.
      
      Reviewed by: Faustin Lammler
      acfaa045
  7. 09 Dec, 2022 2 commits
    • Julius Goryavsky's avatar
      MDEV-29814: galera_var_notify_ssl_ipv6 causes testing system to hang · 8f309732
      Julius Goryavsky authored
      This commit fixes the test system hanging due to
      the galera_var_notify_ssl_ipv6 test and also brings
      the wsrep_notify[_ssl].sh files in line with each other
      between the user template and the mtr suite.
      
      Quotes are also added here to avoid problems if the
      user specifies the value of one of the variables at the
      beginning of the file containing shell-specific characters,
      for example, if the password or username specified in the
      PSWD and USER variables will contain the "$" character.
      
      Also fixed an issue with automatic --ssl-verify-server-cert
      option substitution when the corresponding value is set
      by the user to "1" or "on".
      
      Also fixed some tests here to avoid joining one of the nodes
      to another cluster when the nodes are restarted from the mtr
      side, which can lead to random failures when testing with
      buildbot.
      8f309732
    • Marko Mäkelä's avatar
      MDEV-29144 ER_TABLE_SCHEMA_MISMATCH or crash on DISCARD/IMPORT · 782b2a75
      Marko Mäkelä authored
      mysql_discard_or_import_tablespace(): On successful
      ALTER TABLE...DISCARD TABLESPACE, evict the table handle from the
      table definition cache, so that ha_innobase::close() will be invoked,
      like InnoDB expects to be the case. This will avoid an assertion failure
      ut_a(table->get_ref_count() == 0) during IMPORT TABLESPACE.
      
      ha_innobase::open(): Do not issue any ER_TABLESPACE_DISCARDED warning.
      Member functions for DML will do that.
      
      ha_innobase::truncate(), ha_innobase::check_if_supported_inplace_alter():
      Issue ER_TABLESPACE_DISCARDED warnings, to compensate for the removal of
      the warning in ha_innobase::open().
      
      row_quiesce_write_indexes(): Only write information about committed
      indexes. The ALTER TABLE t NOWAIT ADD INDEX(c) in the nondeterministic
      test case will most of the time fail due to a metadata lock (MDL) timeout
      and leave behind an uncommitted index.
      
      Reviewed by: Sergei Golubchik
      782b2a75
  8. 08 Dec, 2022 1 commit
    • Daniel Black's avatar
      MDEV-30150 ST_GeomFromGeoJSON, 'geometry' before 'type: feature' error · 8f3631d0
      Daniel Black authored
      The geometry type requires Type:"Feature" but the feature need
      not be first in the JSON structure.
      
      Adjust code to return an error if geometry isn't a JSON object,
      but continue parsing searching for Type: "Feature" to trigger
      the geometry parsing.
      
      Thanks Derick Magnusen for the bug report.
      8f3631d0
  9. 07 Dec, 2022 2 commits
  10. 05 Dec, 2022 1 commit
    • Anel Husakovic's avatar
      dgcov: parsing without dot to get specific version · a59dffb0
      Anel Husakovic authored
      - Regression introduced 7baf24a0 for multidigit gcc dump.
      There is no dot in `dumpversion`.
      ```
      $ gcc -dumpversion
      10
      ```
      Otherwise it will fail and not produce the output
      ```
      Running dgcov
      Name "IO::Uncompress::Gunzip::GunzipError" used only once: possible typo at ./dgcov.pl line 197.
      Cannot parse gcc -dumpversion: 9
      ```
      
      - The warning `once` is always generated:
      ```
      Running dgcov
      Name "IO::Uncompress::Gunzip::GunzipError" used only once: possible typo at ./dgcov.pl line 197.
      <number>
      ```
      Suppresing the line `Name "IO::Uncompress::Gunzip::GunzipError" used only once: possible typo at ./dgcov.pl line 197.`
      with the patch.
      
      - Reviewed by: <>
      a59dffb0
  11. 03 Dec, 2022 1 commit
  12. 02 Dec, 2022 16 commits
  13. 01 Dec, 2022 1 commit
  14. 30 Nov, 2022 1 commit
    • Vicențiu Ciorbaru's avatar
      MDEV-30023 Revoking Privilege on the Column Yields the Error · b527bfe8
      Vicențiu Ciorbaru authored
      The change from MDEV-29465 exposed a flaw in replace_column_table
      where again we were not properly updating the column-level bits.
      
      replace_table_table was changed in MDEV-29465 to properly update
      grant_table->init_cols, however replace_column_table still only
      modified grant_column->rights when the GRANT_COLUMN already existed.
      
      This lead to a missmatch between GRANT_COLUMN::init_rights and
      GRANT_COLUMN::rights, *if* the GRANT_COLUMN already existed.
      
      As an example:
      
      GRANT SELECT (col1) ...
      Here:
      For col1
      GRANT_COLUMN::init_rights and GRANT_COLUMN::rights are set to 1 (SELECT) in
      replace_column_table.
      
      GRANT INSERT (col1) ...
      Here, without this patch GRANT_COLUMN::init_rights is still 1 and
      GRANT_COLUMN::rights is 3 (SELECT_PRIV | INSERT_PRIV)
      
      Finally, if before this patch, one does:
      
      REVOKE SELECT (col1) ...
      
      replace_table_table will see that init_rights loses bit 1 thus it
      considers there are no more rights granted on that particular table.
      
      This prompts the whole GRANT_TABLE to be removed via the first revoke,
      when the GRANT_COLUMN corresponding to it should still have init_rights == 2.
      
      By also updating replace_column_table to keep init_rights in sync
      properly, the issue is resolved.
      
      Reviewed by <serg@mariadb.com>
      b527bfe8
  15. 29 Nov, 2022 5 commits