mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 16:03:02 +01:00
-Remove GDS_VAL and GDS_REF
-BOOLEAN Cleaning -Fix tab indent in restore and backup
This commit is contained in:
parent
1884cba12f
commit
ba7b5fdcf9
@ -37,7 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$Id: backup.epp,v 1.36 2003-09-12 09:04:37 robocop Exp $
|
$Id: backup.epp,v 1.37 2003-09-12 23:25:16 brodsom Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "firebird.h"
|
#include "firebird.h"
|
||||||
@ -289,17 +289,12 @@ int BACKUP_backup(TEXT* dbb_file, const TEXT* file_name)
|
|||||||
|
|
||||||
if (tdgbl->gbl_sw_ignore_limbo)
|
if (tdgbl->gbl_sw_ignore_limbo)
|
||||||
{
|
{
|
||||||
if (isc_start_transaction(status_vector,
|
if (isc_start_transaction(status_vector, &isc_trans, 1,
|
||||||
GDS_REF(isc_trans),
|
&tdgbl->db_handle, sizeof(limbo_nau_tpb),
|
||||||
1,
|
|
||||||
GDS_REF(tdgbl->db_handle),
|
|
||||||
sizeof(limbo_nau_tpb),
|
|
||||||
limbo_nau_tpb))
|
limbo_nau_tpb))
|
||||||
{
|
{
|
||||||
isc_start_transaction(status_vector,
|
isc_start_transaction(status_vector, &isc_trans, 1,
|
||||||
GDS_REF(isc_trans),
|
&tdgbl->db_handle,
|
||||||
1,
|
|
||||||
GDS_REF(tdgbl->db_handle),
|
|
||||||
sizeof(limbo_tpb), limbo_tpb);
|
sizeof(limbo_tpb), limbo_tpb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -427,12 +422,12 @@ int BACKUP_backup(TEXT* dbb_file, const TEXT* file_name)
|
|||||||
put(tdgbl, (UCHAR) (att_end));
|
put(tdgbl, (UCHAR) (att_end));
|
||||||
|
|
||||||
if (!(relation->rel_flags & REL_view) &&
|
if (!(relation->rel_flags & REL_view) &&
|
||||||
!(relation->rel_flags & REL_external)) {
|
!(relation->rel_flags & REL_external))
|
||||||
|
{
|
||||||
|
|
||||||
put_index(relation);
|
put_index(relation);
|
||||||
if (!tdgbl->gbl_sw_meta) {
|
if (!tdgbl->gbl_sw_meta)
|
||||||
put_data(relation);
|
put_data(relation);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
put(tdgbl, (UCHAR) (rec_relation_end));
|
put(tdgbl, (UCHAR) (rec_relation_end));
|
||||||
@ -1018,43 +1013,42 @@ SINT64 get_gen_id( const TEXT* name, SSHORT name_len)
|
|||||||
|
|
||||||
SSHORT blr_length = blr - blr_buffer;
|
SSHORT blr_length = blr - blr_buffer;
|
||||||
|
|
||||||
if (isc_compile_request(status_vector,
|
if (isc_compile_request(status_vector, &tdgbl->db_handle, &gen_id_reqh,
|
||||||
GDS_REF(tdgbl->db_handle),
|
blr_length, (char*) blr_buffer))
|
||||||
GDS_REF(gen_id_reqh),
|
{
|
||||||
blr_length, (char*) GDS_VAL(blr_buffer)))
|
|
||||||
/* if there's no gen_id, never mind ... */
|
/* if there's no gen_id, never mind ... */
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (isc_start_request(status_vector, GDS_REF(gen_id_reqh), GDS_REF(isc_trans), /* use the same one generated by gpre */
|
if (isc_start_request(status_vector, &gen_id_reqh,
|
||||||
|
&isc_trans, /* use the same one generated by gpre */
|
||||||
0))
|
0))
|
||||||
|
{
|
||||||
BURP_error_redirect(status_vector, 25, NULL, NULL);
|
BURP_error_redirect(status_vector, 25, NULL, NULL);
|
||||||
/* msg 25 Failed in put_blr_gen_id */
|
/* msg 25 Failed in put_blr_gen_id */
|
||||||
|
}
|
||||||
|
|
||||||
if (tdgbl->BCK_capabilities & BCK_ods10)
|
if (tdgbl->BCK_capabilities & BCK_ods10)
|
||||||
{
|
{
|
||||||
if (isc_receive(status_vector,
|
if (isc_receive(status_vector, &gen_id_reqh, 0, sizeof(read_msg1),
|
||||||
GDS_REF(gen_id_reqh),
|
&read_msg1, 0))
|
||||||
0,
|
{
|
||||||
sizeof(read_msg1),
|
|
||||||
GDS_REF(read_msg1),
|
|
||||||
0))
|
|
||||||
BURP_error_redirect(status_vector, 25, NULL, NULL);
|
BURP_error_redirect(status_vector, 25, NULL, NULL);
|
||||||
/* msg 25 Failed in put_blr_gen_id */
|
/* msg 25 Failed in put_blr_gen_id */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (isc_receive(status_vector,
|
if (isc_receive(status_vector, &gen_id_reqh, 0, sizeof(read_msg0),
|
||||||
GDS_REF(gen_id_reqh),
|
&read_msg0, 0))
|
||||||
0,
|
{
|
||||||
sizeof(read_msg0),
|
|
||||||
GDS_REF(read_msg0),
|
|
||||||
0))
|
|
||||||
BURP_error_redirect(status_vector, 25, NULL, NULL);
|
BURP_error_redirect(status_vector, 25, NULL, NULL);
|
||||||
/* msg 25 Failed in put_blr_gen_id */
|
/* msg 25 Failed in put_blr_gen_id */
|
||||||
|
}
|
||||||
read_msg1 = (SINT64) read_msg0;
|
read_msg1 = (SINT64) read_msg0;
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_release_request(status_vector, GDS_REF(gen_id_reqh));
|
isc_release_request(status_vector, &gen_id_reqh);
|
||||||
|
|
||||||
return read_msg1;
|
return read_msg1;
|
||||||
}
|
}
|
||||||
@ -1149,7 +1143,9 @@ void put_array( BURP_FLD field, BURP_REL relation, ISC_QUAD * blob_id)
|
|||||||
field->fld_type == blr_long ||
|
field->fld_type == blr_long ||
|
||||||
field->fld_type == blr_quad ||
|
field->fld_type == blr_quad ||
|
||||||
field->fld_type == blr_int64)
|
field->fld_type == blr_int64)
|
||||||
|
{
|
||||||
STUFF(field->fld_scale);
|
STUFF(field->fld_scale);
|
||||||
|
}
|
||||||
|
|
||||||
if (field->fld_type == blr_text || field->fld_type == blr_varying)
|
if (field->fld_type == blr_text || field->fld_type == blr_varying)
|
||||||
STUFF_WORD(field->fld_length);
|
STUFF_WORD(field->fld_length);
|
||||||
@ -1216,13 +1212,11 @@ void put_array( BURP_FLD field, BURP_REL relation, ISC_QUAD * blob_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ULONG return_length = 0;
|
ULONG return_length = 0;
|
||||||
if (isc_get_slice(status_vector,
|
if (isc_get_slice(status_vector, &tdgbl->db_handle, &isc_trans, blob_id,
|
||||||
GDS_REF(tdgbl->db_handle), GDS_REF(isc_trans),
|
blr_length, (char*) blr_buffer,
|
||||||
GDS_VAL(blob_id), blr_length, (char*) blr_buffer,
|
|
||||||
0, // param length for subset of an array handling
|
0, // param length for subset of an array handling
|
||||||
NULL, // param for subset of an array handling
|
NULL, // param for subset of an array handling
|
||||||
slice_length, GDS_VAL(slice),
|
slice_length, slice, (SLONG*) &return_length))
|
||||||
(SLONG*) GDS_REF(return_length)))
|
|
||||||
{
|
{
|
||||||
BURP_print(81, field->fld_name, NULL, NULL, NULL, NULL);
|
BURP_print(81, field->fld_name, NULL, NULL, NULL, NULL);
|
||||||
/* msg 81 error accessing blob field %s -- continuing */
|
/* msg 81 error accessing blob field %s -- continuing */
|
||||||
@ -1362,11 +1356,8 @@ void put_blob( BURP_FLD field, ISC_QUAD * blob_id, ULONG count)
|
|||||||
|
|
||||||
FRBRD *blob = NULL;
|
FRBRD *blob = NULL;
|
||||||
|
|
||||||
if (isc_open_blob(status_vector,
|
if (isc_open_blob(status_vector, &tdgbl->db_handle, &isc_trans, &blob,
|
||||||
GDS_REF(tdgbl->db_handle),
|
blob_id))
|
||||||
GDS_REF(isc_trans),
|
|
||||||
GDS_REF(blob),
|
|
||||||
GDS_VAL(blob_id)))
|
|
||||||
{
|
{
|
||||||
BURP_print(81, field->fld_name, NULL, NULL, NULL, NULL);
|
BURP_print(81, field->fld_name, NULL, NULL, NULL, NULL);
|
||||||
/* msg 81 error accessing blob field %s -- continuing */
|
/* msg 81 error accessing blob field %s -- continuing */
|
||||||
@ -1374,11 +1365,8 @@ void put_blob( BURP_FLD field, ISC_QUAD * blob_id, ULONG count)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isc_blob_info(status_vector,
|
if (isc_blob_info(status_vector, &blob, sizeof(blob_items),
|
||||||
GDS_REF(blob),
|
(SCHAR *) blob_items, sizeof(blob_info),
|
||||||
sizeof(blob_items),
|
|
||||||
(SCHAR *) blob_items,
|
|
||||||
sizeof(blob_info),
|
|
||||||
(char*) blob_info))
|
(char*) blob_info))
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 20, NULL, NULL);
|
BURP_error_redirect(status_vector, 20, NULL, NULL);
|
||||||
@ -1434,11 +1422,8 @@ void put_blob( BURP_FLD field, ISC_QUAD * blob_id, ULONG count)
|
|||||||
while (segments > 0)
|
while (segments > 0)
|
||||||
{
|
{
|
||||||
USHORT segment_length;
|
USHORT segment_length;
|
||||||
if (isc_get_segment(status_vector,
|
if (isc_get_segment(status_vector, &blob, &segment_length, max_segment,
|
||||||
GDS_REF(blob),
|
(char*) buffer))
|
||||||
GDS_REF(segment_length),
|
|
||||||
max_segment,
|
|
||||||
(char*) GDS_VAL(buffer)))
|
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 22, NULL, NULL);
|
BURP_error_redirect(status_vector, 22, NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -1453,7 +1438,7 @@ void put_blob( BURP_FLD field, ISC_QUAD * blob_id, ULONG count)
|
|||||||
--segments;
|
--segments;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isc_close_blob(status_vector, GDS_REF(blob)))
|
if (isc_close_blob(status_vector, &blob))
|
||||||
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
||||||
/* msg 23 isc_close_blob failed */
|
/* msg 23 isc_close_blob failed */
|
||||||
|
|
||||||
@ -1489,21 +1474,15 @@ bool put_blr_blob( SCHAR attribute, ISC_QUAD * blob_id)
|
|||||||
|
|
||||||
FRBRD *blob = NULL;
|
FRBRD *blob = NULL;
|
||||||
|
|
||||||
if (isc_open_blob(status_vector,
|
if (isc_open_blob(status_vector, &tdgbl->db_handle, &isc_trans, &blob,
|
||||||
GDS_REF(tdgbl->db_handle),
|
blob_id))
|
||||||
GDS_REF(isc_trans),
|
|
||||||
GDS_REF(blob),
|
|
||||||
GDS_VAL(blob_id)))
|
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 24, NULL, NULL);
|
BURP_error_redirect(status_vector, 24, NULL, NULL);
|
||||||
/* msg 24 isc_open_blob failed */
|
/* msg 24 isc_open_blob failed */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isc_blob_info(status_vector,
|
if (isc_blob_info(status_vector, &blob, sizeof(blr_items),
|
||||||
GDS_REF(blob),
|
(SCHAR *) blr_items, sizeof(blob_info),
|
||||||
sizeof(blr_items),
|
|
||||||
(SCHAR *) blr_items,
|
|
||||||
sizeof(blob_info),
|
|
||||||
(char*) blob_info))
|
(char*) blob_info))
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 20, NULL, NULL);
|
BURP_error_redirect(status_vector, 20, NULL, NULL);
|
||||||
@ -1540,7 +1519,7 @@ bool put_blr_blob( SCHAR attribute, ISC_QUAD * blob_id)
|
|||||||
|
|
||||||
if (!length)
|
if (!length)
|
||||||
{
|
{
|
||||||
if (isc_close_blob(status_vector, GDS_REF(blob)))
|
if (isc_close_blob(status_vector, &blob))
|
||||||
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
||||||
/* msg 23 isc_close_blob failed */
|
/* msg 23 isc_close_blob failed */
|
||||||
return false;
|
return false;
|
||||||
@ -1562,10 +1541,8 @@ bool put_blr_blob( SCHAR attribute, ISC_QUAD * blob_id)
|
|||||||
buffer = BURP_ALLOC(max_segment);
|
buffer = BURP_ALLOC(max_segment);
|
||||||
|
|
||||||
USHORT segment_length;
|
USHORT segment_length;
|
||||||
while (!isc_get_segment(status_vector,
|
while (!isc_get_segment(status_vector, &blob, &segment_length,
|
||||||
GDS_REF(blob),
|
(USHORT) max_segment, (char*) buffer))
|
||||||
GDS_REF(segment_length),
|
|
||||||
(USHORT) max_segment, (char*) GDS_VAL(buffer)))
|
|
||||||
{
|
{
|
||||||
if (segment_length)
|
if (segment_length)
|
||||||
{
|
{
|
||||||
@ -1573,7 +1550,7 @@ bool put_blr_blob( SCHAR attribute, ISC_QUAD * blob_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isc_close_blob(status_vector, GDS_REF(blob)))
|
if (isc_close_blob(status_vector, &blob))
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -1810,14 +1787,12 @@ void put_data(BURP_REL relation)
|
|||||||
|
|
||||||
FRBRD *request = NULL;
|
FRBRD *request = NULL;
|
||||||
SSHORT blr_length = blr - blr_buffer;
|
SSHORT blr_length = blr - blr_buffer;
|
||||||
if (isc_compile_request(status_vector,
|
if (isc_compile_request(status_vector, &tdgbl->db_handle, &request,
|
||||||
GDS_REF(tdgbl->db_handle),
|
blr_length, (SCHAR*) blr_buffer))
|
||||||
GDS_REF(request),
|
|
||||||
blr_length, (SCHAR*) GDS_VAL(blr_buffer)))
|
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 27, NULL, NULL);
|
BURP_error_redirect(status_vector, 27, NULL, NULL);
|
||||||
/* msg 27 isc_compile_request failed */
|
/* msg 27 isc_compile_request failed */
|
||||||
isc_print_blr((char*) blr_buffer, NULL, NULL, 0);
|
isc_print_blr((char*) blr_buffer, (isc_callback)NULL, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
BURP_FREE(blr_buffer);
|
BURP_FREE(blr_buffer);
|
||||||
@ -1825,10 +1800,7 @@ void put_data(BURP_REL relation)
|
|||||||
BURP_verbose(142, relation->rel_name, NULL, NULL, NULL, NULL);
|
BURP_verbose(142, relation->rel_name, NULL, NULL, NULL, NULL);
|
||||||
/* msg 142 writing data for relation %s */
|
/* msg 142 writing data for relation %s */
|
||||||
|
|
||||||
if (isc_start_request(status_vector,
|
if (isc_start_request(status_vector, &request, &isc_trans, 0))
|
||||||
GDS_REF(request),
|
|
||||||
GDS_REF(isc_trans),
|
|
||||||
0))
|
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 28, NULL, NULL);
|
BURP_error_redirect(status_vector, 28, NULL, NULL);
|
||||||
// msg 28 isc_start_request failed
|
// msg 28 isc_start_request failed
|
||||||
@ -1854,12 +1826,7 @@ void put_data(BURP_REL relation)
|
|||||||
ULONG records = 0;
|
ULONG records = 0;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (isc_receive(status_vector,
|
if (isc_receive(status_vector, &request, 0, length, buffer, 0))
|
||||||
GDS_REF(request),
|
|
||||||
0,
|
|
||||||
length,
|
|
||||||
GDS_VAL(buffer),
|
|
||||||
0))
|
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 29, NULL, NULL);
|
BURP_error_redirect(status_vector, 29, NULL, NULL);
|
||||||
/* msg 29 isc_receive failed */
|
/* msg 29 isc_receive failed */
|
||||||
@ -1922,7 +1889,7 @@ void put_data(BURP_REL relation)
|
|||||||
BURP_verbose(108, (void *) (SLONG) records, NULL, NULL, NULL, NULL);
|
BURP_verbose(108, (void *) (SLONG) records, NULL, NULL, NULL, NULL);
|
||||||
/* msg 108 %ld records written */
|
/* msg 108 %ld records written */
|
||||||
|
|
||||||
if (isc_release_request(status_vector, GDS_REF(request)))
|
if (isc_release_request(status_vector, &request))
|
||||||
BURP_error_redirect(status_vector, 30, NULL, NULL);
|
BURP_error_redirect(status_vector, 30, NULL, NULL);
|
||||||
/* msg 30 isc_release_request failed */
|
/* msg 30 isc_release_request failed */
|
||||||
}
|
}
|
||||||
@ -1978,7 +1945,8 @@ void put_index( BURP_REL relation)
|
|||||||
|
|
||||||
if (count != (ULONG) X.RDB$SEGMENT_COUNT)
|
if (count != (ULONG) X.RDB$SEGMENT_COUNT)
|
||||||
{
|
{
|
||||||
BURP_print (180, X.RDB$INDEX_NAME, (void*) count, (void*)(ULONG) X.RDB$SEGMENT_COUNT, NULL, NULL);
|
BURP_print(180, X.RDB$INDEX_NAME, (void*) count,
|
||||||
|
(void*)(ULONG) X.RDB$SEGMENT_COUNT, NULL, NULL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2007,9 +1975,12 @@ void put_index( BURP_REL relation)
|
|||||||
PUT_NUMERIC (att_index_type, X.RDB$INDEX_TYPE);
|
PUT_NUMERIC (att_index_type, X.RDB$INDEX_TYPE);
|
||||||
|
|
||||||
if (!X.RDB$EXPRESSION_SOURCE.NULL)
|
if (!X.RDB$EXPRESSION_SOURCE.NULL)
|
||||||
put_source_blob (att_index_expression_source, att_index_expression_source, (ISC_QUAD *)&X.RDB$EXPRESSION_SOURCE);
|
put_source_blob (att_index_expression_source,
|
||||||
|
att_index_expression_source,
|
||||||
|
(ISC_QUAD *)&X.RDB$EXPRESSION_SOURCE);
|
||||||
if (!X.RDB$EXPRESSION_BLR.NULL)
|
if (!X.RDB$EXPRESSION_BLR.NULL)
|
||||||
put_blr_blob (att_index_expression_blr, (ISC_QUAD *)&X.RDB$EXPRESSION_BLR);
|
put_blr_blob (att_index_expression_blr,
|
||||||
|
(ISC_QUAD *)&X.RDB$EXPRESSION_BLR);
|
||||||
if (!X.RDB$FOREIGN_KEY.NULL)
|
if (!X.RDB$FOREIGN_KEY.NULL)
|
||||||
PUT_TEXT (att_index_foreign_key, X.RDB$FOREIGN_KEY);
|
PUT_TEXT (att_index_foreign_key, X.RDB$FOREIGN_KEY);
|
||||||
put(tdgbl, att_end);
|
put(tdgbl, att_end);
|
||||||
@ -2051,7 +2022,8 @@ void put_index( BURP_REL relation)
|
|||||||
|
|
||||||
if (count != (ULONG) X.RDB$SEGMENT_COUNT)
|
if (count != (ULONG) X.RDB$SEGMENT_COUNT)
|
||||||
{
|
{
|
||||||
BURP_print (180, X.RDB$INDEX_NAME, (void*) count, (void*)(ULONG) X.RDB$SEGMENT_COUNT, NULL, NULL);
|
BURP_print(180, X.RDB$INDEX_NAME, (void*) count,
|
||||||
|
(void*)(ULONG) X.RDB$SEGMENT_COUNT, NULL, NULL);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2078,7 +2050,8 @@ void put_index( BURP_REL relation)
|
|||||||
ON_ERROR
|
ON_ERROR
|
||||||
general_on_error();
|
general_on_error();
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
put_source_blob (att_index_description2, att_index_description, (ISC_QUAD *)&X.RDB$DESCRIPTION);
|
put_source_blob (att_index_description2, att_index_description,
|
||||||
|
(ISC_QUAD *)&X.RDB$DESCRIPTION);
|
||||||
if (tdgbl->BCK_capabilities & BCK_attributes_v3)
|
if (tdgbl->BCK_capabilities & BCK_attributes_v3)
|
||||||
FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle6)
|
FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle6)
|
||||||
I IN RDB$INDICES WITH I.RDB$INDEX_NAME = X.RDB$INDEX_NAME
|
I IN RDB$INDICES WITH I.RDB$INDEX_NAME = X.RDB$INDEX_NAME
|
||||||
@ -2091,9 +2064,12 @@ void put_index( BURP_REL relation)
|
|||||||
FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle7)
|
FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle7)
|
||||||
I IN RDB$INDICES WITH I.RDB$INDEX_NAME = X.RDB$INDEX_NAME
|
I IN RDB$INDICES WITH I.RDB$INDEX_NAME = X.RDB$INDEX_NAME
|
||||||
if (!I.RDB$EXPRESSION_SOURCE.NULL)
|
if (!I.RDB$EXPRESSION_SOURCE.NULL)
|
||||||
put_source_blob (att_index_expression_source, att_index_expression_source, (ISC_QUAD *)&I.RDB$EXPRESSION_SOURCE);
|
put_source_blob (att_index_expression_source,
|
||||||
|
att_index_expression_source,
|
||||||
|
(ISC_QUAD *)&I.RDB$EXPRESSION_SOURCE);
|
||||||
if (!I.RDB$EXPRESSION_BLR.NULL)
|
if (!I.RDB$EXPRESSION_BLR.NULL)
|
||||||
put_blr_blob (att_index_expression_blr, (ISC_QUAD *)&I.RDB$EXPRESSION_BLR);
|
put_blr_blob (att_index_expression_blr,
|
||||||
|
(ISC_QUAD *)&I.RDB$EXPRESSION_BLR);
|
||||||
if (!I.RDB$FOREIGN_KEY.NULL)
|
if (!I.RDB$FOREIGN_KEY.NULL)
|
||||||
PUT_TEXT (att_index_foreign_key, I.RDB$FOREIGN_KEY);
|
PUT_TEXT (att_index_foreign_key, I.RDB$FOREIGN_KEY);
|
||||||
END_FOR;
|
END_FOR;
|
||||||
@ -2411,21 +2387,15 @@ bool put_source_blob(SCHAR attribute,
|
|||||||
|
|
||||||
FRBRD *blob = NULL;
|
FRBRD *blob = NULL;
|
||||||
|
|
||||||
if (isc_open_blob(status_vector,
|
if (isc_open_blob(status_vector, &tdgbl->db_handle, &isc_trans, &blob,
|
||||||
GDS_REF(tdgbl->db_handle),
|
blob_id))
|
||||||
GDS_REF(isc_trans),
|
|
||||||
GDS_REF(blob),
|
|
||||||
GDS_VAL(blob_id)))
|
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 24, NULL, NULL);
|
BURP_error_redirect(status_vector, 24, NULL, NULL);
|
||||||
/* msg 24 isc_open_blob failed */
|
/* msg 24 isc_open_blob failed */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isc_blob_info(status_vector,
|
if (isc_blob_info(status_vector, &blob, sizeof(source_items),
|
||||||
GDS_REF(blob),
|
(SCHAR *) source_items, sizeof(blob_info),
|
||||||
sizeof(source_items),
|
|
||||||
(SCHAR *) source_items,
|
|
||||||
sizeof(blob_info),
|
|
||||||
(SCHAR*) blob_info))
|
(SCHAR*) blob_info))
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 20, NULL, NULL);
|
BURP_error_redirect(status_vector, 20, NULL, NULL);
|
||||||
@ -2466,7 +2436,7 @@ bool put_source_blob(SCHAR attribute,
|
|||||||
|
|
||||||
if (!length)
|
if (!length)
|
||||||
{
|
{
|
||||||
if (isc_close_blob(status_vector, GDS_REF(blob)))
|
if (isc_close_blob(status_vector, &blob))
|
||||||
{
|
{
|
||||||
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
||||||
/* msg 23 isc_close_blob failed */
|
/* msg 23 isc_close_blob failed */
|
||||||
@ -2490,11 +2460,8 @@ bool put_source_blob(SCHAR attribute,
|
|||||||
buffer = BURP_ALLOC(max_segment);
|
buffer = BURP_ALLOC(max_segment);
|
||||||
|
|
||||||
USHORT segment_length;
|
USHORT segment_length;
|
||||||
while (!isc_get_segment(status_vector,
|
while (!isc_get_segment(status_vector, &blob, &segment_length,
|
||||||
GDS_REF(blob),
|
max_segment, (SCHAR*) buffer))
|
||||||
GDS_REF(segment_length),
|
|
||||||
max_segment,
|
|
||||||
(SCHAR*) GDS_VAL(buffer)))
|
|
||||||
{
|
{
|
||||||
if (segment_length)
|
if (segment_length)
|
||||||
{
|
{
|
||||||
@ -2503,7 +2470,7 @@ bool put_source_blob(SCHAR attribute,
|
|||||||
put(tdgbl, (UCHAR) (NULL));
|
put(tdgbl, (UCHAR) (NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isc_close_blob(status_vector, GDS_REF(blob)))
|
if (isc_close_blob(status_vector, &blob))
|
||||||
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
BURP_error_redirect(status_vector, 23, NULL, NULL);
|
||||||
/* msg 23 isc_close_blob failed */
|
/* msg 23 isc_close_blob failed */
|
||||||
|
|
||||||
@ -2610,7 +2577,7 @@ void set_capabilities(void)
|
|||||||
END_ERROR;
|
END_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_release_request(isc_status, GDS_REF(req));
|
isc_release_request(isc_status, &req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2792,8 +2759,7 @@ void write_database( const TEXT * dbb_file)
|
|||||||
|
|
||||||
put(tdgbl, (UCHAR) (rec_physical_db));
|
put(tdgbl, (UCHAR) (rec_physical_db));
|
||||||
|
|
||||||
if (isc_database_info(status_vector,
|
if (isc_database_info(status_vector, &tdgbl->db_handle,
|
||||||
GDS_REF(tdgbl->db_handle),
|
|
||||||
sizeof(db_info_items),
|
sizeof(db_info_items),
|
||||||
(SCHAR *) db_info_items, sizeof(buffer), buffer))
|
(SCHAR *) db_info_items, sizeof(buffer), buffer))
|
||||||
{
|
{
|
||||||
|
@ -546,7 +546,7 @@ int BURP_gbak(int argc,
|
|||||||
tdgbl->gbl_sw_ignore_limbo = FALSE;
|
tdgbl->gbl_sw_ignore_limbo = FALSE;
|
||||||
tdgbl->gbl_sw_blk_factor = 0;
|
tdgbl->gbl_sw_blk_factor = 0;
|
||||||
tdgbl->gbl_sw_no_reserve = FALSE;
|
tdgbl->gbl_sw_no_reserve = FALSE;
|
||||||
tdgbl->gbl_sw_mode = FALSE;
|
tdgbl->gbl_sw_mode = false;
|
||||||
tdgbl->gbl_sw_skip_count = 0;
|
tdgbl->gbl_sw_skip_count = 0;
|
||||||
tdgbl->action = NULL;
|
tdgbl->action = NULL;
|
||||||
|
|
||||||
@ -639,12 +639,12 @@ int BURP_gbak(int argc,
|
|||||||
BURP_error(279, 0, 0, 0, 0, 0); // msg 279: "read_only" or "read_write" required
|
BURP_error(279, 0, 0, 0, 0, 0); // msg 279: "read_only" or "read_write" required
|
||||||
string = *argv++;
|
string = *argv++;
|
||||||
if (!strcmp(string, BURP_SW_MODE_RO))
|
if (!strcmp(string, BURP_SW_MODE_RO))
|
||||||
tdgbl->gbl_sw_mode_val = TRUE;
|
tdgbl->gbl_sw_mode_val = true;
|
||||||
else if (!strcmp(string, BURP_SW_MODE_RW))
|
else if (!strcmp(string, BURP_SW_MODE_RW))
|
||||||
tdgbl->gbl_sw_mode_val = FALSE;
|
tdgbl->gbl_sw_mode_val = false;
|
||||||
else
|
else
|
||||||
BURP_error(279, 0, 0, 0, 0, 0); // msg 279: "read_only" or "read_write" required
|
BURP_error(279, 0, 0, 0, 0, 0); // msg 279: "read_only" or "read_write" required
|
||||||
tdgbl->gbl_sw_mode = TRUE;
|
tdgbl->gbl_sw_mode = true;
|
||||||
}
|
}
|
||||||
else if (in_sw_tab->in_sw == IN_SW_BURP_PASS) {
|
else if (in_sw_tab->in_sw == IN_SW_BURP_PASS) {
|
||||||
if (argv >= end)
|
if (argv >= end)
|
||||||
@ -815,7 +815,7 @@ int BURP_gbak(int argc,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case (IN_SW_BURP_MODE):
|
case (IN_SW_BURP_MODE):
|
||||||
tdgbl->gbl_sw_mode = TRUE;
|
tdgbl->gbl_sw_mode = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (IN_SW_BURP_N):
|
case (IN_SW_BURP_N):
|
||||||
|
@ -721,8 +721,8 @@ typedef struct tgbl
|
|||||||
USHORT gbl_sw_service_gbak;
|
USHORT gbl_sw_service_gbak;
|
||||||
USHORT gbl_sw_service_thd;
|
USHORT gbl_sw_service_thd;
|
||||||
USHORT gbl_sw_convert_ext_tables;
|
USHORT gbl_sw_convert_ext_tables;
|
||||||
BOOLEAN gbl_sw_mode;
|
bool gbl_sw_mode;
|
||||||
BOOLEAN gbl_sw_mode_val;
|
bool gbl_sw_mode_val;
|
||||||
SCHAR *gbl_sw_sql_role;
|
SCHAR *gbl_sw_sql_role;
|
||||||
SCHAR *gbl_sw_user;
|
SCHAR *gbl_sw_user;
|
||||||
SCHAR *gbl_sw_password;
|
SCHAR *gbl_sw_password;
|
||||||
|
2395
src/burp/restore.epp
2395
src/burp/restore.epp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user