This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Hi all, Not sure if this question is one I should be asking here, if not, I am sorry.
I am using mySQL (5.0.37) an am using a stored function to implement Oracle like sequence numbers.
I am having a little issue with the update. So I was wondering if the use of BEGIN creates a lock on the table at the start of the stored function, so that while the function is executing no other function can update the sequence table.
I think this might be wishful thinking because it dosnt know what table I am trying to work with until it encounters the update
I will continue searching mySQL and if I find any answers will post them back here for the record.
Gavin, This is the right place to ask your question.
I'm pretty sure you don't get a lock until the actual update statement. Also, note that some databases don't lock the whole table, just the row you are using. This probably isn't a problem for your table though.