Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View


Categories: connectors experimental galera main
Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

connectors experimental galera main
Thirunarayanan Balathandayuthapani
MDEV-40922  Compilation warning "'<anonymous>' may be used uninitialized" in RecordCallback constructor with GCC

Move the std::function callbacks into the members instead of copying
them, and pass the captureless FTS comparators as plain functions
instead of lambdas. This is to avoid GCC -Wmaybe-uninitialized false
positive in RecordCallback
Georgi (Joro) Kodinov
MDEV-40815: resolveip is not built for the minbuild cmake target

Added the resolveip target to the minbuild target.
Thirunarayanan Balathandayuthapani
MDEV-40621 InnoDB: Failing assertion: doc_id == src_node->last_doc_id

AuxRecordReader::default_word_processor(): InnoDB fails to consider
the ilist data can be stored externally while decoding the auxiliary
table record.
Sergei Petrunia
Fix ubsan failure with not a valid value for enum_mysql_show_type

It produced errors like:
  runtime error: load of value 19, which is not a valid value for
  type 'enum enum_mysql_show_type'

In order to get a correct server-side definition of enum_mysql_show_type,
one must include sql_plugin.h (see #define SHOW_always_last there) before
including include/mysql/plugin.h, either directly or indirectly.
Georgi (Joro) Kodinov
MDEV-39718: Produce Markdown plugin API documentation

Generated the plugin API headers using a shell script.
Fixed some doxygen comment mistakes in the headers.
Added a cmake conveninence target to generate the docs into $BUILD_DIR/docs
Added a main page for the API docs.
Included all of the existing group .md files into the CMake target
Leveraged moxygen 2.1.11's fixes to produce the full API docs in a single go
Removed the list of output .md files from the CMake target and switched to a
stamp file to avoid unnecessary rebuilds of the docs when the list of .md
files changes.
Addressed various review comments.
Monty
Removed some not needed checks and add a DBUG_ASSERT() for not covered code

- In ha_partition.cc:check_parallel_search(), remove check if
  item_field->field is null. This is not needed as the function is run
  after fix_field() which guarnatees that the field is always set.
- Added DBUG_ASSERT(new_field) to Item_field::fix_fields() to check if a
  select-list item, found by name or alias when resolving ORDER BY/GROUP
  BY/HAVING, can have field == 0. This error path is not covered by any
  mtr test.
bsrikanth-mariadb
Do not dump stats and const rows for read only engines' tables.

Stats for tables from engines such as Archive, S3, PerfSchema, and
Sequence shouldn't be recorded in the context. Similarly, const row
records should also not be stored in the context.

Added few tests for Sequence's engine tables like seq_1_to_5.
Marko Mäkelä
squash! e61cabc0a2ae1a58c401fc24bb9f25caab6dc9b5

Remove traces of HTON_CHECK_NEEDED_FOR_CREATE_OR_REPLACE
and handler::can_be_renamed_to_backup() that were made redundant by
MDEV-28933 (commit cffbb17480a6fba6bf8cb42d943833cca214b34a)
Georgi (Joro) Kodinov
Addendum to MDEV-20749's fix: addressed Kristian's comments on indenting and #ifdef-ing.
Sergei Petrunia
Make main.opt_context_load_stats_innodb test stable.

The query plan was not stable.
The test used to create table t1, and then do this in a loop:

  INSERT INTO t1 SELECT ...
  SELECT ... FROM t1;
  DELETE FROM t1;

Apparently deleted records could be purged faster or slower (there is
no way to wait for purge to complete) and this caused variation in
records_in_range() return value.

Changed the test to use TRUNCATE TABLE t1 instead of DELETE.
bsrikanth-mariadb
MDEV-40387: perfschema.misc fails on replay

Disable the testfile, as we don't capture context for performance schema
tables.
Sergei Golubchik
cleanup: mariadb-dump

remove dead code, handling of MariaDB/MySQL servers that didn't
have SQL_QUOTE_SHOW_CREATE.

SQL_QUOTE_SHOW_CREATE was added in 2000
(commit 5762523b788, MySQL 3.23.25-beta)
Monty
Added proper cleanup of main.cte_update_delete.test
Sergei Golubchik
MDEV-34805 post-review fixes

* keep `vec_len >= subdist_part * 2` logic in one place only
* keep "distance-greater-than" mode logic in one place only
* simplify VECTOR_DIMENSIONS (no need to have a special ctx->vec_len
  path if the other one always works)
* new plugin = maturity beta
* remove redundant casts, etc
* moved vector_indexes_fields_enum to the global scope to use it
  for setting schema->idx_field1/schema->idx_field2
* open the hlindex graph table, if needed, otherwise most values
  are unknown unless a user did vector search before
* added TABLE_CATALOG column
* remove CACHE_OVERFLOWS column, doesn't work as implemented,
  the fix is complex and isn't worth it
* add privilege checks (MDEV-40793)

in the test:
* prefer query_vertical for readability
* select all columns at least once
* select INDEX_SIZE even if engine-dependent, use rdiff files
* test how get_all_tables only open one specific table, and
  even only .frm file, if possible
bsrikanth-mariadb
MDEV-40383:innodb_gis.point_basic fails on replay

There are 2 problems: -
1. The REPLACE statement that is recorded doesn't store the
  value of geometry type field correctly.
2. The table definition that got recorded has fields with non-null constraint,
  and no default value is specified.
  Also, the "REPLACE INTO" statement that gets stored in the context,
  doesn't have any value specified for these non-null fields.

Solution is to: -
1. When using REPLACE INTO statement, store all the non-numeric values in HEX,
  whenever conversion from field's charset to output's charset is lossy.
2. Instead of storing only the column values that were projected in the
  query, store all the non-virtual column values into the recorded
  REPLACE INTO statement.

Implementation details: -
1. Introduce a new method is_charset_conversion_lossless() in filesort.cc,
  to check if the output charset to which field's data is being written to,
  results in a lossless conversion. If so, non-numeric values being witten
  using REPLACE INTO statement are stored in string representation,
  else they are converted to HEX.
2. Modify join_read_const(), and join_read_system() methods in sql_select.cc,
  and opt_sum_query() method in opt_sum.cc the following way: -
    a. Extend the read_set to make sure, we read all the non-virtual column
        using Optimizer_context_recorder::prepare_captured_row_read().
        This method also saves the original read_set.
    b. Read the row.
    c. Dump the row into the context when no error is noticed while
        reading. Irrespective of the error, restore back the read_set state to
        the original using Optimizer_context_recorder::finish_captured_row_read()
Sergei Golubchik
MDEV-33463 Add an option to truncate excessively long queries in the slow log
Sergei Petrunia
Code cleanup in JSON array-of-object reading, add unit tests.
bsrikanth-mariadb
MDEV-38701: Optimizer Context Replay: merge into 13.1 tree

Optimizer Context Replay feature allows one to record and replay
a query's Optimizer Context. Optimizer Context includes everything
that one needs to replicate how the Query Optimizer processed the query.

It can be replayed on another to host to debug how the Query Optimizer
processed the query, run what-if scenarios, etc.

== Example recording ==

  set optimizer_record_context=1;
  < Run the query of interest. Typically it's EXPLAIN ...>;
  select context [into dumpfile '/tmp/context.sql']
  from information_schema.optimizer_context;

== Example replay ==
  -- On another machine, just source the script
  source context.sql

This will
* Set relevant system variables to match the recording side;
* Create the dataases, tables and views the query needs;
* Load EITS statistics for the tables;
* Provide the optimizer with other context data
* Finally re-run the query. If it was an EXPLAIN, one should get the
  same output as on the recording side.

Approved-by: Sergei Petrunia ([email protected])
bsrikanth-mariadb
MDEV-40384: innodb_gis.geometry fails on replay

The test had innodb_strict_mode turned OFF, when running the test. But,
in the replay, it was enabled, which caused the creation of tables with
KEY_BLOCK_SIZE=16 fail.

Solution is to record the innodb_strict_mode variable in the context, so
that it gets used during the replay.
bsrikanth-mariadb
MDEV-40388: sequence.simple fails on replay

The problem is that, when recording is enabled for the query such as,
explain select * from seq_1_to_10;
it recorded the table context having a DDL definition as: -

CREATE TABLE `seq_1_to_10` (
    ->  `seq` bigint(20) unsigned NOT NULL,
    ->  PRIMARY KEY (`seq`)
    -> ) ENGINE=SEQUENCE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;

Now, when that context is replayed, the DDL statement is executed.
But, we cannot create such a table, and instead it errors out saying
ERROR 1050 (42S01): Table 'seq_1_to_10' already exists.

Solution is to use: -
  CREATE TABLE IF NOT EXISTS seq_1_to_10 ...;

=====

Also, there is a different way to use sequences as: -
  Create sequence s1;
  Explain select * from s1;

Here, we should be recording the DDL statement, but no need to store the
stats for it. However, we didn't record the DDL statement earlier.
Moreover, sequence's next value should be the same in the replay environment.

Solution here is to record the DDL for such a sequence as
  CREATE TABLE IF NOT EXISTS s1 ...;
and also set its start value as the recorded environment's previous value using
  SELECT SETVAL(s1, prev_value);
Marko Mäkelä
InnoDB review changes

table_name_t::is_create_or_replace(): A new predicate to check for
CREATE OR REPLACE TABLE will rename an old table to
and eventually drop after creating the replacement.

dict_table_t::parse_name(): Do acquire MDL on #sql-create- names
for partitioned tables.

dict_table_rename_in_cache(): On CREATE OR REPLACE TABLE ... SELECT,
forget the original dict_table_t::mdl_name so that purge will
acquire MDL on the #sql-create- name instead. In this way, the
MDL_EXCLUSIVE that the CREATE OR REPLACE TABLE holds on the
user-visible name will not unnecessarily block any purge of old history
until the very end when the #sql-create- table will be dropped.

ha_innobase::delete_table(): Do not check FOREIGN KEY consistency
when dropping an #sql-create- table.

row_rename_table_for_mysql(): Update SYS_FOREIGN.ID also
when renaming to #sql-create- in order to avoid any
duplicate key error when CREATE OR REPLACE TABLE is
creating some FOREIGN KEY constraints by names
that existed in the old table.
Sergei Petrunia
MDEV-40742: Optimizer Context Replay: wrong table names on MacOS

show_create_table_ex() will use table's alias when lower_case_table_names=2.
Specify that table names must be used like the table is stored on disk.
bsrikanth-mariadb
MDEV-40389: type_test.type_test_int8 fails on replay

plugins are not yet supported in replay mode.

So, disabling tests type_test.type_test_int8, and type_test.type_test_double
to be run in replay-server mode
Marko Mäkelä
squash! e61cabc0a2ae1a58c401fc24bb9f25caab6dc9b5

Table_specification_st::end_create_table(): If or_replace(),
acquire MDL_EXCLUSIVE on the backup table name to keep
the InnoDB purge out while we are dropping the table.

(To prevent MDEV-36493 we must defer the acquisition until
it is really necessary.)
Sergei Petrunia
MDEV-40740: Optimizer Context Replay: innodb.xa_unlock_unmodified .. part 2:

The first patch failed to clear the bit in table->read_set if the
field's value was SQL NULL. Move the bitmap_clear_bit() to be called
in all cases.
Marko Mäkelä
Revert all InnoDB changes
Vladislav Vaintroub
MDEV-40656 Bypass REVOKE DENY ... FROM PUBLIC privilege check.

DENY ... TO PUBLIC denies everyone, including whoever tries to revoke
it, via the "deny wins" merge at every scope (global, db, table, column,
routine). Allow REVOKE DENY ... FROM PUBLIC when the revoker can UPDATE
mysql.global_priv (same as hand-editing).

Assisted-by: Claude:claude-5-sonnet
Sergei Petrunia
Remove diagnostic "fprintf(stderr, ...)" left after debugging.
Sergei Petrunia
Remove incorrectly added sql/opt_sum.cc.orig
Georgi Kodinov
MDEV-39806: Add a per-push/per-pull-request checker for Markdown API docs

Create a GitHub action into the MariaDB server tree to build the Markdown
documentation using the cmake target provided by MDEV-39718.

This workflow generates API documentation for the plugin using a
Docker container packed with all the extra doxygen/moxygen tools.
Fixed some more doxygen problems.
Moved the repo to ghcr.io/mariadb/mariadb-doc-gen:latest.
Alexander Barkov
MDEV-39518 Allow prepared statements in stored functions in assignment right hand

Allowing prepared statements in stored functions when
a stored function is used in an assignment right hand.

Both DEFAULT clause of a variable initialization and
the right side of the SET statement are supported:

  CREATE PROCEDURE p1()
  BEGIN
    -- case 1: DEFAULT clause
    DECLARE spvar1 INT DEFAULT f1_with_ps(); -- OK

    -- case 2: SP variable assignment statement
    DECLARE spvar2 INT;
    SET spvar2= f1_with_ps(); -- OK
  END;

- Only assignments to SP variables works for now:
  * SET spvar= func_with_ps(); -- OK
  * SET @uvar= func_with_ps(); -- Error

- Only bare function calls are supported for now. Using a function in
  an expression does not make it PS-safe yet:
    SET v= f1()+0;

- The parser now does not reject PS statements in stored functions.
  PS applicability in stored functions is now detected at run time.
  Note, PS statements in triggers are still prohibited by the parser.

- Functions with PS do not acquire MDL locks on tables, and no MDL is
  taken on the routines themselves either. They work like procedures in
  terms of table opening and routine locking: a concurrent DROP FUNCTION
  can complete while such a function is executing.

- Functions with PS are not replicated as a single `SELECT f1()` call.
  They are replicated per-statement, like procedures.

Helper changes:
- Changing the return result for LEX::sp_variable_declarations_init()
  from void to bool to catch errors in the caller properly.

Misc:
- This patch incorporates fixes for the following bugs found during debugging:
  MDEV-39518,MDEV-40224,MDEV-40225,MDEV-40226,MDEV-40227,MDEV-40240,
  MDEV-40285,MDEV-40288,MDEV-40315,MDEV-40318,MDEV-40890,MDEV-40900,
  MDEV-40901,MDEV-40913,MDEV-40914

Assisted-by: Claude - reviews and minor clean-ups
Ahmad
MDEV-34805 provide various information about vector indexes

Adds INFORMATION_SCHEMA.VECTOR_INDEXES table exposing statistics for MHNSW vector
indexes via a MYSQL_INFORMATION_SCHEMA_PLUGIN registered alongside
the existing mhnsw daemon plugin. columns covered:
(TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, VECTOR_DIMENSIONS,
SUBDIST_ENABLED, INDEX_SIZE, TOTAL_NODES, DELETED_ROWS,
MEMORY_SIZE, CACHE_OVERFLOWS).
monthdev
MDEV-20749 Improve mysqlbinlog --flashback error reporting

Handle corrupted row events by reporting whether the field length could
not be determined from metadata or whether the field extends past the
row buffer instead of falling out through debug-only assertion paths
or ad hoc exits during flashback row conversion. Propagate flashback
conversion failures through the normal mysqlbinlog error path so debug
builds produce the intended diagnostics cleanly.

Add replication tests covering corrupted BLOB metadata and corrupted
BLOB length prefixes using server-side debug injection to write broken
binlog contents and mysqltest-friendly mysqlbinlog invocation patterns.

Reviewed-by: Brandon Nesterenko <[email protected]>
Reviewed-by: Georgi Kodinov <[email protected]>
bsrikanth-mariadb
MDEV-40518: add both drop table and view stmts

The context only stored "DROP TABLE IF EXISTS t1" before adding a
"CREATE TABLE t1" statement. However, there can be a view named t1
already existing in the database. When the context was replayed,
the CREATE statement failed stating t1 already exists.

Solution is to add both "DROP TABLE IF EXISTS t1", and
"DROP VIEW IF EXISTS t1" before adding a
"CREATE TABLE t1" statement into the context.
Marko Mäkelä
Merge main
bsrikanth-mariadb
MDEV-40390: compat/oracle.sp-package fails on replay

UDFs are not yet supported in replay mode.

So, disabling test compat/oracle.sp-package
Alexander Barkov
MDEV-39587 Package-wide TYPE for variable declarations

SET sql_mode=ORACLE;
DELIMITER $$
CREATE OR REPLACE PACKAGE pkg AS
  -- Declare a package public data type
  TYPE varchar_array IS TABLE OF VARCHAR(2000) INDEX BY INTEGER;
END;
$$
DELIMITER ;
DELIMITER $$

CREATE OR REPLACE PROCEDURE p1 AS
  v pkg.varchar_array; -- Use the package public data type
BEGIN
  v(0):='test';
  SELECT v(0);
END;
$$
DELIMITER ;

Note, the change is done only for sql_mode=ORACLE, because the TYPE
declaration is not available for the default mode.

Where package-wide types are available
--------------------------------------
- Variabe list type:
    DECLARE var pkg1.type1;

- RETURN type for a package routine:
    CREATE FUNCTION .. RETURN pkg1.type1 ...

- Parameter type for a package routine:
    PROCEDURE p1(param1 pkg1.type1);

- Assoc array element type:
    TYPE assoc1_t IS TABLE OF pkg1.type1 ...

- REF CURSOR RETURN type:
    TYPE cur1_t IS REF CURSOR RETURN pkg1.type1;

Change details
--------------

- Adding a member Lex_length_and_dec_st::m_foreign_module_type
  It's set to true when the data type was initialized from a TYPE
  in foreign routine (e.g. in PACKAGE spec).
  It's needed to prevent use of qualified identifiers in public contexts,
  i.e. in schema public routine parameter types and schema publuc function
  RETURN types.
  Adding a helper method sp_head::check_applicability() which prevents
  use of qualified types in public context.

- Adding a helper method sp_head::raise_unknown_data_type().

- Adding methods LEX::set_field_type_typedef_package_spec() for
  2-step and 3-step qualified indentifiers.
  It's used in field_type_all_with_typedefs which covers cases:
  - Variabe list type        : DECLARE var pkg1.type1;
  - RETURN type              : CREATE FUNCTION .. RETURN pkg1.type1 ...
  - Parameter type          : PROCEDURE p1(param1 pkg1.type1);
  - Assoc array element type : TYPE assoc1_t IS TABLE OF pkg1.type1 ...

- Adding a method LEX::declare_type_ref_cursor_return_typedef().
  It handles cases when a new TYPE REF CURSOR RETURN is declared,
  for both for qualified RETURN types and non-qualified RETURN types:
  - TYPE cur0_t IS REF CURSOR RETURN rec1_t;
  - TYPE cur0_t IS REF CURSOR RETURN pkg1.rec1_t;
  - TYPE cur0_t IS REF CURSOR RETURN db1.pkg1.rec1_t;

  The code was moved from LEX::declare_type_ref_cursor() into
  LEX::declare_type_ref_cursor_return_typedef() and extended
  to cover qualified RETURN types.

- Adding a method Sql_path::find_package_spec_type().
  It iterates through all schemas specified in @@path and searches
  for the given type in the given package.

- Adding a helper method sp_pcontext::type_defs_add_ref_cursor()
  to reuse the code.

- Adding a new method sp_package::get_typedef() to search
  for TYPE definitions in PACKAGE specifications.

- Adding a new method sp_head::get_typedef_package_spec()
  to search for TYPE definitions used by a PROCEDURE or FUNCTION.

- Adding a helper method
    Sp_handler::sp_cache_routine_reentrant_suppress_errors
  Adding a method Sp_handler::find_package_spec().
Sergei Golubchik
cleanup: remove buggy str2int, replace with a template

remove one str->int implementation (we still have 10+ more),
replace with a convenience template that calls my_strntoll_8bit()
Sergei Petrunia
MDEV-40740: Optimizer Context Replay: innodb.xa_unlock_unmodified fails assert

Optimizer Context code changed format_and_store_row() to check both
table->read_set and table->write_set (when required). It used to
use one of those depending on the lock level.

But we don't set the table->read_set bit so we can get an assertion
failure when dumping the column value.

This is fairly rare as Optimizer Context now reads all columns, and the
only other user is statements like "DBUG_PRINT("dml", dbug_format_row(..."
Sergei Golubchik
remove checks for strto[u][l]l family