Skip to content

Commit cfbf264

Browse files
committed
Remove NOT_EXECUTABLE. wt_profiler Unit Testing
1 parent 425b806 commit cfbf264

9 files changed

Lines changed: 587 additions & 448 deletions

File tree

src/core/install.LST

Lines changed: 13 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -184,160 +184,28 @@ Grant succeeded.
184184
Grant succeeded.
185185

186186

187-
Error starting at line : 6 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
188-
In command -
189-
create table wt_dbout_profiles
190-
(test_run_id number(38) constraint wt_dbout_profiles_nn1 not null
191-
,line number(6) constraint wt_dbout_profiles_nn2 not null
192-
,status varchar2(4) constraint wt_dbout_profiles_nn3 not null
193-
,total_occur number(9) constraint wt_dbout_profiles_nn4 not null
194-
,total_time number(9) constraint wt_dbout_profiles_nn5 not null
195-
,min_time number(9) constraint wt_dbout_profiles_nn6 not null
196-
,max_time number(9) constraint wt_dbout_profiles_nn7 not null
197-
,text varchar2(4000) constraint wt_dbout_profiles_nn8 not null
198-
,not_exec_text varchar2(4000)
199-
,constraint wt_dbout_profiles_pk primary key (test_run_id, line)
200-
,constraint wt_dbout_profiles_fk1 foreign key (test_run_id)
201-
references wt_test_runs (id)
202-
,constraint wt_dbout_profiles_fk2 foreign key (not_exec_text)
203-
references wt_not_executable (text) disable
204-
,constraint wt_dbout_profiles_ck1 check (status in ('EXEC','NOTX','EXCL','ANNO','UNKN'))
205-
) pctfree 0
206-
Error report -
207-
ORA-02444: Cannot resolve referenced object in referential constraints
208-
02444. 00000 - "Cannot resolve referenced object in referential constraints"
209-
*Cause: attempted to define foreign key referencing an object which
210-
cannot be resolved to a base table reference
211-
*Action: referential constraints can only be defined on objects which
212-
can be resolve to base table reference
213-
214-
Error starting at line : 24 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
215-
In command -
216-
comment on table wt_dbout_profiles is 'PL/SQL Profiler data for Database Object Under Test (DBOUT).'
217-
Error report -
218-
ORA-01775: looping chain of synonyms
219-
01775. 00000 - "looping chain of synonyms"
220-
*Cause:
221-
*Action:
187+
Table WT_DBOUT_PROFILES created.
222188

223-
Error starting at line : 25 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
224-
In command -
225-
comment on column wt_dbout_profiles.test_run_id is 'Foreign Key for the Test Run, Primary Key part 1.'
226-
Error report -
227-
ORA-01775: looping chain of synonyms
228-
01775. 00000 - "looping chain of synonyms"
229-
*Cause:
230-
*Action:
231189

232-
Error starting at line : 26 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
233-
In command -
234-
comment on column wt_dbout_profiles.line is 'Source code line number, Primary Key part 2.'
235-
Error report -
236-
ORA-01775: looping chain of synonyms
237-
01775. 00000 - "looping chain of synonyms"
238-
*Cause:
239-
*Action:
190+
Comment created.
240191

241-
Error starting at line : 27 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
242-
In command -
243-
comment on column wt_dbout_profiles.status is 'Executed/NotExecuted/Excluded/Annotated/Unknown Status from the Profiler'
244-
Error report -
245-
ORA-01775: looping chain of synonyms
246-
01775. 00000 - "looping chain of synonyms"
247-
*Cause:
248-
*Action:
249192

250-
Error starting at line : 28 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
251-
In command -
252-
comment on column wt_dbout_profiles.total_occur is 'Number of times this line was executed.'
253-
Error report -
254-
ORA-01775: looping chain of synonyms
255-
01775. 00000 - "looping chain of synonyms"
256-
*Cause:
257-
*Action:
193+
Comment created.
258194

259-
Error starting at line : 29 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
260-
In command -
261-
comment on column wt_dbout_profiles.total_time is 'Total time spent executing this line.'
262-
Error report -
263-
ORA-01775: looping chain of synonyms
264-
01775. 00000 - "looping chain of synonyms"
265-
*Cause:
266-
*Action:
267195

268-
Error starting at line : 30 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
269-
In command -
270-
comment on column wt_dbout_profiles.min_time is 'Minimum execution time for this line.'
271-
Error report -
272-
ORA-01775: looping chain of synonyms
273-
01775. 00000 - "looping chain of synonyms"
274-
*Cause:
275-
*Action:
196+
Comment created.
276197

277-
Error starting at line : 31 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
278-
In command -
279-
comment on column wt_dbout_profiles.max_time is 'Maximum execution time for this line.'
280-
Error report -
281-
ORA-01775: looping chain of synonyms
282-
01775. 00000 - "looping chain of synonyms"
283-
*Cause:
284-
*Action:
285198

286-
Error starting at line : 32 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
287-
In command -
288-
comment on column wt_dbout_profiles.text is 'Source code text for this line number.'
289-
Error report -
290-
ORA-01775: looping chain of synonyms
291-
01775. 00000 - "looping chain of synonyms"
292-
*Cause:
293-
*Action:
199+
Comment created.
294200

295-
Error starting at line : 33 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
296-
In command -
297-
comment on column wt_dbout_profiles.not_exec_text is 'One of the matching values from TEXT.WT_NOT_EXECUTABLE'
298-
Error report -
299-
ORA-01775: looping chain of synonyms
300-
01775. 00000 - "looping chain of synonyms"
301-
*Cause:
302-
*Action:
303201

304-
Error starting at line : 35 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
305-
In command -
306-
grant select on wt_dbout_profiles to public
307-
Error report -
308-
ORA-01775: looping chain of synonyms
309-
01775. 00000 - "looping chain of synonyms"
310-
*Cause:
311-
*Action:
202+
Comment created.
312203

313-
Error starting at line : 36 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
314-
In command -
315-
grant insert on wt_dbout_profiles to public
316-
Error report -
317-
ORA-01775: looping chain of synonyms
318-
01775. 00000 - "looping chain of synonyms"
319-
*Cause:
320-
*Action:
321204

322-
Error starting at line : 37 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
323-
In command -
324-
grant update on wt_dbout_profiles to public
325-
Error report -
326-
ORA-01775: looping chain of synonyms
327-
01775. 00000 - "looping chain of synonyms"
328-
*Cause:
329-
*Action:
205+
Comment created.
330206

331-
Error starting at line : 38 File @ C:\Users\Duane\Documents\GitHub\wtPLSQL\src\core\wt_dbout_profiles.tab
332-
In command -
333-
grant delete on wt_dbout_profiles to public
334-
Error report -
335-
ORA-01775: looping chain of synonyms
336-
01775. 00000 - "looping chain of synonyms"
337-
*Cause:
338-
*Action:
339207

340-
Table WT_NOT_EXECUTABLE created.
208+
Comment created.
341209

342210

343211
Comment created.
@@ -346,13 +214,16 @@ Comment created.
346214
Comment created.
347215

348216

349-
Comment created.
217+
Grant succeeded.
350218

351219

352220
Grant succeeded.
353221

354222

355-
1 row inserted.
223+
Grant succeeded.
224+
225+
226+
Grant succeeded.
356227

357228

358229
Table WT_TEST_DATA created.
@@ -436,4 +307,3 @@ Errors: check compiler log
436307

437308
Package Body WT_TEXT_REPORT compiled
438309

439-
Errors: check compiler log

src/core/install.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ grant select, insert, delete on plsql_profiler_data to public;
3838
-- Core Tables
3939
@wt_test_runs.tab
4040
@wt_results.tab
41-
@wt_not_executable.tab
4241
@wt_dbout_profiles.tab
4342
@wt_test_data.tab
4443

src/core/scratch.sql

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ declare
5555
-- ,in_hide_details => TRUE
5656
-- ,in_summary_last => TRUE
5757
,in_show_pass => TRUE
58-
-- ,in_show_aux => TRUE
58+
,in_show_aux => TRUE
5959
);
6060
end report_test;
6161
begin
@@ -73,10 +73,37 @@ begin
7373
end;
7474
/
7575

76+
select * from user_errors
77+
--where attribute = 'ERROR'
78+
order by name, type, sequence, line, position, text;
79+
80+
where name = 'WT_PROFILE_TEST';
81+
7682
select * from dual
7783
where regexp_like('package body wt_result', '(FUNCTION|PROCEDURE|PACKAGE|TYPE|TRIGGER)', 'i');
7884

7985

8086
select * from wt_dbout_profiles where test_run_id = 26 order by line;
8187

8288
select * from wt_test_data;
89+
90+
create or replace procedure wt_profile_test
91+
is
92+
l_junk number;
93+
begin
94+
--% WTPLSQL SET DBOUT "WT_PROFILER" %--'
95+
l_junk := 1;
96+
end wt_profile_test;
97+
/
98+
99+
begin
100+
execute immediate
101+
'create or replace procedure wt_profile_test' || CHR(10) ||
102+
'is' || CHR(10) ||
103+
' l_junk number;' || CHR(10) ||
104+
'begin' || CHR(10) ||
105+
' --% WTPLSQL SET DBOUT "WT_PROFILE_TEST" %--' || CHR(10) ||
106+
' l_junk := 1;' || CHR(10) ||
107+
'end wt_profile_test;' ;
108+
end;
109+
/

0 commit comments

Comments
 (0)