# HG changeset patch # User Kim Alvefur # Date 1577132007 -3600 # Node ID 8a42fd6702e61f383b9f9ed8bda4ee34c90a733d # Parent a6cc5b844d7b21a1b1a5f2adfbb1e086e7694d62 util.sql: Handle failure to detect connection encoding Silences a luacheck warning about an unused variable diff -r a6cc5b844d7b -r 8a42fd6702e6 util/sql.lua --- 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