Hi

We have problem with UPDATE record during transaction.

We have analized all process of locking records during transaction and
we are sure that it is not problem with locking records. We would like to
present you some examples which show this problem .

I have writen simple application which UPDATE the same record many times
during the same transaction . It use one TDatabase component (Database1)
and two TQuery components (Query1,Query2) .

FIRST EXAMPLE:

Database1->StartTransaction();
try
{
Query2->Close();
Query2->SQL->Clear();
Query2->SQL->Add("UPDATE KASY SET STAN_KASY = 1000 WHERE NUMER_KASY = 0");
Query2->ExecSQL();

Query1->Close();
Query1->SQL->Clear();
Query1->SQL->Add("SELECT * FROM MAGAZYN");
Query1->Open();

Query2->Close();
Query2->SQL->Clear();
Query2->SQL->Add("UPDATE KASY SET STAN_KASY = 2000 WHERE NUMER_KASY = 0");
Query2->ExecSQL(); - !!!!! this instruction holds transaction on several
minutes !!!!

Database1->Commit();
}
catch (...)
{
 Database1->Rollback();
 }

As the resault all transaction lasts several minutes but It should lasts
only several miliseconds.


SECOND EXAMPLE:

Database1->StartTransaction();
try
{
Query1->Close();
Query1->SQL->Clear();
Query1->SQL->Add("SELECT * FROM MAGAZYN");
Query1->Open();

Query2->Close();
Query2->SQL->Clear();
Query2->SQL->Add("UPDATE KASY SET STAN_KASY = 1000 WHERE NUMER_KASY = 0");
Query2->ExecSQL();

Query1->Close();
Query1->SQL->Clear();
Query1->SQL->Add("SELECT * FROM MAGAZYN");
Query1->Open();

Query2->Close();
Query2->SQL->Clear();
Query2->SQL->Add("UPDATE KASY SET STAN_KASY = 2000 WHERE NUMER_KASY = 0");
Query2->ExecSQL(); - !!!!! this instruction execute correctly !!!!

Database1->Commit();
}
catch (...)
{
 Database1->Rollback();
 }


As the resault all transaction lasts several miliseconds.When we have added
one SELECT instruction  which get records from any table Transaction execute
correctly and very fast.


We have oberved that this problem appear only when we UPDATE the same record
many times during the same transaction. We would like to know it is
restriction or bug.
Because we chose SAPDB (MAXDB)  as database platform for our commercial
application this problem is important for our company.

I will be grateful for all suggests and advices concerning with this
problem.

Regards

Andrzej Kazmierkiewicz




-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to