Commit 498fdcc6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 55506e65
......@@ -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)
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment