Skip to main content
replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/
Source Link

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more information on this in the MySQL Documentation.

I wrote earlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is preventing needless deadlocks on pages.

I hope this helps !!!

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more information on this in the MySQL Documentation.

I wrote earlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is preventing needless deadlocks on pages.

I hope this helps !!!

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more information on this in the MySQL Documentation.

I wrote earlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is preventing needless deadlocks on pages.

I hope this helps !!!

deleted 1 characters in body
Source Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more information on this in the MySQL Documentation.

I wrote earlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is too preventpreventing needless deadlocks on pages.

I hope this helps !!!

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more information on this in the MySQL Documentation.

I wrote earlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is too prevent needless deadlocks on pages.

I hope this helps !!!

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more information on this in the MySQL Documentation.

I wrote earlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is preventing needless deadlocks on pages.

I hope this helps !!!

added 11 characters in body
Source Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more information on this in the MySQL Documentation.

I wrote easrlierearlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is too prevent needless deadlocks on pages.

I hope this helps !!!

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more on this in the MySQL Documentation.

I wrote easrlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is too prevent needless deadlocks on pages.

I hope this helps !!!

To some extent, yes.

When it comes to InnoDB, you can choose what rows can get locked. It is not so much a particular setting for the DB Connection. It is a specific query you have to call before doing UPDATEs.

  • SELECT ... FOR UPDATE
  • SELECT ... LOCK IN SHARE MODE

This can initiate exclusive or shared row locks based on the result set of those SELECTs.

You can find more information on this in the MySQL Documentation.

I wrote earlier posts on using these:

With regard to sessions and connections

  • Performing SELECT ... FOR UPDATE will initiate locks on rows you intend to update and still permit other DB Connections to read.
  • Performing SELECT ... LOCK IN SHARE MODE essentially does the reverse
  • lock rows for you to read
  • allow SELECTs of the same locked rows
  • prevent connections from doing SELECT ... FOR UPDATE or direct DML

The only advantage I see in using these SELECT queries is too prevent needless deadlocks on pages.

I hope this helps !!!

added 4 characters in body
Source Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531
Loading
added 650 characters in body
Source Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531
Loading
added 650 characters in body
Source Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531
Loading
Source Link
RolandoMySQLDBA
  • 184.3k
  • 33
  • 323
  • 531
Loading