Commit 7e3564f6 authored by Ted Trask's avatar Ted Trask

Move the line error messages out of the transaction when importing.

Stangely enough, I saw a case where the logme resulted in an error, and the whole transaction was lost.
parent ed427f5a
......@@ -876,6 +876,7 @@ local function importlogfile(source, cookiesfile, file, parselog_func, importlog
pcall(function() con:execute("ROLLBACK") end)
else
assert(con:execute("ROLLBACK TO before_line"))
con:execute("COMMIT")
end
pcall(function() logme("Exception on line:"..line) end)
if err2 then
......@@ -883,6 +884,8 @@ local function importlogfile(source, cookiesfile, file, parselog_func, importlog
end
if (config.stoponerror == "true") then
assert(res2, "Import halted on exception")
else
con:execute("START TRANSACTION")
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment