Row level locking in Uniplex/Informix 2.10. Question.
Posted in 1992
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Transactions, Locking & Isolation
Uniplex users out there?
comp.applications.uniplex would have been nice for this.
Uniplex is an office automation system containing Word processing,
spreadsheets, database, and lots of other stuff.
We have recently moved our customer service users to Uniplex. It uses
Informix 2.10 as its database engine. Uniplex creates sql scripts, which
are passed to the informix engine. No C language capability exists.
I can produce a deadlock-like situation as follows:
===================================================
: 'breaksql.sh'
: 'To try to produce a deadlock with informix.'
# Written by R McClatchey 04/24/92
Uredirect=/appl/uplex
INFORMIXDIR=/appl/informixexport Uredirect INFORMIXDIR
SEL=/tmp/sel$$; export SEL
TMP=/tmp/tmp$$
PATH=$SPATH:$Uredirect/UAP/bin:$Uredirect/UAP/cmds
DBPATH=/appl/dbases/informix
export PATH DBPATH
# records exist where oldquote = -1 and -2.
# usql is the Uniplex tool that calls sqlexec.
for i in 1 2
do
echo "invoke sales
update quotes set oldquote = -6 where oldquote = -$i" >$SEL.$iusql -q -u $SEL.$i&
done
exit 0
=========================================================
I then have to kill 2 sqlexec processes. They do not accumulate CPU time, and
do nothing. I interpret that as a deadlock.
If I add "lock table quotes in share mode" before the updates, the
deadlock is avoided and one update fails, the other succeeds.
Would a more modern version of Informix, interface with Uniplex and
have row level locking in sql? Would I have to go to C or ESQL?
My other SQL experience is with Unify 5, which locks the whole table on update
when using SQL, but not with its C interface, which does field locking.
Thanks for any help.
--
Reynolds McClatchey (Southern Aluminum Finishing Co, Atlanta, GA, USA)
Architectural Aluminum. Custom Fabrication. Paint, Powder Coating, Anodizing.
uunet!safn2!rey MCImail 414-2935 Voice 404-355-1560 Fax 404-350-0581