@@ -106,12 +106,12 @@ create or replace type body ut_data_value_refcursor as
106106 l_result_string varchar2(32767);
107107 begin
108108 dbms_lob.createtemporary(l_result,true);
109- --return first 100 rows
109+ --return rows which were previously marked as different
110110 select xmlserialize( content ucd.row_data no indent)
111111 bulk collect into l_results
112112 from ut_cursor_data ucd
113113 where ucd.cursor_data_guid = self.data_value
114- and ucd.row_no <= c_max_rows ;
114+ and ucd.row_no in (select row_no from ut_cursor_data_diff ucdc) ;
115115
116116 for i in 1 .. l_results.count loop
117117 dbms_lob.append(l_result,l_results(i));
@@ -138,17 +138,17 @@ create or replace type body ut_data_value_refcursor as
138138 l_xpath := coalesce(self.exclude_xpath, l_other.exclude_xpath);
139139 if a_other is of (ut_data_value_refcursor) then
140140 l_other := treat(a_other as ut_data_value_refcursor);
141- select count(1 )
142- into l_result
141+ insert into ut_cursor_data_diff ( row_no )
142+ select nvl(exp.row_no, act.row_no)
143143 from (select case when l_xpath is not null then deletexml( ucd.row_data, l_xpath ) else ucd.row_data end as row_data,
144144 ucd.row_no
145145 from ut_cursor_data ucd where ucd.cursor_data_guid = self.data_value) exp
146146 full outer join (select case when l_xpath is not null then deletexml( ucd.row_data, l_xpath ) else ucd.row_data end as row_data,
147147 ucd.row_no
148148 from ut_cursor_data ucd where ucd.cursor_data_guid = l_other.data_value) act
149149 on (exp.row_no = act.row_no)
150- where nvl(dbms_lob.compare(xmlserialize( content exp.row_data no indent), xmlserialize( content act.row_data no indent)),1) != 0
151- and rownum <= 1;
150+ where nvl(dbms_lob.compare(xmlserialize( content exp.row_data no indent), xmlserialize( content act.row_data no indent)),1) != 0;
151+ select count(1) into l_result from ut_cursor_data_comp where rownum <= 1;
152152 else
153153 raise value_error;
154154 end if;
0 commit comments