From e53330f9f60ae6346cba2bb358eb44ee729ecfd0 Mon Sep 17 00:00:00 2001 From: asfernandes Date: Tue, 19 Apr 2011 15:24:51 +0000 Subject: [PATCH] Improvement CORE-3433 - Improve GBAK restore performance (records insertion). --- src/burp/restore.epp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/burp/restore.epp b/src/burp/restore.epp index ae94e6967b..f749cc64ae 100644 --- a/src/burp/restore.epp +++ b/src/burp/restore.epp @@ -2904,6 +2904,7 @@ rec_type get_data(BurpGlobals* tdgbl, burp_rel* relation) // Build STORE statement + add_byte(blr, blr_loop); add_byte(blr, blr_receive); add_byte(blr, 0); add_byte(blr, blr_store); @@ -3063,8 +3064,14 @@ rec_type get_data(BurpGlobals* tdgbl, burp_rel* relation) get_record(&record, tdgbl); } + ISC_STATUS s; - if (isc_start_and_send (status_vector, &request, &gds_trans, 0, (USHORT) length, buffer, 0)) + if (records == 1) + s = isc_start_and_send(status_vector, &request, &gds_trans, 0, (USHORT) length, buffer, 0); + else + s = isc_send(status_vector, &request, 0, (USHORT) length, buffer, 0); + + if (s) { if (status_vector[1] == isc_not_valid) {