Hi, I'm still having no luck getting the aggregate functions to work on Solaris. Can someone help me figure out how to debug this? In Connection.py in the manage_test method we find: report=DocumentTemplate.HTML( '<html><body bgcolor="#ffffff" link="#000099" vlink="#555555">\n' '<dtml-var name="manage_tabs">\n<hr>\n%s\n\n' '<hr><h4>SQL Used:</strong><br>\n<pre>\n%s\n</pre>\n<hr>\n' '</body></html>' % (r, query)) report=apply(report,(self,REQUEST),{self.id:result}) If I run "select * from users," there is no problem. When I run "select count(*) from users" the server drops the connection. I've tried logging before and after 'apply' and found that that's where it dies. The DA is running the query and returning the result , but any count/sum/average functions cause it to die when it's being rendered. How can I print the contents of {self.id:result} to compare * vs. count(*)? Please help!! Solaris 2.7 Zope 2.3.0 Python 1.5 MySQL 2.22 MySQL-python-0.3.2 ZMySQLDA-2.0.4 Dwayne Morrison morrison@qsilver.net
On Fri, 2 Mar 2001, Dwayne Morrison wrote:
If I run "select * from users," there is no problem. When I run "select count(*) from users" the server drops the connection. I've tried logging
The standard way to run this in Zope is SELECT COUNT(*) AS count_users FROM users because Zope needs a name for the column. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
I get the same behavior with or without a column alias... At 05:37 PM 3/2/01 +0300, Oleg Broytmann wrote:
On Fri, 2 Mar 2001, Dwayne Morrison wrote:
If I run "select * from users," there is no problem. When I run "select count(*) from users" the server drops the connection. I've tried logging
The standard way to run this in Zope is
SELECT COUNT(*) AS count_users FROM users
because Zope needs a name for the column.
Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Fri, 2 Mar 2001, Dwayne Morrison wrote:
I get the same behavior with or without a column alias...
Problem with the server? Upgrade? downgrade? Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
The functions work as expected w/ Gadfly. I thought it might be a DA issue. At 05:43 PM 3/2/01 +0300, Oleg Broytmann wrote:
On Fri, 2 Mar 2001, Dwayne Morrison wrote:
I get the same behavior with or without a column alias...
Problem with the server? Upgrade? downgrade?
Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Fri, 2 Mar 2001, Dwayne Morrison wrote:
The functions work as expected w/ Gadfly.
This menas that Gadly (not its DA) handles this.
I thought it might be a DA issue.
May be. But again, may be not. It is possibly the problem with that exact version of MySQL you are using. Upgrading or downgrading to next/prev version is a god thing to try. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On 02-Mar-01 Oleg Broytmann wrote:
I thought it might be a DA issue.
May be. But again, may be not. It is possibly the problem with that exact version of MySQL you are using. Upgrading or downgrading to next/prev version is a god thing to try.
I'm having similiar problems with ZSQL methods that intermittently cause Zope to break the connection ( and restart itself ? ). Using a ZSQL method containing: ConnectionID: MySQL ( A ZMySQL db connection ) Args: Owner select * from notify WHERE FileOwner = <!--#sqlvar Owner type="string" --> GROUP BY ChangeNum Using the TEST tab on the ZSQL method: If Owner is set to a value in the column everything works OK. e.g Owner=lmarzke@kns.com But if Owner is a string which is not in the column e.g. Owner=lmarzke the broswer doens't get a page, and Zope doesn't respond for 10 seconds or so. The Z2.log shows the lmarzke@kns.com access, but does NOT show the lmarzke access at all. Solaris 2.7 Zope 2.3.0 source build ZMySQLDA 2.0.4 MySQLdb 0.3.2 MySQL 3.23.32 Python 2.0 build from source with threads Lee Marzke <lmarzke@kns.com> 02-Mar-01, 11:12:21 Kulicke & Soffa Industries 2101 Blair Mill Rd +1 215 784-6217 Willow Grove, PA 19090 +1 215 784-6014 fax
participants (3)
-
Dwayne Morrison -
Lee Marzke -
Oleg Broytmann