MYSQL

Moderator: Rathinagiri

t57042
Posts: 148
Joined: Tue Mar 16, 2010 9:46 am
Location: belgium

Re: MYSQL

Post by t57042 »

When using XBASE (in multiuser using NAS) , record and filelocking functions are provided in the language(Rlock .....).

How do you handle concurrency with MySQL?

Richard
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: MYSQL

Post by mol »

I've tried to realise record locking with MySql.
I've got strange results.
One one machine record locking worked OK, on another machine there was no record locking.
I've written to Harbour providers, but without any constructive results.
It depended on MySql version installed on computer (I've tried to install the same version, but with the same results).

For record locking you must use phrase:

Code: Select all

select * from any_table where record_ID=your_ID for UPDATE
here is a little sample:
http://www.molsystemy.pl/hmg/mysql_reco ... g_demo.zip
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MYSQL

Post by Rathinagiri »

IMHO locking is carried on automatically without our interference.

If we use begin transaction and end transaction sequence, ACID requirements are satisfied.

Marek,

In what way == is different from = in this situation?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: MYSQL

Post by mol »

rathinagiri wrote:IMHO locking is carried on automatically without our interference.

If we use begin transaction and end transaction sequence, ACID requirements are satisfied.

Marek,

In what way == is different from = in this situation?
because of text comparison method
= (equality) operator
== exactly equal
Post Reply