Browse Source

- relax db_init BUG check (allow db init from fixup functions)

(SER-227 related)
Andrei Pelinescu-Onciul 18 năm trước cách đây
mục cha
commit
b0123c365a
2 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 1 0
      globals.h
  2. 2 0
      main.c

+ 1 - 0
globals.h

@@ -146,6 +146,7 @@ extern int process_no;
 extern int reply_to_via;
 extern int reply_to_via;
 
 
 extern int is_main;
 extern int is_main;
+extern int fixup_complete;
 
 
 /* debugging level for dumping memory status */
 /* debugging level for dumping memory status */
 extern int memlog;
 extern int memlog;

+ 2 - 0
main.c

@@ -422,6 +422,7 @@ extern int yyparse();
 
 
 
 
 int is_main=1; /* flag = is this the  "main" process? */
 int is_main=1; /* flag = is this the  "main" process? */
+int fixup_complete=0; /* flag = is the fixup complete ? */
 
 
 char* pid_file = 0; /* filename as asked by use */
 char* pid_file = 0; /* filename as asked by use */
 char* pgid_file = 0;
 char* pgid_file = 0;
@@ -1591,6 +1592,7 @@ try_again:
 						r);
 						r);
 		goto error;
 		goto error;
 	};
 	};
+	fixup_complete=1;
 
 
 #ifdef STATS
 #ifdef STATS
 	if (init_stats(  dont_fork ? 1 : children_no  )==-1) goto error;
 	if (init_stats(  dont_fork ? 1 : children_no  )==-1) goto error;