Subject Re: [Firebird-devel] possible bug in FB1.5.0.4306
Author Jim Starkey
David Y. Bonafé wrote:

>Isn't possible to create a flag for each transaction?
>
>When a transaction starts, the flag value is DML, so any DML can be
>executed. After a DDL this flag changes to DDL, so engine raises an
>exception when executing DML. I'm not a core developer, but I think checking
>transaction flag for each statement won't drop the performance so much.
>
>
It almost certainly is not a performance problem. It is, however, what
is known in the business as a "wart on a wart". It is also impossible
to implement because the engine itself must perform DML operations to
perform the DDL request.

Transaction states are generally bad. Ephemeral transaction states are
worse. Batching DDL statements to take advantage of transient,
incomplete execution is next to impossible to design, and puts all sorts
of restrictions on future development rightfully constrained to preserve
past achitecturally sanctioned behaviors. It would also require
different transaction semantics for DML operations emiminating from
clients and the engine itself.

Define work exists solely to support direct update of system tables in
which a single logical DDL operation is necessarily performed by a
sequence of DML operations. If system tables are made client read-only,
there is no reason to making DDL operatings under transaction control.

--

Jim Starkey
Netfrastructure, Inc.
978 526-1376