Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
fix threaded cleaner, some oracle modifications
Browse files Browse the repository at this point in the history
* threaded cleaner gets own db_hello
	- selects instance_name from database
	- if not found, return error
	- if found, insert conninfo and do the config stuff
          like normal db_hello
* threaded cleaner waits until db_hello returns ok
  otherwise sleeps 5 seconds

* fixed oracle instance_name insert into table instead of instance_id

* added oracle truncate/delete all tables scripts

refs #29,#31
  • Loading branch information
Michael Friedrich committed Feb 10, 2010
1 parent c9985f5 commit d2560c7
Show file tree
Hide file tree
Showing 5 changed files with 539 additions and 244 deletions.
10 changes: 10 additions & 0 deletions module/idoutils/db/oracle/oracle-delete.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
declare
v_new_tab_name varchar2(35);
begin
for c1 in (select table_name from user_tables) loop
v_new_tab_name := '' || C1.Table_Name|| '' ;
execute immediate ('delete from '||v_new_tab_name) ;
commit;
end loop;
end;
/
10 changes: 10 additions & 0 deletions module/idoutils/db/oracle/oracle-truncate.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
declare
v_new_tab_name varchar2(35);
begin
for c1 in (select table_name from user_tables) loop
v_new_tab_name := '' || C1.Table_Name|| '' ;
execute immediate (' truncate table '||v_new_tab_name) ;
commit;
end loop;
end;
/
1 change: 1 addition & 0 deletions module/idoutils/include/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ int ndo2db_db_connect(ndo2db_idi *);
int ndo2db_db_disconnect(ndo2db_idi *);

int ndo2db_db_hello(ndo2db_idi *);
int ido2db_thread_db_hello(ndo2db_idi *);
int ndo2db_db_goodbye(ndo2db_idi *);
int ndo2db_db_checkin(ndo2db_idi *);

Expand Down
Loading

0 comments on commit d2560c7

Please sign in to comment.