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
Elena Stepanova
MDEV-42521 Replication tests fail with ER_BINLOG_IN_USE when run after another test

12.3 changed RESET MASTER. The binlog-in-engine commit (7081f2a58ec)
added a check in MYSQL_BIN_LOG::reset_logs() in sql/log.cc. RESET MASTER
now fails with ER_BINLOG_IN_USE while any binlog dump thread is still
registered, even an idle one whose slave has already disconnected. Before
12.3, such leftover threads didn't block it, so the test passes there.

That commit also updated the test framework for this:
include/rpl_init.inc and include/rpl_reset.inc now kill dump threads
before RESET MASTER, and there is a new include/reset_master.inc
that kills them and retries. The fix is to use this include.
Elena Stepanova
MDEV-42628 rpl.rpl_do_grant incorrectly passes on Linux and fails on Windows

The test opens connection create_rout_db_slave with host "localhost",
the slave port and no socket. mysqltest then uses the default socket,
which is the master's. On Unix a connection to "localhost" goes
through the socket and ignores the port, so this "slave" connection
actually went to the master. On Windows "localhost" means TCP, so the
connection really reached the slave.

Since MDEV-35617, DROP USER emits
ER_ACTIVE_CONNECTIONS_FOR_USER_TO_DROP (4227) when the dropped user
still has an active session. On Windows create_rout_db_slave was still
connected to the slave when DROP USER 'create_rout_db'@'localhost' ran
there, so the note appeared and the result did not match. On Unix the
slave had no such session, so the note never appeared, and the "slave"
part of the test had been running against the master.

Fix:
- pass $MASTER_MYSOCK / $SLAVE_MYSOCK explicitly, so each connection
  reaches the intended server on all platforms;
- disconnect create_rout_db_slave right after its last use, before
  DROP USER on the slave, and wait until the session is gone from
  information_schema.processlist, because the server finishes a
  disconnect only after the client has moved on.

Assisted-by: Claude:claude-opus-5-5
Monty
Removed compiler warning in ha_perfschema.cc
Elena Stepanova
MDEV-41085 Enable MTR tests on Windows: rpl suite
Monty
MDEV-39972 Incorrect result of $[last] of JSON

MDEV-40971 JSON Path Array Index 32-bit Integer Truncation Wraparound
( [ 2 3 2 + n ] ≡ [2 3 2+n]≡[n])
MDEV-40986 JSON edit functions' array-index 32-bit wraparound
(edit variant of M4 — modifies the wrong position)

- has_negative_path has to be set for every row. Before, it was only
  set when the path was parsed. If the path argument is a constant,
  c_path->parsed stays set after the first row and the path is not
  parsed again, but we still have to set has_negative_path if needed.
- Setting c_path->p.types_used= JSON_PATH_KEY_NULL in the loop was wrong
  as it reset the JSON_PATH_NEGATIVE_INDEX bit of constant paths. The
  reset is not needed, as json_path_setup() resets it.
- A range with only positive bounds no longer depends on the array sizes.
- Ensure we do not get integer overflow when calculating array indexes in
  json_path_setup(). An index that does not fit in an int is now a path
  syntax error.
Elena Stepanova
Explicitly turn off RocksDB and some other engines

Otherwise 11.4 still tries to build it and fails
Elena Stepanova
MDEV-42590 rpl.rpl_start_alter_restart_master leaves replication setup behind
Elena Stepanova
Merge remote-tracking branch 'origin/bb-10.11-elenst' into bb-11.4-elenst
Elena Stepanova
MDEV-42567 rpl.rpl_change_master_implicit_gtid_warning fails with "Can't initialize replace" when run after another test

The test stopped the slave right after include/master-slave.inc and
then built CHANGE MASTER coordinates from SHOW SLAVE STATUS. But
master-slave.inc only waits for Slave_IO_Running=Yes, which the IO
thread reports right after sending COM_BINLOG_DUMP, before it has
received anything from the master. If STOP SLAVE arrives before the
master's initial fake Rotate event, Master_Log_File is still empty
and --replace_result fails with
"Can't initialize replace from 'replace_result $io_log_file ...'".

The race is lost reliably when the test runs after another
replication test (e.g. with --repeat) over a non-TLS replication
connection, which is the default in 10.11. There the master's dump
thread from the previous test is still waiting for binlog updates
when the slave reconnects, and kill_zombie_dump_threads() delays the
new dump by at least 100 ms. With TLS replication (the default in
11.4+) the old dump thread is already gone and the test passes;
11.4 with --skip-ssl fails the same way as 10.11.

Fix: sync the slave with the master before stopping it, so that the
IO thread has read the master's initial events and Master_Log_File
and Read_Master_Log_Pos are populated. The result file is unchanged.

Assisted-by: Claude:claude-opus-5-5
Elena Stepanova
Merge remote-tracking branch 'origin/12.3-elenst' into bb-13.2-elenst
Elena Stepanova
Merge remote-tracking branch 'origin/bb-10.11-elenst' into bb-11.4-elenst
Elena Stepanova
Re-organize to reuse the same job
Elena Stepanova
MDEV-41085 Enable MTR tests on Windows: rpl suite
Elena Stepanova
MDEV-42228 MTR tests fail with "File already exist" for .expect files on Windows

On Windows mtr workers are threads of one process, so a handle opened
while reading the .expect file could be inherited by a server spawned
at the same time by another worker. That kept the file from being
deleted for the lifetime of that server, and the next --write_file of
the .expect file failed with "File already exist".

Read the .expect file under the spawn lock.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Vladislav Vaintroub
Elena Stepanova
Merge remote-tracking branch 'origin/bb-13.2-elenst' into bb-main-elenst
Monty
MDEV-39938 JSON_TABLE ignores negative indexes and 'last' in paths

The row path and NESTED PATH of JSON_TABLE gave no rows for paths
like $[-1], $[last] and $[1 to last], because
Json_table_nested_path::scan_next() passed no array sizes to
json_path_compare().

Fixed by counting the array sizes during the scan when the path has
negative indexes or 'last', in the same way as JSON_EXTRACT() does.

This also fixes the code from the MDEV-39972 fix that was only needed
because of the bug in json_table.
Elena Stepanova
MDEV-42628 rpl.rpl_do_grant incorrectly passes on Linux and fails on Windows

The test opens connection create_rout_db_slave with host "localhost",
the slave port and no socket. mysqltest then uses the default socket,
which is the master's. On Unix a connection to "localhost" goes
through the socket and ignores the port, so this "slave" connection
actually went to the master. On Windows "localhost" means TCP, so the
connection really reached the slave.

Since MDEV-35617, DROP USER emits
ER_ACTIVE_CONNECTIONS_FOR_USER_TO_DROP (4227) when the dropped user
still has an active session. On Windows create_rout_db_slave was still
connected to the slave when DROP USER 'create_rout_db'@'localhost' ran
there, so the note appeared and the result did not match. On Unix the
slave had no such session, so the note never appeared, and the "slave"
part of the test had been running against the master.

Fix:
- pass $MASTER_MYSOCK / $SLAVE_MYSOCK explicitly, so each connection
  reaches the intended server on all platforms;
- disconnect create_rout_db_slave right after its last use, before
  DROP USER on the slave, and wait until the session is gone from
  information_schema.processlist, because the server finishes a
  disconnect only after the client has moved on.

Assisted-by: Claude:claude-opus-5-5
Alexey Yurchenko
MDEV-41907 mask sensitive data in the statements logged by wsrep

Use wsrep_thd_query() instead of thd->query() when logging
statements that can potentially contain sensitive data. Masking
is possible only for parsed statements, so don't log statements
before parsing.
Add MTR test to verify the fix.
Elena Stepanova
rpl.rpl_corrupted_decimal_precision fails with timeout

Due to MDEV-42580, if an earlier test ever set a replication filter,
the SQL abort expected in rpl.rpl_corrupted_decimal_precision
never happens, and the test fails with a timeout. To avoid it,
temporarily enforce the slave restart at the beginning of the test.
It should be removed when the bug is fixed
Teemu Ollakka
MDEV-42510 Galera: move the backup pause and resume to wsrep_backup.cc

