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

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

--enable_abort_on_error

--disable_warnings
drop table if exists t1;
--enable_warnings

# Heavy simplified testcase
create table t1 (id int not null ,
                 name char(20) not null,
                 primary key (id));

insert into t1 (id, name) values (1, 'Tim'), (2, 'Monty');
select id, name from t1 order by id;

update ignore t1 set id = 8, name = 'Sinisa' where id < 3;
select count(*) from t1 where name = 'Sinisa';

drop table t1;


# Slightly simplified original testcase
create table t1 (id int unsigned not null auto_increment,
                 code tinyint unsigned not null, name char(20) not null,
                 primary key (id), key (code), unique (name));

insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty');
select id, code, name from t1 order by id;

update ignore t1 set id = 8, name = 'Sinisa' where id < 3;
select count(*) from t1 where name = 'Sinisa';

drop table t1;
