Skip to content

Commit ac94102

Browse files
author
Alexander Zhdanov
committed
Increase ODS version for FB 6.0
1 parent cabcf28 commit ac94102

File tree

10 files changed

+31
-28
lines changed

10 files changed

+31
-28
lines changed

src/burp/OdsDetection.epp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace
4545
{"RDB$ROLES", 0, DB_VERSION_DDL9}, // IB5
4646
{"RDB$PACKAGES", 0, DB_VERSION_DDL12}, // FB3
4747
{"RDB$PUBLICATIONS", 0, DB_VERSION_DDL13}, // FB4
48-
{"RDB$TABLESPACES", 0, DB_VERSION_DDL13},
48+
{"RDB$TABLESPACES", 0, DB_VERSION_DDL14}, // FB6
4949
{0, 0, 0}
5050
};
5151

src/burp/OdsDetection.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const int DB_VERSION_DDL11_2 = 112; // ods11.2 db, FB2.5
6969
const int DB_VERSION_DDL12 = 120; // ods12.0 db, FB3.0
7070
const int DB_VERSION_DDL13 = 130; // ods13.0 db, FB4.0
7171
const int DB_VERSION_DDL13_1 = 131; // ods13.1 db, FB5.0
72+
const int DB_VERSION_DDL14 = 140; // ods14.0 db, FB6.0
7273

7374
const int DB_VERSION_OLDEST_SUPPORTED = DB_VERSION_DDL8; // IB4.0 is ods8
7475

src/burp/backup.epp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ int BACKUP_backup(const TEXT* dbb_file, const TEXT* file_name)
403403
write_packages();
404404
}
405405

