aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2016-03-23 12:17:28 +0000
committerMatthew Wild <mwild1@gmail.com>2016-03-23 12:17:28 +0000
commitc50a32df40853786330503ea52ffea6c040a212b (patch)
treee8be0aa66d9a33aac1ad88f64fac748b422ff7a0
parentf88b44d69994d5dae4b8e37a6e6799bbb1c19571 (diff)
downloadprosody-c50a32df40853786330503ea52ffea6c040a212b.tar.gz
prosody-c50a32df40853786330503ea52ffea6c040a212b.zip
util.sql: Charset should be innocent until proven guilty (initialize charset_ok to true), fixes bug introduced in 187ba2e9c012
-rw-r--r--util/sql.lua2
1 files changed, 1 insertions, 1 deletions
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);