- Notifications
You must be signed in to change notification settings - Fork 690
Closed
Description
Problem
MySQL 8.0+: The value of Innodb_history_list_length steadily increases after running the program
The increase in Innodb_history_list_length is expected to have the following effects on MySQL
- Increased response time to user query
Bug description
python-mysql-replication/pymysqlreplication/binlogstream.py
Lines 638 to 655 in 62a009c
| def __get_table_information(self, schema, table): | |
| for i in range(1, 3): | |
| try: | |
| if not self.__connected_ctl: | |
| self.__connect_to_ctl() | |
| cur = self._ctl_connection.cursor() | |
| cur.execute(""" | |
| SELECT | |
| COLUMN_NAME, COLLATION_NAME, CHARACTER_SET_NAME, | |
| COLUMN_COMMENT, COLUMN_TYPE, COLUMN_KEY, ORDINAL_POSITION, | |
| DATA_TYPE, CHARACTER_OCTET_LENGTH | |
| FROM | |
| information_schema.columns | |
| WHERE | |
| table_schema = %s AND table_name = %s | |
| ORDER BY ORDINAL_POSITION | |
| """, (schema, table)) |
According to the logic written in binlogstream.py
After executing a query through the cursor, the transaction remains in place until the program exits
the transaction is being maintained, the Innodb_history_list_length value will continue to increase when DML is performed.

Solution
After executing the query, COMMIT the transaction so that it can be terminated normally.
dongwook-chan, chungeun-choi and soulee-dev
Metadata
Metadata
Assignees
Labels
No labels
