diff options
-rw-r--r-- | util/sql.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/sql.lua b/util/sql.lua index fc1191f9..d0da9302 100644 --- a/util/sql.lua +++ b/util/sql.lua @@ -110,7 +110,10 @@ function engine:connect() dbh:autocommit(false); -- don't commit automatically self.conn = dbh; self.prepared = {}; - self:set_encoding(); + local ok, err = self:set_encoding(); + if not ok then + return ok, err; + end local ok, err = self:onconnect(); if ok == false then return ok, err; |