Subject Re: [firebird-support] Why does not apply insertion result.
Author Ann W. Harrison
On 1/25/2011 3:45 AM, neodreamer@... wrote:
> I work two isql instance with one database. ((A isql instance) and (B isql intance) is connected with test.fdb.)
>
> A isql : Create table. (table name is "member")
>
> B isql : Can see the table.(SHOW SCHEMA "member") (I know that DDL is committed automatically.)
>
> A isql : Insert one record into the "member" table.
>
> B isql : Cannot find any data on "member" table.( I cannot find data because It does not commit on A isql. I think... )
>
> A isql : Run commit command.
>
> B isql : Cannot find any data on "member" table. (WHY??)


Because one of the cardinal virtues of transactions is ISOLATION,
the I in ACID. The changes made by concurrent transactions don't
affect each other. When B did its first query, it started a transaction
and will see a consistent state of the database until it commits and
starts a new transaction which will continue to see the database in
a consistent state until it ends. Nothing that A does during B's
transaction will be visible. That's important if you want do do
multi-pass operations like percent of total or median.

Good luck,

Ann