Commit f61f3307 authored by Casualet's avatar Casualet

update

parent 656f2fa5
...@@ -46,7 +46,7 @@ install: ...@@ -46,7 +46,7 @@ install:
.PHONY: clean .PHONY: clean
clean: clean:
rm -rf $(OBJDIR) rm -rf $(OBJDIR) mtl
.PHONY: doc .PHONY: doc
doc: doc:
......
#include "main/big_proxy.hh"
#include <vector>
using std::string;
using std::vector;
int
main(int argc,char ** argv) {
big_proxy b;
std::string query;
std::getline(std::cin,query);
while(query!="quit"){
b.go(query);
std::getline(std::cin,query);
}
return 0;
}
#include "main/big_proxy.hh"
#include <vector>
using std::string;
using std::vector;
int
main(int argc,char ** argv) {
big_proxy b;
vector<string>queries={
"show databases;",
"create database tdb;",
"use tdb;",
"create table student(id integer,name varchar(20));",
"insert into student values(1,'zhang');",
"select * from student;"
};
std::string query;
for(auto query:queries)
b.go(query);
return 0;
}
...@@ -235,25 +235,20 @@ bool setBleedingTableToRegularTable(const std::unique_ptr<Connect> &e_conn); ...@@ -235,25 +235,20 @@ bool setBleedingTableToRegularTable(const std::unique_ptr<Connect> &e_conn);
class KillZone { class KillZone {
public: public:
enum class Where {Before, After}; enum class Where {Before, After};
KillZone() : active(false) {} KillZone() : active(false) {}
~KillZone() {} ~KillZone() {}
void activate(uint64_t c, Where where) { void activate(uint64_t c, Where where) {
TEST_KillZoneFailure(false == active); TEST_KillZoneFailure(false == active);
this->count = c; this->count = c;
this->active = true; this->active = true;
this->where = where; this->where = where;
} }
void die(Where where) { void die(Where where) {
if (this->active && this->where == where && !this->count--) { if (this->active && this->where == where && !this->count--) {
assert(false); assert(false);
} }
} }
bool isActive() const {return active;} bool isActive() const {return active;}
private: private:
bool active; bool active;
uint64_t count; uint64_t count;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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