fix: support utf8mb4 across MySQL and MariaDB
Test / test (push) Canceled after 6m35s
Build and publish image / image (push) Successful in 13m42s

This commit is contained in:
bryanpedini committed 2026-11-20 15:14:28 +01:00
1 parent cce17c5fa4
commit d34894c9cd
28 files changed
+224 -121

No files matched your search

+3 -3
View File
@@ -184,7 +184,7 @@ func (m *matrixSQL) exec(w *matrixWorld, query string, args []any) fdbResponse {
}
}
return fdbResponse{}
case has("SELECT 1 FROM `coredns_webui_zone_delegations` WHERE `zone` = ? AND `user_id` = ?"):
case has("SELECT 1 FROM `coredns_webui_zone_delegations` WHERE `zone` = CAST(? AS BINARY) AND `user_id` = ?"):
if _, ok := w.state.delegations[delegationKey{args[0].(string), args[1].(int64)}]; ok {
return fdbResponse{rows: fdbRow(int64(1))}
}
@@ -206,7 +206,7 @@ func (m *matrixSQL) exec(w *matrixWorld, query string, args []any) fdbResponse {
}
}
return fdbResponse{}
case has("FOR UPDATE OF d"):
case has("ORDER BY username FOR UPDATE"):
var out []delegationRow
for k, d := range w.state.delegations {
if k.zone == args[0] {
@@ -220,7 +220,7 @@ func (m *matrixSQL) exec(w *matrixWorld, query string, args []any) fdbResponse {
rows = append(rows, []driver.Value{d.Zone, d.UserID, d.Username, d.CreatedAt, d.CreatedBy})
}
return fdbResponse{rows: rows}
case has("DELETE FROM `coredns_webui_zone_delegations` WHERE `zone` = ?"):
case has("DELETE FROM `coredns_webui_zone_delegations` WHERE `zone` = CAST(? AS BINARY)"):
var n int64
for k := range w.state.delegations {
if k.zone == args[0] {