PxPlus User Forum

Main Board => Discussions => Language => Topic started by: Jerry Fletcher on March 12, 2026, 08:40:23 AM

Title: [MySql]
Post by: Jerry Fletcher on March 12, 2026, 08:40:23 AM
Hello,

When opening a [MySql] Table with iol=* is there any way to handle locking a record?

Jerry
Title: Re: [MySql]
Post by: EVa on March 18, 2026, 05:50:30 AM
PxPlus will do that for you, but you can change the SQL syntax it uses by changing option EXTROPT (see https://manual.pvxplus.com/?command_tags/mysql.htm).  I just tried this:

Session #1:
1>print pth(1)," % ",opt(1)
[MySQL]MySQL;bitfile;KEY=KEYFIELD % ;user=root;pswd=pswd;prepare=N;strip
1>extract (1,key="05")
1>print prm('XI')
 0

Session #2:
1>print pth(1)," # ",opt(1)
[MySQL]MySQL;bitfile;KEY=KEYFIELD # ;user=root;pswd=pswd;prepare=N;strip
1>extract(1,key="05")
Error #0: Record/file busy
Last IO to [MySQL]MySQL;bitfile;KEY=KEYFIELD, channel 1
MYSQL:1205:Lock wait timeout exceeded; try restarting transaction
Title: Re: [MySql]
Post by: Jerry Fletcher on March 18, 2026, 08:17:15 AM
Hi

Thank you. that worked.
it must have been that 'XI' parameter which I dont think i can shut off across board but maybe right prior to sql extracts.

Jerry