Subject RE: [firebird-support] Re: How to crash FB
Author Chad Z. Hower
:: CZH> Do you just want the table structure and the SQL?
::
:: I don't know. I need enough stuff to reproduce the crash.
:: Ciao

CREATE TABLE "CartItem" (
"CartItemID" "KeyDmn" NOT NULL,
"CartID" "KeyDmn" NOT NULL,
"EditionID" "KeyDmn" NOT NULL,
"IsProcessed" "BooleanDmn" DEFAULT 'F' NOT NULL,
"CustomerAmt" "CurrnecyDmn",
"VendorAmt" "CurrnecyDmn",
"APPAmt" "CurrnecyDmn",
"VATAmt" "CurrnecyDmn",
CONSTRAINT "PK_CartItem" PRIMARY KEY ("CartItemID")
);

This is the table. I didn't post the FKs so you don't need the other tables.
Insert say 10,000 rows.

Now what it does is it comes back and does this for each row: (all inside
one big transaction)

select "CartItemID", "CartID", "EditionID", "IsProcessed", "CustomerAmt",
"VendorAmt", "APPAmt", "VATAmt" from "CartItem" where "CartItemID"=111

UPDATE "CartItem" SET "CartID"=@PCartID, "EditionID"=@PEditionID,
"IsProcessed"=@PIsProcessed, "CustomerAmt"=@PCustomerAmt,
"VendorAmt"=@PVendorAmt, "APPAmt"=@PAPPAmt, "VATAmt"=@PVATAmt where
"CartItemID"=111

Right now it issues the update for all fields except the key, its just a fix
that needs to be done it the code. But only the Amt fields are actually
being altered.