Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
neoppod
Commits
f2f44cd5
Commit
f2f44cd5
authored
Mar 02, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysql: add support for RocksDB
parent
069dd583
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
neo/storage/database/mysqldb.py
neo/storage/database/mysqldb.py
+1
-1
neo/tests/storage/testStorageMySQL.py
neo/tests/storage/testStorageMySQL.py
+14
-2
No files found.
neo/storage/database/mysqldb.py
View file @
f2f44cd5
...
@@ -49,7 +49,7 @@ class MySQLDatabaseManager(DatabaseManager):
...
@@ -49,7 +49,7 @@ class MySQLDatabaseManager(DatabaseManager):
"""This class manages a database on MySQL."""
"""This class manages a database on MySQL."""
VERSION
=
1
VERSION
=
1
ENGINES
=
"InnoDB"
,
"TokuDB"
ENGINES
=
"InnoDB"
,
"
RocksDB"
,
"
TokuDB"
_engine
=
ENGINES
[
0
]
# default engine
_engine
=
ENGINES
[
0
]
# default engine
# Disabled even on MySQL 5.1-5.5 and MariaDB 5.2-5.3 because
# Disabled even on MySQL 5.1-5.5 and MariaDB 5.2-5.3 because
...
...
neo/tests/storage/testStorageMySQL.py
View file @
f2f44cd5
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
import
unittest
from
MySQLdb
import
OperationalError
from
MySQLdb
import
NotSupportedError
,
OperationalError
from
MySQLdb.constants.ER
import
UNKNOWN_STORAGE_ENGINE
from
..mock
import
Mock
from
..mock
import
Mock
from
neo.lib.exception
import
DatabaseFailure
from
neo.lib.exception
import
DatabaseFailure
from
neo.lib.util
import
p64
from
neo.lib.util
import
p64
...
@@ -35,7 +36,13 @@ class StorageMySQLdbTests(StorageDBTests):
...
@@ -35,7 +36,13 @@ class StorageMySQLdbTests(StorageDBTests):
db
=
MySQLDatabaseManager
(
database
,
self
.
engine
)
db
=
MySQLDatabaseManager
(
database
,
self
.
engine
)
self
.
assertEqual
(
db
.
db
,
DB_PREFIX
+
'0'
)
self
.
assertEqual
(
db
.
db
,
DB_PREFIX
+
'0'
)
self
.
assertEqual
(
db
.
user
,
DB_USER
)
self
.
assertEqual
(
db
.
user
,
DB_USER
)
try
:
db
.
setup
(
reset
)
db
.
setup
(
reset
)
except
NotSupportedError
as
m
:
code
,
m
=
m
.
args
if
code
!=
UNKNOWN_STORAGE_ENGINE
:
raise
raise
unittest
.
SkipTest
(
m
)
return
db
return
db
def
test_query1
(
self
):
def
test_query1
(
self
):
...
@@ -119,6 +126,11 @@ class StorageMySQLdbTests(StorageDBTests):
...
@@ -119,6 +126,11 @@ class StorageMySQLdbTests(StorageDBTests):
self
.
assertEqual
(
len
(
query_list
),
count
)
self
.
assertEqual
(
len
(
query_list
),
count
)
class
StorageMySQLdbRocksDBTests
(
StorageMySQLdbTests
):
engine
=
"RocksDB"
class
StorageMySQLdbTokuDBTests
(
StorageMySQLdbTests
):
class
StorageMySQLdbTokuDBTests
(
StorageMySQLdbTests
):
engine
=
"TokuDB"
engine
=
"TokuDB"
...
...
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