From f989d97c1d45c175b00a998943bd1317b97d43a3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 23 Mar 2016 12:17:28 +0000 Subject: [PATCH] util.sql: Charset should be innocent until proven guilty (initialize charset_ok to true), fixes bug introduced in 187ba2e9c012 --- util/sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/sql.lua b/util/sql.lua index f64e8e10..657acb79 100644 --- a/util/sql.lua +++ b/util/sql.lua @@ -328,7 +328,7 @@ 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); - local charset_ok; + local charset_ok = true; for row in actual_charset do if row[2] ~= charset then log("error", "MySQL %s is actually %q (expected %q)", row[1], row[2], charset); -- 2.30.2