Hi!

>>>>> "Peter" == Peter Zaitsev <[EMAIL PROTECTED]> writes:

Peter> Hello mysql,
Peter>   I'm planing to use transactions in application written in PHP, which
Peter>   of course uses pconnect to optimize perfomance.

Peter>   Few time ago I had to stop using "lock tables" as this lead to
Peter>   locked system then somehow the php script was aborted before unlock
Peter>   tables.

Peter>   With transactions we could have the same bad situation if it's not
Peter>   handeled, it's even worse as the result is unexpected depending on
Peter>   the following statements transaction can be committed or rolled back.

Peter>   I'm speaking about the following problem:
  
Peter>   I issue the  begin statement and some of the statements, then PHP
Peter>   script is aborted before the transaction is committed, but as
Peter>   connection is not terminated mysql does not rolls it back. The next
Peter>   statements come from the other PHP script so they could commit
Peter>   transaction or roll it back.

The above problem should exist with all transactional databases.

Peter>   The question is - does this problem present or not ? If it does I
Peter>   think it would be nice to modify  the behavior so PHP would unlock
Peter>   all the tables and rollback all the transactions from the previous
Peter>   script.

I think that if a PHP script is aborted and you are using persistent
connections, then it should send a 'bk abort' to the database if there
is an active transaction.

I don't however think the current PHP code does this.
Peter and Tim, could you try to sort this out?
This is a question for the PHP list..

Regards,
Monty

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to