Debian Codegraph @

mysql-test/suite/rpl/include/rpl_only_stmt_unsafe.inc

raw
1 # Check that the last statement executed harvested
2 #
3 # binlog_format | query_get_value(SHOW WARNINGS LIMIT 1, Message, 1)
4 # --------------+---------------------------------------------------
5 # statement | Unsafe statement written to the binary log.....
6 # <> statement | No such row (no warning at all)
7 #
8
9 let $my_value= query_get_value(SHOW WARNINGS LIMIT 1, Message, 1);
10 if (`SELECT (NOT ('$my_value' LIKE 'Unsafe statement written to the binary log%'
11 AND @@binlog_format = 'statement'))
12 AND
13 (NOT ('$my_value' LIKE 'No such row'
14 AND @@binlog_format <> 'statement')) `)
15 {
16 --echo ERROR:
17 --echo Last statement is
18 --echo - unsafe in case of binlog_format = 'statement'
19 --echo Expect to get a warning.
20 --echo - safe in case of binlog_format <> 'statement'
21 --echo Expect to get 'No such row'.
22 --echo Result of SHOW WARNINGS via query_get_value : '$my_value'
23 SELECT @@binlog_format;
24 --echo Abort
25 exit;
26 }
27 let $my_value= 'Garbage';