Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Wrong rollback warnings in utPLSQL Development Environment #982
Describe the bug
When I refresh my utpPLSQL development environment I get the following test result:
But when I rerun the tests I do not get this warnings again.
What am I doing wrong?
Provide version info
Information about utPLSQL and Database version,
Information about client software
UTPLSQL_CLI_VERSION="3.1.6" (as configured in the current develop branch)
then the results contains unexpected warnings:
then the result is as expected:
I expect the results of the subsequent runs also in the first run.
This is something I've encountered several times when running self-tests with utPLSQL.
I couldn't figure out what could be causing inconsistent transaction invalidation in the test-run.
Just a short note, that I can reproduce this error at will.
It always happens when install utPLSQL. I've just installed the current develop branch and got the following result:
I run the following script:
and after the failure, I can run
and then the result is
Looks like the condition for the very first run is different and that is causing the error.
I agree, this is low priority.
Since I updated my local installation and got this warnings again, I checked the status of this issue. And then I saw your comment about this not being "deterministic" (somehow I missed that previously). Hence, I thought it is important to point out, that it is reproducible. It has to be a bug. Either in the framework or its test suites.
After some debugging I've found the problem, though it seems like Oracle issue.
Seems that for some reason, with a newly created sequence the savepoints get "damaged" and transaction cannot rollback.
The issue we both saw was occuring for the very first two savepoints in the run (SEQ_NO=1 and SEQNO = 1).
A change from sequence to a timestamp made it go away and I can no longer reproduce the issue
I'm not sure if there is an Oracle bug for it.
For now I'll change from sequence to timestamp by replacing line
I had a deeper look while reviewing #1027 .
It is not an Oracle bug. It's a bug of the utPLSQL test setup. It's a namespace clash between the
I can reproduce it by running this with this script:
A simple fix is to use the owner of the PL/SQL package in the name of the savepoint. Changing the package function
After that change I do not get these warnings anymore.
Thanks for digging @PhilippSalvisberg
To your point on not using timestamp...
The challenge with appending username is the lenght limit on savepoint name.
Even UUID is too long ..
Actually my OS delivers only microseconds:
The last 3 digits are always zero.
I do not think it is a real problem using a timestamp. I just stated that I do not like to rely on slow processing.
Regarding the naming restriction. 30 bytes is valid for 11.2 and 12.1. Both versions are end of live. We can write the code in a way to use the 128 bytes. We can even define the sequence using the