2010-01-24 08:03:23 +01:00
|
|
|
#
|
|
|
|
# === Name
|
|
|
|
#
|
|
|
|
# binlog_inject_error.inc
|
|
|
|
#
|
|
|
|
# === Description
|
|
|
|
#
|
|
|
|
# Inject binlog write error when running the query, verifies that the
|
|
|
|
# query is ended with the proper error (ER_ERROR_ON_WRITE).
|
|
|
|
#
|
|
|
|
# === Usage
|
|
|
|
#
|
|
|
|
# let query= 'CREATE TABLE t1 (a INT)';
|
|
|
|
# source include/binlog_inject_error.inc;
|
|
|
|
#
|
|
|
|
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug='d,injecting_fault_writing';
|
2010-01-24 08:03:23 +01:00
|
|
|
--echo $query;
|
|
|
|
--replace_regex /(errno: .*)/(errno: #)/
|
|
|
|
--error ER_ERROR_ON_WRITE
|
|
|
|
--eval $query
|
2011-12-15 22:07:58 +01:00
|
|
|
SET GLOBAL debug_dbug='';
|