Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
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):
"""This class manages a database on MySQL."""
VERSION
=
1
ENGINES
=
"InnoDB"
,
"TokuDB"
ENGINES
=
"InnoDB"
,
"
RocksDB"
,
"
TokuDB"
_engine
=
ENGINES
[
0
]
# default engine
# 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 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
from
MySQLdb
import
OperationalError
from
MySQLdb
import
NotSupportedError
,
OperationalError
from
MySQLdb.constants.ER
import
UNKNOWN_STORAGE_ENGINE
from
..mock
import
Mock
from
neo.lib.exception
import
DatabaseFailure
from
neo.lib.util
import
p64
...
...
@@ -35,7 +36,13 @@ class StorageMySQLdbTests(StorageDBTests):
db
=
MySQLDatabaseManager
(
database
,
self
.
engine
)
self
.
assertEqual
(
db
.
db
,
DB_PREFIX
+
'0'
)
self
.
assertEqual
(
db
.
user
,
DB_USER
)
try
:
db
.
setup
(
reset
)
except
NotSupportedError
as
m
:
code
,
m
=
m
.
args
if
code
!=
UNKNOWN_STORAGE_ENGINE
:
raise
raise
unittest
.
SkipTest
(
m
)
return
db
def
test_query1
(
self
):
...
...
@@ -119,6 +126,11 @@ class StorageMySQLdbTests(StorageDBTests):
self
.
assertEqual
(
len
(
query_list
),
count
)
class
StorageMySQLdbRocksDBTests
(
StorageMySQLdbTests
):
engine
=
"RocksDB"
class
StorageMySQLdbTokuDBTests
(
StorageMySQLdbTests
):
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