From 3b7f77d92eb6ed23d143a6e80accdbba3db01fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Sat, 10 Oct 2026 19:52:07 +0500 Subject: [PATCH] Check packaged MySQL Unicode regex support on fresh data --- crates/coa-core/src/cleanbase.rs | 2 +- tools/test_module_sql.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/coa-core/src/cleanbase.rs b/crates/coa-core/src/cleanbase.rs index 3f96fe4..44cef0b 100644 --- a/crates/coa-core/src/cleanbase.rs +++ b/crates/coa-core/src/cleanbase.rs @@ -294,7 +294,7 @@ mod tests { #[test] fn scaffolding_keeps_the_launcher_and_drops_runtime_state_and_live_data() { - for keep in ["Runtime/python/python.exe", "Scripts/manage.py", "Settings/worldserver.conf.template", "mysql/bin/mysqld.exe", "mysql/share/english/errmsg.sys", "BugReport/relay.py", "Core/libssl-3-x64.dll", "README.txt"] { + for keep in ["Runtime/python/python.exe", "Scripts/manage.py", "Settings/worldserver.conf.template", "mysql/bin/mysqld.exe", "mysql/share/english/errmsg.sys", "mysql/lib/private/icudt.dat", "BugReport/relay.py", "Core/libssl-3-x64.dll", "README.txt"] { assert!(scaffolding(keep), "{keep}"); } for drop in [".state/world.json", "mysql/data/acore_world/x.ibd", "mysql/logs/error.log", "Core/worldserver.exe", "Core/Logs/Server.log", "BugReport/reports/a.json", "Source/server-source.zip", "Scripts/__pycache__/x.pyc", "Testing/notes.md", "mysql/data.7z"] { diff --git a/tools/test_module_sql.py b/tools/test_module_sql.py index dfa10bc..aa954d3 100644 --- a/tools/test_module_sql.py +++ b/tools/test_module_sql.py @@ -49,6 +49,9 @@ def main(): if process.poll() is not None or time.monotonic() > deadline: raise RuntimeError('Disposable MySQL did not start: ' + (Path(temp) / 'mysql.log').read_text()) time.sleep(0.5) + regex = sql("SELECT REGEXP_LIKE(CONVERT(0xD0AF USING utf8mb4), '^[[:alpha:]]$'), REGEXP_REPLACE('abc123', '[0-9]+', '');").stdout.strip() + assert regex == '1\tabc', regex + print('PASS: packaged MySQL starts on fresh data and supports Unicode regular expressions') for schema in ('fresh', 'old', 'upgraded'): sql('CREATE DATABASE `' + schema + '`;') sql('CREATE TABLE creature_template (entry INT PRIMARY KEY, ScriptName VARCHAR(128));', schema)