From 7434f41ee4c61ab7d5786f2eb91d0693949c39bd Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 30 Nov 2012 08:50:03 +0500 Subject: mod_storage_sql: Return actual error string on commit failure. --- plugins/mod_storage_sql.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/mod_storage_sql.lua') diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index f6fa94e7..eed3fec9 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -228,7 +228,8 @@ local function rollback(...) return ...; end local function commit(...) - if not connection:commit() then return nil, "SQL commit failed"; end + local success,err = connection:commit(); + if not success then return nil, "SQL commit failed: "..tostring(err); end return ...; end -- cgit v1.2.3