mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 10:43:03 +01:00
-Remove GDS_VAL and GDS_REF
This commit is contained in:
parent
578f5c0d54
commit
0065c98434
@ -26,7 +26,7 @@
|
|||||||
*
|
*
|
||||||
*____________________________________________________________
|
*____________________________________________________________
|
||||||
*
|
*
|
||||||
* $Id: gpre_meta.epp,v 1.21 2003-08-28 10:33:04 brodsom Exp $
|
* $Id: gpre_meta.epp,v 1.22 2003-08-30 02:12:44 brodsom Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "firebird.h"
|
#include "firebird.h"
|
||||||
@ -177,8 +177,7 @@ BOOLEAN MET_database(DBB dbb, BOOLEAN print_version)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gds__attach_database
|
if (gds__attach_database
|
||||||
(gds_status, 0, GDS_VAL(dbb->dbb_filename), GDS_REF(DB), d - &dpb[0],
|
(gds_status, 0, dbb->dbb_filename, &DB, d - &dpb[0], dpb)) {
|
||||||
dpb)) {
|
|
||||||
/* We failed to attach, try in read only mode just in case
|
/* We failed to attach, try in read only mode just in case
|
||||||
if (d == dpb)
|
if (d == dpb)
|
||||||
*d++ = gds_dpb_version1;
|
*d++ = gds_dpb_version1;
|
||||||
@ -186,8 +185,8 @@ BOOLEAN MET_database(DBB dbb, BOOLEAN print_version)
|
|||||||
*d++ = 1;
|
*d++ = 1;
|
||||||
*d++ = TRUE;
|
*d++ = TRUE;
|
||||||
if (gds__attach_database
|
if (gds__attach_database
|
||||||
(gds_status, 0, GDS_VAL(dbb->dbb_filename), GDS_REF(DB), d - &dpb[0],
|
(gds_status, 0, dbb->dbb_filename, &DB, d - &dpb[0], dpb)) {
|
||||||
dpb)) {*/
|
*/
|
||||||
gds__print_status(gds_status);
|
gds__print_status(gds_status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
//}
|
//}
|
||||||
@ -282,9 +281,7 @@ BOOLEAN MET_database(DBB dbb, BOOLEAN print_version)
|
|||||||
|
|
||||||
/* get the base level of the engine */
|
/* get the base level of the engine */
|
||||||
|
|
||||||
if (gds__database_info(gds_status,
|
if (gds__database_info(gds_status, &DB, sizeof(db_version_info),
|
||||||
GDS_REF(DB),
|
|
||||||
sizeof(db_version_info),
|
|
||||||
db_version_info, sizeof(buffer), buffer)) {
|
db_version_info, sizeof(buffer), buffer)) {
|
||||||
gds__print_status(gds_status);
|
gds__print_status(gds_status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1491,7 +1488,7 @@ void MET_load_hash_table( DBB dbb)
|
|||||||
X.RDB$SYSTEM_FLAG = 1 post_v3_flag = TRUE;
|
X.RDB$SYSTEM_FLAG = 1 post_v3_flag = TRUE;
|
||||||
|
|
||||||
END_FOR;
|
END_FOR;
|
||||||
gds__release_request(gds_status, GDS_REF(handle));
|
gds__release_request(gds_status, &handle);
|
||||||
|
|
||||||
if (!post_v3_flag)
|
if (!post_v3_flag)
|
||||||
dbb->dbb_flags |= DBB_v3;
|
dbb->dbb_flags |= DBB_v3;
|
||||||
@ -1544,7 +1541,7 @@ void MET_load_hash_table( DBB dbb)
|
|||||||
END_FOR;
|
END_FOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(handle));
|
gds__release_request(gds_status, &handle);
|
||||||
|
|
||||||
/* Pick up all procedures (necessary to parse parts of the GDML grammar) */
|
/* Pick up all procedures (necessary to parse parts of the GDML grammar) */
|
||||||
|
|
||||||
@ -1566,7 +1563,7 @@ void MET_load_hash_table( DBB dbb)
|
|||||||
END_ERROR;
|
END_ERROR;
|
||||||
|
|
||||||
if (handle)
|
if (handle)
|
||||||
gds__release_request(gds_status, GDS_REF(handle));
|
gds__release_request(gds_status, &handle);
|
||||||
|
|
||||||
/* Pickup any user defined functions. If the database does not support UDF's,
|
/* Pickup any user defined functions. If the database does not support UDF's,
|
||||||
* this may fail
|
* this may fail
|
||||||
@ -1619,9 +1616,9 @@ void MET_load_hash_table( DBB dbb)
|
|||||||
}
|
}
|
||||||
END_FOR ON_ERROR END_ERROR;
|
END_FOR ON_ERROR END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(handle));
|
gds__release_request(gds_status, &handle);
|
||||||
if (handle2)
|
if (handle2)
|
||||||
gds__release_request(gds_status, GDS_REF(handle2));
|
gds__release_request(gds_status, &handle2);
|
||||||
|
|
||||||
/* Pick up all Collation names, might have several collations
|
/* Pick up all Collation names, might have several collations
|
||||||
* for a given character set.
|
* for a given character set.
|
||||||
@ -1671,9 +1668,9 @@ void MET_load_hash_table( DBB dbb)
|
|||||||
/* assume pre V4 database, no collations */
|
/* assume pre V4 database, no collations */
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(handle));
|
gds__release_request(gds_status, &handle);
|
||||||
if (handle2)
|
if (handle2)
|
||||||
gds__release_request(gds_status, GDS_REF(handle2));
|
gds__release_request(gds_status, &handle2);
|
||||||
|
|
||||||
/* Now pick up all character set names - with the subtype set to
|
/* Now pick up all character set names - with the subtype set to
|
||||||
* the type of the default collation for the character set.
|
* the type of the default collation for the character set.
|
||||||
@ -1719,9 +1716,9 @@ void MET_load_hash_table( DBB dbb)
|
|||||||
/* assume pre V4 database, no character sets */
|
/* assume pre V4 database, no character sets */
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(handle));
|
gds__release_request(gds_status, &handle);
|
||||||
if (handle2)
|
if (handle2)
|
||||||
gds__release_request(gds_status, GDS_REF(handle2));
|
gds__release_request(gds_status, &handle2);
|
||||||
|
|
||||||
/* Pick up name of database default character set for SQL */
|
/* Pick up name of database default character set for SQL */
|
||||||
|
|
||||||
@ -1739,7 +1736,7 @@ void MET_load_hash_table( DBB dbb)
|
|||||||
/* Assume V3 Db, no default charset */
|
/* Assume V3 Db, no default charset */
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(handle));
|
gds__release_request(gds_status, &handle);
|
||||||
|
|
||||||
/* Pick up all generators for the database */
|
/* Pick up all generators for the database */
|
||||||
|
|
||||||
@ -1751,7 +1748,7 @@ void MET_load_hash_table( DBB dbb)
|
|||||||
|
|
||||||
END_FOR ON_ERROR END_ERROR;
|
END_FOR ON_ERROR END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(handle));
|
gds__release_request(gds_status, &handle);
|
||||||
|
|
||||||
/* now that we have attached to the database, resolve the character set
|
/* now that we have attached to the database, resolve the character set
|
||||||
* request (if any) (and if we can)
|
* request (if any) (and if we can)
|
||||||
@ -2105,7 +2102,7 @@ static int resolve_charset_and_collation(
|
|||||||
/* Assume V3 DB, without default character set */
|
/* Assume V3 DB, without default character set */
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(request));
|
gds__release_request(gds_status, &request);
|
||||||
|
|
||||||
if (charset == NULL)
|
if (charset == NULL)
|
||||||
charset = (UCHAR *) DEFAULT_CHARACTER_SET_NAME;
|
charset = (UCHAR *) DEFAULT_CHARACTER_SET_NAME;
|
||||||
@ -2126,7 +2123,7 @@ static int resolve_charset_and_collation(
|
|||||||
|
|
||||||
END_FOR ON_ERROR END_ERROR;
|
END_FOR ON_ERROR END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(request));
|
gds__release_request(gds_status, &request);
|
||||||
|
|
||||||
return (found);
|
return (found);
|
||||||
}
|
}
|
||||||
@ -2141,7 +2138,7 @@ static int resolve_charset_and_collation(
|
|||||||
*id = MAP_CHARSET_TO_TTYPE(CS.RDB$CHARACTER_SET_ID);
|
*id = MAP_CHARSET_TO_TTYPE(CS.RDB$CHARACTER_SET_ID);
|
||||||
END_FOR ON_ERROR END_ERROR;
|
END_FOR ON_ERROR END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(request));
|
gds__release_request(gds_status, &request);
|
||||||
|
|
||||||
return (found);
|
return (found);
|
||||||
}
|
}
|
||||||
@ -2159,7 +2156,7 @@ static int resolve_charset_and_collation(
|
|||||||
*id = MAP_CHARSET_TO_TTYPE(CS.RDB$CHARACTER_SET_ID);
|
*id = MAP_CHARSET_TO_TTYPE(CS.RDB$CHARACTER_SET_ID);
|
||||||
END_FOR ON_ERROR END_ERROR;
|
END_FOR ON_ERROR END_ERROR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(request));
|
gds__release_request(gds_status, &request);
|
||||||
|
|
||||||
return (found);
|
return (found);
|
||||||
}
|
}
|
||||||
|
@ -985,9 +985,7 @@ static int sleuth( QLI_NOD node, DSC * desc1, DSC * desc2, DSC * desc3)
|
|||||||
if (!(buffer = make_blob_buffer( blob, &buffer_length)))
|
if (!(buffer = make_blob_buffer( blob, &buffer_length)))
|
||||||
buffer = fixed_buffer;
|
buffer = fixed_buffer;
|
||||||
|
|
||||||
while (!gds__get_segment(status_vector,
|
while (!gds__get_segment(status_vector, &blob, (USHORT*) &l1, buffer_length, buffer))
|
||||||
GDS_REF(blob),
|
|
||||||
(USHORT*) GDS_REF(l1), buffer_length, GDS_VAL(buffer)))
|
|
||||||
if (sleuth_check(0, (UCHAR*) buffer, (UCHAR*) (buffer + l1), (UCHAR*) control, (UCHAR*) (control + l2)))
|
if (sleuth_check(0, (UCHAR*) buffer, (UCHAR*) (buffer + l1), (UCHAR*) control, (UCHAR*) (control + l2)))
|
||||||
{
|
{
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
@ -997,7 +995,7 @@ static int sleuth( QLI_NOD node, DSC * desc1, DSC * desc2, DSC * desc3)
|
|||||||
if (buffer != fixed_buffer)
|
if (buffer != fixed_buffer)
|
||||||
gds__free(buffer);
|
gds__free(buffer);
|
||||||
|
|
||||||
if (gds__close_blob(status_vector, GDS_REF(blob))) {
|
if (gds__close_blob(status_vector, &blob)) {
|
||||||
context = (QLI_CTX) node->nod_arg[e_fld_context];
|
context = (QLI_CTX) node->nod_arg[e_fld_context];
|
||||||
request = context->ctx_request;
|
request = context->ctx_request;
|
||||||
dbb = request->req_database;
|
dbb = request->req_database;
|
||||||
@ -1304,11 +1302,8 @@ static int string_boolean( QLI_NOD node)
|
|||||||
if (!(buffer = make_blob_buffer( blob, &buffer_length)))
|
if (!(buffer = make_blob_buffer( blob, &buffer_length)))
|
||||||
buffer = fixed_buffer;
|
buffer = fixed_buffer;
|
||||||
|
|
||||||
while (!gds__get_segment(status_vector,
|
while (!gds__get_segment(status_vector, &blob, (USHORT*) &l1,
|
||||||
GDS_REF(blob),
|
buffer_length, buffer))
|
||||||
(USHORT*) GDS_REF(l1),
|
|
||||||
buffer_length,
|
|
||||||
GDS_VAL(buffer)))
|
|
||||||
if (string_function(node, l1, buffer, l2, p2)) {
|
if (string_function(node, l1, buffer, l2, p2)) {
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -1317,7 +1312,7 @@ static int string_boolean( QLI_NOD node)
|
|||||||
if (buffer != fixed_buffer)
|
if (buffer != fixed_buffer)
|
||||||
gds__free(buffer);
|
gds__free(buffer);
|
||||||
|
|
||||||
if (gds__close_blob(status_vector, GDS_REF(blob))) {
|
if (gds__close_blob(status_vector, &blob)) {
|
||||||
context = (QLI_CTX) node->nod_arg[e_fld_context];
|
context = (QLI_CTX) node->nod_arg[e_fld_context];
|
||||||
request = context->ctx_request;
|
request = context->ctx_request;
|
||||||
dbb = request->req_database;
|
dbb = request->req_database;
|
||||||
|
112
src/qli/exe.cpp
112
src/qli/exe.cpp
@ -110,8 +110,7 @@ void EXEC_abort(void)
|
|||||||
|
|
||||||
for (request = QLI_requests; request; request = request->req_next)
|
for (request = QLI_requests; request; request = request->req_next)
|
||||||
if (request->req_handle)
|
if (request->req_handle)
|
||||||
gds__unwind_request(status_vector,
|
gds__unwind_request(status_vector, &request->req_handle, 0);
|
||||||
GDS_REF(request->req_handle), 0);
|
|
||||||
|
|
||||||
QLI_abort = TRUE;
|
QLI_abort = TRUE;
|
||||||
}
|
}
|
||||||
@ -265,13 +264,10 @@ FRBRD *EXEC_open_blob( QLI_NOD node)
|
|||||||
|
|
||||||
bpb_length = p - bpb;
|
bpb_length = p - bpb;
|
||||||
|
|
||||||
if (gds__open_blob2(status_vector,
|
if (gds__open_blob2(status_vector, &dbb->dbb_handle, &dbb->dbb_transaction,
|
||||||
GDS_REF(dbb->dbb_handle),
|
&blob, (GDS_QUAD*) desc->dsc_address, bpb_length,
|
||||||
GDS_REF(dbb->dbb_transaction),
|
(char*) bpb))
|
||||||
GDS_REF(blob),
|
ERRQ_database_error(dbb, status_vector);
|
||||||
(GDS_QUAD*)GDS_VAL(desc->dsc_address),
|
|
||||||
bpb_length,
|
|
||||||
(char*) bpb)) ERRQ_database_error(dbb, status_vector);
|
|
||||||
|
|
||||||
return blob;
|
return blob;
|
||||||
}
|
}
|
||||||
@ -315,7 +311,8 @@ struct file *EXEC_open_output(QLI_NOD node)
|
|||||||
if (file = ib_fopen(filename, FOPEN_WRITE_TYPE))
|
if (file = ib_fopen(filename, FOPEN_WRITE_TYPE))
|
||||||
return (struct file *) file;
|
return (struct file *) file;
|
||||||
|
|
||||||
ERRQ_print_error(42, filename, NULL, NULL, NULL, NULL); /* Msg42 Can't open output file %s */
|
ERRQ_print_error(42, filename, NULL, NULL, NULL, NULL);
|
||||||
|
/* Msg42 Can't open output file %s */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Output is to a file. Setup file and fork process */
|
/* Output is to a file. Setup file and fork process */
|
||||||
@ -405,12 +402,9 @@ DSC *EXEC_receive(QLI_MSG message, PAR parameter)
|
|||||||
|
|
||||||
request = message->msg_request;
|
request = message->msg_request;
|
||||||
|
|
||||||
if (gds__receive(status_vector,
|
if (gds__receive(status_vector, &request->req_handle, message->msg_number,
|
||||||
GDS_REF(request->req_handle),
|
message->msg_length, message->msg_buffer, 0))
|
||||||
message->msg_number,
|
db_error(request, status_vector);
|
||||||
message->msg_length,
|
|
||||||
GDS_VAL(message->msg_buffer),
|
|
||||||
0)) db_error(request, status_vector);
|
|
||||||
|
|
||||||
if (!parameter)
|
if (!parameter)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -438,12 +432,9 @@ void EXEC_send( QLI_MSG message)
|
|||||||
request = message->msg_request;
|
request = message->msg_request;
|
||||||
|
|
||||||
map_data(message);
|
map_data(message);
|
||||||
if (gds__send(status_vector,
|
if (gds__send(status_vector, &request->req_handle, message->msg_number,
|
||||||
GDS_REF(request->req_handle),
|
message->msg_length, message->msg_buffer, 0))
|
||||||
message->msg_number,
|
db_error(request, status_vector);
|
||||||
message->msg_length,
|
|
||||||
GDS_VAL(message->msg_buffer),
|
|
||||||
0)) db_error(request, status_vector);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -464,18 +455,16 @@ void EXEC_start_request( QLI_REQ request, QLI_MSG message)
|
|||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
map_data(message);
|
map_data(message);
|
||||||
if (!gds__start_and_send(status_vector,
|
if (!gds__start_and_send(status_vector, &request->req_handle,
|
||||||
GDS_REF(request->req_handle),
|
&request->req_database-> dbb_transaction,
|
||||||
GDS_REF(request->req_database->
|
|
||||||
dbb_transaction),
|
|
||||||
message->msg_number, message->msg_length,
|
message->msg_number, message->msg_length,
|
||||||
GDS_VAL(message->msg_buffer), 0)) return;
|
message->msg_buffer, 0))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (!gds__start_request(status_vector,
|
if (!gds__start_request(status_vector, &request->req_handle,
|
||||||
GDS_REF(request->req_handle),
|
&request->req_database-> dbb_transaction, 0))
|
||||||
GDS_REF(request->req_database->
|
return;
|
||||||
dbb_transaction), 0)) return;
|
|
||||||
|
|
||||||
db_error(request, status_vector);
|
db_error(request, status_vector);
|
||||||
}
|
}
|
||||||
@ -720,19 +709,16 @@ static int copy_blob( QLI_NOD value, PAR parameter)
|
|||||||
*p++ = to_desc->dsc_sub_type >> 8;
|
*p++ = to_desc->dsc_sub_type >> 8;
|
||||||
bpb_length = p - bpb;
|
bpb_length = p - bpb;
|
||||||
|
|
||||||
if (gds__create_blob(status_vector,
|
if (gds__create_blob(status_vector, &to_dbb->dbb_handle,
|
||||||
GDS_REF(to_dbb->dbb_handle),
|
&to_dbb->dbb_transaction, &to_blob,
|
||||||
GDS_REF(to_dbb->dbb_transaction),
|
(GDS__QUAD*) to_desc->dsc_address))
|
||||||
GDS_REF(to_blob), (GDS__QUAD*) GDS_VAL(to_desc->dsc_address)))
|
|
||||||
ERRQ_database_error(to_dbb, status_vector);
|
ERRQ_database_error(to_dbb, status_vector);
|
||||||
|
|
||||||
if (gds__open_blob2(status_vector,
|
if (gds__open_blob2(status_vector, &from_dbb->dbb_handle,
|
||||||
GDS_REF(from_dbb->dbb_handle),
|
&from_dbb->dbb_transaction, &from_blob,
|
||||||
GDS_REF(from_dbb->dbb_transaction),
|
(GDS__QUAD*) from_desc->dsc_address, bpb_length,
|
||||||
GDS_REF(from_blob),
|
(char*) bpb))
|
||||||
(GDS__QUAD*) GDS_VAL(from_desc->dsc_address),
|
ERRQ_database_error(from_dbb, status_vector);
|
||||||
bpb_length,
|
|
||||||
(char*) bpb)) ERRQ_database_error(from_dbb, status_vector);
|
|
||||||
|
|
||||||
gds__blob_size(&from_blob, &size, &segment_count, &max_segment);
|
gds__blob_size(&from_blob, &size, &segment_count, &max_segment);
|
||||||
|
|
||||||
@ -750,24 +736,19 @@ static int copy_blob( QLI_NOD value, PAR parameter)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!gds__get_segment(status_vector,
|
while (!gds__get_segment(status_vector, &from_blob, &length, buffer_length,
|
||||||
GDS_REF(from_blob),
|
(char*) buffer))
|
||||||
GDS_REF(length),
|
if (gds__put_segment(status_vector, &to_blob, length,
|
||||||
buffer_length,
|
(char*) buffer))
|
||||||
(char*) GDS_VAL(buffer)))
|
|
||||||
if (gds__put_segment(status_vector,
|
|
||||||
GDS_REF(to_blob),
|
|
||||||
length,
|
|
||||||
(char*) GDS_VAL(buffer)))
|
|
||||||
ERRQ_database_error(to_dbb, status_vector);
|
ERRQ_database_error(to_dbb, status_vector);
|
||||||
|
|
||||||
if (buffer != fixed_buffer)
|
if (buffer != fixed_buffer)
|
||||||
gds__free(buffer);
|
gds__free(buffer);
|
||||||
|
|
||||||
if (gds__close_blob(status_vector, GDS_REF(from_blob)))
|
if (gds__close_blob(status_vector, &from_blob))
|
||||||
ERRQ_database_error(from_dbb, status_vector);
|
ERRQ_database_error(from_dbb, status_vector);
|
||||||
|
|
||||||
if (gds__close_blob(status_vector, GDS_REF(to_blob)))
|
if (gds__close_blob(status_vector, &to_blob))
|
||||||
ERRQ_database_error(to_dbb, status_vector);
|
ERRQ_database_error(to_dbb, status_vector);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -813,7 +794,8 @@ static void execute_abort( QLI_NOD node)
|
|||||||
MOVQ_get_string(EVAL_value(node->nod_arg[0]), (TEXT**) &ptr, (VARY*) temp,
|
MOVQ_get_string(EVAL_value(node->nod_arg[0]), (TEXT**) &ptr, (VARY*) temp,
|
||||||
sizeof(temp));
|
sizeof(temp));
|
||||||
MOVQ_terminate((SCHAR*) ptr, (SCHAR*) msg, l, sizeof(msg));
|
MOVQ_terminate((SCHAR*) ptr, (SCHAR*) msg, l, sizeof(msg));
|
||||||
ERRQ_error(40, (TEXT*) msg, NULL, NULL, NULL, NULL); /* Msg40 Request terminated by statement: %s */
|
ERRQ_error(40, (TEXT*) msg, NULL, NULL, NULL, NULL);
|
||||||
|
/* Msg40 Request terminated by statement: %s */
|
||||||
}
|
}
|
||||||
|
|
||||||
IBERROR(41); /* Msg41 Request terminated by statement */
|
IBERROR(41); /* Msg41 Request terminated by statement */
|
||||||
@ -1103,11 +1085,9 @@ static void map_data( QLI_MSG message)
|
|||||||
desc = ¶meter->par_desc;
|
desc = ¶meter->par_desc;
|
||||||
desc->dsc_address = message->msg_buffer + parameter->par_offset;
|
desc->dsc_address = message->msg_buffer + parameter->par_offset;
|
||||||
if (missing_parameter = parameter->par_missing) {
|
if (missing_parameter = parameter->par_missing) {
|
||||||
missing_flag =
|
missing_flag = (USHORT *) (message->msg_buffer +
|
||||||
(USHORT *) (message->msg_buffer +
|
|
||||||
missing_parameter->par_offset);
|
missing_parameter->par_offset);
|
||||||
*missing_flag =
|
*missing_flag = (desc->dsc_missing & DSC_missing) ? DSC_missing : 0;
|
||||||
(desc->dsc_missing & DSC_missing) ? DSC_missing : 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
from = parameter->par_value;
|
from = parameter->par_value;
|
||||||
@ -1137,12 +1117,10 @@ static void print_counts( QLI_REQ request)
|
|||||||
ISC_STATUS_ARRAY status_vector;
|
ISC_STATUS_ARRAY status_vector;
|
||||||
SCHAR count_buffer[COUNT_ITEMS * 7 + 1], *c;
|
SCHAR count_buffer[COUNT_ITEMS * 7 + 1], *c;
|
||||||
|
|
||||||
if (gds__request_info(status_vector,
|
if (gds__request_info(status_vector, &request->req_handle, 0,
|
||||||
GDS_REF(request->req_handle),
|
sizeof(count_info), count_info,
|
||||||
0,
|
sizeof(count_buffer), count_buffer))
|
||||||
sizeof(count_info),
|
return;
|
||||||
count_info,
|
|
||||||
sizeof(count_buffer), count_buffer)) return;
|
|
||||||
|
|
||||||
/* print out the counts of any records affected */
|
/* print out the counts of any records affected */
|
||||||
|
|
||||||
@ -1229,13 +1207,11 @@ static void transaction_state( QLI_NOD node, DBB database)
|
|||||||
|
|
||||||
if (database->dbb_transaction) {
|
if (database->dbb_transaction) {
|
||||||
if (node->nod_type == nod_commit_retaining) {
|
if (node->nod_type == nod_commit_retaining) {
|
||||||
if (gds__commit_retaining(status,
|
if (gds__commit_retaining(status, &database->dbb_transaction))
|
||||||
GDS_REF(database->dbb_transaction)))
|
|
||||||
ERRQ_database_error(database, status);
|
ERRQ_database_error(database, status);
|
||||||
}
|
}
|
||||||
else if (node->nod_type == nod_prepare) {
|
else if (node->nod_type == nod_prepare) {
|
||||||
if (gds__prepare_transaction(status,
|
if (gds__prepare_transaction(status, &database->dbb_transaction))
|
||||||
GDS_REF(database->dbb_transaction)))
|
|
||||||
ERRQ_database_error(database, status);
|
ERRQ_database_error(database, status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ TEXT *FMT_format(LLS stack)
|
|||||||
size = (max_offset + 1) * (number_segments + 1) + 2;
|
size = (max_offset + 1) * (number_segments + 1) + 2;
|
||||||
|
|
||||||
if (size >= 60000)
|
if (size >= 60000)
|
||||||
ERRQ_print_error(482, (TEXT *) max_offset,
|
ERRQ_print_error(482, (TEXT *)(ULONG) max_offset,
|
||||||
(TEXT *) (number_segments + 1), NULL, NULL, NULL);
|
(TEXT *) (number_segments + 1), NULL, NULL, NULL);
|
||||||
|
|
||||||
header = (STR) ALLOCDV(type_str, size);
|
header = (STR) ALLOCDV(type_str, size);
|
||||||
@ -560,7 +560,7 @@ void FMT_print( QLI_NOD list, PRT print)
|
|||||||
for (ptr = list->nod_arg; ptr < end; ptr++) {
|
for (ptr = list->nod_arg; ptr < end; ptr++) {
|
||||||
item = (ITM) * ptr;
|
item = (ITM) * ptr;
|
||||||
if (item->itm_dtype == dtype_blob && item->itm_stream)
|
if (item->itm_dtype == dtype_blob && item->itm_stream)
|
||||||
gds__close_blob(status_vector, GDS_REF(item->itm_stream));
|
gds__close_blob(status_vector, &item->itm_stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1291,12 +1291,10 @@ static int print_line( ITM item, TEXT ** ptr)
|
|||||||
l = item->itm_print_length;
|
l = item->itm_print_length;
|
||||||
|
|
||||||
|
|
||||||
if ((status = gds__get_segment(status_vector,
|
if ((status = gds__get_segment(status_vector, &item->itm_stream, &length,
|
||||||
GDS_REF(item->itm_stream),
|
l, p)) && status != gds_segment) {
|
||||||
GDS_REF(length),
|
|
||||||
l, GDS_VAL(p))) && status != gds_segment) {
|
|
||||||
long *null_status = 0;
|
long *null_status = 0;
|
||||||
gds__close_blob(null_status, GDS_REF(item->itm_stream));
|
gds__close_blob(null_status, &item->itm_stream);
|
||||||
if (status != gds_segstr_eof)
|
if (status != gds_segstr_eof)
|
||||||
ERRQ_database_error(0, status_vector);
|
ERRQ_database_error(0, status_vector);
|
||||||
return EOF;
|
return EOF;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
* Contributor(s): ______________________________________.
|
* Contributor(s): ______________________________________.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
$Id: gener.cpp,v 1.17 2003-04-16 10:18:17 aafemt Exp $
|
$Id: gener.cpp,v 1.18 2003-08-30 02:11:08 brodsom Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "firebird.h"
|
#include "firebird.h"
|
||||||
@ -111,8 +111,7 @@ void GEN_release(void)
|
|||||||
|
|
||||||
for (; QLI_requests; QLI_requests = QLI_requests->req_next) {
|
for (; QLI_requests; QLI_requests = QLI_requests->req_next) {
|
||||||
if (QLI_requests->req_handle)
|
if (QLI_requests->req_handle)
|
||||||
gds__release_request(status_vector,
|
gds__release_request(status_vector, &QLI_requests->req_handle);
|
||||||
GDS_REF(QLI_requests->req_handle));
|
|
||||||
|
|
||||||
rlb = QLI_requests->req_blr;
|
rlb = QLI_requests->req_blr;
|
||||||
RELEASE_RLB;
|
RELEASE_RLB;
|
||||||
@ -613,23 +612,19 @@ static void gen_compile( QLI_REQ request)
|
|||||||
|
|
||||||
dbb = request->req_database;
|
dbb = request->req_database;
|
||||||
|
|
||||||
if (gds__compile_request(status_vector,
|
if (gds__compile_request(status_vector, &dbb->dbb_handle,
|
||||||
GDS_REF(dbb->dbb_handle),
|
&request->req_handle, length,
|
||||||
GDS_REF(request->req_handle),
|
(char*) rlb->rlb_base)) {
|
||||||
length, (char*) GDS_VAL(rlb->rlb_base))) {
|
|
||||||
RELEASE_RLB;
|
RELEASE_RLB;
|
||||||
ERRQ_database_error(dbb, status_vector);
|
ERRQ_database_error(dbb, status_vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEV_BUILD
|
#ifdef DEV_BUILD
|
||||||
if (QLI_explain &&
|
if (QLI_explain &&
|
||||||
!gds__request_info(status_vector,
|
!gds__request_info(status_vector, &request->req_handle, 0,
|
||||||
GDS_REF(request->req_handle),
|
sizeof(explain_info), explain_info,
|
||||||
0,
|
sizeof(explain_buffer), explain_buffer))
|
||||||
sizeof(explain_info),
|
explain((UCHAR*) explain_buffer);
|
||||||
explain_info,
|
|
||||||
sizeof(explain_buffer),
|
|
||||||
explain_buffer)) explain((UCHAR*) explain_buffer);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RELEASE_RLB;
|
RELEASE_RLB;
|
||||||
|
@ -770,7 +770,7 @@ void LEX_put_procedure( FRBRD *blob, SLONG start, SLONG stop)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (l = p - buffer)
|
if (l = p - buffer)
|
||||||
if (gds__put_segment(status_vector, GDS_REF(blob), l, buffer))
|
if (gds__put_segment(status_vector, &blob, l, buffer))
|
||||||
BUGCHECK(58); /* Msg 58 gds__put_segment failed */
|
BUGCHECK(58); /* Msg 58 gds__put_segment failed */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
148
src/qli/meta.epp
148
src/qli/meta.epp
@ -554,12 +554,8 @@ void MET_delete_database( DBB dbb)
|
|||||||
if (dpb_length == 1)
|
if (dpb_length == 1)
|
||||||
dpb_length = 0;
|
dpb_length = 0;
|
||||||
|
|
||||||
if (gds__attach_database(status_vector,
|
if (gds__attach_database(status_vector, 0, dbb->dbb_filename,
|
||||||
0,
|
&dbb->dbb_handle, dpb_length, (char*) dpb))
|
||||||
GDS_VAL(dbb->dbb_filename),
|
|
||||||
GDS_REF(dbb->dbb_handle),
|
|
||||||
dpb_length,
|
|
||||||
(char*) GDS_VAL(dpb)))
|
|
||||||
ERRQ_database_error(dbb, status_vector);
|
ERRQ_database_error(dbb, status_vector);
|
||||||
|
|
||||||
log_stack = stack = NULL;
|
log_stack = stack = NULL;
|
||||||
@ -578,13 +574,10 @@ void MET_delete_database( DBB dbb)
|
|||||||
|
|
||||||
/* Get write ahead log information */
|
/* Get write ahead log information */
|
||||||
|
|
||||||
if (gds__database_info(status_vector,
|
if (gds__database_info(status_vector, &DB, sizeof(db_log_info),
|
||||||
GDS_REF(DB),
|
(char*) db_log_info, sizeof(db_info_buffer),
|
||||||
sizeof(db_log_info),
|
db_info_buffer))
|
||||||
(char*) db_log_info,
|
ERRQ_database_error(dbb, status_vector);
|
||||||
sizeof(db_info_buffer),
|
|
||||||
db_info_buffer)) ERRQ_database_error(dbb,
|
|
||||||
status_vector);
|
|
||||||
|
|
||||||
/* extract info from buffer */
|
/* extract info from buffer */
|
||||||
|
|
||||||
@ -595,7 +588,7 @@ void MET_delete_database( DBB dbb)
|
|||||||
|
|
||||||
MET_transaction(nod_commit, dbb);
|
MET_transaction(nod_commit, dbb);
|
||||||
|
|
||||||
if (gds__detach_database(gds_status, GDS_REF(dbb->dbb_handle)))
|
if (gds__detach_database(gds_status, &dbb->dbb_handle))
|
||||||
gds__print_status(gds_status);
|
gds__print_status(gds_status);
|
||||||
|
|
||||||
for (database = QLI_databases; database; database = next) {
|
for (database = QLI_databases; database; database = next) {
|
||||||
@ -1070,7 +1063,7 @@ void MET_index_info(
|
|||||||
END_ERROR;
|
END_ERROR;
|
||||||
|
|
||||||
if (request_handle)
|
if (request_handle)
|
||||||
if (gds__release_request(gds_status, GDS_REF(request_handle)))
|
if (gds__release_request(gds_status, &request_handle))
|
||||||
ERRQ_database_error(NULL, gds_status);
|
ERRQ_database_error(NULL, gds_status);
|
||||||
|
|
||||||
/* back up over the last space and finish off */
|
/* back up over the last space and finish off */
|
||||||
@ -1098,8 +1091,7 @@ void MET_meta_commit( DBB database)
|
|||||||
ISC_STATUS_ARRAY status_vector;
|
ISC_STATUS_ARRAY status_vector;
|
||||||
|
|
||||||
if (database->dbb_capabilities & DBB_cap_multi_trans)
|
if (database->dbb_capabilities & DBB_cap_multi_trans)
|
||||||
if (gds__commit_transaction(status_vector,
|
if (gds__commit_transaction(status_vector, &database->dbb_meta_trans)) {
|
||||||
GDS_REF(database->dbb_meta_trans))) {
|
|
||||||
rollback_update(database);
|
rollback_update(database);
|
||||||
ERRQ_database_error(database, status_vector);
|
ERRQ_database_error(database, status_vector);
|
||||||
}
|
}
|
||||||
@ -1166,12 +1158,8 @@ FRBRD *MET_meta_transaction(DBB database, int update_flag)
|
|||||||
((database->dbb_capabilities & DBB_cap_multi_trans) ||
|
((database->dbb_capabilities & DBB_cap_multi_trans) ||
|
||||||
!(database->dbb_capabilities & DBB_cap_single_trans)))
|
!(database->dbb_capabilities & DBB_cap_single_trans)))
|
||||||
{
|
{
|
||||||
if (gds__start_transaction(status_vector,
|
if (gds__start_transaction(status_vector, &transaction, 1,
|
||||||
GDS_REF(transaction),
|
&database->dbb_handle, sizeof(tpb), tpb))
|
||||||
1,
|
|
||||||
GDS_REF(database->dbb_handle),
|
|
||||||
sizeof(tpb),
|
|
||||||
tpb))
|
|
||||||
{
|
{
|
||||||
database->dbb_capabilities |= DBB_cap_single_trans;
|
database->dbb_capabilities |= DBB_cap_single_trans;
|
||||||
}
|
}
|
||||||
@ -1535,17 +1523,11 @@ void MET_ready( SYN node, USHORT create_flag)
|
|||||||
for (ptr = node->syn_arg; ptr < end; ptr++) {
|
for (ptr = node->syn_arg; ptr < end; ptr++) {
|
||||||
dbb = (DBB) * ptr;
|
dbb = (DBB) * ptr;
|
||||||
if (create_flag)
|
if (create_flag)
|
||||||
gds__create_database(status_vector,
|
gds__create_database(status_vector, 0, dbb->dbb_filename,
|
||||||
0,
|
&dbb->dbb_handle, dpb_length, (char*) dpb, 0);
|
||||||
GDS_VAL(dbb->dbb_filename),
|
|
||||||
GDS_REF(dbb->dbb_handle),
|
|
||||||
dpb_length, (char*) GDS_VAL(dpb), 0);
|
|
||||||
else
|
else
|
||||||
gds__attach_database(status_vector,
|
gds__attach_database(status_vector, 0, dbb->dbb_filename,
|
||||||
0,
|
&dbb->dbb_handle, dpb_length, (char*) dpb);
|
||||||
GDS_VAL(dbb->dbb_filename),
|
|
||||||
GDS_REF(dbb->dbb_handle),
|
|
||||||
dpb_length, (char*) GDS_VAL(dpb));
|
|
||||||
if (status_vector[1])
|
if (status_vector[1])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1745,26 +1727,20 @@ FRBRD *MET_transaction( NOD_T node_type, DBB database)
|
|||||||
|
|
||||||
switch (node_type) {
|
switch (node_type) {
|
||||||
case nod_commit:
|
case nod_commit:
|
||||||
gds__commit_transaction(status_vector,
|
gds__commit_transaction(status_vector, &database->dbb_transaction);
|
||||||
GDS_REF(database->dbb_transaction));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nod_rollback:
|
case nod_rollback:
|
||||||
gds__rollback_transaction(status_vector,
|
gds__rollback_transaction(status_vector, &database->dbb_transaction);
|
||||||
GDS_REF(database->dbb_transaction));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nod_prepare:
|
case nod_prepare:
|
||||||
gds__prepare_transaction(status_vector,
|
gds__prepare_transaction(status_vector, &database->dbb_transaction);
|
||||||
GDS_REF(database->dbb_transaction));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nod_start_trans:
|
case nod_start_trans:
|
||||||
gds__start_transaction(status_vector,
|
gds__start_transaction(status_vector, &database->dbb_transaction, 1,
|
||||||
GDS_REF(database->dbb_transaction),
|
&database->dbb_handle, sizeof(tpb), tpb);
|
||||||
1,
|
|
||||||
GDS_REF(database->dbb_handle),
|
|
||||||
sizeof(tpb), tpb);
|
|
||||||
database->dbb_flags &= ~DBB_updates & ~DBB_prepared;
|
database->dbb_flags &= ~DBB_updates & ~DBB_prepared;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1962,10 +1938,8 @@ static int blob_copy( RLB rlb, QLI_REL source, SLONG * source_blob_id)
|
|||||||
DB = source_dbb->dbb_handle;
|
DB = source_dbb->dbb_handle;
|
||||||
source_blob = NULL;
|
source_blob = NULL;
|
||||||
|
|
||||||
if (gds__open_blob(status_vector,
|
if (gds__open_blob(status_vector, &DB, &source_dbb->dbb_meta_trans,
|
||||||
GDS_REF(DB),
|
&source_blob, (GDS__QUAD*) source_blob_id)) {
|
||||||
GDS_REF(source_dbb->dbb_meta_trans),
|
|
||||||
GDS_REF(source_blob), (GDS__QUAD*) GDS_VAL(source_blob_id))) {
|
|
||||||
rollback_update((DBB) DB);
|
rollback_update((DBB) DB);
|
||||||
ERRQ_database_error(source_dbb, status_vector);
|
ERRQ_database_error(source_dbb, status_vector);
|
||||||
}
|
}
|
||||||
@ -1983,10 +1957,8 @@ static int blob_copy( RLB rlb, QLI_REL source, SLONG * source_blob_id)
|
|||||||
|
|
||||||
STUFF_WORD((USHORT) size);
|
STUFF_WORD((USHORT) size);
|
||||||
|
|
||||||
while (!gds__get_segment(status_vector,
|
while (!gds__get_segment(status_vector, &source_blob, &length,
|
||||||
GDS_REF(source_blob),
|
buffer_length, buffer)) {
|
||||||
GDS_REF(length),
|
|
||||||
buffer_length, GDS_VAL(buffer))) {
|
|
||||||
while (rlb->rlb_limit - rlb->rlb_data < length)
|
while (rlb->rlb_limit - rlb->rlb_data < length)
|
||||||
rlb = GEN_rlb_extend(rlb);
|
rlb = GEN_rlb_extend(rlb);
|
||||||
p = buffer;
|
p = buffer;
|
||||||
@ -2004,7 +1976,7 @@ static int blob_copy( RLB rlb, QLI_REL source, SLONG * source_blob_id)
|
|||||||
if (buffer != fixed_buffer)
|
if (buffer != fixed_buffer)
|
||||||
gds__free(buffer);
|
gds__free(buffer);
|
||||||
|
|
||||||
if (gds__close_blob(status_vector, GDS_REF(source_blob))) {
|
if (gds__close_blob(status_vector, &source_blob)) {
|
||||||
rollback_update((DBB) DB);
|
rollback_update((DBB) DB);
|
||||||
ERRQ_database_error(source_dbb, status_vector);
|
ERRQ_database_error(source_dbb, status_vector);
|
||||||
}
|
}
|
||||||
@ -2368,10 +2340,10 @@ static int clone_fields( QLI_REL target, QLI_REL source)
|
|||||||
execute_dynamic_ddl(target->rel_database, rlb);
|
execute_dynamic_ddl(target->rel_database, rlb);
|
||||||
|
|
||||||
if (req1)
|
if (req1)
|
||||||
if (gds__release_request(gds_status, GDS_REF(req1)))
|
if (gds__release_request(gds_status, &req1))
|
||||||
ERRQ_database_error(source->rel_database, gds_status);
|
ERRQ_database_error(source->rel_database, gds_status);
|
||||||
if (req2)
|
if (req2)
|
||||||
if (gds__release_request(gds_status, GDS_REF(req2)))
|
if (gds__release_request(gds_status, &req2))
|
||||||
ERRQ_database_error(source->rel_database, gds_status);
|
ERRQ_database_error(source->rel_database, gds_status);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -2594,13 +2566,13 @@ static int clone_global_fields( QLI_REL target, QLI_REL source)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (req1)
|
if (req1)
|
||||||
if (gds__release_request(gds_status, GDS_REF(req1)))
|
if (gds__release_request(gds_status, &req1))
|
||||||
ERRQ_database_error(source->rel_database, gds_status);
|
ERRQ_database_error(source->rel_database, gds_status);
|
||||||
if (req2)
|
if (req2)
|
||||||
if (gds__release_request(gds_status, GDS_REF(req2)))
|
if (gds__release_request(gds_status, &req2))
|
||||||
ERRQ_database_error(target->rel_database, gds_status);
|
ERRQ_database_error(target->rel_database, gds_status);
|
||||||
if (req3)
|
if (req3)
|
||||||
if (gds__release_request(gds_status, GDS_REF(req3)))
|
if (gds__release_request(gds_status, &req3))
|
||||||
ERRQ_database_error(source->rel_database, gds_status);
|
ERRQ_database_error(source->rel_database, gds_status);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -2708,21 +2680,18 @@ static ISC_STATUS detach( ISC_STATUS * status_vector, DBB dbb)
|
|||||||
status = status_vector;
|
status = status_vector;
|
||||||
|
|
||||||
if (dbb->dbb_transaction)
|
if (dbb->dbb_transaction)
|
||||||
if (gds__commit_transaction(GDS_VAL(status),
|
if (gds__commit_transaction(status, &dbb->dbb_transaction))
|
||||||
GDS_REF(dbb->dbb_transaction)))
|
|
||||||
status = alt_vector;
|
status = alt_vector;
|
||||||
|
|
||||||
if (dbb->dbb_proc_trans && (dbb->dbb_capabilities & DBB_cap_multi_trans))
|
if (dbb->dbb_proc_trans && (dbb->dbb_capabilities & DBB_cap_multi_trans))
|
||||||
if (gds__commit_transaction(GDS_VAL(status),
|
if (gds__commit_transaction(status, &dbb->dbb_proc_trans))
|
||||||
GDS_REF(dbb->dbb_proc_trans)))
|
|
||||||
status = alt_vector;
|
status = alt_vector;
|
||||||
|
|
||||||
if (dbb->dbb_meta_trans && (dbb->dbb_capabilities & DBB_cap_multi_trans))
|
if (dbb->dbb_meta_trans && (dbb->dbb_capabilities & DBB_cap_multi_trans))
|
||||||
if (gds__commit_transaction(GDS_VAL(status),
|
if (gds__commit_transaction(status, &dbb->dbb_meta_trans))
|
||||||
GDS_REF(dbb->dbb_meta_trans)))
|
|
||||||
status = alt_vector;
|
status = alt_vector;
|
||||||
|
|
||||||
gds__detach_database(GDS_VAL(status), GDS_REF(dbb->dbb_handle));
|
gds__detach_database(status, &dbb->dbb_handle);
|
||||||
|
|
||||||
return status_vector[1];
|
return status_vector[1];
|
||||||
}
|
}
|
||||||
@ -2747,10 +2716,8 @@ static int execute_dynamic_ddl( DBB database, RLB rlb)
|
|||||||
if (QLI_blr)
|
if (QLI_blr)
|
||||||
PRETTY_print_dyn((SCHAR*) rlb->rlb_base, (FPTR_INT) ib_printf, "%4d %s\n", 0);
|
PRETTY_print_dyn((SCHAR*) rlb->rlb_base, (FPTR_INT) ib_printf, "%4d %s\n", 0);
|
||||||
|
|
||||||
if (gds__ddl(gds_status,
|
if (gds__ddl(gds_status, &database->dbb_handle, &database->dbb_meta_trans,
|
||||||
GDS_REF(database->dbb_handle),
|
length, (char*) rlb->rlb_base)) {
|
||||||
GDS_REF(database->dbb_meta_trans),
|
|
||||||
length, (char*) GDS_VAL(rlb->rlb_base))) {
|
|
||||||
rollback_update(database);
|
rollback_update(database);
|
||||||
ERRQ_database_error(database, gds_status);
|
ERRQ_database_error(database, gds_status);
|
||||||
}
|
}
|
||||||
@ -2815,9 +2782,8 @@ static void get_database_type( DBB new_dbb)
|
|||||||
USHORT l;
|
USHORT l;
|
||||||
UCHAR item, buffer[1024], *p, *q;
|
UCHAR item, buffer[1024], *p, *q;
|
||||||
|
|
||||||
gds__database_info(status_vector,
|
gds__database_info(status_vector, &new_dbb->dbb_handle, sizeof(db_info),
|
||||||
GDS_REF(new_dbb->dbb_handle),
|
(char*) db_info, sizeof(buffer), (char*) buffer);
|
||||||
sizeof(db_info), (char*) db_info, sizeof(buffer), (char*) buffer);
|
|
||||||
|
|
||||||
if (status_vector[1])
|
if (status_vector[1])
|
||||||
ERRQ_database_error(new_dbb, gds_status);
|
ERRQ_database_error(new_dbb, gds_status);
|
||||||
@ -2997,17 +2963,15 @@ static TEXT *get_query_header( DBB database, SLONG blob_id[2])
|
|||||||
blob = NULL;
|
blob = NULL;
|
||||||
|
|
||||||
|
|
||||||
if (gds__open_blob(status_vector,
|
if (gds__open_blob(status_vector, &database->dbb_handle,
|
||||||
GDS_REF(database->dbb_handle),
|
&gds_trans, &blob, (GDS__QUAD*) blob_id))
|
||||||
GDS_REF(gds_trans), GDS_REF(blob), (GDS__QUAD*) GDS_VAL(blob_id)))
|
|
||||||
ERRQ_database_error(database, status_vector);
|
ERRQ_database_error(database, status_vector);
|
||||||
|
|
||||||
p = header;
|
p = header;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
status = gds__get_segment(status_vector,
|
status = gds__get_segment(status_vector, &blob, &length,
|
||||||
GDS_REF(blob),
|
sizeof(buffer), buffer);
|
||||||
GDS_REF(length), sizeof(buffer), buffer);
|
|
||||||
if (status && status != gds_segment)
|
if (status && status != gds_segment)
|
||||||
break;
|
break;
|
||||||
if (length && buffer[length - 1] == '\n')
|
if (length && buffer[length - 1] == '\n')
|
||||||
@ -3026,7 +2990,7 @@ static TEXT *get_query_header( DBB database, SLONG blob_id[2])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gds__close_blob(status_vector, GDS_REF(blob)))
|
if (gds__close_blob(status_vector, &blob))
|
||||||
ERRQ_database_error(database, gds_status);
|
ERRQ_database_error(database, gds_status);
|
||||||
|
|
||||||
*p = 0;
|
*p = 0;
|
||||||
@ -3131,7 +3095,7 @@ static void install( DBB old_dbb)
|
|||||||
END_ERROR;
|
END_ERROR;
|
||||||
|
|
||||||
if (request)
|
if (request)
|
||||||
if (gds__release_request(gds_status, GDS_REF(request)))
|
if (gds__release_request(gds_status, &request))
|
||||||
ERRQ_database_error(new_dbb, gds_status);
|
ERRQ_database_error(new_dbb, gds_status);
|
||||||
|
|
||||||
/* Pick up functions, if appropriate */
|
/* Pick up functions, if appropriate */
|
||||||
@ -3180,10 +3144,10 @@ static void install( DBB old_dbb)
|
|||||||
ERRQ_database_error(new_dbb, gds_status);
|
ERRQ_database_error(new_dbb, gds_status);
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
if (request)
|
if (request)
|
||||||
if (gds__release_request(gds_status, GDS_REF(request)))
|
if (gds__release_request(gds_status, &request))
|
||||||
ERRQ_database_error(new_dbb, gds_status);
|
ERRQ_database_error(new_dbb, gds_status);
|
||||||
if (request2)
|
if (request2)
|
||||||
if (gds__release_request(gds_status, GDS_REF(request2)))
|
if (gds__release_request(gds_status, &request2))
|
||||||
ERRQ_database_error(new_dbb, gds_status);
|
ERRQ_database_error(new_dbb, gds_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3581,23 +3545,22 @@ static SYN parse_blr_blob( SLONG * blob_id, SYM symbol)
|
|||||||
|
|
||||||
handle = NULL;
|
handle = NULL;
|
||||||
|
|
||||||
if (gds__open_blob(status_vector,
|
if (gds__open_blob(status_vector, &DB, &gds_trans, &handle,
|
||||||
GDS_REF(DB),
|
(GDS__QUAD*) blob_id))
|
||||||
GDS_REF(gds_trans),
|
return NULL;
|
||||||
GDS_REF(handle), (GDS__QUAD*) GDS_VAL(blob_id))) return NULL;
|
|
||||||
|
|
||||||
ptr = buffer;
|
ptr = buffer;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (!(length = buffer + sizeof(buffer) - ptr))
|
if (!(length = buffer + sizeof(buffer) - ptr))
|
||||||
break;
|
break;
|
||||||
if (gds__get_segment(status_vector,
|
if (gds__get_segment(status_vector, &handle, &length, length,
|
||||||
GDS_REF(handle),
|
(char*) ptr))
|
||||||
GDS_REF(length), length, (char*) GDS_VAL(ptr))) break;
|
break;
|
||||||
ptr += length;
|
ptr += length;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gds__close_blob(status_vector, GDS_REF(handle)))
|
if (gds__close_blob(status_vector, &handle))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (ptr == buffer)
|
if (ptr == buffer)
|
||||||
@ -3702,8 +3665,7 @@ static void rollback_update( DBB database)
|
|||||||
|
|
||||||
if (gds_trans == database->dbb_meta_trans &&
|
if (gds_trans == database->dbb_meta_trans &&
|
||||||
(database->dbb_capabilities & DBB_cap_multi_trans))
|
(database->dbb_capabilities & DBB_cap_multi_trans))
|
||||||
gds__rollback_transaction(alt_vector,
|
gds__rollback_transaction(alt_vector, &database->dbb_meta_trans);
|
||||||
GDS_REF(database->dbb_meta_trans));
|
|
||||||
/* Note: No message given if rollback fails */
|
/* Note: No message given if rollback fails */
|
||||||
|
|
||||||
gds_trans = NULL;
|
gds_trans = NULL;
|
||||||
@ -3748,7 +3710,7 @@ static void set_capabilities( DBB database)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (req)
|
if (req)
|
||||||
if (gds__release_request(gds_status, GDS_REF(req)))
|
if (gds__release_request(gds_status, &req))
|
||||||
ERRQ_database_error(database, gds_status);
|
ERRQ_database_error(database, gds_status);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
113
src/qli/proc.epp
113
src/qli/proc.epp
@ -76,7 +76,7 @@ void PRO_close( DBB database, FRBRD *blob)
|
|||||||
**************************************/
|
**************************************/
|
||||||
ISC_STATUS_ARRAY status_vector;
|
ISC_STATUS_ARRAY status_vector;
|
||||||
|
|
||||||
if (database && gds__close_blob(status_vector, GDS_REF(blob)))
|
if (database && gds__close_blob(status_vector, &blob))
|
||||||
ERRQ_database_error(database, status_vector);
|
ERRQ_database_error(database, status_vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,8 +97,7 @@ void PRO_commit( DBB database)
|
|||||||
|
|
||||||
if ((database->dbb_capabilities & DBB_cap_multi_trans) &&
|
if ((database->dbb_capabilities & DBB_cap_multi_trans) &&
|
||||||
!(LEX_active_procedure()))
|
!(LEX_active_procedure()))
|
||||||
if (gds__commit_transaction(status_vector,
|
if (gds__commit_transaction(status_vector, &database->dbb_proc_trans)) {
|
||||||
GDS_REF(database->dbb_proc_trans))) {
|
|
||||||
PRO_rollback(database);
|
PRO_rollback(database);
|
||||||
ERRQ_database_error(database, status_vector);
|
ERRQ_database_error(database, status_vector);
|
||||||
}
|
}
|
||||||
@ -165,21 +164,14 @@ void PRO_copy_procedure(
|
|||||||
NEW IN DB1.QLI$PROCEDURES USING
|
NEW IN DB1.QLI$PROCEDURES USING
|
||||||
|
|
||||||
strcpy(NEW.QLI$PROCEDURE_NAME, new_name);
|
strcpy(NEW.QLI$PROCEDURE_NAME, new_name);
|
||||||
if (gds__create_blob2(status_vector,
|
if (gds__create_blob2(status_vector, &new_database->dbb_handle,
|
||||||
GDS_REF(new_database->dbb_handle),
|
&new_database->dbb_proc_trans, &new_blob,
|
||||||
GDS_REF(new_database->dbb_proc_trans),
|
&NEW.QLI$PROCEDURE, bpb_length, (char*) bpb))
|
||||||
GDS_REF(new_blob),
|
|
||||||
GDS_REF(NEW.QLI$PROCEDURE),
|
|
||||||
bpb_length,
|
|
||||||
(char*) bpb))
|
|
||||||
ERRQ_database_error(new_database, status_vector);
|
ERRQ_database_error(new_database, status_vector);
|
||||||
while (!(gds__get_segment(status_vector,
|
while (!(gds__get_segment(status_vector, &old_blob, (USHORT*) &length,
|
||||||
GDS_REF(old_blob),
|
sizeof(buffer), buffer))) {
|
||||||
(USHORT*) GDS_REF(length),
|
|
||||||
sizeof(buffer), GDS_VAL(buffer)))) {
|
|
||||||
buffer[length] = 0;
|
buffer[length] = 0;
|
||||||
if (gds__put_segment(status_vector, GDS_REF(new_blob),
|
if (gds__put_segment(status_vector, &new_blob, length, buffer))
|
||||||
length, buffer))
|
|
||||||
ERRQ_database_error(new_database, status_vector);
|
ERRQ_database_error(new_database, status_vector);
|
||||||
}
|
}
|
||||||
PRO_close(old_database, old_blob);
|
PRO_close(old_database, old_blob);
|
||||||
@ -187,7 +179,7 @@ void PRO_copy_procedure(
|
|||||||
END_STORE;
|
END_STORE;
|
||||||
|
|
||||||
/* Release the FOR and STORE requests */
|
/* Release the FOR and STORE requests */
|
||||||
gds__release_request(gds_status, GDS_REF(store_request));
|
gds__release_request(gds_status, &store_request);
|
||||||
PRO_commit(new_database);
|
PRO_commit(new_database);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,13 +223,8 @@ void PRO_create( DBB database, TEXT * name)
|
|||||||
STORE(REQUEST_HANDLE database->dbb_store_blob) X IN DB.QLI$PROCEDURES
|
STORE(REQUEST_HANDLE database->dbb_store_blob) X IN DB.QLI$PROCEDURES
|
||||||
gds__vtof(name, X.QLI$PROCEDURE_NAME, sizeof(X.QLI$PROCEDURE_NAME));
|
gds__vtof(name, X.QLI$PROCEDURE_NAME, sizeof(X.QLI$PROCEDURE_NAME));
|
||||||
|
|
||||||
if (gds__create_blob2(status_vector,
|
if (gds__create_blob2(status_vector, &database->dbb_handle, &gds_trans,
|
||||||
GDS_REF(database->dbb_handle),
|
&blob, &X.QLI$PROCEDURE, bpb_length, (char*) bpb))
|
||||||
GDS_REF(gds_trans),
|
|
||||||
GDS_REF(blob),
|
|
||||||
GDS_REF(X.QLI$PROCEDURE),
|
|
||||||
bpb_length,
|
|
||||||
(char*) bpb))
|
|
||||||
ERRQ_database_error(database, status_vector);
|
ERRQ_database_error(database, status_vector);
|
||||||
while (!MATCH(KW_END_PROCEDURE)) {
|
while (!MATCH(KW_END_PROCEDURE)) {
|
||||||
if (QLI_token->tok_type == tok_eof)
|
if (QLI_token->tok_type == tok_eof)
|
||||||
@ -248,7 +235,7 @@ void PRO_create( DBB database, TEXT * name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LEX_put_procedure(blob, start, stop);
|
LEX_put_procedure(blob, start, stop);
|
||||||
gds__close_blob(status_vector, GDS_REF(blob));
|
gds__close_blob(status_vector, &blob);
|
||||||
END_STORE;
|
END_STORE;
|
||||||
|
|
||||||
/* Commit the procedure transaction, if there is one */
|
/* Commit the procedure transaction, if there is one */
|
||||||
@ -283,7 +270,7 @@ int PRO_delete_procedure( DBB database, TEXT * name)
|
|||||||
count++;
|
count++;
|
||||||
END_FOR;
|
END_FOR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(request));
|
gds__release_request(gds_status, &request);
|
||||||
|
|
||||||
/* Commit the procedure transaction, if there is one */
|
/* Commit the procedure transaction, if there is one */
|
||||||
|
|
||||||
@ -381,7 +368,7 @@ int PRO_get_line( FRBRD *blob, TEXT * buffer, USHORT size)
|
|||||||
USHORT length;
|
USHORT length;
|
||||||
|
|
||||||
gds__get_segment(status_vector,
|
gds__get_segment(status_vector,
|
||||||
GDS_REF(blob), GDS_REF(length), size, GDS_VAL(buffer));
|
&blob, &length, size, buffer);
|
||||||
|
|
||||||
if (status_vector[1] && status_vector[1] != gds_segment)
|
if (status_vector[1] && status_vector[1] != gds_segment)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -458,13 +445,10 @@ FRBRD *PRO_open_blob( DBB database, SLONG * blob_id)
|
|||||||
|
|
||||||
bpb_length = p - bpb;
|
bpb_length = p - bpb;
|
||||||
|
|
||||||
if (gds__open_blob2(status_vector,
|
if (gds__open_blob2(status_vector, &database->dbb_handle,
|
||||||
GDS_REF(database->dbb_handle),
|
&database->dbb_proc_trans, &blob, (GDS__QUAD*) blob_id,
|
||||||
GDS_REF(database->dbb_proc_trans),
|
bpb_length, (char*) bpb))
|
||||||
GDS_REF(blob),
|
ERRQ_database_error(database, status_vector);
|
||||||
(GDS__QUAD*) GDS_VAL(blob_id),
|
|
||||||
bpb_length,
|
|
||||||
(char*) bpb)) ERRQ_database_error(database, status_vector);
|
|
||||||
|
|
||||||
return blob;
|
return blob;
|
||||||
}
|
}
|
||||||
@ -498,12 +482,12 @@ int PRO_rename_procedure( DBB database, TEXT * old_name, TEXT * new_name)
|
|||||||
gds__vtof(new_name, X.QLI$PROCEDURE_NAME, sizeof(X.QLI$PROCEDURE_NAME));
|
gds__vtof(new_name, X.QLI$PROCEDURE_NAME, sizeof(X.QLI$PROCEDURE_NAME));
|
||||||
END_MODIFY
|
END_MODIFY
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
gds__release_request(gds_status, GDS_REF(request));
|
gds__release_request(gds_status, &request);
|
||||||
ERRQ_database_error(database, status_vector);
|
ERRQ_database_error(database, status_vector);
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
END_FOR;
|
END_FOR;
|
||||||
|
|
||||||
gds__release_request(gds_status, GDS_REF(request));
|
gds__release_request(gds_status, &request);
|
||||||
|
|
||||||
/* Commit the procedure transaction, if there is one */
|
/* Commit the procedure transaction, if there is one */
|
||||||
|
|
||||||
@ -529,8 +513,7 @@ void PRO_rollback( DBB database)
|
|||||||
ISC_STATUS_ARRAY status_vector;
|
ISC_STATUS_ARRAY status_vector;
|
||||||
|
|
||||||
if (database->dbb_capabilities & DBB_cap_multi_trans) {
|
if (database->dbb_capabilities & DBB_cap_multi_trans) {
|
||||||
gds__rollback_transaction(status_vector,
|
gds__rollback_transaction(status_vector, &database->dbb_proc_trans);
|
||||||
GDS_REF(database->dbb_proc_trans));
|
|
||||||
|
|
||||||
gds_trans = NULL;
|
gds_trans = NULL;
|
||||||
}
|
}
|
||||||
@ -642,12 +625,8 @@ FRBRD *PRO_transaction( DBB database, int update_flag)
|
|||||||
if (!transaction &&
|
if (!transaction &&
|
||||||
((database->dbb_capabilities & DBB_cap_multi_trans) ||
|
((database->dbb_capabilities & DBB_cap_multi_trans) ||
|
||||||
!(database->dbb_capabilities & DBB_cap_single_trans)))
|
!(database->dbb_capabilities & DBB_cap_single_trans)))
|
||||||
if (gds__start_transaction(status_vector,
|
if (gds__start_transaction(status_vector, &transaction, 1,
|
||||||
GDS_REF(transaction),
|
&database->dbb_handle, sizeof(tpb), tpb))
|
||||||
1,
|
|
||||||
GDS_REF(database->dbb_handle),
|
|
||||||
sizeof(tpb),
|
|
||||||
tpb))
|
|
||||||
database->dbb_capabilities |= DBB_cap_single_trans;
|
database->dbb_capabilities |= DBB_cap_single_trans;
|
||||||
else
|
else
|
||||||
database->dbb_capabilities |= DBB_cap_multi_trans;
|
database->dbb_capabilities |= DBB_cap_multi_trans;
|
||||||
@ -710,10 +689,10 @@ static int clear_out_qli_procedures( DBB dbb)
|
|||||||
count++;
|
count++;
|
||||||
END_FOR
|
END_FOR
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
ERRQ_database_error(dbb, gds_status);
|
ERRQ_database_error(dbb, gds_status);
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
|
|
||||||
if (count >= 2) {
|
if (count >= 2) {
|
||||||
dbb->dbb_flags |= DBB_procedures;
|
dbb->dbb_flags |= DBB_procedures;
|
||||||
@ -727,20 +706,20 @@ static int clear_out_qli_procedures( DBB dbb)
|
|||||||
count++;
|
count++;
|
||||||
END_FOR
|
END_FOR
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
ERRQ_database_error(dbb, gds_status);
|
ERRQ_database_error(dbb, gds_status);
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
|
|
||||||
FOR(REQUEST_HANDLE req) X IN DB.RDB$INDEX_SEGMENTS WITH X.RDB$INDEX_NAME = "QLI$PROCEDURES_IDX1"
|
FOR(REQUEST_HANDLE req) X IN DB.RDB$INDEX_SEGMENTS WITH X.RDB$INDEX_NAME = "QLI$PROCEDURES_IDX1"
|
||||||
ERASE X;
|
ERASE X;
|
||||||
count++;
|
count++;
|
||||||
END_FOR
|
END_FOR
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
ERRQ_database_error(dbb, gds_status);
|
ERRQ_database_error(dbb, gds_status);
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
|
|
||||||
FOR(REQUEST_HANDLE req) X IN DB.RDB$RELATION_FIELDS
|
FOR(REQUEST_HANDLE req) X IN DB.RDB$RELATION_FIELDS
|
||||||
WITH X.RDB$FIELD_NAME = "QLI$PROCEDURE_NAME" OR
|
WITH X.RDB$FIELD_NAME = "QLI$PROCEDURE_NAME" OR
|
||||||
@ -749,10 +728,10 @@ static int clear_out_qli_procedures( DBB dbb)
|
|||||||
count++;
|
count++;
|
||||||
END_FOR
|
END_FOR
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
ERRQ_database_error(dbb, gds_status);
|
ERRQ_database_error(dbb, gds_status);
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
gds__release_request(gds_status, GDS_REF(req));
|
gds__release_request(gds_status, &req);
|
||||||
|
|
||||||
FOR(REQUEST_HANDLE req) X IN DB.RDB$FIELDS
|
FOR(REQUEST_HANDLE req) X IN DB.RDB$FIELDS
|
||||||
WITH X.RDB$FIELD_NAME = "QLI$PROCEDURE_NAME" OR
|
WITH X.RDB$FIELD_NAME = "QLI$PROCEDURE_NAME" OR
|
||||||
@ -761,10 +740,10 @@ static int clear_out_qli_procedures( DBB dbb)
|
|||||||
count++;
|
count++;
|
||||||
END_FOR
|
END_FOR
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
ERRQ_database_error(dbb, gds_status);
|
ERRQ_database_error(dbb, gds_status);
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
gds__release_request(gds_status, GDS_REF(req));
|
gds__release_request(gds_status, &req);
|
||||||
|
|
||||||
FOR(REQUEST_HANDLE req) X IN DB.RDB$RELATIONS
|
FOR(REQUEST_HANDLE req) X IN DB.RDB$RELATIONS
|
||||||
WITH X.RDB$RELATION_NAME = "QLI$PROCEDURES"
|
WITH X.RDB$RELATION_NAME = "QLI$PROCEDURES"
|
||||||
@ -772,10 +751,10 @@ static int clear_out_qli_procedures( DBB dbb)
|
|||||||
count++;
|
count++;
|
||||||
END_FOR
|
END_FOR
|
||||||
ON_ERROR
|
ON_ERROR
|
||||||
gds__release_request(status_vector, GDS_REF(req));
|
gds__release_request(status_vector, &req);
|
||||||
ERRQ_database_error(dbb, gds_status);
|
ERRQ_database_error(dbb, gds_status);
|
||||||
END_ERROR;
|
END_ERROR;
|
||||||
gds__release_request(gds_status, GDS_REF(req));
|
gds__release_request(gds_status, &req);
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
@ -807,33 +786,29 @@ static void create_qli_procedures( DBB dbb)
|
|||||||
if (dbb->dbb_flags & DBB_procedures)
|
if (dbb->dbb_flags & DBB_procedures)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gds__ddl(gds_status,
|
if (gds__ddl(gds_status, &DB, &gds_trans, sizeof(dyn_gdl1),
|
||||||
GDS_REF(DB),
|
(char*) dyn_gdl1)) {
|
||||||
GDS_REF(gds_trans), sizeof(dyn_gdl1), (char*) dyn_gdl1)) {
|
|
||||||
PRO_rollback(dbb);
|
PRO_rollback(dbb);
|
||||||
IBERROR(73);
|
IBERROR(73);
|
||||||
/* Msg 73 Could not create QLI$PROCEDURE_NAME field */
|
/* Msg 73 Could not create QLI$PROCEDURE_NAME field */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gds__ddl(gds_status,
|
if (gds__ddl(gds_status, &DB, &gds_trans, sizeof(dyn_gdl2),
|
||||||
GDS_REF(DB),
|
(char*) dyn_gdl2)) {
|
||||||
GDS_REF(gds_trans), sizeof(dyn_gdl2), (char*) dyn_gdl2)) {
|
|
||||||
PRO_rollback(dbb);
|
PRO_rollback(dbb);
|
||||||
IBERROR(74);
|
IBERROR(74);
|
||||||
/* Msg 74 Could not create QLI$PROCEDURE field */
|
/* Msg 74 Could not create QLI$PROCEDURE field */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gds__ddl(gds_status,
|
if (gds__ddl(gds_status, &DB, &gds_trans, sizeof(dyn_gdl3),
|
||||||
GDS_REF(DB),
|
(char*) dyn_gdl3)) {
|
||||||
GDS_REF(gds_trans), sizeof(dyn_gdl3), (char*) dyn_gdl3)) {
|
|
||||||
PRO_rollback(dbb);
|
PRO_rollback(dbb);
|
||||||
IBERROR(75);
|
IBERROR(75);
|
||||||
/* Msg 75 Could not create QLI$PROCEDURES relation */
|
/* Msg 75 Could not create QLI$PROCEDURES relation */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gds__ddl(gds_status,
|
if (gds__ddl(gds_status, &DB, &gds_trans, sizeof(dyn_gdl4),
|
||||||
GDS_REF(DB),
|
(char*) dyn_gdl4)) {
|
||||||
GDS_REF(gds_trans), sizeof(dyn_gdl4), (char*) dyn_gdl4)) {
|
|
||||||
PRO_rollback(dbb);
|
PRO_rollback(dbb);
|
||||||
IBERROR(409);
|
IBERROR(409);
|
||||||
/* msg 409 Could not create QLI$PROCEDURES index */
|
/* msg 409 Could not create QLI$PROCEDURES index */
|
||||||
@ -864,7 +839,7 @@ static void probe( DBB database, TEXT * name)
|
|||||||
/* Probe to see if procedure is already in use */
|
/* Probe to see if procedure is already in use */
|
||||||
|
|
||||||
if (blob = PRO_fetch_procedure(database, name)) {
|
if (blob = PRO_fetch_procedure(database, name)) {
|
||||||
gds__close_blob(status_vector, GDS_REF(blob));
|
gds__close_blob(status_vector, &blob);
|
||||||
ERRQ_print_error(76, name, database->dbb_symbol->sym_string, NULL,
|
ERRQ_print_error(76, name, database->dbb_symbol->sym_string, NULL,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
/* Msg 76 procedure name \"%s\" in use in database %s */
|
/* Msg 76 procedure name \"%s\" in use in database %s */
|
||||||
|
Loading…
Reference in New Issue
Block a user