diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-06-16 16:00:40 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-06-16 16:00:40 +0200 |
commit | 008292817580eba8a0f0cf83d8e2d08df8fc8c3f (patch) | |
tree | 7e47d035cc5d1f54d20f556476c439844f1956e0 /tex/context/base/mkiv/util-sql.lua | |
parent | 5e668aa418d6d082446e9369ae06625b50e49943 (diff) | |
download | context-008292817580eba8a0f0cf83d8e2d08df8fc8c3f.tar.gz |
2017-06-15 22:16:00
Diffstat (limited to 'tex/context/base/mkiv/util-sql.lua')
-rw-r--r-- | tex/context/base/mkiv/util-sql.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/util-sql.lua b/tex/context/base/mkiv/util-sql.lua index 09056c048..0eff25130 100644 --- a/tex/context/base/mkiv/util-sql.lua +++ b/tex/context/base/mkiv/util-sql.lua @@ -103,7 +103,7 @@ local defaults = { __index = variables = { }, username = "default", password = "default", - host = "localhost", + host = "localhost", -- 127.0.0.1 is sometimes more reliable port = 3306, database = "default", }, @@ -285,7 +285,13 @@ local currentmethod local currentserver local function firstexecute(...) - local execute = methods[currentmethod].execute + local method = methods[currentmethod] + if not method then + report_state("invalid sql method") + sql.execute = function() end + return nil + end + local execute = method.execute sql.execute = execute return execute(...) end |