The Galera rules for backup locks, FTWRL and the provider pause were in
backup.cc, lock.cc, mdl.cc, handler.cc and wsrep_mysqld.cc. No place
documented them as a whole.

Changes:
- New sql/wsrep_backup.h: documentation of the backup locks, the writes
  that they hold, the provider pause and desync, when a holder pauses,
  BF threads and backup locks, and the order of lock, pause, resume and
  release. mdl.h, mdl.cc, handler.cc and wsrep_mysqld.cc refer to it.
- New sql/wsrep_backup.cc: wsrep_backup_stage_pause(),
  wsrep_ftwrl_pause() and wsrep_backup_resume() replace the pause and
  resume code in backup_block_ddl(), backup_block_commit(),
  backup_end(), make_global_read_lock_block_commit() and
  unlock_global_read_lock(). wsrep_backup_pause() moves here and is
  static.
- THD::wsrep_desynced_backup_stage is now THD::wsrep_backup_paused, an
  Atomic_relaxed<bool>. FTWRL on a donor pauses without a desync. Other
  threads read the flag in wsrep_handle_mdl_conflict(), under the
  MDL_lock::m_rwlock that the holder takes after it sets the flag.
- ha_commit_trans() and wsrep_backup.h: say why a provider-ordered
  commit does not take MDL_BACKUP_COMMIT.

Behavior changes:
- UNLOCK TABLES resumes with resume_and_resync() also after a pause
  without a desync. It resyncs only after a desync, and it catches a
  resume failure.
- UNLOCK TABLES always resumes after a pause. Before, it did not resume
  when the node was not a donor and the session had wsrep_on=OFF.
- The holder flag is cleared after the resume, before the backup lock
  is released. A BF request in this window waits for the release.
- The resume DEBUG_SYNC points fire also when the holder did not pause.

Tests:
- galera_ftwrl_ordered_commit: new test. An applier waits for FTWRL1,
  and a local commit waits in the provider order for the applier. FTWRL
  gets FTWRL2 and pauses. If the local commit took MDL_BACKUP_COMMIT,
  FTWRL would fail with ER_LOCK_WAIT_TIMEOUT.

Assisted-by: Claude:claude-opus-5-5
Elena Stepanova
MDEV-42590 rpl.rpl_start_alter_restart_master leaves replication setup behind
Elena Stepanova
MDEV-42238 rpl.rpl_row_mysqlbinlog fails on Windows (charset problem)

rpl.rpl_row_mysqlbinlog fails because apparently the client command
line on Windows cannot interpret the literal cp932 string which is
passed to it. Since the point of the test is not how the original
INSERT happens, but how it further works while replaying the binlog,
it should be acceptable to insert a hex-encoded value

Reviewed-by: Susil Behera
Elena Stepanova
MDEV-42202 perfschema.relaylog fails when run after other replication tests

The test checks file I/O instrumentation accumulated since server
startup, so it relied on getting freshly started servers. With
duplicate options removed, mtr may now reuse servers left by
a previous replication test, and the test sees binary/relay log
files and statistics from it.

Restart both servers at the beginning of the test, removing
binary and relay logs while the servers are down. RESET MASTER
and RESET SLAVE are not sufficient, as performance schema keeps
instances of files deleted by them, and a restart opens a new
binary log anyway.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Susil Behera
Elena Stepanova
Trying to split github actions run into small and big-only

To save execution time
Elena Stepanova
MDEV-42236 rpl.rpl_change_master_long_channel_name fails on Windows (too long path)

rpl.rpl_change_master_long_channel_name fails on Windows because it
expects a 252-character name (base name, excluding the path) to be
valid; on Windows the whole path is limited to 260 characters, so
a 252-character name makes it too long. The patch disables the test
for Windows.

Reviewed-by: Susil Behera
Elena Stepanova
MDEV-42595 rpl.rpl_heartbeat modifies master_heartbeat_period, affects following tests

mysql-test/include/rpl_heartbeat.inc does
change master to ..., master_ssl_verify_server_cert=0, master_heartbeat_period= 0.5;
and its cleanup never puts it back.

13.x changed how CHANGE MASTER treats the heartbeat period, which
exposes the leak. In 10.11 any CHANGE MASTER that doesn't mention
MASTER_HEARTBEAT_PERIOD resets it to slave_net_timeout/2. In 13.x
the period is now an optional value. An unmentioned option stays
as it was. The between-test check doesn't catch it.

Assisted-by: Claude:claude-opus-5-5
Elena Stepanova
MDEV-42237 rpl.rpl_read_old_relay_log_info fails on Windows (Linux-style path)

rpl.rpl_read_old_relay_log_info fails because the test overrides
relay-log.info with the Linux-style ./slave-relay-bin.000001,
while Windows uses the format with backslashes, .\slave-relay-bin.000001.
The patch modifies the file contents using a perl block, which keeps
the relay log name intact and only replaces the position. Thus the name
remains valid for whatever system the test is run on.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Susil Behera
Elena Stepanova
MDEV-42586 rpl.warn_slaves_not_needed_for_purge fails when run in a chain of tests

The warning about the @@slave_connections_needed_for_purge default is
printed only once per server process: warn_slaves_not_needed_for_purge
is cleared by the first COM_REGISTER_SLAVE and whenever the variable is
set, either on the command line or with SET.

The test assumed the flag was still set when it started. MTR reuses
running servers between tests, so after a previous test whose slave
connected to the master, or after the test itself (it ends with
SET @@GLOBAL.slave_connections_needed_for_purge= DEFAULT), the flag was
already cleared. The warning was then never logged in this test's section
of the error log, and both expected-FOUND checks failed. This happened
with --repeat and when the test ran after another replication test.

Restart the master at the beginning of the test, before the slave
connects, so the test always starts with the flag set.

Assisted-by: Claude:claude-opus-5-5
Elena Stepanova
MDEV-42200 main.mysqlbinlog_stmt_compressed depends on previous tests

The test ran mysqlbinlog on the current binlog file from the start,
and if that file still held the previous test's events, it would
cause a mismatch. Additionally, thread_id value depended on the
chain of tests.

The part for thread_id is taken from 11.8, to preserve consistency.

Assisted-by: Claude:claude-sonnet-5-5
Reviewed-by: Kristian Nielsen
Alexey Botchkov
MDEV-42405 XMLISVALID accepts malformed comments: "<!-->" and "--" inside a comment.

Chenge parser so it discards incorrect comments.
Elena Stepanova
MDEV-42570 rpl.rpl_start_alter_restart_master fails when run in a chain of tests

The test shows the slave binary log from the beginning, including
the replicated mtr.add_suppression() transaction. How that transaction
ends in the slave binary log depends on the engine of
mysql.gtid_slave_pos, because the slave updates the table within
the same transaction. With Aria (the default under MTR) it ends with
Query COMMIT. With InnoDB, InnoDB takes part in the transaction and
it ends with Xid COMMIT.

Many replication tests change mysql.gtid_slave_pos to InnoDB and
don't restore it, for example rpl_start_alter_mysqlbinlog_1, and
check-testcase does not check table engines. When mtr reuses
the servers after such a test, the result mismatches. The test
passes after a restart or with --repeat, because then the table
is in Aria.

Set the engine of mysql.gtid_slave_pos on the slave to Aria
explicitly at the beginning of the test, so that the result
does not depend on previous tests.

Assisted-by: Claude:claude-opus-5-5
Elena Stepanova
MDEV-42567 rpl.rpl_change_master_implicit_gtid_warning fails with "Can't initialize replace" when run after another test

The test stopped the slave right after include/master-slave.inc and
then built CHANGE MASTER coordinates from SHOW SLAVE STATUS. But
master-slave.inc only waits for Slave_IO_Running=Yes, which the IO
thread reports right after sending COM_BINLOG_DUMP, before it has
received anything from the master. If STOP SLAVE arrives before the
master's initial fake Rotate event, Master_Log_File is still empty
and --replace_result fails with
"Can't initialize replace from 'replace_result $io_log_file ...'".

The race is lost reliably when the test runs after another
replication test (e.g. with --repeat) over a non-TLS replication
connection, which is the default in 10.11. There the master's dump
thread from the previous test is still waiting for binlog updates
when the slave reconnects, and kill_zombie_dump_threads() delays the
new dump by at least 100 ms. With TLS replication (the default in
11.4+) the old dump thread is already gone and the test passes;
11.4 with --skip-ssl fails the same way as 10.11.

