potiuk commented on a change in pull request #12596:
URL: https://github.com/apache/airflow/pull/12596#discussion_r530287460
##########
File path: tests/operators/test_generic_transfer.py
##########
@@ -55,12 +55,12 @@ def tearDown(self):
)
def test_mysql_to_mysql(self, client):
with MySqlContext(client):
- sql = "SELECT * FROM INFORMATION_SCHEMA.TABLES LIMIT 100;"
+ sql = "SELECT * FROM connection;"
op = GenericTransfer(
task_id='test_m2m',
preoperator=[
"DROP TABLE IF EXISTS test_mysql_to_mysql",
- "CREATE TABLE IF NOT EXISTS test_mysql_to_mysql LIKE
INFORMATION_SCHEMA.TABLES",
Review comment:
I actually wanted. This test was failing on MYSQL 8 because you cannot
do CREATE TABLE LIKE on INFORMATION_SCHEMA.TABLES - in MySQL8 you get an error
when you try to do this
```
self = <_mysql.connection closed at 55e386a803e8>
query = b'CREATE TABLE IF NOT EXISTS test_mysql_to_mysql LIKE
INFORMATION_SCHEMA.TABLES'
def query(self, query):
# Since _mysql releases GIL while querying, we need immutable buffer.
if isinstance(query, bytearray):
query = bytes(query)
if self.waiter is not None:
self.send_query(query)
self.waiter(self.fileno())
self.read_query_result()
else:
> _mysql.connection.query(self, query)
E _mysql_exceptions.OperationalError: (1347,
"'information_schema.TABLES' is not BASE TABLE")
```
So rather than INFORMATION_SCHEMA.TABLES I picked connection as the source
of the transfer (random pick really - I was working on the connection
description problem, it's small enough table to be similar to
information_schema.TABLES.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]