[1.7.x] Fixed #21166 -- Reset errors_occurred flag after commit and rollback.
[1.7.x] Fixed #21166 -- Reset errors_occurred flag after commit and rollback.

Backport of 3033a71 from master.

Conflicts:
	django/db/backends/__init__.py

oscaro/django,jyotsna1820/django,oscaro/django,jyotsna1820/django,oscaro/django,jyotsna1820/django,jyotsna1820/django,oscaro/django