Merge pull request #4 from greenlion/master

update
get_sql

* get_sql handles invalid mv_id and non-defined mv
* tests for get_sql
* re-sorted tests
suppress IF EXISTS warnings everywhere
Merge pull request #17 from santec/master

get_sql + IF EXISTS warnings - I don't think the warnings are really useful anywhere so it looks good.