--echo #---- Bug 205 ----
SET STORAGE_ENGINE='Falcon';

#                                                                     #
# This test is derived from innodb.test                               #
#                                                                     #

--enable_abort_on_error

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

# We need sometimes several attempts to reach the problem
let $num= 1000;
while ($num)
{
create table t1 (n int not null primary key) ;
set autocommit=0;
insert into t1 values (4);
rollback;
select n, "after rollback" from t1;
insert into t1 values (4);
commit;
select n, "after commit" from t1;
commit;
insert into t1 values (5);
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (4);
commit;
select n, "after commit" from t1;
set autocommit=1;
insert into t1 values (6);
--error ER_DUP_ENTRY_WITH_KEY_NAME
insert into t1 values (4);
select n from t1;
set autocommit=0;

DROP TABLE t1;
dec $num;
--echo $num;
}
