summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2021-05-12 18:03:45 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2021-05-17 16:38:58 +0530
commit88c7a58ecf231865492729f892f6aafe72cafdad (patch)
tree0f0bb7b84f180ffcff1ed5c2e0d9ea9dc5609ce1 /scripts
parent410e3c1a9a364219481392a408f12a432d83b2f2 (diff)
downloadmariadb-git-88c7a58ecf231865492729f892f6aafe72cafdad.tar.gz
MDEV-22530: Aborting OPTIMIZE TABLE still logs in binary log and replicates to the Slave server.
Problem: ======== Aborting OPTIMIZE TABLE still logs in binary logs and replicates to the Slave server. "Optimize table" command under execution, is killed by using "Ctrl-C" as shown below. MariaDB [test]> optimize table t2; ^CCtrl-C -- query killed. Continuing normally. In spite of query execution being interrupted the query gets written to binary log. Analysis: ======== Admin command execution logic is not handling KILL command, hence it ignores the KILL command and completes its execution. Fix: === Check for thread killed notification, during admin command execution and handle it. If thread kill occurs prior to any table modification the query will not be written to binary log. If kill happens after at least one table is modified then the query will be written to binary log. Ex: command in execution is 'OPTIMIZE TABLE t1,t2' and the thread kill happens after t1 table is modified then 'OPTIMIZE TABLE t1,t2' will be written to binary log as admin commands will not make the slave to diverge from master.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions