Fixed a few bugs found during mysql tests
Added a .where(bool) to choose all or no row