mariadb/mysql-test/t/events_trans.test
unknown 624d65c591 Fix for
bug#26338 events_bugs.test fail on Debian
and
bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"


mysql-test/r/events_bugs.result:
  uppercase
mysql-test/t/events.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
mysql-test/t/events_bugs.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
mysql-test/t/events_grant.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
mysql-test/t/events_logs_tests.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
mysql-test/t/events_scheduling.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
mysql-test/t/events_stress.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
mysql-test/t/events_time_zone.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
mysql-test/t/events_trans.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
mysql-test/t/events_trans_notembedded.test:
  wait at the end of the script for event which haven't
  finished their execution. This should solve
  bug#26338 events_bugs.test fail on Debian
  and
  bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
2007-05-26 16:36:38 +02:00

121 lines
2.8 KiB
Text

#
# Tests that require transactions
#
-- source include/have_innodb.inc
--disable_warnings
drop database if exists events_test;
drop database if exists mysqltest_no_such_database;
--enable_warnings
create database events_test;
use events_test;
--echo
--echo Test that Events DDL issue an implicit COMMIT
--echo
--echo
set autocommit=off;
# Sanity check
select @@autocommit;
create table t1 (a varchar(255)) engine=innodb;
# Basic: check that successful Events DDL commits pending transaction
begin work;
insert into t1 (a) values ("OK: create event");
create event e1 on schedule every 1 day do select 1;
rollback work;
select * from t1;
delete from t1;
commit work;
#
begin work;
insert into t1 (a) values ("OK: alter event");
alter event e1 on schedule every 2 day do select 2;
rollback work;
select * from t1;
delete from t1;
commit work;
#
begin work;
insert into t1 (a) values ("OK: alter event rename");
alter event e1 rename to e2;
rollback work;
select * from t1;
delete from t1;
commit work;
#
begin work;
insert into t1 (a) values ("OK: drop event");
drop event e2;
rollback work;
select * from t1;
delete from t1;
commit work;
#
begin work;
insert into t1 (a) values ("OK: drop event if exists");
drop event if exists e2;
rollback work;
select * from t1;
delete from t1;
commit work;
#
create event e1 on schedule every 1 day do select 1;
begin work;
insert into t1 (a) values ("OK: create event if not exists");
create event if not exists e1 on schedule every 2 day do select 2;
rollback work;
select * from t1;
delete from t1;
commit work;
--echo
--echo Now check various error conditions: make sure we issue an
--echo implicit commit anyway
--echo
#
begin work;
insert into t1 (a) values ("OK: create event: event already exists");
--error ER_EVENT_ALREADY_EXISTS
create event e1 on schedule every 2 day do select 2;
rollback work;
select * from t1;
delete from t1;
commit work;
#
begin work;
insert into t1 (a) values ("OK: alter event rename: rename to same name");
--error ER_EVENT_SAME_NAME
alter event e1 rename to e1;
rollback work;
select * from t1;
delete from t1;
commit work;
#
create event e2 on schedule every 3 day do select 3;
begin work;
insert into t1 (a) values ("OK: alter event rename: destination exists");
--error ER_EVENT_ALREADY_EXISTS
alter event e2 rename to e1;
rollback work;
select * from t1;
delete from t1;
commit work;
#
begin work;
insert into t1 (a) values ("OK: create event: database does not exist");
--error ER_BAD_DB_ERROR
create event mysqltest_no_such_database.e1 on schedule every 1 day do select 1;
rollback work;
select * from t1;
delete from t1;
commit work;
#
# Cleanup
#
let $wait_condition=
select count(*) = 0 from information_schema.processlist
where db='events_test' and command = 'Connect' and user=current_user();
--source include/wait_condition.inc
drop database events_test;