Commit 8df5dd1c authored by casualet's avatar casualet

update

parent 9c784fec
......@@ -9,8 +9,8 @@ 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;
w_ytd decimal(12,2)
) Engine=InnoDB;
drop table if exists district;
......@@ -25,8 +25,8 @@ 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;
d_next_o_id int
) Engine=InnoDB;
drop table if exists customer;
......@@ -51,8 +51,7 @@ c_balance decimal(12,2),
c_ytd_payment decimal(12,2),
c_payment_cnt smallint,
c_delivery_cnt smallint,
c_data text,
PRIMARY KEY(c_w_id, c_d_id, c_id) ) Engine=InnoDB;
c_data VARCHAR(1000)) Engine=InnoDB;
drop table if exists history;
......@@ -71,8 +70,7 @@ drop table if exists new_orders;
create table new_orders (
no_o_id int not null,
no_d_id tinyint not null,
no_w_id smallint not null,
PRIMARY KEY(no_w_id, no_d_id, no_o_id)) Engine=InnoDB;
no_w_id smallint not null) Engine=InnoDB;
drop table if exists orders;
......@@ -84,8 +82,7 @@ o_c_id int,
o_entry_d datetime,
o_carrier_id tinyint,
o_ol_cnt tinyint,
o_all_local tinyint,
PRIMARY KEY(o_w_id, o_d_id, o_id) ) Engine=InnoDB ;
o_all_local tinyint) Engine=InnoDB ;
drop table if exists order_line;
......@@ -99,8 +96,7 @@ ol_supply_w_id smallint,
ol_delivery_d datetime,
ol_quantity tinyint,
ol_amount decimal(6,2),
ol_dist_info char(24),
PRIMARY KEY(ol_w_id, ol_d_id, ol_o_id, ol_number) ) Engine=InnoDB ;
ol_dist_info char(24)) Engine=InnoDB ;
drop table if exists item;
......@@ -109,8 +105,8 @@ i_id int not null,
i_im_id int,
i_name varchar(24),
i_price decimal(5,2),
i_data varchar(50),
PRIMARY KEY(i_id) ) Engine=InnoDB;
i_data varchar(50)
) Engine=InnoDB;
drop table if exists stock;
......@@ -131,6 +127,5 @@ s_dist_10 char(24),
s_ytd decimal(8,0),
s_order_cnt smallint,
s_remote_cnt smallint,
s_data varchar(50),
PRIMARY KEY(s_w_id, s_i_id) ) Engine=InnoDB ;
s_data varchar(50)) Engine=InnoDB ;
echo "=============================================CREATE DATABASE====================================================="
mysql -uroot -pletmein -h127.0.0.1 -P3399 -e "create database tpcc1000"
echo "=============================================CREATE TABLE====================================================="
mysql -uroot -pletmein -h127.0.0.1 -P3399 tpcc1000 < create_table.sql
#mysql -uroot -pletmein -h127.0.0.1 -P3399 tpcc1000 < create_table.sql
echo "=============================================LOAD DATA====================================================="
mysql -uroot -pletmein -h127.0.0.1 -P3399 tpcc1000 < all$1.sql
echo "=============================================DUMP DATABASE====================================================="
......
......@@ -3,6 +3,10 @@
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tpcc1000"
mysql -uroot -pletmein -h127.0.0.1 -e "create database tpcc1000"
mysql -uroot -pletmein -h127.0.0.1 tpcc1000 < create_table.sql
./tpcc_load -h127.0.0.1 -uroot -pletmein -d tpcc1000 -w $1
mysqldump --skip-extended-insert -uroot -pletmein -h127.0.0.1 --no-create-info --hex-blob --compact tpcc1000 > all$1.sql
# mysqldump --skip-extended-insert -uroot -pletmein -h127.0.0.1 --no-create-info --hex-blob --compact tpcc1000 > all$1.sql
mysqldump -uroot -pletmein -h127.0.0.1 --hex-blob --compact tpcc1000 > all$1.sql
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tpcc1000"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment