bug #4625 "Insufficient space to save the file" on export SQL to file on server

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