MySQL Forums
Forum List  »  InnoDB

transactions and webservers
Posted by: Dick Stins
Date: January 31, 2005 11:20AM

We have a webbased php apache mysql application. The application has several end users, but one database mysql user used for connections.

How does the transaction mechanisme work with innodb transactions? Is it like:
Unless, you use pconnect, you will always have no transactoins in que as
they would have been all rolled back as soon as the page terminated. If you
do use pconnect your icon would reflect the fact that james or susie or
graham or jack, ... have not yet commited a transaction and that you can
commit it if you want. This is how it works and I am sure it is not the
behaviour you want. This will only work in a GUI, where a connection/session
is kept live and is unique for each user.

When this is right, then any transactions ( also started with BEGIN ) can't be used, because other users are able to commit or rollback it in the middle of it.

Autocommit means any sql statement that modifies the database is automaticaly
committed unless requested otherwise by changing the behavior with a BEGIN
which will temporarily ignore the default behavior until either a ROLLBACK or
COMMIT is received.

Concerning your described situation above of how this works, then these BEGIN transactions can't be used either.

When this all is true, how can we solve this? Someting like:
What happens when we use a different mysql user for every webERP user?

I guess that it should work then, when the connection stays alive (so we need to use pconnect, because otherwise the script will enforce a rollback after each page load?)

I hope that you are going to tell me that mysql/apache/php has smart solutions for using transactions and preventing unwanted rollbacks and commits by other users.

Options: ReplyQuote

Written By
transactions and webservers
January 31, 2005 11:20AM
February 01, 2005 07:39AM
February 01, 2005 10:02AM
February 01, 2005 03:03PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.