create schema insert_bypass;
set current_schema to 'insert_bypass';
drop table if exists warehouse;
create table warehouse (
w_id smallint not null,
w_name varchar(10),
w_street_1 varchar(20),
w_street_2 varchar(20),
w_city varchar(20),
w_state char(2),
w_zip char(9),
w_tax decimal(4,2),
w_ytd decimal(12,2),
primary key (w_id) ) Engine=InnoDB;
drop table if exists district;
create table district (
d_id tinyint not null,
d_w_id smallint not null,
d_name varchar(10),
d_street_1 varchar(20),
d_street_2 varchar(20),
d_city varchar(20),
d_state char(2),
d_zip char(9),
d_tax decimal(4,2),
d_ytd decimal(12,2),
d_next_o_id int,
primary key (d_w_id, d_id) ) Engine=InnoDB;
ALTER TABLE district ADD CONSTRAINT fkey_district_1 FOREIGN KEY(d_w_id) REFERENCES warehouse(w_id);
insert into warehouse values (1, 1, 1, 1, 1, 1, 1, 1, 1);
prepare s1 as INSERT INTO district values(?,?,?,?,?,?,?,?,?,?,?);
explain (costs off) execute s1 using 1,1,1,1,1,1,1,1,1,1,1;
SET FOREIGN_KEY_CHECKS=0;
set opfusion_debug_mode = 'log';
prepare s1 as INSERT INTO district values(?,?,?,?,?,?,?,?,?,?,?);
explain (costs off) execute s1 using 1,1,1,1,1,1,1,1,1,1,1;
drop table district;
drop table warehouse;
drop schema insert_bypass cascade;
reset current_schema;