fix an issue with (select from mydb) syntax