Skip to content

Bug - Increase in Innodb_history_list_length #430

Closed
@davinc71998

Description

@davinc71998

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

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

스크린샷 2023-08-22 오후 11 06 03

the transaction is being maintained, the Innodb_history_list_length value will continue to increase when DML is performed.
KakaoTalk_Photo_2023-08-22-23-18-38

Solution

After executing the query, COMMIT the transaction so that it can be terminated normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions