1. 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
  2. 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
  3. 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
  4. 07 Dec, 2022 2 commits
  5. 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
  6. 03 Dec, 2022 1 commit
  7. 02 Dec, 2022 16 commits
  8. 01 Dec, 2022 1 commit
  9. 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
  10. 29 Nov, 2022 7 commits
  11. 28 Nov, 2022 2 commits
    • Christian Gonzalez's avatar
      MDEV-16735 Ensure mysql_upgrade works when changing alter_algorithm · 112870d7
      Christian Gonzalez authored
      MDEV-16735 describes how mysql_upgrade fails when alter_algorithm
      is set to a value different than 'DEFAULT'/'COPY'. It was marked as
      fixed by 0ee08683, but the fix didn't covered the possibility of having
      the global value of alter_algorithm set to something different than
      'DEFAULT'/'COPY'. To ensure that the upgrade process works properly
      regardless the global value of alter_altorithm, this commit force it's
      value to 'DEFAULT' (note the quotes) for the mysql_upgrade session.
      
      All new code of the whole pull request, including one or several files
      that are either new files or modified ones, are contributed under the
      BSD-new license. I am contributing on behalf of my employer
      Amazon Web Services, Inc.
      112870d7
    • Anel Husakovic's avatar
      MDEV-29348 rpl.rpl_rewrt_db test fails with [gdb,manual-gdb] with wrong parsing · 3d5ce043
      Anel Husakovic authored
      Reviewer: <serg@mariadb.com>
      Closes PR #2244
      3d5ce043
  12. 27 Nov, 2022 1 commit
  13. 24 Nov, 2022 1 commit
    • Nayuta Yanagisawa's avatar
      MDEV-29855 Crash with SPIDER_DIRECT_SQL and spider_udf_ds_use_real_table=1 · 162c1505
      Nayuta Yanagisawa authored
      The crash occurs because of the following call of TABLE_LIST::init_one_table():
      
        table_list.init_one_table(
          &table_list.db, &table_list.table_name, 0, TL_WRITE);
      
      One should not pass table_list.db and table_list.table_name to the function
      because it update the very members internally.
      
      The function is called previously, and there is no need to call it again.
      So, simply removing the call will resolve the problem.
      162c1505
  14. 23 Nov, 2022 1 commit
  15. 22 Nov, 2022 1 commit
    • Julius Goryavsky's avatar
      MDEV-29817: Issues with handling options for SSL CRLs (and some others) · f0820400
      Julius Goryavsky authored
      This patch adds the correct setting of the "--ssl-verify-server-cert"
      option in the client-side utilities such as mysqlcheck and mysqlslap,
      as well as the correct setting of the "--ssl-crl" option when executing
      queries on the slave side, and also add the correct option codes in
      the "sslopts-logopts.h" file (in the latter case, incorrect values
      are not a problem right now, but may cause subtle test failures in
      the future, if the option handling code changes).
      f0820400