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
2bcb7b4f
Commit
2bcb7b4f
authored
Mar 07, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add doxygen
parent
90c255d8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1902 additions
and
35 deletions
+1902
-35
.gitignore
.gitignore
+2
-0
CryptDBdoxgen
CryptDBdoxgen
+1869
-0
CURRENT.conf
conf/CURRENT.conf
+2
-2
ddl_handler.cc
main/ddl_handler.cc
+1
-2
rewrite_main.cc
main/rewrite_main.cc
+0
-2
ConnectWrapper.cc
mysqlproxy/ConnectWrapper.cc
+28
-29
No files found.
.gitignore
View file @
2bcb7b4f
...
@@ -33,3 +33,5 @@ packages/tls/mysqlWrapper/main
...
@@ -33,3 +33,5 @@ packages/tls/mysqlWrapper/main
*.conf
*.conf
input/sql
input/sql
token.cc
token.cc
html
latex
CryptDBdoxgen
0 → 100644
View file @
2bcb7b4f
This diff is collapsed.
Click to expand it.
conf/CURRENT.conf
View file @
2bcb7b4f
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
[
onions
for
num
]
[
onions
for
num
]
oDET
:
DET
oDET
:
DET
oOPE
:
OPE
oOPE
:
OPE
#
oAGG: HOM
oAGG
:
HOM
oASHE
:
ASHE
#
oASHE: ASHE
[
end
]
[
end
]
...
...
main/ddl_handler.cc
View file @
2bcb7b4f
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
//################################################################Create table handler#########################################################################################
//################################################################Create table handler#########################################################################################
AbstractQueryExecutor
*
AbstractQueryExecutor
*
CreateTableHandler
::
rewriteAndUpdate
(
Analysis
&
a
,
LEX
*
lex
,
const
Preamble
&
pre
)
const
CreateTableHandler
::
rewriteAndUpdate
(
Analysis
&
a
,
LEX
*
lex
,
const
Preamble
&
pre
)
const
{
{
assert
(
a
.
deltas
.
size
()
==
0
);
assert
(
a
.
deltas
.
size
()
==
0
);
TEST_DatabaseDiscrepancy
(
pre
.
dbname
,
a
.
getDatabaseName
());
TEST_DatabaseDiscrepancy
(
pre
.
dbname
,
a
.
getDatabaseName
());
...
...
main/rewrite_main.cc
View file @
2bcb7b4f
...
@@ -1334,7 +1334,6 @@ Rewriter::dispatchOnLex(Analysis &a, const std::string &query)
...
@@ -1334,7 +1334,6 @@ Rewriter::dispatchOnLex(Analysis &a, const std::string &query)
return
new
OnionAdjustmentExecutor
(
std
::
move
(
deltas
),
return
new
OnionAdjustmentExecutor
(
std
::
move
(
deltas
),
adjust_queries
);
adjust_queries
);
}
}
//为什么两种情况返回的executor是不一样的?一个用了get一个没有用?
return
executor
.
get
();
return
executor
.
get
();
}
else
if
(
ddl_dispatcher
->
canDo
(
lex
))
{
}
else
if
(
ddl_dispatcher
->
canDo
(
lex
))
{
const
SQLHandler
&
handler
=
ddl_dispatcher
->
dispatch
(
lex
);
const
SQLHandler
&
handler
=
ddl_dispatcher
->
dispatch
(
lex
);
...
@@ -1364,7 +1363,6 @@ Rewriter::dispatchOnLex(Analysis &a, const std::string &query)
...
@@ -1364,7 +1363,6 @@ Rewriter::dispatchOnLex(Analysis &a, const std::string &query)
QueryRewrite
QueryRewrite
Rewriter
::
rewrite
(
const
std
::
string
&
q
,
const
SchemaInfo
&
schema
,
Rewriter
::
rewrite
(
const
std
::
string
&
q
,
const
SchemaInfo
&
schema
,
const
std
::
string
&
default_db
,
const
ProxyState
&
ps
){
const
std
::
string
&
default_db
,
const
ProxyState
&
ps
){
//LOG(cdb_v) << "q " << q;
assert
(
0
==
mysql_thread_init
());
assert
(
0
==
mysql_thread_init
());
Analysis
analysis
(
default_db
,
schema
,
ps
.
getMasterKey
(),
Analysis
analysis
(
default_db
,
schema
,
ps
.
getMasterKey
(),
ps
.
defaultSecurityRating
());
ps
.
defaultSecurityRating
());
...
...
mysqlproxy/ConnectWrapper.cc
View file @
2bcb7b4f
...
@@ -187,36 +187,35 @@ rewrite(lua_State *const L) {
...
@@ -187,36 +187,35 @@ rewrite(lua_State *const L) {
strtoull
(
xlua_tolstring
(
L
,
3
).
c_str
(),
NULL
,
10
);
strtoull
(
xlua_tolstring
(
L
,
3
).
c_str
(),
NULL
,
10
);
c_wrapper
->
last_query
=
query
;
c_wrapper
->
last_query
=
query
;
if
(
EXECUTE_QUERIES
)
{
try
{
try
{
TEST_Text
(
retrieveDefaultDatabase
(
_thread_id
,
ps
->
getConn
(),
TEST_Text
(
retrieveDefaultDatabase
(
_thread_id
,
ps
->
getConn
(),
&
c_wrapper
->
default_db
),
&
c_wrapper
->
default_db
),
"proxy failed to retrieve default database!"
);
"proxy failed to retrieve default database!"
);
// save a reference so a second thread won't eat objects
// save a reference so a second thread won't eat objects
// that DeltaOuput wants later(a shared_ptr for the schemaInfo)
// that DeltaOuput wants later(a shared_ptr for the schemaInfo)
const
std
::
shared_ptr
<
const
SchemaInfo
>
&
schema
=
const
std
::
shared_ptr
<
const
SchemaInfo
>
&
schema
=
ps
->
getSchemaInfo
();
ps
->
getSchemaInfo
();
c_wrapper
->
schema_info_refs
.
push_back
(
schema
);
c_wrapper
->
schema_info_refs
.
push_back
(
schema
);
//parse, rewrite, delta, adjust, returnMeta,
//parse, rewrite, delta, adjust, returnMeta,
std
::
unique_ptr
<
QueryRewrite
>
qr
=
std
::
unique_ptr
<
QueryRewrite
>
qr
=
std
::
unique_ptr
<
QueryRewrite
>
(
new
QueryRewrite
(
std
::
unique_ptr
<
QueryRewrite
>
(
new
QueryRewrite
(
Rewriter
::
rewrite
(
query
,
Rewriter
::
rewrite
(
query
,
*
schema
.
get
(),
*
schema
.
get
(),
c_wrapper
->
default_db
,
*
ps
)));
c_wrapper
->
default_db
,
*
ps
)));
assert
(
qr
);
assert
(
qr
);
c_wrapper
->
setQueryRewrite
(
std
::
move
(
qr
));
c_wrapper
->
setQueryRewrite
(
std
::
move
(
qr
));
}
catch
(
const
AbstractException
&
e
)
{
}
catch
(
const
AbstractException
&
e
)
{
lua_pushboolean
(
L
,
false
);
// status
lua_pushboolean
(
L
,
false
);
// status
xlua_pushlstring
(
L
,
e
.
to_string
());
// error message
xlua_pushlstring
(
L
,
e
.
to_string
());
// error message
return
2
;
return
2
;
}
catch
(
const
CryptDBError
&
e
)
{
}
catch
(
const
CryptDBError
&
e
)
{
lua_pushboolean
(
L
,
false
);
// status
lua_pushboolean
(
L
,
false
);
// status
xlua_pushlstring
(
L
,
e
.
msg
);
// error message
xlua_pushlstring
(
L
,
e
.
msg
);
// error message
return
2
;
return
2
;
}
}
}
lua_pushboolean
(
L
,
true
);
// status
lua_pushboolean
(
L
,
true
);
// status
lua_pushnil
(
L
);
// error message
lua_pushnil
(
L
);
// error message
return
2
;
return
2
;
...
...
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