From: Mark O. <sky...@us...> - 2001-03-18 15:40:28
|
Update of /cvsroot/firebird/interbase/burp In directory usw-pr-cvs1:/tmp/cvs-serv6578 Modified Files: backup.e restore.e Log Message: Comitted changes made by Toni Martir that will print a progress trace when doing a backup and restore. Index: backup.e =================================================================== RCS file: /cvsroot/firebird/interbase/burp/backup.e,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** backup.e 2000/09/04 16:04:21 1.4 --- backup.e 2001/03/18 15:42:39 1.5 *************** *** 20,23 **** --- 20,24 ---- * All Rights Reserved. * Contributor(s): ______________________________________. + * Toni Martir: Added verbose backup records as BACKUP_VERBOSE_INTERVAL */ /* *************** *** 59,62 **** --- 60,66 ---- */ + /* VERBOSE INTERVAL WHEN BACKING RECORDS */ + #define BACKUP_VERBOSE_INTERVAL 20000 + #define STUFF(byte) *blr++ = (SCHAR) (byte) #define STUFF_WORD(word) {STUFF (word); STUFF ((word) >> 8);} *************** *** 1735,1738 **** --- 1739,1746 ---- break; records++; + /* Verbose records */ + if ((records % BACKUP_VERBOSE_INTERVAL)==0) + BURP_verbose (108, (TEXT*) records, NULL, NULL, NULL, NULL); + PUT (rec_data); PUT_NUMERIC (att_data_length, record_length); Index: restore.e =================================================================== RCS file: /cvsroot/firebird/interbase/burp/restore.e,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** restore.e 2000/08/15 18:39:39 1.2 --- restore.e 2001/03/18 15:42:39 1.3 *************** *** 20,23 **** --- 20,25 ---- * All Rights Reserved. * Contributor(s): ______________________________________. + * Toni Martir: Verbose records restored as RESTORE_VERBOSE_INTERVAL, + * also verbose restoring indexes as DEFERRED when verbose */ /* *************** *** 88,91 **** --- 90,94 ---- */ + #define RESTORE_VERBOSE_INTERVAL 10000 #define cvtbl_len 28 static CONST struct s_t_cvtbl { *************** *** 287,291 **** --- 290,297 ---- FOR (REQUEST_HANDLE req_handle3) IDX IN RDB$INDICES WITH IDX.RDB$INDEX_NAME EQ index_name + { + BURP_verbose(243,index_name,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); MODIFY IDX USING IDX.RDB$INDEX_INACTIVE = TRUE; + } BURP_print(240, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); /* msg 240 Index \"%s\" failed to activate because: */ *************** *** 325,328 **** --- 331,377 ---- { + /* Block added to verbose index creation by Toni Martir */ + if (tdgbl->gbl_sw_verbose) + { + EXEC SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO_AUTO_UNDO; + if (gds__status [1]) + EXEC SQL SET TRANSACTION; + + /* Activate first indexes that are not foreign keys */ + FOR (REQUEST_HANDLE req_handle1) IDS IN RDB$INDICES WITH + IDS.RDB$INDEX_INACTIVE EQ DEFERRED_ACTIVE AND + IDS.RDB$FOREIGN_KEY MISSING + MODIFY IDS USING IDS.RDB$INDEX_INACTIVE=FALSE; + END_MODIFY; + ON_ERROR + general_on_error(); + END_ERROR; + + SAVE + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + BURP_print (173, IDS.RDB$INDEX_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + BURP_print_status (tdgbl->status); + MODIFY IDS USING + IDS.RDB$INDEX_INACTIVE = TRUE; + END_MODIFY; + ON_ERROR + general_on_error (); + END_ERROR; + END_ERROR; + BURP_verbose(122,IDS.RDB$INDEX_NAME,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + if (req_handle1) + isc_release_request (req_status, &req_handle1); + COMMIT; + ON_ERROR + general_on_error (); + END_ERROR; + } + + EXEC SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO_AUTO_UNDO; if (gds__status [1]) *************** *** 360,364 **** END_ERROR; END_ERROR; ! END_FOR; ON_ERROR --- 409,413 ---- END_ERROR; END_ERROR; ! BURP_verbose(122,IDS.RDB$INDEX_NAME,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); END_FOR; ON_ERROR *************** *** 2527,2530 **** --- 2576,2583 ---- records++; + + if ((records % RESTORE_VERBOSE_INTERVAL)==0) + BURP_verbose(107,(TEXT*) records,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); + for (field = relation->rel_fields; field; field = field->fld_next) if ((field->fld_type == blr_blob) || (field->fld_flags & FLD_array)) *************** *** 4243,4248 **** --- 4296,4310 ---- X.RDB$INDEX_INACTIVE = get_numeric(); /* Defer foreign key index activation */ + /* Modified by Toni Martir, all index deferred when verbose */ + if (tdgbl->gbl_sw_verbose) + { + if (X.RDB$INDEX_INACTIVE == FALSE) + X.RDB$INDEX_INACTIVE = DEFERRED_ACTIVE; + } + else + { if (X.RDB$INDEX_INACTIVE == FALSE && foreign_index) X.RDB$INDEX_INACTIVE = DEFERRED_ACTIVE; + } if (tdgbl->gbl_sw_deactivate_indexes) X.RDB$INDEX_INACTIVE = TRUE; |