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
21ae6eaa
Commit
21ae6eaa
authored
May 20, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove ggbt
parent
6f31dac4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
simple_load_new.cc
tools/simple_load_new.cc
+16
-19
No files found.
tools/simple_load_new.cc
View file @
21ae6eaa
...
@@ -103,18 +103,13 @@ load_columns(std::vector<FieldMetaTrans> &fmts,std::string db,std::string table)
...
@@ -103,18 +103,13 @@ load_columns(std::vector<FieldMetaTrans> &fmts,std::string db,std::string table)
}
}
struct
batch
{
vector
<
string
>
field_names
;
vector
<
int
>
field_types
;
vector
<
int
>
field_lengths
;
};
batch
ggbt
;
/*should choose the right decryption onion*/
/*should choose the right decryption onion*/
static
static
std
::
shared_ptr
<
ReturnMeta
>
getReturnMeta
(
std
::
vector
<
FieldMeta
*>
fms
,
std
::
shared_ptr
<
ReturnMeta
>
getReturnMeta
(
std
::
vector
<
FieldMeta
*>
fms
,
std
::
vector
<
FieldMetaTrans
>
&
tfds
){
std
::
vector
<
FieldMetaTrans
>
&
tfds
,
vector
<
string
>
&
field_names
,
vector
<
int
>
&
field_types
,
vector
<
int
>
&
field_lengths
){
assert
(
fms
.
size
()
==
tfds
.
size
());
assert
(
fms
.
size
()
==
tfds
.
size
());
std
::
shared_ptr
<
ReturnMeta
>
myReturnMeta
=
std
::
make_shared
<
ReturnMeta
>
();
std
::
shared_ptr
<
ReturnMeta
>
myReturnMeta
=
std
::
make_shared
<
ReturnMeta
>
();
int
pos
=
0
;
int
pos
=
0
;
...
@@ -139,14 +134,14 @@ std::shared_ptr<ReturnMeta> getReturnMeta(std::vector<FieldMeta*> fms,
...
@@ -139,14 +134,14 @@ std::shared_ptr<ReturnMeta> getReturnMeta(std::vector<FieldMeta*> fms,
if
(
use_salt
)
if
(
use_salt
)
addSaltToReturn
(
myReturnMeta
.
get
(),
pos
++
);
addSaltToReturn
(
myReturnMeta
.
get
(),
pos
++
);
//used to record choosen field lengths, onion names , and field types
//used to record choosen field lengths, onion names , and field types
ggbt
.
field_types
.
push_back
(
tfds
[
i
].
getChoosenFieldTypes
()[
index
]);
field_types
.
push_back
(
tfds
[
i
].
getChoosenFieldTypes
()[
index
]);
ggbt
.
field_names
.
push_back
(
tfds
[
i
].
getChoosenOnionName
()[
index
]);
field_names
.
push_back
(
tfds
[
i
].
getChoosenOnionName
()[
index
]);
ggbt
.
field_lengths
.
push_back
(
tfds
[
i
].
getChoosenFieldLengths
()[
index
]);
field_lengths
.
push_back
(
tfds
[
i
].
getChoosenFieldLengths
()[
index
]);
if
(
use_salt
){
if
(
use_salt
){
ggbt
.
field_types
.
push_back
(
tfds
[
i
].
getSaltType
());
field_types
.
push_back
(
tfds
[
i
].
getSaltType
());
ggbt
.
field_names
.
push_back
(
tfds
[
i
].
getSaltName
());
field_names
.
push_back
(
tfds
[
i
].
getSaltName
());
ggbt
.
field_lengths
.
push_back
(
tfds
[
i
].
getSaltLength
());
field_lengths
.
push_back
(
tfds
[
i
].
getSaltLength
());
}
}
}
}
return
myReturnMeta
;
return
myReturnMeta
;
...
@@ -170,12 +165,14 @@ static ResType load_files_new(std::string db, std::string table){
...
@@ -170,12 +165,14 @@ static ResType load_files_new(std::string db, std::string table){
mf
.
show
();
mf
.
show
();
load_columns
(
fmts
,
db
,
table
);
load_columns
(
fmts
,
db
,
table
);
std
::
shared_ptr
<
ReturnMeta
>
rm
=
getReturnMeta
(
fms
,
fmts
);
vector
<
string
>
field_names
;
vector
<
int
>
field_types
;
vector
<
int
>
field_lengths
;
std
::
shared_ptr
<
ReturnMeta
>
rm
=
getReturnMeta
(
fms
,
fmts
,
field_names
,
field_types
,
field_lengths
);
UNUSED
(
rm
);
UNUSED
(
rm
);
vector
<
string
>
field_names
=
ggbt
.
field_names
;
vector
<
int
>
field_types
=
ggbt
.
field_types
;
vector
<
int
>
field_lengths
=
ggbt
.
field_lengths
;
create_embedded_thd
(
0
);
create_embedded_thd
(
0
);
rawMySQLReturnValue
resraw
;
rawMySQLReturnValue
resraw
;
vector
<
vector
<
string
>>
res_field
;
vector
<
vector
<
string
>>
res_field
;
...
...
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