Commit e74b2a97 authored by Casualet's avatar Casualet

add proxy and verify

parent 6920414c
......@@ -7,7 +7,7 @@ CRYPTDB_SRCS := schema.cc Translator.cc Connect.cc \
rewrite_func.cc rewrite_sum.cc metadata_tables.cc \
error.cc stored_procedures.cc rewrite_ds.cc rewrite_main.cc big_proxy.cc
CRYPTDB_PROGS:= cdb_test load_and_store test_layer test_schema test_proxy
CRYPTDB_PROGS:= cdb_test load_and_store test_layer test_schema test_proxy change_test
CRYPTDBPROGOBJS := $(patsubst %,$(OBJDIR)/main/%,$(CRYPTDB_PROGS))
......
#include "big_proxy.hh"
#include <vector>
using std::string;
using std::vector;
vector<string> queries{
"show databases;",
"create database if not exists tdb2;",
"use tdb2;",
"create table if not exists student(id integer, name varchar(50));",
"insert into student values(1,'shao'),(2,'xiaocai'),(3,'nans'),(4,'hehe'),(5,'oo');",
"select * from student;",
"select id from student;",
"select name from student;",
"select sum(id) from student;"
};
int
main(int argc,char ** argv) {
big_proxy b;
for(auto query:queries){
b.go(query);
std::cout<<query<<" pass!"<<std::endl;
}
std::cout<<"pass ALL !!"<<std::endl;
return 0;
}
#include "big_proxy.hh"
using std::string;
int
main(int argc,char ** argv) {
big_proxy b;
......
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tpcc1000"
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb"
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb2"
mysql -uroot -pletmein -h127.0.0.1 -e "drop database if exists tdb3"
rm -rf ./shadow/*
##running this twice will caurse troubles because of the metadata mismatch
./obj/main/change_test
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