diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-29 02:10:55 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-29 02:10:55 +0100 |
commit | bd5f9b8cbfd168a21141607218446222ab9d8642 (patch) | |
tree | e78baabff21e9b6fefaeef4a709098ca30b35922 /tools/ejabberdsql2prosody.lua | |
parent | 9b89441dd008a8b3fda12d9217ff6f9ba240df9a (diff) | |
parent | a2055895d362fed58ff314820bb7fddd53e40436 (diff) | |
download | prosody-bd5f9b8cbfd168a21141607218446222ab9d8642.tar.gz prosody-bd5f9b8cbfd168a21141607218446222ab9d8642.zip |
Merge 0.9->trunk
Diffstat (limited to 'tools/ejabberdsql2prosody.lua')
-rw-r--r-- | tools/ejabberdsql2prosody.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/ejabberdsql2prosody.lua b/tools/ejabberdsql2prosody.lua index 576f4436..c64faee0 100644 --- a/tools/ejabberdsql2prosody.lua +++ b/tools/ejabberdsql2prosody.lua @@ -129,7 +129,12 @@ local function readInsert() end end local tname = readTableName(); - for ch in ("` VALUES "):gmatch(".") do read(ch); end -- expect this + read("`"); read(" ") -- expect this + if peek() == "(" then -- skip column list + repeat until read() == ")"; + read(" "); + end + for ch in ("VALUES "):gmatch(".") do read(ch); end -- expect this local tuples = readTuples(); read(";"); read("\n"); return tname, tuples; |