From: Mark O. <sky...@us...> - 2001-04-05 17:05:47
|
Update of /cvsroot/firebird/interbase/burp In directory usw-pr-cvs1:/tmp/cvs-serv32292/burp Modified Files: backup.e burp.c burp.h mvol.c restore.e Log Message: Committed Changes made in the borland tree Committed Changes made by Mike Nordel re, 64 bit io for win32 and bug fixes Index: backup.e =================================================================== RCS file: /cvsroot/firebird/interbase/burp/backup.e,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** backup.e 2001/03/18 15:42:39 1.5 --- backup.e 2001/04/05 17:05:42 1.6 *************** *** 207,211 **** SSHORT l; TEXT temp [32]; ! SLONG cumul_count; isc_req_handle req_handle1 = NULL; long req_status [20]; --- 207,211 ---- SSHORT l; TEXT temp [32]; ! SLONG cumul_count_kb; isc_req_handle req_handle1 = NULL; long req_status [20]; *************** *** 221,225 **** tdgbl->io_cnt = 0; tdgbl->relations = (REL) NULL; ! cumul_count = tdgbl->BCK_capabilities = 0; gds__trans = NULL; --- 221,225 ---- tdgbl->io_cnt = 0; tdgbl->relations = (REL) NULL; ! cumul_count_kb = tdgbl->BCK_capabilities = 0; gds__trans = NULL; *************** *** 428,433 **** PUT (rec_end); ! MVOL_fini_write (&tdgbl->io_cnt, &tdgbl->io_ptr, &cumul_count); ! BURP_verbose (176, (TEXT*) cumul_count, NULL, NULL, NULL, NULL); /* msg 176 closing file, committing, and finishing. %ld bytes written */ COMMIT; --- 428,433 ---- PUT (rec_end); ! MVOL_fini_write (&tdgbl->io_cnt, &tdgbl->io_ptr, &cumul_count_kb); ! BURP_verbose (176, (TEXT*) cumul_count_kb, NULL, NULL, NULL, NULL); /* msg 176 closing file, committing, and finishing. %ld bytes written */ COMMIT; Index: burp.c =================================================================== RCS file: /cvsroot/firebird/interbase/burp/burp.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** burp.c 2000/09/04 16:04:21 1.3 --- burp.c 2001/04/05 17:05:42 1.4 *************** *** 31,34 **** --- 31,36 ---- #include "../jrd/ibsetjmp.h" #include "../jrd/msg_encode.h" + #include "../jrd/thd_proto.h" + #include "../jrd/ods.h" // to get MAX_PAGE_SIZE #include "../burp/burp.h" #include "../burp/burpswi.h" *************** *** 491,495 **** IB_FILE *tmp_outfile; ! struct tgbl thd_context; tdgbl = (struct tgbl *) gds__alloc (sizeof(*tdgbl)); --- 493,499 ---- IB_FILE *tmp_outfile; ! /* TMN: This variable should probably be removed, but I left it in */ ! /* in case some platform should redefine the BURP SET_THREAD_DATA. */ ! /* struct tgbl thd_context; */ tdgbl = (struct tgbl *) gds__alloc (sizeof(*tdgbl)); *************** *** 1065,1082 **** BURP_error (8, 0, 0, 0, 0, 0); /* msg 8 page size is allowed only on restore or create */ temp = tdgbl->gbl_sw_page_size; ! if (temp <= 1024) ! temp = 1024; ! else if (temp <= 2048) ! temp = 2048; ! else if (temp <= 4096) ! temp = 4096; ! else if (temp <= 8192) ! temp = 8192; ! else #ifdef SUPERSERVER BURP_svc_error (3, isc_arg_number, tdgbl->gbl_sw_page_size, 0, NULL, 0, NULL, 0, NULL, 0, NULL); #else ! BURP_error (3, (TEXT *) tdgbl->gbl_sw_page_size, 0, 0, 0, 0); /* msg 3 Page size specified (%ld) greater than limit (8192 bytes) */ #endif if (temp != tdgbl->gbl_sw_page_size) --- 1069,1088 ---- BURP_error (8, 0, 0, 0, 0, 0); /* msg 8 page size is allowed only on restore or create */ temp = tdgbl->gbl_sw_page_size; ! { ! int curr_pg_size = 1024; ! while (curr_pg_size <= MAX_PAGE_SIZE) { ! if (temp <= curr_pg_size) { ! temp = curr_pg_size; ! break; ! } ! curr_pg_size <<= 1; ! } ! } ! if (temp > MAX_PAGE_SIZE) #ifdef SUPERSERVER BURP_svc_error (3, isc_arg_number, tdgbl->gbl_sw_page_size, 0, NULL, 0, NULL, 0, NULL, 0, NULL); #else ! BURP_error (3, (TEXT *) tdgbl->gbl_sw_page_size, 0, 0, 0, 0); /* msg 3 Page size specified (%ld) greater than limit (MAX_PAGE_SIZE bytes) */ #endif if (temp != tdgbl->gbl_sw_page_size) *************** *** 1169,1172 **** --- 1175,1180 ---- else BURP_abort(); + + return 0; /* silence compiler warning */ } Index: burp.h =================================================================== RCS file: /cvsroot/firebird/interbase/burp/burp.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** burp.h 2000/08/03 20:42:56 1.1.1.1 --- burp.h 2001/04/05 17:05:42 1.2 *************** *** 737,741 **** ULONG mvol_io_buffer_size; ULONG mvol_actual_buffer_size; ! ULONG mvol_cumul_count; UCHAR *mvol_io_ptr; int mvol_io_cnt; --- 737,741 ---- ULONG mvol_io_buffer_size; ULONG mvol_actual_buffer_size; ! ULONG mvol_cumul_count_kb; UCHAR *mvol_io_ptr; int mvol_io_cnt; Index: mvol.c =================================================================== RCS file: /cvsroot/firebird/interbase/burp/mvol.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** mvol.c 2000/08/30 03:58:43 1.2 --- mvol.c 2001/04/05 17:05:42 1.3 *************** *** 116,120 **** void MVOL_fini_read ( ! int *count) { /************************************** --- 116,120 ---- void MVOL_fini_read ( ! int *count_kb) { /************************************** *************** *** 135,139 **** tdgbl->file_desc = INVALID_HANDLE_VALUE; ! *count = tdgbl->mvol_cumul_count; BURP_FREE (tdgbl->mvol_io_buffer); tdgbl->mvol_io_buffer = NULL; --- 135,139 ---- tdgbl->file_desc = INVALID_HANDLE_VALUE; ! *count_kb = tdgbl->mvol_cumul_count_kb; BURP_FREE (tdgbl->mvol_io_buffer); tdgbl->mvol_io_buffer = NULL; *************** *** 145,149 **** int *io_cnt, UCHAR **io_ptr, ! int *count) { /************************************** --- 145,149 ---- int *io_cnt, UCHAR **io_ptr, ! int *count_kb) { /************************************** *************** *** 165,169 **** CLOSE (tdgbl->file_desc); tdgbl->file_desc = INVALID_HANDLE_VALUE; ! *count = tdgbl->mvol_cumul_count; BURP_FREE (tdgbl->mvol_io_header); tdgbl->mvol_io_header = NULL; --- 165,169 ---- CLOSE (tdgbl->file_desc); tdgbl->file_desc = INVALID_HANDLE_VALUE; ! *count_kb = tdgbl->mvol_cumul_count_kb; BURP_FREE (tdgbl->mvol_io_header); tdgbl->mvol_io_header = NULL; *************** *** 345,349 **** } ! tdgbl->mvol_cumul_count += tdgbl->mvol_io_cnt; file_not_empty(); --- 345,349 ---- } ! tdgbl->mvol_cumul_count_kb += tdgbl->mvol_io_cnt / 1024; file_not_empty(); *************** *** 401,405 **** } ! tdgbl->mvol_cumul_count += tdgbl->mvol_io_cnt; file_not_empty(); --- 401,405 ---- } ! tdgbl->mvol_cumul_count_kb += tdgbl->mvol_io_cnt / 1024; file_not_empty(); *************** *** 644,648 **** if (cnt > 0) { ! tdgbl->mvol_cumul_count += cnt; file_not_empty(); if (tdgbl->action->act_action == ACT_backup_split) --- 644,648 ---- if (cnt > 0) { ! tdgbl->mvol_cumul_count_kb += cnt / 1024; file_not_empty(); if (tdgbl->action->act_action == ACT_backup_split) *************** *** 717,721 **** tdgbl->mvol_io_header + tdgbl->mvol_io_buffer_size, left); ! tdgbl->mvol_cumul_count += tdgbl->mvol_io_buffer_size; tdgbl->mvol_io_buffer = tdgbl->mvol_io_data; } --- 717,721 ---- tdgbl->mvol_io_header + tdgbl->mvol_io_buffer_size, left); ! tdgbl->mvol_cumul_count_kb += tdgbl->mvol_io_buffer_size / 1024; tdgbl->mvol_io_buffer = tdgbl->mvol_io_data; } Index: restore.e =================================================================== RCS file: /cvsroot/firebird/interbase/burp/restore.e,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** restore.e 2001/03/18 15:42:39 1.3 --- restore.e 2001/04/05 17:05:42 1.4 *************** *** 244,248 **** * **************************************/ ! int cumul_count; REL relation; PRC procedure; --- 244,248 ---- * **************************************/ ! int cumul_count_kb; REL relation; PRC procedure; *************** *** 532,536 **** /* msg 88 finishing, closing, and going home */ ! MVOL_fini_read (&cumul_count); /* attach database again to put it online */ --- 532,536 ---- /* msg 88 finishing, closing, and going home */ ! MVOL_fini_read (&cumul_count_kb); /* attach database again to put it online */ |