Check packaged MySQL Unicode regex support on fresh data

This commit is contained in:
Дмитрий committed 2026-10-10 19:52:07 +05:00
1 parent 0589722e71
commit 3b7f77d92e
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -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"] {
+3
View File
@@ -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)