[Zope] MySQL on 2.3.0

Dwayne Morrison morrison@qsilver.net
Fri, 02 Mar 2001 09:31:04 -0500


--=====================_8603412==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

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


--=====================_8603412==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
Hi, <br>
<br>
I'm still having no luck getting the aggregate functions to work on
Solaris. Can someone help me figure out how to debug this?<br>
<br>
In Connection.py in the manage_test method we find:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
report=DocumentTemplate.HTML(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'&lt;html&gt;&lt;body bgcolor=&quot;#ffffff&quot;
link=&quot;#000099&quot; vlink=&quot;#555555&quot;&gt;\n'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'&lt;dtml-var name=&quot;manage_tabs&quot;&gt;\n&lt;hr&gt;\n%s\n\n'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'&lt;hr&gt;&lt;h4&gt;SQL
Used:&lt;/strong&gt;&lt;br&gt;\n&lt;pre&gt;\n%s\n&lt;/pre&gt;\n&lt;hr&gt;\n'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
'&lt;/body&gt;&lt;/html&gt;'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; % (r,
query))<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
report=apply(report,(self,REQUEST),{self.id:result})<br>
<br>
If I run &quot;select * from users,&quot; there is no problem. When I run
&quot;select count(*) from users&quot; 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.&nbsp; How can I print the contents of {self.id:result} to
compare * vs. count(*)? <br>
<br>
Please help!!<br>
<br>
Solaris 2.7<br>
Zope 2.3.0<br>
Python 1.5<br>
MySQL 2.22<br>
MySQL-python-0.3.2<br>
ZMySQLDA-2.0.4<br>
<br>
Dwayne Morrison<br>
morrison@qsilver.net<br>
&nbsp;<br>
</html>

--=====================_8603412==_.ALT--