Merge pull request #507 from scnakandala/gsoc_2013

Refactoring SQL executor
unset variable notice corrected