[CalendarServer-changes] [15071] CalendarServer/trunk/calendarserver/tools/dbinspect.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 27 09:11:05 PDT 2015
Revision: 15071
http://trac.calendarserver.org//changeset/15071
Author: cdaboo at apple.com
Date: 2015-08-27 09:11:05 -0700 (Thu, 27 Aug 2015)
Log Message:
-----------
Fix table count problem.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/dbinspect.py
Modified: CalendarServer/trunk/calendarserver/tools/dbinspect.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/dbinspect.py 2015-08-27 01:58:53 UTC (rev 15070)
+++ CalendarServer/trunk/calendarserver/tools/dbinspect.py 2015-08-27 16:11:05 UTC (rev 15071)
@@ -27,7 +27,7 @@
from pycalendar.datetime import DateTime
from twext.enterprise.dal.syntax import Select, Parameter, Count, Delete, \
- Constant
+ ALL_COLUMNS
from twext.who.idirectory import RecordType
from twisted.internet.defer import inlineCallbacks, returnValue, succeed
@@ -164,7 +164,7 @@
@inlineCallbacks
def getTableSize(self, txn, dbtable):
rows = (yield Select(
- [Count(Constant(1)), ],
+ [Count(ALL_COLUMNS), ],
From=dbtable,
).on(txn))
returnValue(rows[0][0])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150827/94af1232/attachment.html>
More information about the calendarserver-changes
mailing list