The test sets a session variable and queries a union of this variable and a value in each of the databases.