util.sql: Charset should be innocent until proven guilty (initialize charset_ok to...
authorMatthew Wild <mwild1@gmail.com>
Wed, 23 Mar 2016 12:17:28 +0000 (12:17 +0000)
committerMatthew Wild <mwild1@gmail.com>
Wed, 23 Mar 2016 12:17:28 +0000 (12:17 +0000)
util/sql.lua

index f64e8e10a141c4cc0a9583bfa0e6e0819e589a0f..657acb79d0dd72d0f431b2300e545f5f2b41d555 100644 (file)
@@ -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);