mod_storage_sql2: Use correct variable (Thanks SkyBlue and Florob)
authorKim Alvefur <zash@zash.se>
Sun, 23 Jun 2013 17:27:49 +0000 (19:27 +0200)
committerKim Alvefur <zash@zash.se>
Sun, 23 Jun 2013 17:27:49 +0000 (19:27 +0200)
plugins/mod_storage_sql2.lua

index 7d705b0bcd883f135766475a4d70a88565e6db95..382c0e238a737c2d786888c6a73399b987d19a63 100644 (file)
@@ -85,7 +85,7 @@ local function set_encoding()
                                        module:log("warn", "Found %d columns in prosody table requiring encoding change, updating now...", n_bad_columns);
                                        local fix_column_query1 = "ALTER TABLE `prosody` CHANGE `%s` `%s` BLOB;";
                                        local fix_column_query2 = "ALTER TABLE `prosody` CHANGE `%s` `%s` %s CHARACTER SET 'utf8' COLLATE 'utf8_bin';";
-                                       for row in success:rows() do
+                                       for row in result:rows() do
                                                local column_name, column_type = unpack(row);
                                                engine:execute(fix_column_query1:format(column_name, column_name));
                                                engine:execute(fix_column_query2:format(column_name, column_name, column_type));