[Zope] MySQLDA Problems with simple constant/function queries

Monty Taylor mtaylor@goldridge.net
Mon, 26 Jun 2000 10:16:14 +0200


This is a multi-part message in MIME format.
--------------2650FB8CB6D76EE01AF25134
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This is actually fixed in both 1.1.4 and in 1.2.0. The problem has to do
with type conversions from a dictionary in the adapter. Any type of
non-row function or aggregate returns a type of 'unhandled' which was
not mapped in the conversion dictionary. This is fairly much the bug
that called for 1.1.4 to be released. You're right, though, very easy to
fix.

1.2.0 deals with the problem by taking a different approach to
type-mapping. 

Monty

Stefan Franke wrote:
> 
> I'm using MySQLDA 1.1.3 on Win32. When I type the following queries
> into the test tab edit box, I get the traceback below:
> 
>   select LAST_INSERT_ID()
> 
> or
> 
>   select 1 from <table>
> 
> Of course "select * from <table>" works.
> 
> When I look into db.py, the error doesn't look very hard to fix, I think
> I'll give tomorrow. Is there some API documentation of what a DA is
> supposed to do?
> 
> Since the 1.1.4 query() code is identical, I think the problem appears
> there as well.
> 
> Please reply to the posting via email directly, since I'm not subscribed
> to the list.
> 
> Stefan
> www.meso.net
> 
> -------------------------------
> 
> Error Type: KeyError
> Error Value: unhandled
> 
> Traceback (innermost last):
>   File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\Publish.py, line
> 224, in publish_module
>   File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\Publish.py, line
> 189, in publish
>   File D:\Programme\Zope2.2\mensa_m\lib\python\Zope\__init__.py, line 221,
> in zpublisher_exception_hook
>     (Object: RoleManager)
>   File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\Publish.py, line
> 175, in publish
>   File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\mapply.py, line
> 160, in mapply
>     (Object: manage_test)
>   File D:\Programme\Zope2.2\mensa_m\lib\python\ZPublisher\Publish.py, line
> 112, in call_object
>     (Object: manage_test)
>   File D:\Programme\Zope2.2\mensa_m\lib\python\Shared\DC\ZRDB\Connection.py,
> line 178, in manage_test
>     (Object: RoleManager)
>   File D:\Programme\Zope2.2\mensa_m\lib\python\Products\ZMySQLDA\db.py, line
> 191, in query
> KeyError: (see above)
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
--------------2650FB8CB6D76EE01AF25134
Content-Type: text/x-vcard; charset=us-ascii;
 name="mtaylor.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Monty Taylor
Content-Disposition: attachment;
 filename="mtaylor.vcf"

begin:vcard 
n:Taylor;Monty
tel;cell:+31 (0)6 200 17486
tel;fax:+31 (0)20 589 5566
tel;work:+31 (0)20 589 5517
x-mozilla-html:TRUE
url:http://www.goldridge.net
org:Information Innovation
adr:;;Amstelveenseweg 88-90;Amsterdam;;1075 XJ;The Netherlands
version:2.1
email;internet:mtaylor@goldridge.net
title:Information Artist
x-mozilla-cpt:;0
fn:Monty Taylor
end:vcard

--------------2650FB8CB6D76EE01AF25134--