Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
Practical-Cryptdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhaozhen
Practical-Cryptdb
Commits
beec50da
Commit
beec50da
authored
Jan 26, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more log
parent
2beaf1cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
10 deletions
+30
-10
final_load.cc
debug/final_load.cc
+30
-10
No files found.
debug/final_load.cc
View file @
beec50da
...
@@ -178,14 +178,20 @@ static ResType load_files(std::string db, std::string table){
...
@@ -178,14 +178,20 @@ static ResType load_files(std::string db, std::string table){
res
[
i
].
trans
(
fms
[
i
]);
res
[
i
].
trans
(
fms
[
i
]);
}
}
glog
<<
"loadtablemeta: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"loadtablemeta: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
//then we should load all the fields available
//then we should load all the fields available
initGfb
(
res
,
db
,
table
);
initGfb
(
res
,
db
,
table
);
glog
<<
"initGfb: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"initGfb: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
std
::
shared_ptr
<
ReturnMeta
>
rm
=
getReturnMeta
(
fms
,
res
);
std
::
shared_ptr
<
ReturnMeta
>
rm
=
getReturnMeta
(
fms
,
res
);
glog
<<
"getReturnMeta: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"getReturnMeta: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
vector
<
string
>
field_names
=
ggbt
.
field_names
;
vector
<
string
>
field_names
=
ggbt
.
field_names
;
vector
<
int
>
field_types
=
ggbt
.
field_types
;
vector
<
int
>
field_types
=
ggbt
.
field_types
;
...
@@ -217,11 +223,15 @@ static ResType load_files(std::string db, std::string table){
...
@@ -217,11 +223,15 @@ static ResType load_files(std::string db, std::string table){
}
}
ResType
rawtorestype
=
rawMySQLReturnValue_to_ResType
(
false
,
&
resraw
);
ResType
rawtorestype
=
rawMySQLReturnValue_to_ResType
(
false
,
&
resraw
);
glog
<<
"transform: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"transform: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
auto
finalresults
=
decryptResults
(
rawtorestype
,
*
rm
);
auto
finalresults
=
decryptResults
(
rawtorestype
,
*
rm
);
glog
<<
"descryption: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"descryption: "
<<
std
::
to_string
(
t_load_files
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
return
finalresults
;
return
finalresults
;
}
}
...
@@ -299,7 +309,9 @@ main(int argc, char* argv[]){
...
@@ -299,7 +309,9 @@ main(int argc, char* argv[]){
timer
t_init
;
timer
t_init
;
init
();
init
();
glog
<<
"init: "
<<
std
::
to_string
(
t_init
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"init: "
<<
std
::
to_string
(
t_init
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
create_embedded_thd
(
0
);
create_embedded_thd
(
0
);
std
::
string
db
=
"tdb"
,
table
=
"student"
;
std
::
string
db
=
"tdb"
,
table
=
"student"
;
...
@@ -314,12 +326,16 @@ main(int argc, char* argv[]){
...
@@ -314,12 +326,16 @@ main(int argc, char* argv[]){
const
std
::
unique_ptr
<
AES_KEY
>
&
TK
=
std
::
unique_ptr
<
AES_KEY
>
(
getKey
(
std
::
string
(
"113341234"
)));
const
std
::
unique_ptr
<
AES_KEY
>
&
TK
=
std
::
unique_ptr
<
AES_KEY
>
(
getKey
(
std
::
string
(
"113341234"
)));
Analysis
analysis
(
db
,
*
schema
,
TK
,
SECURITY_RATING
::
SENSITIVE
);
Analysis
analysis
(
db
,
*
schema
,
TK
,
SECURITY_RATING
::
SENSITIVE
);
glog
<<
"loadSchema: "
<<
std
::
to_string
(
t_init
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"loadSchema: "
<<
std
::
to_string
(
t_init
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
/*choose decryption onion, load and decrypt to plain text*/
/*choose decryption onion, load and decrypt to plain text*/
ResType
res
=
load_files
(
db
,
table
);
ResType
res
=
load_files
(
db
,
table
);
glog
<<
"load_files: "
<<
std
::
to_string
(
t_init
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"load_files: "
<<
std
::
to_string
(
t_init
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
std
::
string
annoTableName
=
analysis
.
getTableMeta
(
db
,
table
).
getAnonTableName
();
std
::
string
annoTableName
=
analysis
.
getTableMeta
(
db
,
table
).
getAnonTableName
();
const
std
::
string
head
=
std
::
string
(
"INSERT INTO `"
)
+
db
+
"`.`"
+
annoTableName
+
"` "
;
const
std
::
string
head
=
std
::
string
(
"INSERT INTO `"
)
+
db
+
"`.`"
+
annoTableName
+
"` "
;
...
@@ -353,9 +369,13 @@ main(int argc, char* argv[]){
...
@@ -353,9 +369,13 @@ main(int argc, char* argv[]){
break
;
break
;
}
}
}
}
glog
<<
"reencryptionAndInsert: "
<<
std
::
to_string
(
t_init
.
lap
()
/
1000000u
)
<<
"
\n
"
;
glog
<<
"reencryptionAndInsert: "
<<
std
::
to_string
(
t_init
.
lap
()
/
1000000u
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
"
\n
"
;
glog
<<
std
::
string
(
"gcount: "
)
<<
std
::
to_string
(
gcount
)
<<
std
::
string
(
"
\n
"
);
glog
<<
std
::
string
(
"gcount: "
)
<<
std
::
to_string
(
gcount
)
<<
"##"
<<
std
::
to_string
(
time
(
NULL
))
<<
std
::
string
(
"
\n
"
);
return
0
;
return
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment