mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:43:04 +01:00
- Fix incorrect assignment of DYN constants for NBACKUP
- Fix minor inconsistency in drop_generator DYN constant definition Noted by Dmitry Emanov
This commit is contained in:
parent
5fa2d65e80
commit
79dea9d5a3
@ -20,7 +20,7 @@
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*
|
||||
* $Id: ddl.cpp,v 1.61 2003-09-20 23:28:11 brodsom Exp $
|
||||
* $Id: ddl.cpp,v 1.62 2003-09-21 13:33:41 skidder Exp $
|
||||
* 2001.5.20 Claudio Valderrama: Stop null pointer that leads to a crash,
|
||||
* caused by incomplete yacc syntax that allows ALTER DOMAIN dom SET;
|
||||
*
|
||||
@ -1280,7 +1280,7 @@ request->append_number(gds_dyn_rel_sql_protection, 1);
|
||||
|
||||
switch (element->nod_type) {
|
||||
case nod_difference_file:
|
||||
request->append_cstring(gds_dyn_def_difference,
|
||||
request->append_cstring(isc_dyn_def_difference,
|
||||
((STR)element->nod_arg[0])->str_data);
|
||||
break;
|
||||
case nod_file_desc:
|
||||
@ -4119,7 +4119,7 @@ static void generate_dyn( DSQL_REQ request, DSQL_NOD node)
|
||||
|
||||
case nod_del_generator:
|
||||
string = (STR) node->nod_arg[0];
|
||||
request->append_cstring(gds_dyn_delete_generator, string->str_data);
|
||||
request->append_cstring(isc_dyn_delete_generator, string->str_data);
|
||||
request->append_uchar(gds_dyn_end);
|
||||
break;
|
||||
|
||||
@ -4530,7 +4530,7 @@ request->append_number(gds_dyn_rel_sql_protection, 1);
|
||||
request->append_uchar(gds_dyn_drop_cache);
|
||||
}
|
||||
if (drop_difference) {
|
||||
request->append_uchar(gds_dyn_drop_difference);
|
||||
request->append_uchar(isc_dyn_drop_difference);
|
||||
}
|
||||
|
||||
elements = ddl_node->nod_arg[e_adb_all];
|
||||
@ -4612,14 +4612,14 @@ request->append_number(gds_dyn_rel_sql_protection, 1);
|
||||
request->append_ushort_with_length(temp_short);
|
||||
break;
|
||||
case nod_difference_file:
|
||||
request->append_cstring(gds_dyn_def_difference,
|
||||
request->append_cstring(isc_dyn_def_difference,
|
||||
((STR)element->nod_arg[0])->str_data);
|
||||
break;
|
||||
case nod_begin_backup:
|
||||
request->append_uchar(gds_dyn_begin_backup);
|
||||
request->append_uchar(isc_dyn_begin_backup);
|
||||
break;
|
||||
case nod_end_backup:
|
||||
request->append_uchar(gds_dyn_end_backup);
|
||||
request->append_uchar(isc_dyn_end_backup);
|
||||
break;
|
||||
case nod_drop_log:
|
||||
case nod_drop_cache:
|
||||
|
@ -584,7 +584,7 @@ TEXT * function_name, TEXT * procedure_name)
|
||||
DYN_delete_dimensions(gbl, ptr, relation_name, field_name);
|
||||
break;
|
||||
|
||||
case gds_dyn_delete_generator:
|
||||
case isc_dyn_delete_generator:
|
||||
DYN_delete_generator(gbl, ptr);
|
||||
break;
|
||||
|
||||
|
@ -175,7 +175,7 @@ void DYN_modify_database( GBL gbl, UCHAR ** ptr)
|
||||
DYN_define_file(gbl, ptr, (SLONG) 0, &start, 158);
|
||||
break;
|
||||
|
||||
case gds_dyn_def_difference:
|
||||
case isc_dyn_def_difference:
|
||||
DYN_define_difference(gbl, ptr);
|
||||
break;
|
||||
|
||||
@ -218,9 +218,9 @@ void DYN_modify_database( GBL gbl, UCHAR ** ptr)
|
||||
drop_cache(gbl);
|
||||
break;
|
||||
|
||||
case gds_dyn_drop_difference:
|
||||
case gds_dyn_begin_backup:
|
||||
case gds_dyn_end_backup:
|
||||
case isc_dyn_drop_difference:
|
||||
case isc_dyn_begin_backup:
|
||||
case isc_dyn_end_backup:
|
||||
change_backup_mode(gbl, verb);
|
||||
break;
|
||||
|
||||
@ -1731,10 +1731,10 @@ static void change_backup_mode( GBL gbl, UCHAR verb)
|
||||
if (X.RDB$FILE_FLAGS & FILE_difference) {
|
||||
found = true;
|
||||
switch (verb) {
|
||||
case gds_dyn_drop_difference:
|
||||
case isc_dyn_drop_difference:
|
||||
ERASE X;
|
||||
break;
|
||||
case gds_dyn_begin_backup:
|
||||
case isc_dyn_begin_backup:
|
||||
if (X.RDB$FILE_FLAGS & FILE_backing_up) {
|
||||
invalid_state = true;
|
||||
} else {
|
||||
@ -1743,7 +1743,7 @@ static void change_backup_mode( GBL gbl, UCHAR verb)
|
||||
END_MODIFY;
|
||||
}
|
||||
break;
|
||||
case gds_dyn_end_backup:
|
||||
case isc_dyn_end_backup:
|
||||
if (X.RDB$FILE_FLAGS & FILE_backing_up) {
|
||||
if (X.RDB$FILE_NAME.NULL) {
|
||||
ERASE X;
|
||||
@ -1773,7 +1773,7 @@ static void change_backup_mode( GBL gbl, UCHAR verb)
|
||||
/* msg 63: ERASE RDB$FILE failed */
|
||||
}
|
||||
|
||||
if (!found && verb == gds_dyn_begin_backup) try {
|
||||
if (!found && verb == isc_dyn_begin_backup) try {
|
||||
request = (BLK) CMP_find_request(tdbb, drq_s_difference, DYN_REQUESTS);
|
||||
STORE(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction)
|
||||
X IN RDB$FILES
|
||||
@ -1800,7 +1800,7 @@ static void change_backup_mode( GBL gbl, UCHAR verb)
|
||||
}
|
||||
|
||||
if (invalid_state) {
|
||||
DYN_error_punt(FALSE, verb == gds_dyn_begin_backup ? 217 : 218,
|
||||
DYN_error_punt(FALSE, verb == isc_dyn_begin_backup ? 217 : 218,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
/* msg 217: "Database is already in the physical backup mode" */
|
||||
/* msg 218: "Database is not in the physical backup mode" */
|
||||
@ -1808,7 +1808,7 @@ static void change_backup_mode( GBL gbl, UCHAR verb)
|
||||
|
||||
if (!found)
|
||||
{
|
||||
DYN_error_punt(FALSE, verb == gds_dyn_end_backup ? 218 : 215,
|
||||
DYN_error_punt(FALSE, verb == isc_dyn_end_backup ? 218 : 215,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
/* msg 218: "Database is not in the physical backup mode" */
|
||||
/* msg 215: "Difference file is not defined" */
|
||||
|
@ -1273,10 +1273,6 @@ const char gds_dyn_eoc = -1;
|
||||
#define gds__dyn_drop_log 194
|
||||
#define gds__dyn_drop_cache 195
|
||||
#define gds__dyn_def_default_log 202
|
||||
#define gds__dyn_def_difference 211
|
||||
#define gds__dyn_drop_difference 212
|
||||
#define gds__dyn_begin_backup 213
|
||||
#define gds__dyn_end_backup 214
|
||||
|
||||
#else /* c++ definitions */
|
||||
|
||||
@ -1339,10 +1335,6 @@ const unsigned char gds_dyn_del_exception = 183;
|
||||
const unsigned char gds_dyn_drop_log = 194;
|
||||
const unsigned char gds_dyn_drop_cache = 195;
|
||||
const unsigned char gds_dyn_def_default_log = 202;
|
||||
const unsigned char gds_dyn_def_difference = 211;
|
||||
const unsigned char gds_dyn_drop_difference = 212;
|
||||
const unsigned char gds_dyn_begin_backup = 213;
|
||||
const unsigned char gds_dyn_end_backup = 214;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: ibase.h,v 1.44 2003-08-29 11:13:12 aafemt Exp $
|
||||
$Id: ibase.h,v 1.45 2003-09-21 13:33:45 skidder Exp $
|
||||
*/
|
||||
|
||||
#ifndef JRD_IBASE_H
|
||||
@ -2005,10 +2005,10 @@ enum info_db_provider
|
||||
#define isc_dyn_drop_log 194
|
||||
#define isc_dyn_drop_cache 195
|
||||
#define isc_dyn_def_default_log 202
|
||||
#define isc_dyn_def_difference 211
|
||||
#define isc_dyn_drop_difference 212
|
||||
#define isc_dyn_begin_backup 213
|
||||
#define isc_dyn_end_backup 214
|
||||
#define isc_dyn_def_difference 220
|
||||
#define isc_dyn_drop_difference 221
|
||||
#define isc_dyn_begin_backup 222
|
||||
#define isc_dyn_end_backup 223
|
||||
|
||||
/***********************/
|
||||
/* View specific stuff */
|
||||
@ -2245,17 +2245,13 @@ enum info_db_provider
|
||||
/* Generators again */
|
||||
/**********************************************/
|
||||
|
||||
#ifndef __cplusplus /* c definitions */
|
||||
#define gds_dyn_delete_generator 217
|
||||
#else /* c++ definitions */
|
||||
const unsigned char gds_dyn_delete_generator = 217;
|
||||
#endif
|
||||
#define isc_dyn_delete_generator 217
|
||||
|
||||
/****************************/
|
||||
/* Last $dyn value assigned */
|
||||
/****************************/
|
||||
|
||||
#define isc_dyn_last_dyn_value 219
|
||||
#define isc_dyn_last_dyn_value 223
|
||||
|
||||
/******************************************/
|
||||
/* Array slice description language (SDL) */
|
||||
|
Loading…
Reference in New Issue
Block a user