Commit 4ac47930 authored by yiwenshao's avatar yiwenshao

add comments

parent 7201cb3c
......@@ -3,10 +3,10 @@
#oAGG: HOM
#oASHE: ASHE
[onions for num]
oDET: DET RND
oOPE: OPE RND
#oAGG: HOM
oASHE: ASHE
#oDET: DET RND
#oOPE: OPE RND
oAGG: HOM
#oASHE: ASHE
[end]
......
......@@ -230,33 +230,24 @@ EncLayerFactory::deserializeLayer(unsigned int id,
const std::string &serial){
assert(id);
const SerialLayer li = serial_unpack(serial);
switch (li.l) {
case SECLEVEL::RND:
return RNDFactory::deserialize(id, li);
case SECLEVEL::DET:
return DETFactory::deserialize(id, li);
case SECLEVEL::DETJOIN:
return DETJOINFactory::deserialize(id, li);
case SECLEVEL::OPEFOREIGN:
return OPEFOREIGNFactory::deserialize(id,li);
case SECLEVEL::OPE:
return OPEFactory::deserialize(id, li);
case SECLEVEL::HOM:
return std::unique_ptr<EncLayer>(new HOM(id, serial));
case SECLEVEL::ASHE: return std::unique_ptr<EncLayer>(new ASHE(id, serial));
case SECLEVEL::SEARCH:
return std::unique_ptr<EncLayer>(new Search(id, serial));
case SECLEVEL::PLAINVAL:
return std::unique_ptr<EncLayer>(new PlainText(id));
default:{}
}
FAIL_TextMessageError("unknown or unimplemented security level");
......@@ -286,7 +277,6 @@ lowLevelcreateFieldHelper(const Create_field &f,
const std::string &anonname = "",
CHARSET_INFO * const charset = NULL)
{
//从内存分配新的Create_field
const THD * const thd = current_thd;
Create_field * const f0 = f.clone(thd->mem_root);
f0->length = field_length;
......
......@@ -109,6 +109,10 @@ std::string OnionMeta::getAnonOnionName() const{
return onionname;
}
/*
*Called by loadchildren.The deserialHelper uses the deserializer of the Enclayers to recover them, and the
*DBMeta::doFetchChildren reads raw data from embedded MySQL.
*/
std::vector<DBMeta *>
OnionMeta::fetchChildren(const std::unique_ptr<Connect> &e_conn){
std::function<DBMeta *(const std::string &,
......
......@@ -22,7 +22,7 @@ int main() {
}
embeddedDir = std::string(buffer)+"/shadow";
free(buffer);
// init_mysql(embeddedDir);
init_mysql(embeddedDir);
std::string filename = std::string(cryptdb_dir)+"/test_parser/"+"template";
std::string line="show databases;";
std::unique_ptr<query_parse> p;
......
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