From 56f3da28edd0fc67013e609ab646506a5110890e Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 4 Mar 2014 14:01:04 +0100 Subject: [PATCH] Fix #20 by skipping table and view missing from the catalogs. --- src/sources/mysql.lisp | 5 +++++ test/parse/hans.goeuro.load | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sources/mysql.lisp b/src/sources/mysql.lisp index 1664c9b..08592a8 100644 --- a/src/sources/mysql.lisp +++ b/src/sources/mysql.lisp @@ -365,6 +365,11 @@ (loop for (table-name . columns) in (append all-columns view-columns) + + unless columns + do (log-message :error "Table ~s not found, skipping." table-name) + + when columns do (let* ((encoding ;; force the data encoding when asked to diff --git a/test/parse/hans.goeuro.load b/test/parse/hans.goeuro.load index b8e6ab9..11afbda 100644 --- a/test/parse/hans.goeuro.load +++ b/test/parse/hans.goeuro.load @@ -16,7 +16,7 @@ LOAD DATABASE column enumerate.foo using empty-string-to-null - MATERIALIZE VIEWS + MATERIALIZE VIEWS nonexisting, d as $$ select cast(d as date) as d, count(*) as n from plop