# Related Aone bug: # https://aone.alibaba-inc.com/project/488772/issue/20623281 # --connect (follower,127.0.0.1,root,,test,$MYPORT_2) flush local logs; # restart follower --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --enable_reconnect --sleep 1 --source include/wait_until_connected_again_old.inc flush local logs; # # testcase: flush empty log should not break 'show consensus_log events' command # --connection default create database test1; drop database test1; flush logs; flush logs; flush logs; create database test1; #purge consensus_log before 100000000; call dbms_consensus.purge_log(100000000); --replace_column 1 # 2 # 3 # show consensus logs; let $idx= query_get_value("show consensus logs", Start_log_index, 1); let $idx1 = query_get_value("select $idx-1 as idx1", idx1, 1); let $idx2 = query_get_value("select $idx+1 as idx2", idx2, 1); let $idx3 = query_get_value("select $idx+2 as idx3", idx3, 1); --replace_result $idx1 idx1 --error 1220 eval show consensus_log events from $idx1 limit 1; --replace_column 1 # 2 # 4 # 5 # 6 # --replace_result $idx idx eval show consensus_log events from $idx limit 1; --replace_result $idx2 idx2 eval show consensus_log events from $idx2 limit 1; --replace_result $idx3 idx3 --error 1220 eval show consensus_log events from $idx3 limit 1; flush logs; flush logs; flush logs; --replace_column 1 # 2 # 3 # show consensus logs; --replace_result $idx2 idx2 eval show consensus_log events from $idx2 limit 1; --replace_result $idx3 idx3 --error 1220 eval show consensus_log events from $idx3 limit 1; drop database test1; --replace_column 1 # 2 # 4 # 5 # 6 # --replace_result $idx2 idx2 eval show consensus_log events from $idx2 limit 1; --replace_result $idx3 idx3 eval show consensus_log events from $idx3 limit 1;