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
a3209cd2
Commit
a3209cd2
authored
Feb 23, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify reuse.cc:rawMySQLReturnValue_to_ResType to handle null input
parent
49d287e7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
310 additions
and
4 deletions
+310
-4
fast_insert.cc
debug/fast_insert.cc
+2
-1
test_insertHandler.cc
debug/test_insertHandler.cc
+1
-1
try_select_data.cc
debug/try_select_data.cc
+304
-0
reuse.cc
wrapper/reuse.cc
+3
-2
No files found.
debug/fast_insert.cc
View file @
a3209cd2
...
...
@@ -225,7 +225,8 @@ main(int argc,char**argv) {
SharedProxyState
*
shared_ps
=
new
SharedProxyState
(
ci
,
embeddedDir
,
master_key
,
determineSecurityRating
());
assert
(
shared_ps
!=
NULL
);
std
::
string
query1
=
"insert into student values(1,
\"
ZHAOYUN
\"
),(2,'XC'),(3,'KK')"
;
//std::string query1 = "insert into student values(1,\"ZHAOYUN\"),(2,'XC'),(3,'KK')";
std
::
string
query1
=
"insert into student values(NULL)"
;
std
::
vector
<
std
::
string
>
querys
{
query1
};
for
(
auto
item
:
querys
){
std
::
cout
<<
item
<<
std
::
endl
;
...
...
debug/test_insertHandler.cc
View file @
a3209cd2
...
...
@@ -51,7 +51,7 @@ main() {
ConnectionInfo
ci
(
"localhost"
,
"root"
,
"letmein"
,
3306
);
SharedProxyState
*
shared_ps
=
new
SharedProxyState
(
ci
,
embeddedDir
,
master_key
,
determineSecurityRating
());
assert
(
shared_ps
!=
NULL
);
std
::
string
query1
=
"insert into
child values(1,
\"
zh Z D D
\"
)"
;
std
::
string
query1
=
"insert into
student values(NULL
)"
;
std
::
vector
<
std
::
string
>
querys
{
query1
};
for
(
auto
item
:
querys
){
std
::
cout
<<
item
<<
std
::
endl
;
...
...
debug/try_select_data.cc
0 → 100644
View file @
a3209cd2
This diff is collapsed.
Click to expand it.
wrapper/reuse.cc
View file @
a3209cd2
...
...
@@ -121,7 +121,8 @@ ResType rawMySQLReturnValue_to_ResType(bool isNULL,rawMySQLReturnValue *inRow,in
for
(
auto
inRows
:
inRow
->
rowValues
)
{
std
::
vector
<
Item
*>
curTempRow
=
itemNullVector
(
types
.
size
());
for
(
int
i
=
0
;
i
<
(
int
)(
inRows
.
size
());
i
++
){
curTempRow
[
i
]
=
(
MySQLFieldTypeToItem
(
types
[
i
],
inRows
[
i
])
);
if
(
inRows
[
i
]
!=
"NULL"
)
curTempRow
[
i
]
=
(
MySQLFieldTypeToItem
(
types
[
i
],
inRows
[
i
]));
//why unsinged processing is not needed here?
}
rows
.
push_back
(
curTempRow
);
}
...
...
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