projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dfc061
)
util.sql: Return failure if set_encoding() fails
author
Matthew Wild
<mwild1@gmail.com>
Wed, 8 Jul 2015 14:10:25 +0000
(15:10 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Wed, 8 Jul 2015 14:10:25 +0000
(15:10 +0100)
util/sql.lua
patch
|
blob
|
history
diff --git
a/util/sql.lua
b/util/sql.lua
index fc1191f96a65f6ce106134e76cbd44f0333616a8..d0da930279fcf7ef1a17029d12c373100a98d0b6 100644
(file)
--- 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;