Skip to Content
-2
Jan 20, 2019 at 09:06 AM

Rollback not working in HANA XSA

142 Views Last edit Jan 20, 2019 at 09:17 AM 3 rev

PROCEDURE ".."( ) LANGUAGE SQLSCRIPT SQL SECURITY INVOKER --DEFAULT SCHEMA <default_schema_name> --READS SQL DATA AS BEGIN /************************************* Write your procedure logic *************************************/ DECLARE EXIT HANDLER FOR SQLEXCEPTION SELECT ::SQL_ERROR_CODE, ::SQL_ERROR_MESSAGE FROM "...::DUMMY";

INSERT INTO "TABLE" VALUES( , , , );

INSERT INTO "TABLE" VALUES( , , , );

ROLLBACK;

END

I can see the exception thrown "Unique constraint violated

But ROLLBACK is not happening data is inserted by first INSERT statement