[Zope] begin/commit
Andy Dustman
andy@dustman.net
Tue, 3 Jul 2001 15:37:42 -0400 (EDT)
On Mon, 2 Jul 2001, Gustavo Vieira Goncalves Coelho Rios wrote:
> I am facing a "problem": i added a mysql connection to my folder, zope
> is executing a begin + my query + commit. How may i stop zope from
> doing that. I want it only execute <my query>, nothing more, nothing
> else.
If you are using ZMySQLDA-2.0.7, putting a - at the beginning of your
*connection string* will force it to not use transactions. If your server
supports transactions (i.e. you have BDB tables or InnoDB tables),
transactions are used automatically; otherwise they are not, so I must
assume your server supports them.
> Another problem: Just some of the query i run works when testing mysql
> connection. For instance, the following query does not work: select
> now()
>
> Looking at mysql log i saw zope exec the folloging:
>
> select now() limit 1000
Set the max_rows property on your Z SQL Method to 0, and a limit will not
be added. You also may be able to trick it by putting an SQL comment above
that line.
--
Andy Dustman PGP: 0xC72F3F1D
@ .net http://dustman.net/andy
I'll give spammers one bite of the apple, but they'll
have to guess which bite has the razor blade in it.