Commit e88b94c2 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix r2306: Constraint on 'partition' must alway match.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2316 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8852a8da
......@@ -603,11 +603,10 @@ class MySQLDatabaseManager(DatabaseManager):
min_serial = u64(min_serial)
max_serial = u64(max_serial)
r = q('SELECT oid, serial FROM obj '
'WHERE (partition=%(partition)s AND (oid = %(min_oid)d '
'AND serial >= %(min_serial)d) OR '
'oid > %(min_oid)d) AND '
'partition = %(partition)d AND '
'serial <= %(max_serial)d '
'WHERE (partition = %(partition)s '
'AND serial <= %(max_serial)d '
'AND ((oid = %(min_oid)d AND serial >= %(min_serial)d) '
'OR oid > %(min_oid)d) '
'ORDER BY oid ASC, serial ASC LIMIT %(length)d' % {
'min_oid': min_oid,
'min_serial': min_serial,
......
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