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
1bbbc80e
Commit
1bbbc80e
authored
May 22, 2017
by
casualet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update mbk
parent
2175037a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
.gitignore
.gitignore
+0
-1
mbk.cc
main/mbk.cc
+23
-2
No files found.
.gitignore
View file @
1bbbc80e
...
...
@@ -5,7 +5,6 @@ tags
shadow/
core
curMysql
reset.sh
reset.sql
test
cscope.files
...
...
main/mbk.cc
View file @
1bbbc80e
...
...
@@ -657,7 +657,7 @@ main() {
assert
(
item
.
choosenOnions
.
size
()
==
0u
);
assert
(
item
.
onions
.
size
()
==
item
.
originalOm
.
size
());
assert
(
item
.
fields
.
size
()
==
item
.
originalOm
.
size
()
||
item
.
fields
.
size
()
==
item
.
originalOm
.
size
()
+
1
);
for
(
unsigned
int
i
=
0u
;
i
<
item
.
onions
.
size
();
i
++
){
for
(
unsigned
int
i
=
0u
;
i
<
item
.
onions
.
size
();
i
++
)
{
item
.
choosenOnions
.
push_back
(
i
);
}
}
...
...
@@ -665,7 +665,28 @@ main() {
cout
<<
backq
<<
endl
;
rawReturnValue
resraw
=
executeAndGetResultRemote
(
globalConn
,
backq
);
getInsertQuery
(
*
schema
,
res
,
db
,
table
,
resraw
);
}
else
if
(
curQuery
==
"backpart"
){
std
::
string
db
,
table
;
std
::
cout
<<
"please input dbname "
<<
std
::
endl
;
cin
>>
db
;
std
::
cout
<<
"please input table name "
<<
std
::
endl
;
cin
>>
table
;
std
::
unique_ptr
<
SchemaInfo
>
schema
=
myLoadSchemaInfo
();
//get all the fields in the tables.
std
::
vector
<
FieldMeta
*>
fms
=
getFieldMeta
(
*
schema
,
db
,
table
);
auto
res
=
getTransField
(
fms
);
//for each filed, we choose all the onions and salts.
for
(
auto
&
item
:
res
){
assert
(
item
.
choosenOnions
.
size
()
==
0u
);
assert
(
item
.
onions
.
size
()
==
item
.
originalOm
.
size
());
assert
(
item
.
fields
.
size
()
==
item
.
originalOm
.
size
()
||
item
.
fields
.
size
()
==
item
.
originalOm
.
size
()
+
1
);
item
.
choosenOnions
.
push_back
(
0
);
}
std
::
string
backq
=
getBackupQuery
(
*
schema
,
res
,
db
,
table
);
cout
<<
backq
<<
endl
;
rawReturnValue
resraw
=
executeAndGetResultRemote
(
globalConn
,
backq
);
getInsertQuery
(
*
schema
,
res
,
db
,
table
,
resraw
);
}
std
::
cout
<<
GREEN_BEGIN
<<
"
\n
please input a new query:#######"
<<
COLOR_END
<<
std
::
endl
;
std
::
getline
(
std
::
cin
,
curQuery
);
...
...
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