bug #4187 SQL query inline edit doesn't post changes on the first run

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>