--- a/plugins/mod_storage_sql2.lua Tue Dec 09 19:36:34 2014 +0100
+++ b/plugins/mod_storage_sql2.lua Thu Dec 11 09:18:39 2014 +0100
@@ -113,8 +113,6 @@
--local dburi = db2uri(params);
engine = mod_sql:create_engine(params);
- engine:set_encoding();
-
if module:get_option("sql_manage_tables", true) then
-- Automatically create table, ignore failure (table probably already exists)
create_table();
--- a/util/sql.lua Tue Dec 09 19:36:34 2014 +0100
+++ b/util/sql.lua Thu Dec 11 09:18:39 2014 +0100
@@ -156,6 +156,7 @@
dbh:autocommit(false); -- don't commit automatically
self.conn = dbh;
self.prepared = {};
+ self:set_encoding();
return true;
end
function engine:execute(sql, ...)