Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cda5578

Browse files
authored
Merge pull request #509 from utPLSQL/bugfix/savepoints_on_windows
Savepoint name is now generated from sys_guid.
2 parents 733861c + 605d78d commit cda5578

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

source/core/ut_utils.pkb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ create or replace package body ut_utils is
5252

5353
function gen_savepoint_name return varchar2 is
5454
begin
55-
return 'ut_'||to_char(systimestamp,'yymmddhh24mmssff');
55+
return '"'|| utl_raw.cast_to_varchar2(utl_encode.base64_encode(sys_guid()))||'"';
5656
end;
5757

5858
/*

source/core/ut_utils.pks

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ create or replace package ut_utils authid definer is
119119

120120
function to_test_result(a_test boolean) return integer;
121121

122+
/**
123+
* Generates a unique name for a savepoint
124+
* Uses sys_guid, as timestamp gives only miliseconds on Windows and is not unique
125+
* Issue: #506 for details on the implementation approach
126+
*/
122127
function gen_savepoint_name return varchar2;
123128

124129
procedure debug_log(a_message varchar2);

0 commit comments

Comments
 (0)