Fix wrong SQL statement for MetadataMsg table.