util/sql.lua
changeset 10538 8a42fd6702e6
parent 10279 a247fa8df7df
child 12876 a20923f7d5fd
--- 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