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
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
Stefane Fermigier
neo
Commits
498fdcc6
Commit
498fdcc6
authored
Jan 16, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
55506e65
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
15 deletions
+1
-15
neo/storage/database/manager.py
neo/storage/database/manager.py
+0
-6
neo/storage/database/mysqldb.py
neo/storage/database/mysqldb.py
+1
-9
No files found.
neo/storage/database/manager.py
View file @
498fdcc6
...
...
@@ -23,8 +23,6 @@ from neo.lib.exception import DatabaseFailure
from
neo.lib.interfaces
import
abstract
,
requires
from
neo.lib.protocol
import
CellStates
,
NonReadableCell
,
ZERO_TID
X
=
0
def
lazymethod
(
func
):
def
getter
(
self
):
cls
=
self
.
__class__
...
...
@@ -292,10 +290,6 @@ class DatabaseManager(object):
return
util
.
bin
(
self
.
getConfiguration
(
'backup_tid'
))
def
_setBackupTID
(
self
,
tid
):
if
X
:
print
print
'SET backup_tid: %r'
%
tid
import
traceback
;
traceback
.
print_stack
()
tid
=
util
.
dump
(
tid
)
logging
.
debug
(
'backup_tid = %s'
,
tid
)
return
self
.
_setConfiguration
(
'backup_tid'
,
tid
)
...
...
neo/storage/database/mysqldb.py
View file @
498fdcc6
...
...
@@ -370,10 +370,6 @@ class MySQLDatabaseManager(DatabaseManager):
return
util
.
p64
(
r
[
0
][
0
])
if
r
else
None
def
_getNextTID
(
self
,
*
args
):
# partition, oid, tid
#" USE INDEX(PRIMARY)"
# " USE KEY(`partition`, oid, tid)" says 'tid' is not in 'oid' XXX why ?
# ANSWER -> index name is SHOW INDEX FROM tbl; -> Key_name
# " FORCE INDEX(`partition`)"
r
=
self
.
query
(
"SELECT tid FROM obj"
" FORCE INDEX(`partition`)"
" WHERE `partition`=%d AND oid=%d AND tid>%d"
...
...
@@ -744,13 +740,9 @@ class MySQLDatabaseManager(DatabaseManager):
p64
=
util
.
p64
min_tid
=
u64
(
min_tid
)
max_tid
=
u64
(
max_tid
)
# AND tid >= %(min_tid)d AND tid <= %(max_tid)d
# ORDER BY tid ASC LIMIT %(length)d""" % {
# ORDER BY tid ASC LIMIT %(length)d""" % {
r
=
self
.
query
(
"""SELECT tid FROM trans
FORCE INDEX FOR ORDER BY (PRIMARY)
WHERE `partition` = %(partition)d
AND tid
BETWEEN %(min_tid)d AND
%(max_tid)d
AND tid
>= %(min_tid)d AND tid <=
%(max_tid)d
ORDER BY tid ASC LIMIT %(length)d"""
%
{
'partition'
:
partition
,
'min_tid'
:
min_tid
,
...
...
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