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
c38e16a8
Commit
c38e16a8
authored
Jan 21, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add batch_insert.cc
parent
e14bf0d7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
6 deletions
+41
-6
batch_insert.cc
debug/batch_insert.cc
+30
-0
micro_init_int.cc
debug/micro_init_int.cc
+4
-5
test_proxy.cc
debug/test_proxy.cc
+7
-1
No files found.
debug/batch_insert.cc
0 → 100644
View file @
c38e16a8
#include "main/big_proxy.hh"
using
std
::
string
;
int
main
(
int
argc
,
char
**
argv
)
{
if
(
argc
!=
3
){
std
::
cout
<<
"1:db, 2:ip"
<<
std
::
endl
;
return
0
;
}
std
::
string
db
=
std
::
string
(
argv
[
1
]);
std
::
string
ip
=
std
::
string
(
argv
[
2
]);
big_proxy
b
(
db
,
ip
,
"root"
,
"letmein"
,
3306
);
std
::
string
initQuery
=
std
::
string
(
"use "
)
+
db
+
";"
;
b
.
go
(
initQuery
);
std
::
string
query
;
std
::
getline
(
std
::
cin
,
query
);
long
long
countWrapper
=
0
;
while
(
query
!=
"quit"
){
if
(
query
.
size
()
==
0
)
return
0
;
b
.
go
(
query
);
std
::
getline
(
std
::
cin
,
query
);
countWrapper
++
;
if
(
countWrapper
==
3
){
std
::
cout
<<
"bingo"
<<
std
::
endl
;
countWrapper
=
0
;
}
}
return
0
;
}
debug/micro_init_int.cc
View file @
c38e16a8
...
...
@@ -9,13 +9,12 @@ main(int argc,char ** argv) {
"use micro_db;"
,
"create table int_table(id integer);"
,
};
if
(
argc
!=
3
){
std
::
cout
<<
"1:
db, 2:
ip"
<<
std
::
endl
;
if
(
argc
!=
2
){
std
::
cout
<<
"1:ip"
<<
std
::
endl
;
return
0
;
}
std
::
string
db
=
std
::
string
(
argv
[
1
]);
std
::
string
ip
=
std
::
string
(
argv
[
2
]);
big_proxy
b
(
"tdb"
,
"127.0.0.1"
,
"root"
,
"letmein"
,
3306
);
std
::
string
ip
=
std
::
string
(
argv
[
1
]);
big_proxy
b
(
"tdb"
,
ip
,
"root"
,
"letmein"
,
3306
);
for
(
auto
item
:
create
){
b
.
go
(
item
);
}
...
...
debug/test_proxy.cc
View file @
c38e16a8
...
...
@@ -2,7 +2,13 @@
using
std
::
string
;
int
main
(
int
argc
,
char
**
argv
)
{
big_proxy
b
;
if
(
argc
!=
2
){
std
::
cout
<<
"1:ip"
<<
std
::
endl
;
return
0
;
}
std
::
string
ip
=
std
::
string
(
argv
[
1
]);
big_proxy
b
(
"tdb"
,
ip
,
"root"
,
"letmein"
,
3306
);
std
::
string
query
;
std
::
getline
(
std
::
cin
,
query
);
while
(
query
!=
"quit"
){
...
...
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