|
7 | 7 | * |
8 | 8 | * |
9 | 9 | * IDENTIFICATION |
10 | | - * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.9 1996/12/1904:54:56 scrappy Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.10 1996/12/1905:01:17 scrappy Exp $ |
11 | 11 | * |
12 | 12 | *------------------------------------------------------------------------- |
13 | 13 | */ |
@@ -178,7 +178,11 @@ Async_Notify(char *relname) |
178 | 178 | if (!pendingNotifies) |
179 | 179 | pendingNotifies=DLNewList(); |
180 | 180 |
|
181 | | -notifyName=pstrdup(relname); |
| 181 | +/* |
| 182 | + * Allocate memory from the global malloc pool because it needs to be |
| 183 | + * referenced also when the transaction is finished. DZ - 26-08-1996 |
| 184 | + */ |
| 185 | +notifyName=strdup(relname); |
182 | 186 | DLAddHead(pendingNotifies,DLNewElem(notifyName)); |
183 | 187 |
|
184 | 188 | ScanKeyEntryInitialize(&key,0, |
@@ -580,7 +584,8 @@ AsyncExistsPendingNotify(char *relname) |
580 | 584 | for (p=DLGetHead(pendingNotifies); |
581 | 585 | p!=NULL; |
582 | 586 | p=DLGetSucc(p)) { |
583 | | -if (!strcmp(DLE_VAL(p),relname)) |
| 587 | +/* Use NAMEDATALEN for relname comparison. DZ - 26-08-1996 */ |
| 588 | +if (!strncmp(DLE_VAL(p),relname,NAMEDATALEN)) |
584 | 589 | return1; |
585 | 590 | } |
586 | 591 |
|
|