Fix SQL syntax.
Merge branch 'master' into nag_4_2