Skip to content

fix(mariadb): drop MySQL-only log_error_verbosity, reclassify secure_timestamp as static - #3070

Open
weicao wants to merge 1 commit into
mainfrom
fix/mariadb-effect-scope-invalid-params
Open

fix(mariadb): drop MySQL-only log_error_verbosity, reclassify secure_timestamp as static#3070
weicao wants to merge 1 commit into
mainfrom
fix/mariadb-effect-scope-invalid-params

Conversation

@weicao

@weicao weicao commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

addons/mariadb/config/mariadb-config-effect-scope.yaml lists two parameters that are invalid for MariaDB. Both were runtime-confirmed on mariadb:11.4 (2026-07-06).

1. log_error_verbosity — MySQL-only, crash-class (removed)

log_error_verbosity is a MySQL 5.7+ system variable that does not exist in MariaDB. It was listed under dynamicParameters, so a reconfigure would persist it into the engine config. On next restart mariadbd rejects it:

$ mariadbd --log_error_verbosity=3 --verbose --help
[ERROR] mariadbd: unknown variable 'log_error_verbosity=3'   # exit rc=7

This is the same failure class the addon already documents for rpl_semi_sync_master_wait_for_slave_count (removed in a prior change with the note "MariaDB 11.4 does not recognize the MySQL-specific variable ... CrashLoops the engine container on first startup"). MariaDB uses log_warnings (already in the list) for verbosity. Fix: remove log_error_verbosity.

2. secure_timestamp — read-only variable, mis-classified as dynamic (moved to static)

secure_timestamp is a read-only MariaDB variable (information_schema.SYSTEM_VARIABLES.READ_ONLY = YES); it can only be set at startup:

$ mariadb -e "SET GLOBAL secure_timestamp='YES';"
ERROR 1238 (HY000): Variable 'secure_timestamp' is a read only variable

It was under dynamicParameters, so the Configure controller would attempt SET GLOBAL and fail. Fix: move it to staticParameters so a reconfigure of it correctly triggers a restart.

Not changed (verified NOT bugs)

While auditing I also checked two params from the same area and confirmed they are not defects on MariaDB 11.4, so they are intentionally left as-is:

  • sql_log_binREAD_ONLY = NO; SET GLOBAL sql_log_bin=1 succeeds on MariaDB (unlike MySQL 8, which removed the global). Genuinely dynamic.
  • wsrep_slave_threads — exists as a built-in variable even without the wsrep provider loaded, so it does not crash non-galera topologies (it is inert there). A cross-topology scope-cleanliness nit, not a correctness bug.

Tests

reconfigure_persisted_alpha86_spec.sh: new guard group asserting log_error_verbosity is absent everywhere and secure_timestamp is classified static, not dynamic. Full mariadb suite: 666 examples, 0 failures.

@weicao weicao added the nopick Not auto cherry-pick when PR merged label Jul 6, 2026
@codecov-commenter

codecov-commenter commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (554fd84) to head (6e038fc).

Files with missing lines Patch % Lines
...ipts-ut-spec/reconfigure_persisted_alpha86_spec.sh 0.00% 19 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3070   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        144     144           
  Lines      23053   23072   +19     
=====================================
- Misses     23053   23072   +19     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…timestamp as static

Both runtime-confirmed on mariadb:11.4.

log_error_verbosity is a MySQL-only variable that does not exist in MariaDB
(`unknown variable`, mariadbd exits rc=7). Listed under dynamicParameters it
would be persisted by reconfigure and CrashLoop the engine on next restart —
the same class as the previously-removed rpl_semi_sync_master_wait_for_slave_count.
Removed; MariaDB uses log_warnings for verbosity.

secure_timestamp is a read-only MariaDB variable (SET GLOBAL returns
ERROR 1238 "read only variable"); it can only be set at startup. Moved from
dynamicParameters to staticParameters so reconfigure triggers a restart instead
of a failing SET GLOBAL.

sql_log_bin (dynamic on MariaDB) and wsrep_slave_threads (inert on non-galera)
were checked and left unchanged.

Fixes #3069
@weicao
weicao force-pushed the fix/mariadb-effect-scope-invalid-params branch from 429989e to 6e038fc Compare July 10, 2026 16:59
@weicao

weicao commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

rebase 到 main 554fd84 + re-author 为 Magnus magnus@apecloud.com + 移除 AI 署名 trailer。内容零变化(#3030/#3020 已在 merge base 内)。

@weicao

weicao commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #3276. This PR's current head 6e038fc is included in the consolidated candidate 7978812; further review and testing should use #3276.

@weicao weicao closed this Jul 28, 2026
@weicao

weicao commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Reopened per owner direction after rolling back the consolidated PR #3276. This PR is again an independent review and validation unit.

@weicao weicao reopened this Jul 28, 2026
@weicao
weicao marked this pull request as ready for review July 28, 2026 13:02
@weicao
weicao requested review from a team and leon-ape as code owners July 28, 2026 13:02

@weicao weicao left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the rendered ComponentDefinition spec.configs[].reconfigure content while keeping chart version 1.2.0-alpha.26. On released KubeBlocks v1.0.0 that field is immutable, so same-name upgrades can be rejected and leave the ComponentDefinition unavailable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nopick Not auto cherry-pick when PR merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants