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
c823bc83
Commit
c823bc83
authored
Jan 31, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
able to test_stor_field
parent
080340ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
test_store_field.cc
debug/test_store_field.cc
+13
-1
No files found.
debug/test_store_field.cc
View file @
c823bc83
...
...
@@ -71,6 +71,15 @@ void write_raw_data_to_files(MySQLColumnData& resraw,string db,string table,std:
}
}
static
std
::
vector
<
std
::
string
>
getTables
(
std
::
string
db
)
{
std
::
string
query
=
std
::
string
(
"show tables in "
)
+
db
;
MySQLColumnData
resraw
=
executeAndGetColumnData
(
globalConn
,
query
);
return
resraw
.
columnData
[
0
];
}
static
void
store
(
std
::
string
db
,
std
::
string
table
,
std
::
string
dir
){
std
::
string
backup_query
=
std
::
string
(
"SELECT * FROM `"
)
+
db
+
"`.`"
+
table
+
"`"
;
MySQLColumnData
resraw
=
executeAndGetColumnData
(
globalConn
,
backup_query
);
...
...
@@ -94,6 +103,9 @@ main(int argc, char* argv[]){
return
0
;
}
init
(
ip
,
port
);
auto
tables
=
getTables
(
db
);
for
(
auto
table
:
tables
){
store
(
db
,
table
,
dir
);
}
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