Debian Codegraph @

mysql-test/suite/binlog/include/check_binlog_size.inc

raw
1 # This file runs the query and checks
2 # whether the size of binlog is increased or not
3 # If size is changed it issue die command
4 # Parameters
5 # $sql_query = query to run
6
7 #Only last row of show binlog events matter
8 --let $tmp= 0
9 --let $counter= 1
10 while ($tmp != "No such row")
11 {
12 --let $initial_binlog_size= $tmp
13 --let $tmp= query_get_value(show binary logs, File_size, $counter)
14 --inc $counter
15 }
16
17 --eval $sql_query
18
19 --let $tmp= 0
20 --let $counter= 1
21 while ($tmp != "No such row")
22 {
23 --let $current_binlog_size= $tmp
24 --let $tmp= query_get_value(show binary logs, File_size, $counter)
25 --inc $counter
26 }
27
28 if ($initial_binlog_size != $current_binlog_size)
29 {
30 die "Binlog size changed";
31 }