Fix: sync the slave with the master before stopping it, so that the
IO thread has read the master's initial events and Master_Log_File
and Read_Master_Log_Pos are populated. The result file is unchanged.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Susil Behera
Elena Stepanova
MDEV-42594 rpl.rpl_binlog_directory fails on Windows with wrong result (slashes in the path)
Elena Stepanova
MDEV-42570 rpl.rpl_start_alter_restart_master fails when run in a chain of tests

The test shows the slave binary log from the beginning, including
the replicated mtr.add_suppression() transaction. How that transaction
ends in the slave binary log depends on the engine of
mysql.gtid_slave_pos, because the slave updates the table within
the same transaction. With Aria (the default under MTR) it ends with
Query COMMIT. With InnoDB, InnoDB takes part in the transaction and
it ends with Xid COMMIT.

Many replication tests change mysql.gtid_slave_pos to InnoDB and
don't restore it, for example rpl_start_alter_mysqlbinlog_1, and
check-testcase does not check table engines. When mtr reuses
the servers after such a test, the result mismatches. The test
passes after a restart or with --repeat, because then the table
is in Aria.

Set the engine of mysql.gtid_slave_pos on the slave to Aria
explicitly at the beginning of the test, so that the result
does not depend on previous tests.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Susil Behera
Elena Stepanova
MDEV-42586 rpl.warn_slaves_not_needed_for_purge fails when run in a chain of tests

The warning about the @@slave_connections_needed_for_purge default is
printed only once per server process: warn_slaves_not_needed_for_purge
is cleared by the first COM_REGISTER_SLAVE and whenever the variable is
set, either on the command line or with SET.

The test assumed the flag was still set when it started. MTR reuses
running servers between tests, so after a previous test whose slave
connected to the master, or after the test itself (it ends with
SET @@GLOBAL.slave_connections_needed_for_purge= DEFAULT), the flag was
already cleared. The warning was then never logged in this test's section
of the error log, and both expected-FOUND checks failed. This happened
with --repeat and when the test ran after another replication test.

Restart the master at the beginning of the test, before the slave
connects, so the test always starts with the flag set.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Susil Behera
Elena Stepanova
rpl.rpl_corrupted_decimal_precision fails with timeout

Due to MDEV-42580, if an earlier test ever set a replication filter,
the SQL abort expected in rpl.rpl_corrupted_decimal_precision
never happens, and the test fails with a timeout. To avoid it,
temporarily enforce the slave restart at the beginning of the test.
It should be removed when the bug is fixed
Monty
MDEV-26448 CAST(expr AS JSON)

Until we have a true JSON TYPE, the definition of CAST(X to JSON) will be
IDENTICAL to:

IF X IS NULL
  RETURN NULL
ELSE IF X is of type temporal
  RETURN "X"    # Tagged as a JSON OBJECT. This matches MySQL 8.0
ELSE IF JSON_VALID(X)
  RETURN X      # Tagged as JSON object
ELSE
  GIVE_ERROR
FI
Elena Stepanova
MDEV-42198 Options from MTR opt files are added multiple times

Options from .opt files of included files were appended every time
the file was sourced, so they got repeated once per include path.
It caused unnecessary server restarts, and too long server command
lines lead to startup failures on Windows.

Now each file caches only its own .opt options plus an ordered list
of the files (itself and everything it sources) whose options apply,
each file listed once. The test's options are assembled from that list.
Options of included files still precede those of the including file.
If a file is sourced several times, its options are applied at the
place of its last inclusion, so the effective option values stay
the same as before, and a test can still source a file again to
override options set by files sourced in between.

Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Alice Sherepa
Elena Stepanova
MDEV-41085 Enable MTR tests on Windows: rpl suite
Monty
Updated sql-bench to benchmark json functions

Other things:
- Added compare-result --adjust to compare benchmark with different
  query/row count
- Have different configure options for MySQL and MariaDB
- Use highrest timers for tests for more accurate resutls