From: Matthew Wild Date: Wed, 23 Mar 2016 12:17:28 +0000 (+0000) Subject: util.sql: Charset should be innocent until proven guilty (initialize charset_ok to... X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=f989d97c1d45c175b00a998943bd1317b97d43a3;p=prosody.git util.sql: Charset should be innocent until proven guilty (initialize charset_ok to true), fixes bug introduced in 187ba2e9c012 --- 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);