sql: fix tests