1. 09 Dec, 2022 1 commit
    • 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
  2. 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
  3. 07 Dec, 2022 2 commits
  4. 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
  5. 03 Dec, 2022 1 commit
  6. 02 Dec, 2022 16 commits
  7. 01 Dec, 2022 1 commit
  8. 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
  9. 29 Nov, 2022 7 commits
  10. 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
  11. 27 Nov, 2022 1 commit
  12. 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
  13. 23 Nov, 2022 1 commit
  14. 22 Nov, 2022 2 commits
    • 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
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-28462 Race condition between instant alter and AHI access · 71c93fb8
      Thirunarayanan Balathandayuthapani authored
      - InnoDB AHI tries to access the concurrent instant alter column,
      leads to asan failure. Instant alter column should acquire the
      clustered index search latch in exclusive mode before changing
      the table cache definition.
      
      - Removed the default parameter for the function
      btr_search_drop_page_hash_index()
      
      - Addressed the DWITH_INNODB_AHI=0 compilation failure
      by passing two parameters from all callers of
      btr_search_drop_page_hash_index()
      71c93fb8
  15. 18 Nov, 2022 1 commit
    • Daniel Black's avatar
      MDEV-12274: Too many connections warning in error log (#2213) · f4a1298f
      Daniel Black authored
      Because of the default warning level, aborted unauthenticated
      connections are in the error log. These errors frequently occur
      in production environments because cancelled connectiosn occur
      all the time when web pages are shutdown.
      
      Rather than flood our user's errors log with these ordinary
      messages, lets push them down to the warning level at log-warnings=4
      level.
      
      Concept approved by Monty.
      f4a1298f
  16. 17 Nov, 2022 1 commit
    • Alexander Barkov's avatar
      MDEV-29473 UBSAN: Signed integer overflow: X * Y cannot be represented in type... · 6216a2df
      Alexander Barkov authored
      MDEV-29473 UBSAN: Signed integer overflow: X * Y cannot be represented in type 'int' in strings/dtoa.c
      
      Fixing a few problems relealed by UBSAN in type_float.test
      
      - multiplication overflow in dtoa.c
      
      - uninitialized Field::geom_type (and Field::srid as well)
      
      - Wrong call-back function types used in combination with SHOW_FUNC.
        Changes in the mysql_show_var_func data type definition were not
        properly addressed all around the code by the following commits:
          b4ff6456
          18feb62f
          0ee879ff
      
        Adding a helper SHOW_FUNC_ENTRY() function and replacing
        all mysql_show_var_func declarations using SHOW_FUNC
        to SHOW_FUNC_ENTRY, to catch mysql_show_var_func in the future
        at compilation time.
      6216a2df