Commit cd8efbfe authored by Yoshinori Okuji's avatar Yoshinori Okuji

Replace data with value.

git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@96 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f8317749
...@@ -264,7 +264,7 @@ class MySQLDatabaseManager(DatabaseManager): ...@@ -264,7 +264,7 @@ class MySQLDatabaseManager(DatabaseManager):
oid = e(oid) oid = e(oid)
if tid is not None: if tid is not None:
tid = e(tid) tid = e(tid)
r = q("""SELECT serial, compression, checksum, data FROM obj r = q("""SELECT serial, compression, checksum, value FROM obj
WHERE oid = '%s' AND serial = '%s'""" \ WHERE oid = '%s' AND serial = '%s'""" \
% (oid, tid)) % (oid, tid))
try: try:
...@@ -274,7 +274,7 @@ class MySQLDatabaseManager(DatabaseManager): ...@@ -274,7 +274,7 @@ class MySQLDatabaseManager(DatabaseManager):
return None return None
elif before_tid is not None: elif before_tid is not None:
before_tid = e(before_tid) before_tid = e(before_tid)
r = q("""SELECT serial, compression, checksum, data FROM obj r = q("""SELECT serial, compression, checksum, value FROM obj
WHERE oid = '%s' AND serial < '%s' WHERE oid = '%s' AND serial < '%s'
ORDER BY serial DESC LIMIT 1""" \ ORDER BY serial DESC LIMIT 1""" \
% (oid, before_tid)) % (oid, before_tid))
...@@ -293,7 +293,7 @@ class MySQLDatabaseManager(DatabaseManager): ...@@ -293,7 +293,7 @@ class MySQLDatabaseManager(DatabaseManager):
else: else:
# XXX I want to express "HAVING serial = MAX(serial)", but # XXX I want to express "HAVING serial = MAX(serial)", but
# MySQL does not use an index for a HAVING clause! # MySQL does not use an index for a HAVING clause!
r = q("""SELECT serial, compression, checksum, data FROM obj r = q("""SELECT serial, compression, checksum, value FROM obj
WHERE oid = '%s' ORDER BY serial DESC LIMIT 1""" \ WHERE oid = '%s' ORDER BY serial DESC LIMIT 1""" \
% oid) % oid)
try: try:
...@@ -424,7 +424,7 @@ class MySQLDatabaseManager(DatabaseManager): ...@@ -424,7 +424,7 @@ class MySQLDatabaseManager(DatabaseManager):
q = self.query q = self.query
e = self.escape e = self.escape
oid = e(oid) oid = e(oid)
r = q("""SELECT serial, LENGTH(data) FROM obj WHERE oid = '%s' r = q("""SELECT serial, LENGTH(value) FROM obj WHERE oid = '%s'
ORDER BY serial DESC LIMIT %d""" \ ORDER BY serial DESC LIMIT %d""" \
% (oid, length)) % (oid, length))
if r: if r:
......
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