[1576] in Moira

home help back first fref pref prev next nref lref last post

handle more than one incremental

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Wed Jun 7 22:28:58 2000

Message-Id: <200006080228.WAA09473@riff-raff-w20.mit.edu>
To: moiradev@MIT.EDU
Date: Wed, 07 Jun 2000 22:28:54 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>

	We need to duplicate the iupdate structure before putting it on
the incremental_exec queue so we can do more than one incremental for a
given query.  I *think* this is the last change needed before we can
start actually testing the pismere ldap thingy.

Garry

Index: increment.pc
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/server/increment.pc,v
retrieving revision 2.7
diff -c -r2.7 increment.pc
*** increment.pc	1998/08/27 17:47:37	2.7
--- increment.pc	2000/06/08 02:22:53
***************
*** 345,351 ****
    EXEC SQL BEGIN DECLARE SECTION;
    char tab[INCREMENTAL_TABLE_NAME_SIZE], serv[INCREMENTAL_SERVICE_SIZE];
    EXEC SQL END DECLARE SECTION;
!   struct iupdate *iu;
  
    if (!inited)
      {
--- 345,351 ----
    EXEC SQL BEGIN DECLARE SECTION;
    char tab[INCREMENTAL_TABLE_NAME_SIZE], serv[INCREMENTAL_SERVICE_SIZE];
    EXEC SQL END DECLARE SECTION;
!   struct iupdate *iu, *iu_save;
  
    if (!inited)
      {
***************
*** 376,383 ****
  	  if (!strcmp(c->table, iu->table))
  	    {
  	      iu->service = c->service;
! 	      sq_save_data(incremental_exec, iu);
! 	      break;
  	    }
  	}
        if (!c)
--- 376,389 ----
  	  if (!strcmp(c->table, iu->table))
  	    {
  	      iu->service = c->service;
! 	      iu_save = xmalloc(sizeof(struct iupdate));
! 	      iu_save->service = xstrdup(iu->service);
! 	      iu_save->table = xstrdup(iu->table);
! 	      iu_save->beforec = iu->beforec;
! 	      iu_save->afterc = iu->afterc;
! 	      iu_save->before = copy_argv(iu->before, iu->beforec);
! 	      iu_save->after = copy_argv(iu->after, iu->afterc);
! 	      sq_save_data(incremental_exec, iu_save);
  	    }
  	}
        if (!c)

home help back first fref pref prev next nref lref last post