fix logic deciding whether to serialize write_stmt
update IDENTITY (translating read_stmt now)