Commit 0748e564 authored by yiwenshao's avatar yiwenshao

debug

parent 5d9ff989
#include "main/big_proxy.hh"
#include <vector>
using std::string;
int
main(int argc,char ** argv) {
std::vector<string> create{
"create database micro_db;",
"use micro_db;",
"create table int_table(id integer);",
};
big_proxy b;
for(auto item:create){
b.go(item);
}
return 0;
}
...@@ -4,8 +4,8 @@ using std::string; ...@@ -4,8 +4,8 @@ using std::string;
int int
main(int argc,char ** argv) { main(int argc,char ** argv) {
if(argc!=2){ if(argc<2){
std::cout<<"expect 1 argument"<<std::endl; std::cout<<"expect 1 or 2 arguments"<<std::endl;
return 0; return 0;
} }
string length(argv[1]); string length(argv[1]);
...@@ -13,12 +13,9 @@ main(int argc,char ** argv) { ...@@ -13,12 +13,9 @@ main(int argc,char ** argv) {
std::vector<string> create{ std::vector<string> create{
"create database micro_db;", "create database micro_db;",
"use micro_db;", "use micro_db;",
"create table int_table(id integer);",
string("create table str_table(name varchar(")+length+"));" string("create table str_table(name varchar(")+length+"));"
}; };
big_proxy b;
big_proxy b;
for(auto item:create){ for(auto item:create){
b.go(item); b.go(item);
} }
......
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