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
58e2c191
Commit
58e2c191
authored
Jan 25, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass tests for finalload and finalstore
parent
3f7f047b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
Makefile
Makefile
+6
-0
final_load.cc
debug/final_load.cc
+7
-9
No files found.
Makefile
View file @
58e2c191
...
@@ -82,6 +82,10 @@ mtl/%:$(OBJDIR)/debug/%.o $(OBJDIR)/libwrapper.so
...
@@ -82,6 +82,10 @@ mtl/%:$(OBJDIR)/debug/%.o $(OBJDIR)/libwrapper.so
$(CXX)
-g
-o
$@
$^
$(CXXFLAGS)
$(LDFLAGS)
-L
/
$(MYBUILD)
/libmysqld
-lmysqld
-laio
-lz
-ldl
-lm
-lcrypt
-lpthread
-lwrapper
-lcryptdb
-ledbcrypto
-ledbutil
-ledbparser
-lntl
-lcrypto
$(CXX)
-g
-o
$@
$^
$(CXXFLAGS)
$(LDFLAGS)
-L
/
$(MYBUILD)
/libmysqld
-lmysqld
-laio
-lz
-ldl
-lm
-lcrypt
-lpthread
-lwrapper
-lcryptdb
-ledbcrypto
-ledbutil
-ledbparser
-lntl
-lcrypto
mtl/test_wrapper_exe/%
:
$(OBJDIR)/test_wrapper/%.o $(OBJDIR)/libwrapper.so
@
mkdir
-p
$
(
@D
)
$(CXX)
-g
-o
$@
$^
$(CXXFLAGS)
$(LDFLAGS)
-L
/
$(MYBUILD)
/libmysqld
-lmysqld
-laio
-lz
-ldl
-lm
-lcrypt
-lpthread
-lwrapper
-lcryptdb
-ledbcrypto
-ledbutil
-ledbparser
-lntl
-lcrypto
include
crypto/Makefrag
include
crypto/Makefrag
...
@@ -91,8 +95,10 @@ include util/Makefrag
...
@@ -91,8 +95,10 @@ include util/Makefrag
include
udf/Makefrag
include
udf/Makefrag
include
mysqlproxy/Makefrag
include
mysqlproxy/Makefrag
include
debug/Makefrag
include
debug/Makefrag
include
test_wrapper/Makefrag
include
wrapper/Makefrag
include
wrapper/Makefrag
$(OBJDIR)/.deps
:
$(foreach dir
,
$(OBJDIRS)
,
$(wildcard $(OBJDIR)/$(dir)/*.d))
$(OBJDIR)/.deps
:
$(foreach dir
,
$(OBJDIRS)
,
$(wildcard $(OBJDIR)/$(dir)/*.d))
@
mkdir
-p
$
(
@D
)
@
mkdir
-p
$
(
@D
)
perl mergedep.pl
$@
$^
perl mergedep.pl
$@
$^
...
...
debug/final_load.cc
View file @
58e2c191
...
@@ -138,12 +138,11 @@ void initGfb(std::vector<FieldMetaTrans> &res,std::string db,std::string table){
...
@@ -138,12 +138,11 @@ void initGfb(std::vector<FieldMetaTrans> &res,std::string db,std::string table){
std
::
string
filename
=
prefix
+
gfb
.
field_names
[
i
];
std
::
string
filename
=
prefix
+
gfb
.
field_names
[
i
];
std
::
vector
<
std
::
string
>
column
;
std
::
vector
<
std
::
string
>
column
;
if
(
IS_NUM
(
gfb
.
field_types
[
i
])){
if
(
IS_NUM
(
gfb
.
field_types
[
i
])){
// load_num_file_count(filename,column,constGlobalConstants.loadCount);
loadFileNoEscapeLimitCount
(
filename
,
column
,
constGlobalConstants
.
loadCount
);
loadFileNoEscape
(
filename
,
column
);
}
else
{
}
else
{
// load_string_file_count(filename,column,gfb.field_lengths[i],constGlobalConstants.loadCount);
loadFileEscapeLimitCount
(
filename
,
column
,
gfb
.
field_lengths
[
i
],
constGlobalConstants
.
loadCount
);
loadFileEscape
(
filename
,
column
,
gfb
.
field_lengths
[
i
]);
}
}
std
::
reverse
(
column
.
begin
(),
column
.
end
());
gfb
.
annoOnionNameToFileVector
[
gfb
.
field_names
[
i
]]
=
std
::
move
(
column
);
gfb
.
annoOnionNameToFileVector
[
gfb
.
field_names
[
i
]]
=
std
::
move
(
column
);
}
}
//init another map
//init another map
...
@@ -200,6 +199,7 @@ static ResType load_files(std::string db, std::string table){
...
@@ -200,6 +199,7 @@ static ResType load_files(std::string db, std::string table){
return
finalresults
;
return
finalresults
;
}
}
unsigned
long
gcount
=
0
;
static
static
void
local_wrapper
(
const
Item
&
i
,
const
FieldMeta
&
fm
,
Analysis
&
a
,
void
local_wrapper
(
const
Item
&
i
,
const
FieldMeta
&
fm
,
Analysis
&
a
,
List
<
Item
>
*
const
append_list
)
{
List
<
Item
>
*
const
append_list
)
{
...
@@ -217,7 +217,6 @@ void local_wrapper(const Item &i, const FieldMeta &fm, Analysis &a,
...
@@ -217,7 +217,6 @@ void local_wrapper(const Item &i, const FieldMeta &fm, Analysis &a,
std
::
vector
<
std
::
string
>
&
tempFileVector
=
gfb
.
annoOnionNameToFileVector
[
annoOnionName
];
std
::
vector
<
std
::
string
>
&
tempFileVector
=
gfb
.
annoOnionNameToFileVector
[
annoOnionName
];
std
::
string
in
=
tempFileVector
.
back
();
std
::
string
in
=
tempFileVector
.
back
();
if
(
IS_NUM
(
type
)){
if
(
IS_NUM
(
type
)){
//std::string in("11");
unsigned
int
len
=
annoOnionName
.
size
();
unsigned
int
len
=
annoOnionName
.
size
();
if
(
len
>
4u
&&
annoOnionName
.
substr
(
len
-
4
)
==
"ASHE"
){
if
(
len
>
4u
&&
annoOnionName
.
substr
(
len
-
4
)
==
"ASHE"
){
l
.
push_back
(
MySQLFieldTypeToItem
(
type
,
in
));
l
.
push_back
(
MySQLFieldTypeToItem
(
type
,
in
));
...
@@ -226,13 +225,12 @@ void local_wrapper(const Item &i, const FieldMeta &fm, Analysis &a,
...
@@ -226,13 +225,12 @@ void local_wrapper(const Item &i, const FieldMeta &fm, Analysis &a,
Item_int
(
static_cast
<
ulonglong
>
(
valFromStr
(
in
)))
);
Item_int
(
static_cast
<
ulonglong
>
(
valFromStr
(
in
)))
);
}
}
}
else
{
}
else
{
//std::string in("hehe");
l
.
push_back
(
MySQLFieldTypeToItem
(
type
,
in
));
l
.
push_back
(
MySQLFieldTypeToItem
(
type
,
in
));
}
}
tempFileVector
.
pop_back
();
tempFileVector
.
pop_back
();
//l.push_back(&(const_cast<Item&>(i)));
}
else
{
}
else
{
l
.
push_back
(
my_encrypt_item_layers
(
i
,
o
,
*
om
,
a
,
IV
));
l
.
push_back
(
my_encrypt_item_layers
(
i
,
o
,
*
om
,
a
,
IV
));
gcount
++
;
}
}
}
}
std
::
string
saltName
=
fm
.
getSaltName
();
std
::
string
saltName
=
fm
.
getSaltName
();
...
@@ -240,8 +238,6 @@ void local_wrapper(const Item &i, const FieldMeta &fm, Analysis &a,
...
@@ -240,8 +238,6 @@ void local_wrapper(const Item &i, const FieldMeta &fm, Analysis &a,
if
(
gfb
.
annoOnionNameToFileVector
.
find
(
saltName
)
!=
gfb
.
annoOnionNameToFileVector
.
end
()){
if
(
gfb
.
annoOnionNameToFileVector
.
find
(
saltName
)
!=
gfb
.
annoOnionNameToFileVector
.
end
()){
std
::
vector
<
std
::
string
>
&
tempFileVector
=
gfb
.
annoOnionNameToFileVector
[
saltName
];
std
::
vector
<
std
::
string
>
&
tempFileVector
=
gfb
.
annoOnionNameToFileVector
[
saltName
];
std
::
string
in
=
tempFileVector
.
back
();
std
::
string
in
=
tempFileVector
.
back
();
// enum_field_types type = static_cast<enum_field_types>(gfb.annoOnionNameToType[saltName]);
// l.push_back(MySQLFieldTypeToItem(type,in));
l
.
push_back
(
new
(
current_thd
->
mem_root
)
l
.
push_back
(
new
(
current_thd
->
mem_root
)
Item_int
(
static_cast
<
ulonglong
>
(
valFromStr
(
in
)))
Item_int
(
static_cast
<
ulonglong
>
(
valFromStr
(
in
)))
);
);
...
@@ -294,6 +290,8 @@ main(int argc, char* argv[]){
...
@@ -294,6 +290,8 @@ main(int argc, char* argv[]){
insertManyValues
(
o
,
newList
);
insertManyValues
(
o
,
newList
);
std
::
cout
<<
(
head
+
o
.
str
())
<<
std
::
endl
;
std
::
cout
<<
(
head
+
o
.
str
())
<<
std
::
endl
;
}
}
std
::
cout
<<
"gcount<<"
<<
gcount
<<
std
::
endl
;
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