/* BEGIN mrds_dbcb.incl.pl1 -- jaw, 11/7/78 */ /****^ HISTORY COMMENTS: 1) change(85-11-17,Dupuis), approve(85-12-16,MCR7314), audit(86-02-04,Brunelle), install(86-02-05,MR12.0-1013): This entry is being made to cover the change made on 85-07-01 by Thanh Nguyen. The scopes_changed flag was added to make checking for this more efficient (mrds error list #137). 2) change(86-06-10,Blair), approve(86-08-07,MCR7491), audit(86-08-07,Gilcrease), install(86-08-15,MR12.0-1127): Add a bit called dont_check_txn_id to indicate whether or not we should care if multiple txns use the same selection_expression. (mrds #156) 3) change(87-11-23,Hergert), approve(88-06-28,MCR7903), audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): Added parser_work_area_ptr and mrds_se_info_ptr for new parser. END HISTORY COMMENTS */ /* WARNING If the dbcb structure is changed then the mrds_data_ item saved_res_version MUST be incremented to invalidate all existing saved resultants */ /* HISTORY : modified by Jim Gray - - 80-10-24, to add new_select_expr bit for tid_list management 81-1-9 Jim Gray : added like reference for ease in making the phony resultant in mu_database_index, without having the area dcl included. 81-06-17 Roger Lackey : added last_store_rel_name for use by mrds_dsl_store 81-06-26 Roger Lackey : Added no_optimize and print_search_order switches 81-07-06 Jim Gray : added identifier for the current selection expression, so that relation statistics can be updated relative to number of selection expressions seem. Also removed init for last_store_rel_name, as this iw now properly done in mrds_dsl_init_res. 81-07-17 Roger Lackey : added pred_ptr and unused_ptrs. 82-08-19 Mike Kubicar : added store_vector field. This is needed for the conversion to the relation manager. 82-08-23 Davids: added the relmgr_entries and access_costs substructures so that the entries and costs can change depending on the type of database that is opened. 82-09-09 Mike Kubicar : added modify_vector field. This is needed since modify uses a different vector type (general) than does store. 82-09-20 Davids: changed names of (store modify)_vector to (store modify)_vector_ptr. Also (delete modify)_tuple_by_id to (delete modify)_tuples_by_id. added the element cursor_storage_ptr which should be inited to null and will be set by mu_cursor_manager_$get during the first call. 82-09-21 Davids: renamed cursor_storage_ptr to cursor_ptrs_storage_ptr since it deals with the pointers to the cursors and not the cursors themelves and added the element cursor_storage_area_ptr which points to the area where the cursors are kept. 82-09-22 Davids: renamed the transact_ctl_seg to transactions_needed. the transact_ctl_seg always had a value of 0 and really didn't mean anything. 82-09-22 Mike Kubicar : added create_relation, create_index and destroy_relation_by_opening to relmgr_entries. They are needed by mrds_dsl_define_temp_rel. 82-09-24 Donna Woodka : added put_tuple to relmgr_entries. It is needed by mu_store. 82-11-12 Davids: changed the declaration of the access_costs from fixed bin to float bin since the values are not integers. 83-02-02 Davids: added the dbc_uid element. This will allow mrds to make sure that the dbc_ptr still points to the correct segment. Element was added to the end of the structure to allow modules that don't use the element to continue to reference the dbcb structure without recompiling. 83-02-25 Davids: added the concurrency_on and rollback_on elements. These are needed so that temp rels can be created with the same file attributes as the permanent relations. 83-05-02 Mike Kubicar : Deleted get_next_search_specification_ptr and added the resultant_in_pdir bit. 83-05-18 Davids: reduced the number of reserved bits to 14 (from 15) and added the res_already_made element. 83-05-24 Mike Kubicar : Updated the relation manager calling sequences. 83-08-03 Mike Kubicar : Added the element_id_list_segment_ptr and removed one of the unused pointers. 83-09-20 Ron Harvey: Added relmgr_entries.get_population. 84-08-27 John Hergert: Created compiled_se_info_ptr from unused_ptrs(2) leaving unused_ptrs(1). 85-01-15 Thanh Nguyen: Added the work_area_ptr and removed the last unused_ptrs (1). 85-04-12 Thanh Nguyen: Added user_started_transaction and non_shared_to_shared flags. Also added se_transaction_id and some more spare ptrs, entries and reserved storages for future enhancement, since we changed the saved_res_version from rslt0001 to rslt0002. 85-07-01 Thanh Nguyen: Added scopes_changed flag. This flag is set by common routine of mrds_dsl_set_scope, reset by mrds_dsl_optimize and mrds_dsl_gen_srch_prog when building of a new search_vars. */ /* this structure is based on the {unique_name}.mrds.dbcb segment that constitutes the non-secure portion of the resultant model that is created during the opening of a database. it contains variables that are used during the runtime access of the database, and an area for evaluation of requests. it points to four other segments in the resultant model, {unique_name}.mrds.rdbi, the secure portion of the resultant(see mdbm_rm_db_info.incl.pl1), {unique_name}.mrds.select, an area for selection expression evaluation, {unique_name}.mrds.curdat, and {unique_name}.mrds.stadat, two segments used in the elimination of duplicate tuples during a retrieve. the dbcb area holds the structure in mdbm_scope_info.incl.pl1 that is used when the database is using the file scope mechanism for concurrency control over file readying. the segment overlayed via mrds_dbc.incl.pl1 structure is pointed to and also handles concurrency control, across database openings. the pointer to this dbcb structure is kept in a table which associates database indexes(returned from a call to dsl_$open), with particular opening instances of resultant models. (see mu_database_index routine) */ dcl 1 dbcb aligned based (dbcb_ptr), /* DBCB -- non-secure portion */ 2 data like dbcb_data, 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (dbcb.static_area)))); dcl dbcb_ptr ptr; declare 1 dbcb_data based, /* info part of dbcb, separated out so that like references can avoid getting the area declaration */ 2 rdbi_ptr ptr, /* pointer to write protected mdbm_util_ info. */ 2 range_ptr ptr, /* ptr to range structure, or null */ 2 select_ptr ptr, /* ptr to select list, or null */ 2 sv_ptr ptr, /* pointer to search variables */ 2 so_ptr ptr, /* pointer to search operators */ 2 ti_ptr ptr, /* pointer to tuple info */ 2 lit_ptr ptr, /* pointer to the literal area, or null */ 2 current_ptr ptr, /* ptr to select list resulting from -current clause */ 2 ss_ptr ptr, /* ptr to select sets block if not simple s.e. */ 2 retr_info_ptr ptr, /* ptr to retrieve info area */ 2 trel_info_ptr ptr, /* ptr to retrieve info area */ 2 sti_ptr ptr, /* pointer to store info */ 2 dbc_ptr ptr, /* pointer to the data base control segment */ 2 sfi_ptr ptr, /* points to head of scalar function list */ 2 scope_ptr ptr, /* points to array of scope tuples */ 2 select_area_ptr ptr, /* ptr to area for current selection expression allocations */ 2 current_data_ptr ptr, /* ptr to one of 2 segments used by mrds_dsl_retrieve for eliminating duplicate tuples. */ 2 static_data_ptr ptr, /* ptr to one of 2 segments used by mrds_dsl_retrieve for eliminating duplicate tuples. */ 2 store_area_ptr ptr, /* temp storage area for dsl_$store */ 2 retrieve_area_ptr ptr, /* temp storage for dsl_$retrieve */ 2 modify_area_ptr ptr, /* temp storage area for dsl_$modify */ 2 delete_area_ptr ptr, /* temp storage area for dsl_$delete */ 2 def_temp_rel_area_ptr ptr, /* temp storage area for dsl_$define_temp_rel */ 2 pred_ptr ptr, /* Pointer to pred_array */ 2 store_vector_ptr ptr, /* Vector structure used during store operations */ 2 modify_vector_ptr ptr, /* Used during modifies */ 2 element_id_list_segment_ptr ptr, /* Points to the segment used to hold element_id_list structures */ 2 compiled_se_info_ptr ptr, /* points to the segment containing all info on compiled sexs */ 2 work_area_ptr ptr, /* Work area for encode/decode value allocations in mu_retrieve */ 2 se_info_ptr ptr, /* Points to se_info struct. Primarily for error reports */ 2 parser_work_area_ptr ptr, /* work area for parser */ 2 reserved_ptrs (4) ptr, /* Reserved for future use */ 2 another_flag bit (1) unal, /* on if predicate was -another */ 2 current_flag bit (1) unal, /* on if predicate was -current clause */ 2 dbc_incr bit (1) unal, /* on if dbc open mode has been incremented for this user */ 2 delete_flag bit (1) unal, /* On if search was called from mrds_dsl_sec_delete */ 2 dup_retain bit (1) unaligned, /* On if dup tuples allowed for retrieval */ 2 prev_select bit (1) unal, /* on if prev. select block processed in this s.e. */ 2 possible_op bit (1) unal, /* on of arith op. allowed */ 2 sel_clause bit (1) unal, /* on if currently in select clause */ 2 dsm_sw bit (1) unal, /* on if data base was opened via data submodel */ 2 val_rtrv bit (1) unal, /* if s.e. valid for retrieve */ 2 val_mod bit (1) unal, /* for modify */ 2 val_del bit (1) unal, /* for delete */ 2 val_dtr bit (1) unal, /* for define temp rel */ 2 transactions_needed bit (1) unal, /* On => transaction must be started or in progress does not imply that the database is of type page_file */ 2 open_mode bit (3) unal, /* 0=>unknown, 1=>r, 2=>u, 3=>er, 4=>eu, >4=>bad */ 2 new_select_expr bit (1) unal, /* on => starting a new tid list management period */ 2 no_optimize bit (1) unal, /* On => no optimize */ 2 print_search_order bit (1) unal, /* On => print the search order */ 2 resultant_in_pdir bit (1) unal, /* On => Temp segments are in the process dir */ 2 res_already_made bit (1) unal, /* On => resultant has been made based on a saved copy */ 2 user_started_transaction bit (1) unal, /* On => user already started his own transaction. */ 2 non_shared_to_shared bit (1) unal, /* On => user changed the scope from non shared to shared inside a sequence of -another selection expression. */ 2 scopes_changed bit (1) unal, /* On => scopes had been changed by set_scopes or delete_scopes */ 2 dont_check_txn_id bit (1) unal, /* On => cpmd needs same selection exp across multiple txns */ 2 reserved bit (10) unal, /* reserved for future use */ 2 nseq_sch fixed bin (35), /* no. tuples located via sequential search */ 2 nind_sch fixed bin (35), /* no. tuples located via index search */ 2 nhash_sch fixed bin (35), /* no. tuples located via hash search */ 2 nlk_sch fixed bin (35), /* no tuples located via link search */ 2 cur_lit_offset fixed bin (35), /* current bit offset in literal string */ 2 dbi fixed bin (35), /* database index for this opening */ 2 last_s_e_id_num fixed bin (35), /* identifying number for last selection expression seen */ 2 se_transaction_id bit (36) aligned, /* transaction id from beginning of select expression */ 2 last_store_rel_name char (32), /* Name of relation last used for store */ 2 cursor_ptrs_storage_ptr ptr, /* pointer to space where cursor ptrs are stored */ 2 cursor_storage_area_ptr ptr, /* pointer to area where the cursors are kept */ 2 reserved_words (10) fixed bin (35), /* Reserved for future use */ 2 relmgr_entries, /* relation manager entries */ 3 open entry (char (*), char (*), bit (36) aligned, fixed bin (35)), 3 close entry (bit (36) aligned, fixed bin (35)), 3 create_cursor entry (bit (36) aligned, ptr, ptr, fixed bin (35)), 3 destroy_cursor entry (ptr, ptr, fixed bin (35)), 3 set_scope entry (bit (36) aligned, bit (2) aligned, bit (2) aligned, fixed bin (35)), 3 delete_tuples_by_id entry (ptr, ptr, fixed bin (35), fixed bin (35)), 3 modify_tuples_by_id entry (ptr, ptr, ptr, fixed bin (35), fixed bin (35)), 3 get_tuple_by_id entry (ptr, bit (36) aligned, ptr, ptr, ptr, fixed bin (35)), 3 get_tuples_by_spec entry (ptr, ptr, ptr, ptr, ptr, fixed bin (35)), 3 get_tuple_id entry (ptr, ptr, ptr, ptr, fixed bin (35)), 3 put_tuple entry (ptr, ptr, bit (36) aligned, fixed bin (35)), 3 get_count entry (ptr, ptr, fixed bin (35), fixed bin (35)), 3 get_duplicate_key_count entry (ptr, bit (36) aligned, fixed bin (17), fixed bin (35), fixed bin (35)), 3 get_population entry (ptr, fixed bin (35), fixed bin (35)), 3 create_relation entry (char (*), char (*), ptr, ptr, bit (36) aligned, bit (36) aligned, fixed bin (35)), 3 create_index entry (bit (36) aligned, ptr, bit (36) aligned, fixed bin (17), bit (36) aligned, fixed bin (35)), 3 destroy_relation_by_path entry (char (*), char (*), fixed bin (35)), 3 reserved_entries (5) entry (), 2 access_costs, /* access costs for permute */ 3 total_primary_key_cost float bin, 3 access_cost float bin, 3 access_overhead float bin, 3 us_access_cost float bin, 3 os_access_cost float bin, 2 dbc_uid bit (36) aligned, /* uid of the segment containing the dbc structure */ 2 concurrency_on bit (1) unal, /* "1"b implies dmfile concurrency is being used */ 2 rollback_on bit (1) unal; /* "1"b iomplies before journaling is to be done */ /* END mrds_dbcb.incl.pl1 */ */ ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group Bull including Bull HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell Bull Inc., Groupe Bull and Bull HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, Bull or Bull HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by Bull HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved */