Quelle ensure_binlog_row_event_columns.inc
Sprache: Delphi
#
# Helper fileto ensure that a binary log file properly writes the expected
# fields based on the binlog_row_image value.
#
# ==== Usage ====
#
# --let $expected_columns= (COLUMN_IDS)
# --let $binlog_filename= FILENAME
# --source include/count_binlog_row_event_columns.inc
#
# Parameters:
# expected_columns (list<uint>, in) : A list of positive integers which
# correspond to the column numbers that should be output in a binary
# log's write_rows event
# binlog_filename (string, in) : Name of the binary log fileto analyze
#
if (!$expected_columns)
{
--die expected_columns parameter is required but was notset
}
if (!$binlog_filename)
{
--die binlog_filename parameter is required but was notset
}
--echo # Verifying all expected column ids appear in binlog event output..
--let num_cols_found=0
--let last_expected_col= `SELECT GREATEST $expected_columns`
--let i= 1 while($i <= $last_expected_col)
{
# By default, assume the column isnot expected to be in the binary log.
# If the column id issetin expected_columns, then override assertion
# parameters.
--let assert_count= 0
--let assert_text= Column @$i should not be in binary log
if (`SELECT $iIN$expected_columns`)
{
--let assert_count= 1
--let assert_text= Column @$i should be in binary log
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.