Console View
|
Categories: connectors experimental galera main |
|
| connectors | experimental | galera | main | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
sjaakola
seppo.jaakola@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41597: Check DEFINER of triggers and views before TOI CREATE TRIGGER, CREATE VIEW and ALTER VIEW checked the DEFINER clause (sp_process_definer(), which requires SET USER for a DEFINER other than the current user) only after TOI had replicated the statement. The replicated statement carries the DEFINER, and the applier runs with all privileges, so a statement refused on the originating node was still applied by the other nodes, creating the trigger or view with a DEFINER the user was not allowed to use. ALTER VIEW without a DEFINER clause also replicated the wrong definition. fill_defined_view_parts(), which takes DEFINER, ALGORITHM and SQL SECURITY from the existing view, ran after the replicated statement had been built, so the other nodes got the current user as DEFINER and the default SQL SECURITY. Resolve and check the DEFINER before TOI begins, as is already done for stored routines and events: - mysql_create_or_drop_trigger() calls sp_process_definer() for CREATE TRIGGER before WSREP_TO_ISOLATION_BEGIN, and Table_triggers_list::create_trigger() no longer calls it. - mysql_create_view() calls fill_defined_view_parts() (ALTER VIEW) and sp_process_definer() before WSREP_TO_ISOLATION_BEGIN. The order of checks changes for all builds: the DEFINER error is now reported before some errors that were found later in the statement. The test galera.galera_toi_definer_check checks that: - CREATE TRIGGER, CREATE VIEW and ALTER VIEW refused for a foreign DEFINER on node_1 are not applied on node_2 - ALTER VIEW without a DEFINER clause keeps the same DEFINER and SQL SECURITY on both nodes Assisted By: Claude Opus 5.5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41658 follow-up: map all wsrep errors, fix after_statement ordering rpt_handle_event() now calls wsrep_after_statement() unconditionally, so the provider handle and commit-order slot are released even when apply_event_and_update_pos_for_parallel() already failed. Its own failure maps through wsrep_override_error()/wsrep_current_error(), covering every wsrep::client_error code instead of only e_deadlock_error and e_interrupted_error, so has_temporary_error() can recognise any resulting retryable error. Log severity for the genuinely unexpected failure case reverts to WSREP_WARN. The duplicated mark_start_commit() guard in retry_event_group() and handle_rpl_parallel_thread() is factored into one mark_start_commit_unless_wsrep() helper. galera_parallel_slave_rollback.cnf drops the redundant binlog-format=row, already set by the included galera_2nodes_as_slave.cnf. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pekka Lampio
pekka.lampio@galeracluster.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38999: Galera - stale reads in explicit transactions wsrep_must_sync_wait() skipped a statement's causal wait unconditionally once a multi-statement transaction was open, regardless of which wsrep_sync_wait bit was configured - so later statements could run against a view no fresher than whatever BEGIN itself happened to check. A timed-out wait's error also stayed sticky until commit/rollback, breaking ROLLBACK itself. Fix: only skip the wait once the transaction has made its first write or locking read (SELECT ... FOR UPDATE/LOCK IN SHARE MODE, including via a stored procedure CALL, autocommit statements, and UNION) - after that, re-waiting risks a self-deadlock against the local applier. Clear a timed-out wait's error immediately instead of leaving it sticky. Tests: galera_MDEV-38999*.test cover the bitmask gap, the self-deadlock risk, stored-procedure/UNION/autocommit locking reads, and the query cache's independent wait path. Assisted-by: Claude:claude-sonnet-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
sjaakola
seppo.jaakola@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41597: GRANT ROLE is replicated before the privilege check GRANT ROLE and REVOKE ROLE started TOI before mysql_grant_role() checked whether the user may grant the role, and they could be replicated, although they potentially could be refused on the originating node later on. On the other nodes the applier runs with a non-user security context, and GRANT and REVOKE ROLE, will be applied causing the nodes' ACLs to be diverged. Begin TOI is moved inside mysql_grant_role(), after the role lookup and the privilege check. The check is done by a new helper, find_grantable_role(), which is also used for the second check under LOCK_grant. Under TOI the second check only looks up the role again and does not repeat the privilege check. Otherwise an ACL change ordered between the first check and the start of TOI (e.g. REVOKE ADMIN OPTION from the granting user) could refuse the statement on the originating node only, while the other nodes apply it. The pre-TOI check is therefore final in a cluster, as it already is for the other ACL statements: privileges are checked as of the start of the statement. Without wsrep, or outside TOI, both checks are done as before. A DEBUG_SYNC point, grant_role_before_toi, is added before TOI begins. The test galera.MDEV-41597 checks that: - a GRANT ROLE refused on node_1 is not applied on node_2 - when REVOKE ADMIN OPTION is ordered between the privilege check and the start of TOI, both nodes reach the same outcome |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| feat: MDEV-40672 implement basic support for the pluggable aggregate functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42186: Info leak with optimizer_replay_context When @@optimizer_replay_context is set, the replay reports mismatches between the context and the optimizer's statistics as warnings that name tables, indexes and ranges. For a view, stored routine or trigger those names can belong to objects the invoker has no privilege to see, for example the base tables of a DEFINER view, or a key number and the view's hidden predicate through a records_in_range() call. Apply the same privilege checks the optimizer trace and the optimizer context recorder already use: * Optimizer_context_replay gets a missing_priv flag, set through missing_privilege(). Optimizer_context_replay::has_records() returns false once it is set, and every infuse_*()/store_*() entry point already bails out on !has_records(), so no warning is produced and no replayed data is used. * opt_trace.cc: report_missing_privilege() also notifies the replay, and the checks for tables, views, stored routines and the security context no longer return early when only a replay is active. Table-level SELECT is required, so column-level grants do not enable the replay, even when they cover all columns. The flag is never cleared within a statement. For a stored function or trigger the check runs when it is called, so output for tables already optimized stays. Add test opt_context_replay_view_leak. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40406 hide #mysql50# prefix support behind the old mode Disallow usage of #mysql50# prefix in db and table names, only allow it under the old_mode=MYSQL50_TABLE_NAMES. Even in the default old_mode the #mysql50# support isn't completely off, such names are not rejected everywhere throughout the server, but only in the parser. Rejecting them everywhere would need a lot of code to cover various corner cases when a name is accepted under MYSQL50_TABLE_NAMES and then the old_mode is cleared - see test cases. So, the goal is only to make the prefix practically unusable, preparing for its eventual demise. This mode is always enabled on the slave side, otherwise any unprivileged user on the master would be able to break replication. Assisted-by: Claude:claude-opus-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41658 fix Galera node crash when a parallel slave worker is bf_killed A parallel-replication worker would assert in ha_rollback_trans() because wsrep_after_statement() and ha_commit_trans()'s wsrep error path could roll back its transaction before retry_event_group() unmarks it as committing. Skip mark_start_commit() when using Galera. Galera certification can cause rollback of parallel replication transactions during commit when there is a conflicting transaction outside of replication. This can cause to start the next GCO too early, while the previous GCO still needs to rollback and retry. Do not fail replication with an error when wsrep_after_statement() fails due to a retryable error like brute-force kill. Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41998 fix galera.mdev-41075: RESET MASTER races ER_BINLOG_IN_USE The plain RESET MASTER on connection primary (galera.mdev-41075, added by MDEV-41075) can race a lingering binlog dump thread and fail with ER_BINLOG_IN_USE, an error defined on 12.3 and later only. The test's other RESET MASTER calls, on node_1 and node_2, use include/reset_master.inc, which kills lingering dump threads and retries on ER_BINLOG_IN_USE (MDEV-40903); the one on primary did not, since it predates that fix's introduction into this test's source branch. Use include/reset_master.inc there too, matching every other RESET MASTER in the galera suite. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hemant Dangi
hemant.dangi@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42231: galera_sst_check_port_ancestry fails on noexec vardir Issue: The test generates a driver script under $MYSQLTEST_VARDIR/tmp and executes it directly. On a host where that directory is on a noexec-mounted tmpfs, execution fails with "Permission denied" regardless of the script's mode bits, since noexec is enforced by the kernel against the mount itself, not against the file's own permissions. Solution: Invoke the generated driver script through bash explicitly instead of relying on the kernel executing it directly via its shebang; running it through an interpreter only requires the interpreter itself to be executable, not the script file. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mariadb-test: enable metadata without results Allow this mtr sequence to display just the metadata. --disable_result_log --enable_metadata This is useful for MDEV-41860 where the results are binary, but we want the metadata. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For testing only, not to be merged Enable rpl tests on Windows, and skip one test that fails due to a known bug |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-40310 Connect use-of-uninitialized-value in XFILE::Write When writing date types to an index, Connect Engine only had 4 bytes initialized, however 8 bytes where being written. Changed the type to 8 bytes. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Susil Kumar Behera
59557163+mariadb-SusilBehera@users.noreply.github.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '12.3' into 12.3-MDEV-41446 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41658 follow-up: map all wsrep errors, fix after_statement ordering rpt_handle_event() now calls wsrep_after_statement() unconditionally, so the provider handle and commit-order slot are released even when apply_event_and_update_pos_for_parallel() already failed. Its own failure maps through wsrep_override_error()/wsrep_current_error(), covering every wsrep::client_error code instead of only e_deadlock_error and e_interrupted_error, so has_temporary_error() can recognise any resulting retryable error. Log severity for the genuinely unexpected failure case reverts to WSREP_WARN. The duplicated mark_start_commit() guard in retry_event_group() and handle_rpl_parallel_thread() is factored into one mark_start_commit_unless_wsrep() helper. galera_parallel_slave_rollback.cnf drops the redundant binlog-format=row, already set by the included galera_2nodes_as_slave.cnf. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42208 Do not consider direct update for UPDATE ... RETURNING ... Just like direct delete is not considered for DELETE ... RETURNING ... This is because metadata sending is skipped in the direct update route. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hemant Dangi
hemant.dangi@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42231: galera_sst_check_port_ancestry fails on noexec vardir Issue: The test generates a driver script under $MYSQLTEST_VARDIR/tmp and executes it directly. On a host where that directory is on a noexec-mounted tmpfs, execution fails with "Permission denied" regardless of the script's mode bits, since noexec is enforced by the kernel against the mount itself, not against the file's own permissions. Solution: Invoke the generated driver script through bash explicitly instead of relying on the kernel executing it directly via its shebang; running it through an interpreter only requires the interpreter itself to be executable, not the script file. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42044: I_S.OPTIMIZER_CONTEXT exposes rows, DDL and statistics ... Optimizer Context has DDLs of used tables and VIEWs, table statistics, and even captured table rows which include all, even the columns that the query doesn't read. The user running the query might not have access to some of this information. Making it available in the optimizer context would create an opportunity to bypass the security controls. There is a similar issue in the Optimizer Trace. It is solved by NOT producing optimizer trace if it would expose data that's not available otherwise. We have to extend that logic for context recorder as well. Optimizer Trace relied on opt_trace_disable_if_no_tables_access(), to check if the query object had privilege to execute. Solution ======== Run opt_trace_disable_if_no_tables_access() once in mysql_execute_command(), after the trace, and recorder are created. Along with it set missing_priv flag in the recorder object if needed. This flag is used to skip recording the stats, and not dump the context at the end of query execution. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Item_sum_test_plugin_first shallow copy changed b/c its implementation leaked memory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pekka Lampio
pekka.lampio@galeracluster.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-38999 followup: fix galera_sr.mysql-wsrep#215 regression wsrep_must_sync_wait() now performs the causal wait on the first real statement of an explicit transaction instead of skipping it as soon as the transaction was merely BEGIN'd. mysql-wsrep#215 deliberately freezes node_1's local applier via a debug sync point and then expects node_1's own first statement in the transaction to proceed without waiting for that frozen apply - which the old, buggy skip-on-BEGIN behaviour happened to allow, but the fix correctly no longer does. Disable wsrep_sync_wait for node_1's session before entering the transaction, mirroring the same workaround node_1a's connection already uses for the identical reason. Co-Authored-By: Claude Sonnet 5 <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41860 vec_fromtext metadata type=vector vec_fromtext, as the only function returning a true vector, gains the type=vector extended metadata so that connectors can process this correctly. Guidance thanks to Vivaan Sanghavi. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sergei Golubchik
serg@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41860 return vector extended metadata This adds "vector" as an extended metadata type for when is returning a collection of 4 byte little endian floats from teh server. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41008 main.x509_oneline_separators test stabilization Same principle as MDEV-40909. In 12.3+ branches the thread cleanup is deferred so disable the warnings because a warning is possible if the other connection is taking a while to cleanup. This prevents the warning: Warnings: Note 4227 Dropped users 'raw_user'@'localhost' have active conn... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-41352 Pluggable Aggregate Functions now supports FILTER syntax. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elena Stepanova
elenst@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36025: Server start fails on mariabackup with prepared transactions mariabackup --no-lock can leave InnoDB prepared transactions in the restored server; this can also happen even without --no-lock when the server is running parallel replication. But mariabackup does not back up the TC_LOG state (typically binlog, or TC_LOG_MMAP if binlog is disabled). This caused the server to complain during startup that the TC_LOG state has been lost, and requires to temporarily configure the server with --tc-heuristic-recover=rollback to roll back the offending transactions. This is a regression since 10.5, where the --rollback-xa option was removed from mariabackup --prepare. Rolling back internal XA prepared transactions is always the correct behaviour after restoring a mariabackup, just as any other active InnoDB transactions that are present in the backup (eg. just before innodb_xa_prepare() for example). The BLOCK_COMMIT MDL lock will ensure that no transaction in the backup can be in a state where it is committed in some participating engine/binlog but not the others, so consistency is guaranteed. This patch implements a new value --tc-heuristic-recover=rollback_proceed which makes the server automatically handle rolling back prepared transactions as needed when the TC_LOG state is missing, without the user having to change any configurations. This option is safe to have configured permanently: The server will still do the normal 2pc crash recovery from any existing binlog. Only when the binlog is removed prior to server startup (as mariabackup does for the restored server) will the crash recovery rollback transactions unconditionally and proceed to start the server. The default is kept as --tc-heuristic-recover=off, to not change default in existing GA release. This requires the user to configure --tc-heuristic-recover=rollback_proceed explicitly to work around the problem with mariabackup not backing up the binlog. The default could be changed when merged up to main for the next release. The old behaviour of --tc-heuristic-recover does not seem very useful. If the TC_LOG state is intentionally removed by the user, the correct behaviour seems obviously to be to roll back any prepared transactions. The purpose of having those internal prepared transactions in the first place is to ensure consistency between the engine and the binlog, this has no meaning if the binlog is gone. However, the question of whether --tc-heuristic-recover=OFF is the best default is separate from this mariabackup issue (except for the hassle for mariabackup users to have to change the configuration manually). Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bsrikanth-mariadb
srikanth.bondalapati@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42044: Do the table privilege check once for trace and recorder Run opt_trace_disable_if_no_tables_access() once in mysql_execute_command(), after the recorder is created, instead of separately at trace start and in the recorder. Remove opt_ctx_can_read_all_columns(). The recorder now relies on its missing_priv flag and skips recording when it is set. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-41270: every PAF implementation decides whether it supports DISTINCT argument or not. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Susil
susil.behera@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41446 rpl.rpl_fragment_row_event_main: wait for binlog checkpoint The test failed in buildbot with a result content mismatch: in Test Case 7 the Binlog_checkpoint event naming the current binlog was listed after the CREATE TABLE events instead of before them. That event is logged asynchronously, normally by the binlog background thread, once the previous binlog has been checkpointed, so its position among the first events of a freshly rotated binlog depends on timing. Test Case 7 lists the events of the binlog opened by the FLUSH LOGS at the end of the previous test case, without waiting for that event. The other listings of this test wait for it, in rpl_fragment_row_event.inc, with include/wait_for_binlog_checkpoint.inc. Wait for the checkpoint event in the same way before the CREATE TABLE in Test Case 7. The listed checkpoint rows can also differ in a second way. show_binlog_events.inc skips the first Binlog_checkpoint of a binlog, which normally names the previous binlog. If a FLUSH LOGS runs before the background thread has logged the checkpoint of the previous one, that skipped event names an older binlog, and the checkpoint naming the previous binlog is listed as an extra row. The cleanup at the end of rpl_fragment_row_event.inc runs FLUSH LOGS shortly after the FLUSH LOGS of its last test phase, without waiting in between. Wait for the checkpoint before each of the three cleanup FLUSH LOGS (one per server). The recorded result is unchanged. Verified with the debug point inject_binlog_background_thread_before_mark_xid_done, which holds back one checkpoint event: with the event of the cleanup FLUSH LOGS held back, only the wait in Test Case 7 prevents the diff reported in the bug; with the event of the FLUSH LOGS before it held back, only the cleanup waits prevent the extra row. Both changes together pass in both cases. The same ordering variance failed binlog.binlog_checkpoint, see MDEV-29607. Assisted-by: Claude:claude-sonnet-5-5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41996 galera.galera_change_user fails: extra change_user line The test calls change_user three times. The result file recorded the echoed "change_user user1,,;" line for the first two calls but not for the third one, added by MDEV-41385. The test output has the line after "# After COM_CHANGE_USER". Add the missing line to the result file. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Daniel Black
daniel@mariadb.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41860 vec_fromtext extended metadata type=vector vec_fromtext, as the only function returning a true vector, gains the type=vector extended metadata so that connectors can process this correctly. Guidance thanks to Vivaan Sanghavi. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Susil Kumar Behera
59557163+mariadb-SusilBehera@users.noreply.github.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Merge branch '12.3' into 12.3-MDEV-41446 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41658 follow-up: map all wsrep errors, fix after_statement ordering rpt_handle_event() now calls wsrep_after_statement() unconditionally, so the provider handle and commit-order slot are released even when apply_event_and_update_pos_for_parallel() already failed. Its own failure maps through wsrep_override_error()/wsrep_current_error(), covering every wsrep::client_error code instead of only e_deadlock_error and e_interrupted_error, so has_temporary_error() can recognise any resulting retryable error. Log severity for the genuinely unexpected failure case reverts to WSREP_WARN. The duplicated mark_start_commit() guard in retry_event_group() and handle_rpl_parallel_thread() is factored into one mark_start_commit_unless_wsrep() helper. galera_parallel_slave_rollback.cnf drops the redundant binlog-format=row, already set by the included galera_2nodes_as_slave.cnf. Assisted-by: Claude:claude-4.6-sonnet |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy
drrtuy@gmail.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MDEV-41269 PAF fix for DISTINCT + literal argument. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Jan Lindström
jan.lindstrom@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42234 : Galera test failure on galera.galera_ws_datatypes Re-record after fk name change. Test change only. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
sjaakola
seppo.jaakola@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-41597: Check DEFINER of triggers and views before TOI CREATE TRIGGER, CREATE VIEW and ALTER VIEW checked the DEFINER clause (sp_process_definer(), which requires SET USER for a DEFINER other than the current user) only after TOI had replicated the statement. The replicated statement carries the DEFINER, and the applier runs with all privileges, so a statement refused on the originating node was still applied by the other nodes, creating the trigger or view with a DEFINER the user was not allowed to use. ALTER VIEW without a DEFINER clause also replicated the wrong definition. fill_defined_view_parts(), which takes DEFINER, ALGORITHM and SQL SECURITY from the existing view, ran after the replicated statement had been built, so the other nodes got the current user as DEFINER and the default SQL SECURITY. Resolve and check the DEFINER before TOI begins, as is already done for stored routines and events: - mysql_create_or_drop_trigger() calls sp_process_definer() for CREATE TRIGGER before WSREP_TO_ISOLATION_BEGIN, and Table_triggers_list::create_trigger() no longer calls it. - mysql_create_view() calls fill_defined_view_parts() (ALTER VIEW) and sp_process_definer() before WSREP_TO_ISOLATION_BEGIN. The order of checks changes for all builds: the DEFINER error is now reported before some errors that were found later in the statement. The test galera.galera_toi_definer_check checks that: - CREATE TRIGGER, CREATE VIEW and ALTER VIEW refused for a foreign DEFINER on node_1 are not applied on node_2 - ALTER VIEW without a DEFINER clause keeps the same DEFINER and SQL SECURITY on both nodes Assisted By: Claude Opus 5.5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yuchen Pei
ycp@mariadb.com |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-42208 Do not consider direct update for UPDATE ... RETURNING ... Just like direct delete is not considered for DELETE ... RETURNING ... This is because metadata sending is skipped in the direct update route. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Kristian Nielsen
knielsen@knielsen-hq.org |
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MDEV-36025: Server start fails on mariabackup with prepared transactions mariabackup --no-lock can leave InnoDB prepared transactions in the restored server; this can also happen even without --no-lock when the server is running parallel replication. But mariabackup does not back up the TC_LOG state (typically binlog, or TC_LOG_MMAP if binlog is disabled). This caused the server to complain during startup that the TC_LOG state has been lost, and requires to temporarily configure the server with --tc-heuristic-recover=rollback to roll back the offending transactions. This is a regression since 10.5, where the --rollback-xa option was removed from mariabackup --prepare. Rolling back internal XA prepared transactions is always the correct behaviour after restoring a mariabackup, just as any other active InnoDB transactions that are present in the backup (eg. just before innodb_xa_prepare() for example). The BLOCK_COMMIT MDL lock will ensure that no transaction in the backup can be in a state where it is committed in some participating engine/binlog but not the others, so consistency is guaranteed. This patch implements a new value --tc-heuristic-recover=rollback_proceed which makes the server automatically handle rolling back prepared transactions as needed when the TC_LOG state is missing, without the user having to change any configurations. This option is safe to have configured permanently: The server will still do the normal 2pc crash recovery from any existing binlog. Only when the binlog is removed prior to server startup (as mariabackup does for the restored server) will the crash recovery rollback transactions unconditionally and proceed to start the server. The default is kept as --tc-heuristic-recover=off, to not change default in existing GA release. This requires the user to configure --tc-heuristic-recover=rollback_proceed explicitly to work around the problem with mariabackup not backing up the binlog. The default could be changed when merged up to main for the next release. The old behaviour of --tc-heuristic-recover does not seem very useful. If the TC_LOG state is intentionally removed by the user, the correct behaviour seems obviously to be to roll back any prepared transactions. The purpose of having those internal prepared transactions in the first place is to ensure consistency between the engine and the binlog, this has no meaning if the binlog is gone. However, the question of whether --tc-heuristic-recover=OFF is the best default is separate from this mariabackup issue (except for the hassle for mariabackup users to have to change the configuration manually). Signed-off-by: Kristian Nielsen <[email protected]> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||