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
543440a8
Commit
543440a8
authored
May 19, 2017
by
casualet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
able to handle decimal value
parent
8df5dd1c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
2 deletions
+21
-2
rewrite_util.cc
main/rewrite_util.cc
+15
-1
ConnectWrapper.cc
mysqlproxy/ConnectWrapper.cc
+1
-0
gdbs
packages/tls/gdbs
+2
-0
stopgdbs
packages/tls/stopgdbs
+2
-0
normalbenchmark.sh
packages/tls/tpcc-mysql/normalbenchmark.sh
+1
-1
No files found.
main/rewrite_util.cc
View file @
543440a8
...
...
@@ -574,6 +574,8 @@ isUnique(const std::string &name,
return
unique
;
}
//from one filed to multiple fields. the fields are automatically transformed to unsigned. This is called in createHandler.
List
<
Create_field
>
createAndRewriteField
(
Analysis
&
a
,
Create_field
*
const
cf
,
TableMeta
*
const
tm
,
bool
new_table
,
...
...
@@ -583,6 +585,18 @@ createAndRewriteField(Analysis &a, Create_field * const cf,
List
<
Create_field
>
&
rewritten_cfield_list
)
{
// we only support the creation of UNSIGNED fields
//add this to support plaintext data and decimal
if
(
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_DECIMAL
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_FLOAT
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_DOUBLE
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_TIMESTAMP
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_DATE
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_TIME
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_DATETIME
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_YEAR
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_NEWDATE
&&
cf
->
sql_type
!=
enum_field_types
::
MYSQL_TYPE_NEWDECIMAL
)
cf
->
flags
=
cf
->
flags
|
UNSIGNED_FLAG
;
const
std
::
string
&
name
=
std
::
string
(
cf
->
field_name
);
...
...
mysqlproxy/ConnectWrapper.cc
View file @
543440a8
...
...
@@ -266,6 +266,7 @@ rewrite(lua_State *const L) {
const
std
::
string
&
query
=
xlua_tolstring
(
L
,
2
);
const
unsigned
long
long
_thread_id
=
strtoull
(
xlua_tolstring
(
L
,
3
).
c_str
(),
NULL
,
10
);
std
::
cout
<<
query
<<
std
::
endl
;
//this is not used??
c_wrapper
->
last_query
=
query
;
if
(
EXECUTE_QUERIES
)
{
...
...
packages/tls/gdbs
0 → 100755
View file @
543440a8
###start gdb
sudo gdb `which mysql-proxy` `ps aux | grep 'mysql-proxy.cnf' |grep -v grep | awk '{print $2}'`
packages/tls/stopgdbs
0 → 100755
View file @
543440a8
###stop gdb
ps aux|grep gdb|grep -v grep|awk '{print $2}'| while read line;do sudo kill -9 $line;done
packages/tls/tpcc-mysql/normalbenchmark.sh
View file @
543440a8
...
...
@@ -7,6 +7,6 @@ mysql -uroot -pletmein -h127.0.0.1 tpcc1000 < create_table.sql
./tpcc_load
-h127
.0.0.1
-uroot
-pletmein
-d
tpcc1000
-w
$1
# mysqldump --skip-extended-insert -uroot -pletmein -h127.0.0.1 --no-create-info --hex-blob --compact tpcc1000 > all$1.sql
mysqldump
-uroot
-pletmein
-h127
.0.0.1
--hex-blob
--compact
tpcc1000
>
all
$1
.sql
mysqldump
--skip-extended-insert
-uroot
-pletmein
-h127
.0.0.1
--hex-blob
--compact
tpcc1000
>
all
$1
.sql
mysql
-uroot
-pletmein
-h127
.0.0.1
-e
"drop database if exists tpcc1000"
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