aboutsummaryrefslogtreecommitdiffstats
path: root/util/sql.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-23 21:13:27 +0100
committerKim Alvefur <zash@zash.se>2019-12-23 21:13:27 +0100
commitbe507b93838619f24a0b5cc89463513bc2238932 (patch)
tree2dfd90d7c042e62d6dc3071b81e9b5bb2025d23e /util/sql.lua
parent7da0e322ed6969444703a976ae01fabdadfb2794 (diff)
downloadprosody-be507b93838619f24a0b5cc89463513bc2238932.tar.gz
prosody-be507b93838619f24a0b5cc89463513bc2238932.zip
util.sql: Handle failure to detect connection encoding
Silences a luacheck warning about an unused variable
Diffstat (limited to 'util/sql.lua')
-rw-r--r--util/sql.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/sql.lua b/util/sql.lua
index 86740b1c..9d1c86ca 100644
--- a/util/sql.lua
+++ b/util/sql.lua
@@ -335,6 +335,9 @@ function engine:set_encoding() -- to UTF-8
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