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
2157bfe0
Commit
2157bfe0
authored
Jan 17, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the first step of removing executor in select
parent
11ceb5d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
try_select_data.cc
debug/try_select_data.cc
+17
-10
No files found.
debug/try_select_data.cc
View file @
2157bfe0
...
@@ -36,13 +36,17 @@ void parseResType(const ResType &rd) {
...
@@ -36,13 +36,17 @@ void parseResType(const ResType &rd) {
static
void
sp_next_second
(
std
::
string
db
,
std
::
string
query
,
QueryRewrite
*
qr
,
ResType
inRes
){
static
void
sp_next_second
(
std
::
string
db
,
std
::
string
query
,
QueryRewrite
*
qr
,
ResType
inRes
){
ps
->
safeCreateEmbeddedTHD
();
ps
->
safeCreateEmbeddedTHD
();
const
ResType
&
res
=
inRes
;
const
ResType
&
res
in
=
inRes
;
try
{
try
{
//AbstractQueryExecutor::ResultType::RESULTS
//AbstractQueryExecutor::ResultType::RESULTS
NextParams
nparams
(
*
ps
,
db
,
query
);
NextParams
nparams
(
*
ps
,
db
,
query
);
const
auto
&
new_results
=
qr
->
executor
->
next
(
res
,
nparams
);
nparams
.
ps
.
getSchemaCache
().
updateStaleness
(
nparams
.
ps
.
getEConn
(),
false
);
// const auto &new_results = qr->executor->next(res, nparams);
//const auto &result_type = new_results.first;
//const auto &result_type = new_results.first;
const
auto
&
res
=
new_results
.
second
->
extract
<
ResType
>
();
// const auto &res = new_results.second->extract<ResType>();
const
auto
&
res
=
decryptResults
(
resin
,((
DMLQueryExecutor
*
)(
qr
->
executor
).
get
())
->
getReturnMeta
());
parseResType
(
res
);
parseResType
(
res
);
}
catch
(...){
}
catch
(...){
std
::
cout
<<
"second next error"
<<
std
::
endl
;
std
::
cout
<<
"second next error"
<<
std
::
endl
;
...
@@ -51,15 +55,18 @@ static void sp_next_second(std::string db, std::string query, QueryRewrite *qr,R
...
@@ -51,15 +55,18 @@ static void sp_next_second(std::string db, std::string query, QueryRewrite *qr,R
static
void
sp_next_first
(
std
::
string
db
,
std
::
string
query
,
QueryRewrite
*
qr
,
ResType
inRes
){
static
void
sp_next_first
(
std
::
string
db
,
std
::
string
query
,
QueryRewrite
*
qr
,
ResType
inRes
){
ps
->
safeCreateEmbeddedTHD
();
ps
->
safeCreateEmbeddedTHD
();
const
ResType
&
res
=
inRes
;
//
const ResType &res = inRes;
try
{
try
{
NextParams
nparams
(
*
ps
,
db
,
query
);
const
auto
&
new_results
=
qr
->
executor
->
next
(
res
,
nparams
);
// const auto &result_type = new_results.first;
//AbstractQueryExecutor::ResultType::QUERY_COME_AGAIN
//AbstractQueryExecutor::ResultType::QUERY_COME_AGAIN
const
auto
&
output
=
NextParams
nparams
(
*
ps
,
db
,
query
);
std
::
get
<
1
>
(
new_results
)
->
extract
<
std
::
pair
<
bool
,
std
::
string
>
>
();
const
auto
&
next_query
=
output
.
second
;
nparams
.
ps
.
getSchemaCache
().
updateStaleness
(
nparams
.
ps
.
getEConn
(),
false
);
const
std
::
string
next_query
=
((
DMLQueryExecutor
*
)(
qr
->
executor
).
get
())
->
getQuery
();
//x const auto &new_results = qr->executor->next(res, nparams);
//x const auto &output =
//x std::get<1>(new_results)->extract<std::pair<bool, std::string> >();
//x const auto &next_query = output.second;
//here we execute the query against the remote database, and get rawReturnValue
//here we execute the query against the remote database, and get rawReturnValue
rawMySQLReturnValue
resRemote
=
executeAndGetResultRemote
(
globalConn
,
next_query
);
rawMySQLReturnValue
resRemote
=
executeAndGetResultRemote
(
globalConn
,
next_query
);
//transform rawReturnValue first
//transform rawReturnValue first
...
...
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