Use new per-connection SQL for loading collators.

Developers have been able to register custom collators using syntax
like "SELECT icu_load_collation()", but collators are registered per
database connection.

Since we don't expose any details APIs for interacting with connection
pools directly, developers can end up with flaky behavior as their
queries rotate through the pool of connections, as only a subset of
connections will have their collation registered.

This solve this, we add a new execPerConnectionSQL() method to
ensure that a given statement is executed on all current and future
database connections.

Bug: 152005629
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I9c82ae63e9ef3b32388b10a96a8a00bc1d2a479b
1 file changed