| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Used by scripts testing XA crash recovery, it searches |
| 4 |
# `performance_schema.error_log` table for one occurrence of the given |
| 5 |
# InnoDB message. |
| 6 |
# |
| 7 |
# ==== Parameters ==== |
| 8 |
# |
| 9 |
# $assert_select |
| 10 |
# Sub-string to search for in the error log. |
| 11 |
# |
| 12 |
# ==== References ==== |
| 13 |
# |
| 14 |
# WL#11300: Crash-safe XA + binary log |
| 15 |
# |
| 16 |
# Related tests; |
| 17 |
# see extra/xa_crash_safe_tests/setup.inc |
| 18 |
# |
| 19 |
|
| 20 |
if ($assert_select == '') { |
| 21 |
--die ERROR IN TEST: You must set $assert_select before sourcing assert_recovery_message.inc |
| 22 |
} |
| 23 |
|
| 24 |
let $_row_count_to_assert = |
| 25 |
`SELECT COUNT(1) |
| 26 |
FROM performance_schema.error_log |
| 27 |
WHERE |
| 28 |
subsystem = 'InnoDB' AND |
| 29 |
prio = 'Note' AND |
| 30 |
data LIKE '%$assert_select%'`; |
| 31 |
--let $assert_text = Found log message(s) for "$assert_select" |
| 32 |
--let $assert_cond = $_row_count_to_assert > 0 |
| 33 |
--source include/assert.inc |