Hi folks, First, i would like to thanks all of you who provided me with the necessary help to get zope + mysql running, THANKS! 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. 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 How may i control how zope queries MySQL ? Thanks a lot -- The intelligence of any discussion diminishes with the square of the number of participants. -- Adam Walinsky
Hi Gustavo, --On Montag, 2. Juli 2001 21:51 -0300 Gustavo Vieira Goncalves Coelho Rios <gustavo@ifour.com.br> wrote:
Hi folks,
First, i would like to thanks all of you who provided me with the necessary help to get zope + mysql running, THANKS!
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.
Thats a feature of zope. The support for transactions is relatively new in mysql. However it makes sense. I cant think of a case where it can get in the way. May be you can show me where the problem with the transaction lives? Then, you might modify the DA or write your special own.
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
limit 1000 is not nessecary. Look at the "advanced" tab of ZSQL Methods for options to the query. There might be a problem with the now() call concerning names. Try select now() as now as a workaround. Regards Tino
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.
On Tue, Jul 03, 2001 at 03:37:42PM -0400, Andy Dustman wrote:
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.
Dear gentleman, i forgot to say i am not using Z SQL Method, this problem happens when i test mysq Z MySQL Database Connection Object! Do you know how to fix it? -- Go placidly amid the noise and waste, and remember what value there may be in owning a piece thereof. -- National Lampoon, "Deteriorata"
On Tue, 3 Jul 2001, Gustavo Vieira Goncalves Coelho Rios wrote:
On Tue, Jul 03, 2001 at 03:37:42PM -0400, Andy Dustman wrote:
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.
i forgot to say i am not using Z SQL Method, this problem happens when i test mysq Z MySQL Database Connection Object! Do you know how to fix it?
You may be able to trick it like this: select now() -- or /* */ select now() -- 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.
participants (3)
-
Andy Dustman -
Gustavo Vieira Goncalves Coelho Rios -
Tino Wildenhain