Subject | Re: Re[2]: [ib-support] Re: Unsuccessful metatdata update: Index is in use |
---|---|
Author | Claudio Valderrama C. |
Post date | 2002-03-25T09:23:39Z |
"Dieter Tremel" <tremel@...> wrote in message
news:159400607.20020325100816@......
SQL> create table y(a int);
SQL> commit;
SQL> select * from y;
=> Y has been loaded and the current txn is used it. It's taken.
SQL> drop table y;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-object Y is in use
=> isql uses separate txns for data and metadata. The metadata txn can't get
the lock that the data transaction has on Y, at least until the data
transaction is committed (sometimes this isn't enough).
=> Therefore, instead of committing the data txn and retrying with the
metadata transaction, we will force isql to use the data txn for metadata,
too.
SQL> set auto off;
SQL> drop table y;
SQL> commit;
SQL>
=> Since the same txn is free to get the same lock on db entities again, it
suceeds dropping the table.
You should know that isql runs three internal txns at the same time.
:-)
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:159400607.20020325100816@......
>Here you have a different example, but it's simpler:
> At the moment I have no trust in the timing of the yahoo groups
> posting mechanism.
SQL> create table y(a int);
SQL> commit;
SQL> select * from y;
=> Y has been loaded and the current txn is used it. It's taken.
SQL> drop table y;
Statement failed, SQLCODE = -607
unsuccessful metadata update
-object Y is in use
=> isql uses separate txns for data and metadata. The metadata txn can't get
the lock that the data transaction has on Y, at least until the data
transaction is committed (sometimes this isn't enough).
=> Therefore, instead of committing the data txn and retrying with the
metadata transaction, we will force isql to use the data txn for metadata,
too.
SQL> set auto off;
SQL> drop table y;
SQL> commit;
SQL>
=> Since the same txn is free to get the same lock on db entities again, it
suceeds dropping the table.
You should know that isql runs three internal txns at the same time.
:-)
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing