bug #4607 Syntax error during db_copy operation

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