Replication of bug #4292 in inline sql edit  

Signed-off-by: A V Minhaz <minhazav@gmail.com>
Bug fix 4293

Signed-off-by: A V Minhaz <minhazav@gmail.com>
coding style fix - for bug 4293

Signed-off-by: A V Minhaz <minhazav@gmail.com>
Merge pull request #953 from mebjas/QA_4_1

Replication of bug #4292 in inline sql edit