1# 2# === Name 3# 4# binlog_inject_error.inc 5# 6# === Description 7# 8# Inject binlog write error when running the query, verifies that the 9# query is ended with the proper error (ER_ERROR_ON_WRITE). 10# 11# === Usage 12# 13# let query= 'CREATE TABLE t1 (a INT)'; 14# source include/binlog_inject_error.inc; 15# 16set @saved_dbug = @@global.debug_dbug; 17SET GLOBAL debug_dbug='d,injecting_fault_writing'; 18--echo $query; 19--replace_regex /(errno: .*)/(errno: #)/ 20--error ER_ERROR_ON_WRITE 21--eval $query 22set @@global.debug_dbug = @saved_dbug; 23