db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: Can't seem to force table level locking
Date Wed, 01 Feb 2012 15:00:09 GMT
> Yes, autocommit is turned off.
> Any other thoughts?

Well, I never had any trouble getting the LOCK TABLE feature to work,
so I'm not sure what's wrong.

One possibility is that the query plan output is misleading you.

That is, although the query plan output might indicate that the
optimizer is choosing row-level locking, and it might even be
requesting row-level locks when it runs, the locking system may
be quietly processing those locks as table-level locks and so
everything might be working fine, just confusing output from the
optimizer dumps.

Do you have a reason to believe that your table is not being
locked at table level? For example, you see unexpected concurrent
accesses to the table?

Another thing you might try is to access some of the diagnostic
locking tools from within your transaction. For example, plant
a call to the LOCK_TABLE function and print out the results, and
see what locks it shows that you are *actually* holding.



View raw message