-
Dyre Tjeldvoll authored
Execution of certain BINLOG statements while having temporary tables open by HANDLER statements caused server crash. Execution of BINLOG statements for Start/Format_description events may close the connection's temporary tables. If a handler had been associated with a temporary table, the BINLOG statement's call to close_temporary_tables() would result in dangling pointers to the now freed TABLE in thd->handler_table_hash. Similarly, a dangling pointer would also be left if there was a lock on the temporary table. Running with valgrind showed that freed memory was being accessed. Solution: Properly close handlers and remove locks associated with temporary tables being closed by the BINLOG statement. (cherry picked from commit 11507ffa1df94c1d4df78f3b9b9d4de591ebc43e) Conflicts: sql/sql_base.cc Changes to a GTID related comment. Retained the version from 5.6.
Dyre Tjeldvoll authoredExecution of certain BINLOG statements while having temporary tables open by HANDLER statements caused server crash. Execution of BINLOG statements for Start/Format_description events may close the connection's temporary tables. If a handler had been associated with a temporary table, the BINLOG statement's call to close_temporary_tables() would result in dangling pointers to the now freed TABLE in thd->handler_table_hash. Similarly, a dangling pointer would also be left if there was a lock on the temporary table. Running with valgrind showed that freed memory was being accessed. Solution: Properly close handlers and remove locks associated with temporary tables being closed by the BINLOG statement. (cherry picked from commit 11507ffa1df94c1d4df78f3b9b9d4de591ebc43e) Conflicts: sql/sql_base.cc Changes to a GTID related comment. Retained the version from 5.6.
Loading