MySQLDA Problems with simple constant/function queries
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)
Stefan Franke wrote:
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?
Zope site's not responding for me currently, so I can't give you a URL, but please search the Zope.org site for "how to write a da", it should return a link to an article by Chris Petrilli that documents the DA interface.
+----[ Stefan Franke ]--------------------------------------------- [Charset iso-8859-1 unsupported, filtering to ASCII...] | 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> I can give you work_arounds for both cases:- select 1 from foo as One select CONV(LAST_INSERT_ID(),10,10) AS LAST_INSERT_ID This last one took me a little while to work out :-) -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
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 )
participants (4)
-
Andrew Kenneth Milton -
Chris McDonough -
Monty Taylor -
Stefan Franke