Avatar billede Slettet bruger
09. juli 2004 - 22:41 Der er 2 kommentarer og
1 løsning

LOCK TABLE på InnoDB og MyISAM

Will a LOCK TABLE work as expected on a InnoDB type table? Example: LOCK TABLE a WRITE, b WRITE (where a is type InnoDB and b is type MyISAM)?

Jeg har læst følgende begrænsning i manualen:
The MySQL LOCK TABLES operation does not know about InnoDB row-level locks set by already completed SQL statements. This means that you can get a table lock on a table even if there still exist transactions by other users who have row level locks on the same table. Thus your operations on the table may have to wait if they collide with these locks of other users. Also a deadlock is possible. However, this does not endanger transaction integrity, because the row level locks set by InnoDB will always take care of the integrity. Also, a table lock prevents other transactions from acquiring more row level locks (in a conflicting lock mode) on the table.

http://dev.mysql.com/doc/mysql/en/InnoDB_restrictions.html
Avatar billede arne_v Ekspert
09. juli 2004 - 22:43 #1
Hvorfor vil du bruge LOCK TABLE på InnoDB tabeller ?

Transaktioner og passende højt transaction isolation level
vil vil opnå det samme på en langt mere effektiv måde ?
Avatar billede Slettet bruger
09. juli 2004 - 23:02 #2
Fordi jeg ikke tænkte mig om. Beklager du fik læst spørgsmålet, inden jeg nåede at lukke det. Hvis du vil have point for din ulejlighed, så læg et svar.
Avatar billede arne_v Ekspert
09. juli 2004 - 23:07 #3
:-)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Computerworld tilbyder specialiserede kurser i database-management

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester