CREATE TABLE t0 ( col1 INT) ENGINE = MyISAM  ;
# One of the concurrent SQL runner has removed the file '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/run'.
# == Hit an unexpected effect.
MY_CURRENT_TS : 1550524313 , MY_START_TS : 1550524323 , MY_END_TS : 1550524383
MY_NUMBER : 2 , TST_FILE : '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.2'
Begin of content of '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.2' ----
--echo # Begin of SQL_FILE
# Values provided by Wlad (Mariabackup).
SET SESSION wait_timeout = 2147483, max_statement_time = 0;
SET SESSION lock_wait_timeout = 31536000;
let $run=1;
let $batch_num=0;
--disable_query_log
# IMHO all BACKUP STAGE statements should pass because
# 1. There is only *one* concurrent session, the ALTER TABLE runner above, in the game.
# 2. The BACKUP STAGE runner
#    - should show a sufficient patience (locking timeouts >> a few seconds)
#    - does not run SQL != BACKUP STAGE at all
# 3. The scheduling in the DB server should be sufficient fair
#    == The BACKUP STAGE runner might get his chance not immediate.
#       But after a few statements of the ALTER TABLE runner he should get his chance.
# --disable_abort_on_error
#

while ($run)
{
   inc $batch_num;
   if($batch_num == 30)
   {
      --error 0
      --file_exists $RUN_FILE
      let $batch_num=0;
   }
   BACKUP STAGE START ;
   BACKUP STAGE FLUSH ;
   BACKUP STAGE BLOCK_DDL ;
   BACKUP STAGE BLOCK_COMMIT ;
   BACKUP STAGE END ;
}
--echo # End   of SQL_FILE reached
End   of content of '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.2' ----
Start executing '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.2' at TS: 1550524323
End   executing '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.2' at TS: 1550524323 and status was 1
Begin of       output ----
# Begin of SQL_FILE
SET SESSION wait_timeout = 2147483, max_statement_time = 0;
SET SESSION lock_wait_timeout = 31536000;
not ok
End   of       output ----
Begin of error output ----
mysqltest: At line 30: query 'BACKUP STAGE BLOCK_DDL ' failed: 1213: Deadlock found when trying to get lock; try restarting transaction
End   of error output ----
ERROR: My exit status > 0 means I have hit some not expected problem.
Removing the file '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/run' and giving up.
Giving up.
MY_CURRENT_TS : 1550524313 , MY_START_TS : 1550524323 , MY_END_TS : 1550524383
MY_NUMBER : 1 , TST_FILE : '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.1'
Begin of content of '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.1' ----
--echo # Begin of SQL_FILE
SET AUTOCOMMIT = 0 ; 
SET SESSION lock_wait_timeout = 2  ; 
SET SESSION innodb_lock_wait_timeout = 1 ;
let $run=1;
let $batch_num=0;
--disable_query_log
--disable_abort_on_error
while ($run)
{
   inc $batch_num;
   if($batch_num == 30)
   {
      --error 0
      --file_exists $RUN_FILE
      let $batch_num=0;
   }
   ALTER TABLE t0 ADD KEY  `idx1` ( col1 )  ;
   ALTER TABLE t0 DROP KEY `idx1`;
}
--echo # End   of SQL_FILE reached
End   of content of '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.1' ----
Start executing '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.1' at TS: 1550524323
End   executing '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/sql.1' at TS: 1550524323 and status was 1
Begin of       output ----
# Begin of SQL_FILE
SET AUTOCOMMIT = 0 ;
SET SESSION lock_wait_timeout = 2  ;
SET SESSION innodb_lock_wait_timeout = 1 ;
not ok
End   of       output ----
Begin of error output ----
mysqltest: At line 20: command "file_exists" failed with wrong error: 1  my_errno: 2  errno: 2
End   of error output ----
The file '/home/mleich/Server/10.4/bld_debug/mysql-test/var/tmp/run' does no more exist.
This means some concurrent session has observed a problem and deleted that file.
Assuming that this is the reason for my exit status > 0.
ENDE 1550524323
