fix bug when try run select whitout params + add unittest for select query