406-
if (tdgbl->runtimeODS >= DB_VERSION_DDL13)
406+
if (tdgbl->runtimeODS >= DB_VERSION_DDL14)
407407
{
408408
// Write tablespaces
409409
BURP_verbose(411); // msg 411 writing tablespaces
@@ -1695,6 +1695,7 @@ void put_index( burp_rel* relation)
16951695
if (!X.RDB$FOREIGN_KEY.NULL)
16961696
PUT_TEXT (att_index_foreign_key, X.RDB$FOREIGN_KEY);
16971697

1698+
// ODS 14
16981699
if (!X.RDB$TABLESPACE_NAME.NULL)
16991700
PUT_TEXT (att_index_tablespace_name, X.RDB$TABLESPACE_NAME);
17001701

@@ -1775,7 +1776,8 @@ void put_index( burp_rel* relation)
17751776
if (!X.RDB$FOREIGN_KEY.NULL)
17761777
PUT_TEXT (att_index_foreign_key, X.RDB$FOREIGN_KEY);
17771778

1778-
if (!X.RDB$TABLESPACE_NAME.NULL) // For old versions I expect it will be NULL here. Right?
1779+
// ODS 14
1780+
if (!X.RDB$TABLESPACE_NAME.NULL) // For old versions I expect it will be NULL here.
17791781
PUT_TEXT (att_index_tablespace_name, X.RDB$TABLESPACE_NAME);
17801782

17811783
put(tdgbl, att_end);

src/burp/burp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Version 11: FB4.0.
209209
SQL SECURITY feature, tables RDB$PUBLICATIONS/RDB$PUBLICATION_TABLES.
210210
*/
211211

212-
const int ATT_BACKUP_FORMAT = 12;
212+
const int ATT_BACKUP_FORMAT = 13;
213213

214214
// max array dimension
215215

src/burp/restore.epp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6927,7 +6927,7 @@ bool get_tablespace(BurpGlobals* tdgbl)
69276927
SSHORT len;
69286928
scan_attr_t scan_next_attr;
69296929

6930-
if (tdgbl->RESTORE_format < 12) // Probably this check is not needed
6930+
if (tdgbl->RESTORE_format < 13) // Probably this check is not needed
69316931
return false;
69326932

69336933
// Firebird::ITransaction* local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans;

src/isql/extract.epp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3631,7 +3631,7 @@ static void list_tablespaces()
36313631
*
36323632
**************************************/
36333633

3634-
if (isqlGlob.major_ods < ODS_VERSION13)
3634+
if (isqlGlob.major_ods < ODS_VERSION14)
36353635
return;
36363636

36373637
bool first = true;

src/isql/show.epp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3587,7 +3587,7 @@ static processing_state show_comments(const commentMode showextract, const char*
35873587
END_ERROR
35883588
}
35893589

3590-
if (isqlGlob.major_ods >= ODS_VERSION13)
3590+
if (isqlGlob.major_ods >= ODS_VERSION14)
35913591
{
35923592
FOR TS IN RDB$TABLESPACES
35933593
WITH TS.RDB$DESCRIPTION NOT MISSING
@@ -5092,7 +5092,7 @@ static processing_state show_tablespaces(const SCHAR* tablespace_name)
50925092
* Functional description
50935093
* Show all tablespaces or the named tablespace
50945094
************************************/
5095-
if (isqlGlob.major_ods < ODS_VERSION13)
5095+
if (isqlGlob.major_ods < ODS_VERSION14)
50965096
return OBJECT_NOT_FOUND;
50975097

50985098
bool first = true;

src/jrd/fields.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@
235235

236236
FIELD(fld_par_workers , nam_par_workers , dtype_long , sizeof(SLONG) , 0 , NULL , true , ODS_13_1)
237237

238-
FIELD(fld_ts_id , nam_ts_id , dtype_long , sizeof(SLONG) , 0 , NULL , true , ODS_13_0)
239-
FIELD(fld_ts_name , nam_ts_name , dtype_text , MAX_SQL_IDENTIFIER_LEN , dsc_text_type_metadata , NULL , true , ODS_13_0)
238+
FIELD(fld_ts_id , nam_ts_id , dtype_long , sizeof(SLONG) , 0 , NULL , true , ODS_14_0)
239+
FIELD(fld_ts_name , nam_ts_name , dtype_text , MAX_SQL_IDENTIFIER_LEN , dsc_text_type_metadata , NULL , true , ODS_14_0)
240240

241-
FIELD(fld_pp_number , nam_pp_number , dtype_long , sizeof(SLONG) , 0 , NULL , true , ODS_13_0)
242-
FIELD(fld_idx_number , nam_idx_number , dtype_long , sizeof(SLONG) , 0 , NULL , true , ODS_13_0)
241+
FIELD(fld_pp_number , nam_pp_number , dtype_long , sizeof(SLONG) , 0 , NULL , true , ODS_14_0)
242+
FIELD(fld_idx_number , nam_idx_number , dtype_long , sizeof(SLONG) , 0 , NULL , true , ODS_14_0)
243243

src/jrd/relations.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ RELATION(nam_indices, rel_indices, ODS_8_0, rel_persistent)
9999
FIELD(f_idx_exp_blr, nam_exp_blr, fld_value, 1, ODS_8_0)
100100
FIELD(f_idx_exp_source, nam_exp_source, fld_source, 1, ODS_8_0)
101101
FIELD(f_idx_statistics, nam_statistics, fld_statistics, 1, ODS_8_0)
102-
FIELD(f_idx_ts_name, nam_ts_name, fld_ts_name, 1, ODS_13_0)
102+
FIELD(f_idx_ts_name, nam_ts_name, fld_ts_name, 1, ODS_14_0)
103103
FIELD(f_idx_cond_blr, nam_cond_blr, fld_value, 1, ODS_13_1)
104104
FIELD(f_idx_cond_source, nam_cond_source, fld_source, 1, ODS_13_1)
105105
END_RELATION
@@ -127,7 +127,7 @@ RELATION(nam_r_fields, rel_rfr, ODS_8_0, rel_persistent)
127127
FIELD(f_rfr_coll_id, nam_collate_id, fld_collate_id, 1, ODS_8_0)
128128
FIELD(f_rfr_gen_name, nam_gen_name, fld_gen_name, 1, ODS_12_0)
129129
FIELD(f_rfr_identity_type, nam_identity_type, fld_identity_type, 1, ODS_12_0)
130-
FIELD(f_rfr_ts_name, nam_ts_name, fld_ts_name, 1, ODS_13_0)
130+
FIELD(f_rfr_ts_name, nam_ts_name, fld_ts_name, 1, ODS_14_0)
131131
END_RELATION
132132

133133
// Relation 6 (RDB$RELATIONS)
@@ -150,9 +150,9 @@ RELATION(nam_relations, rel_relations, ODS_8_0, rel_persistent)
150150
FIELD(f_rel_flags, nam_flags, fld_flag_nullable, 0, ODS_8_0)
151151
FIELD(f_rel_type, nam_r_type, fld_r_type, 0, ODS_11_1)
152152
FIELD(f_rel_sql_security, nam_sql_security, fld_b_sql_security, 1, ODS_13_0)
153-
FIELD(f_rel_ts_name, nam_ts_name, fld_ts_name, 1, ODS_13_0)
154-
FIELD(f_rel_first_pp, nam_pp_number, fld_pp_number, 0, ODS_13_0)
155-
FIELD(f_rel_idx_root, nam_idx_number, fld_idx_number, 0, ODS_13_0)
153+
FIELD(f_rel_ts_name, nam_ts_name, fld_ts_name, 1, ODS_14_0)
154+
FIELD(f_rel_first_pp, nam_pp_number, fld_pp_number, 0, ODS_14_0)
155+
FIELD(f_rel_idx_root, nam_idx_number, fld_idx_number, 0, ODS_14_0)
156156
END_RELATION
157157

158158
// Relation 7 (RDB$VIEW_RELATIONS)
@@ -765,14 +765,14 @@ RELATION(nam_mon_compiled_statements, rel_mon_compiled_statements, ODS_13_1, rel
765765
END_RELATION
766766

767767
// Relation 56 (RDB$TABLESPACES)
768-
RELATION(nam_tablespaces, rel_tablespaces, ODS_13_0, rel_persistent)
769-
FIELD(f_ts_id, nam_ts_id, fld_ts_id, 0, ODS_13_0)
770-
FIELD(f_ts_name, nam_ts_name, fld_ts_name, 1, ODS_13_0)
771-
FIELD(f_ts_class, nam_class, fld_class, 1, ODS_13_0)
772-
FIELD(f_ts_sys_flag, nam_sys_flag, fld_flag, 1, ODS_13_0)
773-
FIELD(f_ts_desc, nam_description, fld_description, 1, ODS_13_0)
774-
FIELD(f_ts_owner, nam_owner, fld_user, 1, ODS_13_0)
775-
FIELD(f_ts_file, nam_file_name, fld_file_name, 1, ODS_13_0)
776-
FIELD(f_ts_offline, nam_ts_offline, fld_bool, 1, ODS_13_0)
777-
FIELD(f_ts_readonly, nam_ts_readonly, fld_bool, 1, ODS_13_0)
768+
RELATION(nam_tablespaces, rel_tablespaces, ODS_14_0, rel_persistent)
769+
FIELD(f_ts_id, nam_ts_id, fld_ts_id, 0, ODS_14_0)
770+
FIELD(f_ts_name, nam_ts_name, fld_ts_name, 1, ODS_14_0)
771+
FIELD(f_ts_class, nam_class, fld_class, 1, ODS_14_0)
772+
FIELD(f_ts_sys_flag, nam_sys_flag, fld_flag, 1, ODS_14_0)
773+
FIELD(f_ts_desc, nam_description, fld_description, 1, ODS_14_0)
774+
FIELD(f_ts_owner, nam_owner, fld_user, 1, ODS_14_0)
775+
FIELD(f_ts_file, nam_file_name, fld_file_name, 1, ODS_14_0)
776+
FIELD(f_ts_offline, nam_ts_offline, fld_bool, 1, ODS_14_0)
777+
FIELD(f_ts_readonly, nam_ts_readonly, fld_bool, 1, ODS_14_0)
778778
END_RELATION

src/jrd/trig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static const Jrd::gen generators[] =
8282
{ "RDB$BACKUP_HISTORY", 9, "Nbackup technology", ODS_13_0 },
8383
{ FUNCTIONS_GENERATOR, 10, "Function ID", ODS_13_0 },
8484
{ "RDB$GENERATOR_NAME", 11, "Implicit generator name", ODS_13_0 },
85-
{ "RDB$TABLESPACES", 12, "Tablespace ID", ODS_13_0 },
85+
{ "RDB$TABLESPACES", 12, "Tablespace ID", ODS_14_0 },
8686
{ nullptr, 0, nullptr, 0 }
8787
};
8888

0 commit comments

Comments
 (0)