Software /
code /
prosody
Diff
util/sql.lua @ 10534:8a42fd6702e6
util.sql: Handle failure to detect connection encoding
Silences a luacheck warning about an unused variable
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 23 Dec 2019 21:13:27 +0100 |
parent | 10275:a247fa8df7df |
child | 12872:a20923f7d5fd |
line wrap: on
line diff
--- a/util/sql.lua Mon Dec 23 21:09:38 2019 +0100 +++ b/util/sql.lua Mon Dec 23 21:13:27 2019 +0100 @@ -335,6 +335,9 @@ local ok, actual_charset = self:transaction(function () return self:select"SHOW SESSION VARIABLES LIKE 'character_set_client'"; end); + if not ok then + return false, "Failed to detect connection encoding"; + end local charset_ok = true; for row in actual_charset do if row[2] ~= charset then