Jump to content

Transactions


eazyGen

Recommended Posts

Hi Guys,

 

I am building an app that I know will be deployed on a LAMP server but where I am not in control of the MySQL database engine. It could be InnoDB or it could be MyISAM. Or it could be something else for that matter.

 

My app has some pretty complicated updates that are tightly related and represent what folk call a “transaction”. In other words, and in an ideal world, all my updates should succeed or none should. The classic example is the bank transfer:

 

UPDATE account1 SET balance=balance-500;

UPDATE account2 SET balance=balance+500;

 

Both or none please.

 

I have been reading up on MySQL transactions, commit and rollback etc; and I am seeing what I would more or less expect (my background is with IBM's DB2).

 

However, I have been searching around, and, from what I have read thus far,  it seems that MyISAM does not support row level locking - only table locks (which is madness in my book).

 

So I thought I would ask here how folk achieve guaranteed transaction integrity if they are forced (by the host for example) to use MyISAM.

 

Or do you just put up with this db engine limitation?

 

Many thanks in advance.

 

S

Link to comment
Share on other sites

Your choice of hosting should be representative of your requirements. If you need transactions, you need a hosting provider that will provide that functionality. It's really quite simple.

It is not that simple when the app I am building will be used by others whose hosting I cannot dictate. Ergo - I need to consider the most basic set of features around and proceed on that basis.

 

NOT simple at ALL.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.