From: <asf...@us...> - 2011-05-27 02:05:33
|
Revision: 53018 http://firebird.svn.sourceforge.net/firebird/?rev=53018&view=rev Author: asfernandes Date: 2011-05-27 02:05:27 +0000 (Fri, 27 May 2011) Log Message: ----------- Frontported changes of CORE-3491. Modified Paths: -------------- firebird/trunk/src/dsql/DdlNodes.epp firebird/trunk/src/dsql/DsqlCompilerScratch.cpp firebird/trunk/src/dsql/ddl.cpp firebird/trunk/src/dsql/dsql.h firebird/trunk/src/dsql/metd.epp firebird/trunk/src/dsql/parse.y Modified: firebird/trunk/src/dsql/DdlNodes.epp =================================================================== --- firebird/trunk/src/dsql/DdlNodes.epp 2011-05-27 02:00:41 UTC (rev 53017) +++ firebird/trunk/src/dsql/DdlNodes.epp 2011-05-27 02:05:27 UTC (rev 53018) @@ -754,8 +754,8 @@ notNull = legacyField->fld_not_nullable; fieldSource = legacyField->fld_source; - if (legacyField->fld_type_of_table) - typeOfTable = legacyField->fld_type_of_table->str_data; + if (legacyField->fld_type_of_table.hasData()) + typeOfTable = legacyField->fld_type_of_table.c_str(); typeOfName = legacyField->fld_type_of_name; } Modified: firebird/trunk/src/dsql/DsqlCompilerScratch.cpp =================================================================== --- firebird/trunk/src/dsql/DsqlCompilerScratch.cpp 2011-05-27 02:00:41 UTC (rev 53017) +++ firebird/trunk/src/dsql/DsqlCompilerScratch.cpp 2011-05-27 02:05:27 UTC (rev 53018) @@ -60,13 +60,13 @@ if (field->fld_type_of_name.hasData()) { - if (field->fld_type_of_table) + if (field->fld_type_of_table.hasData()) { if (field->fld_explicit_collation) { appendUChar(blr_column_name2); appendUChar(field->fld_full_domain ? blr_domain_full : blr_domain_type_of); - appendMetaString(field->fld_type_of_table->str_data); + appendMetaString(field->fld_type_of_table.c_str()); appendMetaString(field->fld_type_of_name.c_str()); appendUShort(field->fld_ttype); } @@ -74,7 +74,7 @@ { appendUChar(blr_column_name); appendUChar(field->fld_full_domain ? blr_domain_full : blr_domain_type_of); - appendMetaString(field->fld_type_of_table->str_data); + appendMetaString(field->fld_type_of_table.c_str()); appendMetaString(field->fld_type_of_name.c_str()); } } Modified: firebird/trunk/src/dsql/ddl.cpp =================================================================== --- firebird/trunk/src/dsql/ddl.cpp 2011-05-27 02:00:41 UTC (rev 53017) +++ firebird/trunk/src/dsql/ddl.cpp 2011-05-27 02:05:27 UTC (rev 53018) @@ -310,10 +310,10 @@ if (field->fld_type_of_name.hasData()) { - if (field->fld_type_of_table) + if (field->fld_type_of_table.hasData()) { dsql_rel* relation = METD_get_relation(dsqlScratch->getTransaction(), dsqlScratch, - field->fld_type_of_table->str_data); + field->fld_type_of_table.c_str()); const dsql_fld* fld = NULL; if (relation) @@ -345,7 +345,7 @@ // column @1 does not exist in table/view @2 post_607(Arg::Gds(isc_dyn_column_does_not_exist) << Arg::Str(field->fld_type_of_name) << - Arg::Str(field->fld_type_of_table->str_data)); + field->fld_type_of_table); } } else @@ -1929,7 +1929,7 @@ { dsqlScratch->appendString(isc_dyn_fld_source, field->fld_source); dsqlScratch->appendString(isc_dyn_fld_name, field->fld_type_of_name); - dsqlScratch->appendNullString(isc_dyn_rel_name, field->fld_type_of_table->str_data); + dsqlScratch->appendString(isc_dyn_rel_name, field->fld_type_of_table); } else dsqlScratch->appendString(isc_dyn_fld_source, field->fld_type_of_name); Modified: firebird/trunk/src/dsql/dsql.h =================================================================== --- firebird/trunk/src/dsql/dsql.h 2011-05-27 02:00:41 UTC (rev 53017) +++ firebird/trunk/src/dsql/dsql.h 2011-05-27 02:05:27 UTC (rev 53018) @@ -232,7 +232,7 @@ fld_collation_id(0), fld_ttype(0), fld_type_of_name(p), - fld_type_of_table(NULL), + fld_type_of_table(p), fld_explicit_collation(false), fld_not_nullable(false), fld_full_domain(false), @@ -263,7 +263,7 @@ SSHORT fld_collation_id; // ID of field's collation SSHORT fld_ttype; // ID of field's language_driver Firebird::string fld_type_of_name; // TYPE OF - dsql_str* fld_type_of_table; // TYPE OF table name + Firebird::string fld_type_of_table; // TYPE OF table name bool fld_explicit_collation; // COLLATE was explicit specified bool fld_not_nullable; // NOT NULL was explicit specified bool fld_full_domain; // Domain name without TYPE OF prefix Modified: firebird/trunk/src/dsql/metd.epp =================================================================== --- firebird/trunk/src/dsql/metd.epp 2011-05-27 02:00:41 UTC (rev 53017) +++ firebird/trunk/src/dsql/metd.epp 2011-05-27 02:05:27 UTC (rev 53018) @@ -1278,6 +1278,18 @@ if (FLD.RDB$FIELD_TYPE == blr_blob) parameter->fld_seg_length = FLD.RDB$SEGMENT_LENGTH; + if (!PR.RDB$FIELD_NAME.NULL) + { + fb_utils::exact_name(PR.RDB$FIELD_NAME); + parameter->fld_type_of_name = PR.RDB$FIELD_NAME; + } + + if (!PR.RDB$RELATION_NAME.NULL) + { + fb_utils::exact_name(PR.RDB$RELATION_NAME); + parameter->fld_type_of_table = PR.RDB$RELATION_NAME; + } + if (type == 0 && (!pr_default_value_null || (fb_utils::implicit_domain(FLD.RDB$FIELD_NAME) && !FLD.RDB$DEFAULT_VALUE.NULL))) Modified: firebird/trunk/src/dsql/parse.y =================================================================== --- firebird/trunk/src/dsql/parse.y 2011-05-27 02:00:41 UTC (rev 53017) +++ firebird/trunk/src/dsql/parse.y 2011-05-27 02:05:27 UTC (rev 53018) @@ -1826,7 +1826,7 @@ | KW_TYPE OF COLUMN symbol_column_name '.' symbol_column_name { lex.g_field = make_field(NULL); - lex.g_field->fld_type_of_table = ((dsql_str*) $4); + lex.g_field->fld_type_of_table = ((dsql_str*) $4)->str_data; lex.g_field->fld_type_of_name = ((dsql_str*) $6)->str_data; $$ = lex.g_field; } @@ -3509,7 +3509,7 @@ | KW_TYPE OF COLUMN symbol_column_name '.' symbol_column_name { lex.g_field->fld_type_of_name = ((dsql_str*) $6)->str_data; - lex.g_field->fld_type_of_table = ((dsql_str*) $4); + lex.g_field->fld_type_of_table = ((dsql_str*) $4)->str_data; } | symbol_column_name { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |