Merge pull request #10925 from senny/10917_test_to_prevent_regression

regression test + mysql2 adapter raises correct error if conn is closed.
Conflicts:

	activerecord/CHANGELOG.md