8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 20:03:03 +01:00
This commit is contained in:
asfernandes 2009-11-21 00:10:16 +00:00
parent 9f57e5112e
commit 13e1546a70
7 changed files with 65 additions and 75 deletions

View File

@ -669,7 +669,7 @@ inline void check_copy_incr(char*& to, const char ch, const char* const string)
%type <legacyNode> data_type data_type_or_domain datetime_value_expression
%type <legacyNode> db_alter_clause db_clause db_file db_file_list db_initial_desc db_initial_desc1
%type <legacyNode> db_initial_option db_name db_rem_desc db_rem_desc1 db_rem_option ddl_subname
%type <legacyNode> db_initial_option db_rem_desc db_rem_desc1 db_rem_option ddl_subname
%type <legacyNode> decimal_keyword declare declare_clause
%type <legacyNode> decode_pairs def_computed default_par_opt default_value delete delete_positioned
%type <legacyNode> delete_rule delete_searched delimiter_opt derived_column_list derived_table
@ -678,7 +678,7 @@ inline void check_copy_incr(char*& to, const char ch, const char* const string)
%type <legacyNode> domain_default domain_default_opt domain_or_non_array_type
%type <legacyNode> domain_or_non_array_type_name domain_type drop drop_behaviour
%type <legacyNode> drop_clause drop_user_clause
%type <legacyStr> ddl_desc
%type <legacyStr> db_name ddl_desc
%type <legacyNode> end_default err errors event_argument_opt exception_clause
%type <legacyNode> excp_hndl_statement excp_hndl_statements excp_statement
@ -1466,8 +1466,8 @@ alter_charset_clause
db_clause
: db_name db_initial_desc1 db_rem_desc1
{
$$ = make_node (nod_def_database, (int) e_cdb_count,
$1, make_list($2), make_list ($3));
$$ = make_node(nod_def_database, (int) e_cdb_count,
$1, make_list($2), make_list($3));
}
;
@ -1478,7 +1478,6 @@ equals
db_name
: sql_string
{ $$ = (dsql_nod*) $1; }
;
db_initial_desc1
@ -1490,20 +1489,20 @@ db_initial_desc1
db_initial_desc
: db_initial_option
| db_initial_desc db_initial_option
{ $$ = make_node (nod_list, 2, $1, $2); }
{ $$ = make_node(nod_list, 2, $1, $2); }
;
db_initial_option
: KW_PAGE_SIZE equals pos_short_integer
{ $$ = make_node (nod_page_size, 1, $3); }
{ $$ = make_node(nod_page_size, 1, $3); }
| LENGTH equals long_integer page_noise
{ $$ = make_node (nod_file_length, 1, $3); }
{ $$ = make_node(nod_file_length, 1, $3); }
| USER sql_string
{ $$ = make_node (nod_user_name, 1, $2); }
{ $$ = make_node(nod_user_name, 1, $2); }
| PASSWORD sql_string
{ $$ = make_node (nod_password, 1, $2); }
{ $$ = make_node(nod_password, 1, $2); }
| SET NAMES sql_string
{ $$ = make_node (nod_lc_ctype, 1, $3); }
{ $$ = make_node(nod_lc_ctype, 1, $3); }
;
db_rem_desc1
@ -1515,29 +1514,28 @@ db_rem_desc1
db_rem_desc
: db_rem_option
| db_rem_desc db_rem_option
{ $$ = make_node (nod_list, 2, $1, $2); }
{ $$ = make_node(nod_list, 2, $1, $2); }
;
db_rem_option
: db_file
| DEFAULT CHARACTER SET symbol_character_set_name
{ $$ = make_node (nod_dfl_charset, 1, $4); }
{ $$ = make_node(nod_dfl_charset, 1, $4); }
| DEFAULT CHARACTER SET symbol_character_set_name COLLATION symbol_collation_name
{
$$ = make_node (nod_list, 2,
make_node (nod_dfl_charset, 1, $4),
make_node (nod_dfl_collate, 1, $6));
$$ = make_node(nod_list, 2,
make_node(nod_dfl_charset, 1, $4),
make_node(nod_dfl_collate, 1, $6));
}
| KW_DIFFERENCE KW_FILE sql_string
{ $$ = make_node (nod_difference_file, 1, $3); }
{ $$ = make_node(nod_difference_file, 1, $3); }
;
db_file
: file1 sql_string file_desc1
{
lex.g_file->fil_name = $2;
$$ = (dsql_nod*) make_node (nod_file_desc, (int) 1,
(dsql_nod*) lex.g_file);
$$ = make_node(nod_file_desc, (int) 1, (dsql_nod*) lex.g_file);
}
;

View File

@ -68,4 +68,3 @@ void CMP_shutdown_database(Jrd::thread_db*);
void CMP_verify_access(Jrd::thread_db* tdbb, Jrd::jrd_req* request);
#endif // JRD_CMP_PROTO_H

View File

@ -4728,10 +4728,8 @@ static Format* make_format(thread_db* tdbb, jrd_rel* relation, USHORT* version,
defRef.vlu_desc.dsc_address = defRef.vlu_string->str_data;
}
else
{
defRef.vlu_desc.dsc_address = (UCHAR*) &defRef.vlu_misc;
}
}
/* Compute the offsets of the various fields */
@ -5089,7 +5087,7 @@ static bool make_version(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_
jrd_nod* defaultNode = MET_parse_blob(tdbb, relation, defaultValue,
NULL, &defaultRequest, false);
{ // scope
// Attention: this is scoped to the end of this "try".
AutoSetRestore2<jrd_req*, thread_db> autoRequest(tdbb,
&thread_db::getRequest, &thread_db::setRequest, defaultRequest);
@ -5129,7 +5127,6 @@ static bool make_version(thread_db* tdbb, SSHORT phase, DeferredWork* work, jrd_
}
}
}
}
catch (const Exception&)
{
if (defaultRequest)

View File

@ -1227,17 +1227,15 @@ SINT64 DPM_gen_id(thread_db* tdbb, SLONG generator, bool initialize, SINT64 val)
* decided that the V6 engine would only access an ODS-10 database.
* (and uncommented 2000-05-05, also by ChrisJ, when minds changed.)
*/
SINT64* ptr = 0;
SLONG* lptr = 0;
if (dbb->dbb_ods_version >= ODS_VERSION12) {
ptr = ((SINT64 *) (page->gpg_values)) + offset;
}
else if (dbb->dbb_ods_version >= ODS_VERSION10) {
ptr = ((SINT64 *) (((old_gen_page*) page)->gpg_values)) + offset;
}
else {
SINT64* ptr = NULL;
SLONG* lptr = NULL;
if (dbb->dbb_ods_version >= ODS_VERSION12)
ptr = ((SINT64*) (page->gpg_values)) + offset;
else if (dbb->dbb_ods_version >= ODS_VERSION10)
ptr = ((SINT64*) (((old_gen_page*) page)->gpg_values)) + offset;
else
lptr = ((SLONG *) (((pointer_page*) page)->ppg_page)) + offset;
}
if (val || initialize)
{

View File

@ -263,4 +263,3 @@ public:
} //namespace Jrd
#endif /* JRD_VAL_H */

View File

@ -561,4 +561,3 @@ static void sanitize( TEXT* locale)
locale++;
}
}