COMPILATION LISTING OF SEGMENT rmdb_rq_create_index Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 10/16/86 1349.1 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 rmdb_rq_create_index: proc (sci_ptr, info_ptr); 7 8 /* 9* . BEGIN_DESCRIPTION 10* This procedure implements the create_index request of the 11* restructure_mrds_db subsystem. It verifies that the correct 12* number of arguments have been supplied and that a data base has 13* been readied for restructuring. It does not verify that the 14* arguments supplied are actually a relation and attribute in the 15* database, that is left to the rmdb_create_index procedure which 16* is called to do the actual index creation. 17* 18* It also checks to be sure that the database is consistent. If the 19* database is marked as inconsistent it will query the user for 20* execution of the undo request. If the request is ok the database 21* will be consistent so the index creation will be done, else it 22* won't be. 23* . END_DESCRIPTION 24* 25* Known Bugs: 26* 27* Other Problems: 28* 29* . HISTORY 30* 82-03-31 Davids: Written 31* 32* 82-05-26 Davids: added code to check consistency of db and call 33* . rmdb_execute_undo its inconsistent. Also changed 34* . calling sequence of rmdb_create_index to include 35* . the db_model_ptr. 36* 37* 82-07-01 Roger Lackey : Modified the calls to mu_db_inconsistent to use 38* mdbm_util_$inconsistent_* for binding. 39* 40**/ 41 42 /* PARAMETERS */ 43 44 dcl sci_ptr ptr; /* (input) pointer to the subsystem control info structure */ 45 /* need to be able to pass it to the ssu routines */ 46 dcl info_ptr ptr; /* (input) pointer to the rmdb_ctl structure which is */ 47 /* read only */ 48 49 /* EXTERNAL STATIC */ 50 51 dcl error_table_$action_not_performed fixed bin (35) external static; 52 dcl error_table_$badcall fixed bin (35) external static; 53 54 /* ENTRIES */ 55 56 dcl mdbm_util_$inconsistent_get_info entry (ptr, bit (1), char (*), char (*), char (*)); 57 dcl ssu_$abort_line entry options (variable); 58 dcl ssu_$arg_count entry (ptr, fixed bin); 59 dcl ssu_$arg_ptr entry (ptr, fixed bin, ptr, fixed bin (21)); 60 dcl rmdb_create_index entry (ptr, char (168), ptr, char (*), char (*), char (500), fixed bin (35)); 61 dcl rmdb_execute_undo entry (ptr, char (32), char (168), ptr, char (32), char (100)); 62 63 /* INTERNAL AUTOMATIC */ 64 65 dcl attr_name_len fixed bin (21); /* length of the attribute name argument */ 66 dcl attr_name_ptr ptr; /* pointer to the attribute name argument */ 67 dcl code fixed bin (35); /* standard error code */ 68 dcl error_message char (500); /* error message returned from rmdb_create_index */ 69 dcl incon_name char (32); /* name of the request that caused 70* the database to be inconsistent */ 71 dcl incon_value bit (1); /* true ==> the database is inconsistent */ 72 dcl nargs fixed bin; /* number of arguments the request was called with */ 73 dcl rel_name_len fixed bin (21); /* length of the relation name argument */ 74 dcl rel_name_ptr ptr; /* pointer to the relation name argument */ 75 dcl undo_request char (100); /* rmdb request that will cause the db to become consistent */ 76 dcl unused2 char (200); /* output from mdbm_util_$inconsistent_get_info */ 77 78 /* BASED */ 79 80 dcl attr_name char (attr_name_len) based (attr_name_ptr); /* name of attribute to be indexed */ 81 dcl rel_name char (rel_name_len) based (rel_name_ptr); /* name of relation which 82* contains the attribute */ 83 84 /* INCLUDES */ 85 1 1 /* BEGIN - mrds_rmdb_ctl.incl.pl1 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(82-03-26,Davids), approve(), audit(), install(): 1 7* created 1 8* 2) change(82-05-26,Davids), approve(), audit(), install(): 1 9* added db_model_ptr 1 10* 3) change(82-06-09,Harvey), approve(), audit(), install(): 1 11* deleted ssu_ routines ptr storage 1 12* 4) change(82-08-20,Davids), approve(), audit(), install(): 1 13* added the relmgr like reference and included the rmdb_relmgr_entries 1 14* include file 1 15* 5) change(83-05-24,Davids), approve(), audit(), install(): 1 16* added the saved_res_version_ptr element 1 17* 6) change(84-10-23,Benjamin), approve(), audit(), install(): 1 18* added flags (just database_readied_by_rmdb for now). 1 19* 7) change(85-11-08,Spitzer), approve(85-11-08,MCR7311), 1 20* audit(86-09-02,Blair), install(86-10-16,MR12.0-1187): 1 21* added crossref_file_info. 1 22* END HISTORY COMMENTS */ 1 23 1 24 1 25 dcl 01 rmdb_ctl based (rmdb_ctl_ptr), 1 26 02 version fixed bin, 1 27 02 rmdb_version char (16) varying, 1 28 02 absolute_db_path char (168), 1 29 02 temp_dir_path char (168), 1 30 02 work_area_ptr ptr, 1 31 02 db_model_ptr ptr, 1 32 02 saved_res_version_ptr ptr, 1 33 02 crossref_file_info, 1 34 03 iocb_ptr ptr, 1 35 03 name char (32), 1 36 02 relmgr_entries like rmdb_relmgr_entries, 1 37 02 flags, 1 38 03 database_readied_by_rmdb bit (1) unal, 1 39 03 unused bit (35) unal; 1 40 1 41 dcl RMDB_CTL_VERSION_1 fixed bin init (1) internal static options (constant); 1 42 1 43 dcl rmdb_ctl_ptr ptr; 1 44 1 45 2 1 /* START OF: rmdb_relmgr_entries.incl.pl1 * * * * * * * * * * * * * * * * */ 2 2 2 3 2 4 /****^ HISTORY COMMENTS: 2 5* 1) change(82-08-20,Davids), approve(), audit(), install(): 2 6* written 2 7* 2) change(86-01-28,Spitzer), approve(86-01-28,MCR7311), 2 8* audit(86-09-15,Gilcrease), install(86-10-16,MR12.0-1187): 2 9* add get_tuples_by_spec, put_tuple, put_tuples, create_cursor entry points. 2 10* 3) change(86-08-21,Blair), approve(86-08-21,MCR7311), 2 11* audit(86-09-15,Gilcrease), install(86-10-16,MR12.0-1187): 2 12* Back out the entries get_tuples_by_spec and put_tuples since they aren't 2 13* sufficiently well tested to be reliable. Replace with get_tuple_id and 2 14* get_tuple_by_id. 2 15* END HISTORY COMMENTS */ 2 16 2 17 2 18 dcl 01 rmdb_relmgr_entries based (rmdb_relmgr_entries_ptr), 2 19 02 create_relation entry (char (*), char (*), ptr, ptr, bit (36) aligned, 2 20 bit (36) aligned, fixed bin (35)), 2 21 02 delete_relation entry (char (*), char (*), fixed bin (35)), 2 22 02 open entry (char (*), char (*), bit (36) aligned, fixed bin (35)), 2 23 02 close entry (bit (36) aligned, fixed bin (35)), 2 24 02 create_index entry (bit (36) aligned, ptr, bit (36) aligned, fixed bin (17), 2 25 bit (36) aligned, fixed bin (35)), 2 26 02 delete_index entry (bit (36) aligned, bit (36) aligned, fixed bin (35)), 2 27 02 put_tuple entry (ptr, ptr, bit (36) aligned, fixed bin (35)), 2 28 02 get_tuple_id entry (ptr, ptr, ptr, ptr, fixed bin (35)), 2 29 02 get_tuple_by_id entry (ptr, bit (36) aligned, ptr, ptr, ptr, fixed bin (35)), 2 30 02 create_cursor entry (bit (36) aligned, ptr, ptr, fixed bin (35)); 2 31 2 32 dcl rmdb_relmgr_entries_ptr ptr; 2 33 2 34 /* END OF: rmdb_relmgr_entries.incl.pl1 * * * * * * * * * * * * * * * * */ 1 46 1 47 1 48 1 49 /* END - mrds_rmdb_ctl.incl.pl1 */ 86 87 88 /* 89* Assign initial values 90**/ 91 92 rmdb_ctl_ptr = info_ptr; 93 94 95 96 97 98 /* 99* Determine the number of arguments that this request was called 100* with. Two arguments are required the relation name and the 101* attribute name. 102* 103* If two arguments are not supplied issue an error. Note that abort 104* line does not return. 105**/ 106 107 call ssu_$arg_count (sci_ptr, nargs); 108 if nargs ^= 2 109 then call ssu_$abort_line (sci_ptr, error_table_$badcall, 110 "^/Usage:^/^-create_index relation_name attribute_name^/"); 111 112 113 114 115 116 /* 117* If the absolute_db_path element of the rmdb_ctl structure is null 118* it means that no data base is currently readied for 119* restructuring. This is an error. 120**/ 121 122 if rmdb_ctl.absolute_db_path = "" 123 then call ssu_$abort_line (sci_ptr, error_table_$action_not_performed, 124 "^/There is no currently readied database"); 125 126 /* 127* If the database is inconsistent it must be made consistent before 128* the index can be created. Note that if for some reason the 129* database is not made consistent rmdb_execute_undo will not return 130* it will either cause a request line or subsystem abort. 131**/ 132 133 call mdbm_util_$inconsistent_get_info (rmdb_ctl.db_model_ptr, incon_value, incon_name, unused2, undo_request); 134 if incon_value 135 then call rmdb_execute_undo (sci_ptr, "create_index", rmdb_ctl.absolute_db_path, 136 rmdb_ctl.db_model_ptr, incon_name, undo_request); 137 138 139 140 141 /* 142* Get the relation name and attribute name arguments. 143**/ 144 145 call ssu_$arg_ptr (sci_ptr, 1, rel_name_ptr, rel_name_len); 146 call ssu_$arg_ptr (sci_ptr, 2, attr_name_ptr, attr_name_len); 147 148 149 150 151 152 /* 153* Do the actual index creation 154**/ 155 156 call rmdb_create_index (rmdb_ctl_ptr, rmdb_ctl.absolute_db_path, rmdb_ctl.db_model_ptr, rel_name, attr_name, 157 error_message, code); 158 if code ^= 0 159 then call ssu_$abort_line (sci_ptr, code, error_message); 160 161 162 163 164 165 166 return; 167 168 169 end rmdb_rq_create_index; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/16/86 1144.2 rmdb_rq_create_index.pl1 >special_ldd>install>MR12.0-1187>rmdb_rq_create_index.pl1 86 1 10/16/86 1139.6 mrds_rmdb_ctl.incl.pl1 >special_ldd>install>MR12.0-1187>mrds_rmdb_ctl.incl.pl1 1-46 2 10/16/86 1140.2 rmdb_relmgr_entries.incl.pl1 >special_ldd>install>MR12.0-1187>rmdb_relmgr_entries.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. absolute_db_path 6 based char(168) level 2 packed unaligned dcl 1-25 set ref 122 134* 156* attr_name based char unaligned dcl 80 set ref 156* attr_name_len 000100 automatic fixed bin(21,0) dcl 65 set ref 146* 156 156 attr_name_ptr 000102 automatic pointer dcl 66 set ref 146* 156 code 000104 automatic fixed bin(35,0) dcl 67 set ref 156* 158 158* db_model_ptr 134 based pointer level 2 dcl 1-25 set ref 133* 134* 156* error_message 000105 automatic char(500) unaligned dcl 68 set ref 156* 158* error_table_$action_not_performed 000010 external static fixed bin(35,0) dcl 51 set ref 122* error_table_$badcall 000012 external static fixed bin(35,0) dcl 52 set ref 108* incon_name 000302 automatic char(32) unaligned dcl 69 set ref 133* 134* incon_value 000312 automatic bit(1) unaligned dcl 71 set ref 133* 134 info_ptr parameter pointer dcl 46 ref 6 92 mdbm_util_$inconsistent_get_info 000014 constant entry external dcl 56 ref 133 nargs 000313 automatic fixed bin(17,0) dcl 72 set ref 107* 108 rel_name based char unaligned dcl 81 set ref 156* rel_name_len 000314 automatic fixed bin(21,0) dcl 73 set ref 145* 156 156 rel_name_ptr 000316 automatic pointer dcl 74 set ref 145* 156 rmdb_create_index 000024 constant entry external dcl 60 ref 156 rmdb_ctl based structure level 1 unaligned dcl 1-25 rmdb_ctl_ptr 000434 automatic pointer dcl 1-43 set ref 92* 122 133 134 134 156* 156 156 rmdb_execute_undo 000026 constant entry external dcl 61 ref 134 rmdb_relmgr_entries based structure level 1 unaligned dcl 2-18 sci_ptr parameter pointer dcl 44 set ref 6 107* 108* 122* 134* 145* 146* 158* ssu_$abort_line 000016 constant entry external dcl 57 ref 108 122 158 ssu_$arg_count 000020 constant entry external dcl 58 ref 107 ssu_$arg_ptr 000022 constant entry external dcl 59 ref 145 146 undo_request 000320 automatic char(100) unaligned dcl 75 set ref 133* 134* unused2 000351 automatic char(200) unaligned dcl 76 set ref 133* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. RMDB_CTL_VERSION_1 internal static fixed bin(17,0) initial dcl 1-41 rmdb_relmgr_entries_ptr automatic pointer dcl 2-32 NAME DECLARED BY EXPLICIT CONTEXT. rmdb_rq_create_index 000052 constant entry external dcl 6 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 524 554 374 534 Length 1006 374 30 216 130 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME rmdb_rq_create_index 374 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME rmdb_rq_create_index 000100 attr_name_len rmdb_rq_create_index 000102 attr_name_ptr rmdb_rq_create_index 000104 code rmdb_rq_create_index 000105 error_message rmdb_rq_create_index 000302 incon_name rmdb_rq_create_index 000312 incon_value rmdb_rq_create_index 000313 nargs rmdb_rq_create_index 000314 rel_name_len rmdb_rq_create_index 000316 rel_name_ptr rmdb_rq_create_index 000320 undo_request rmdb_rq_create_index 000351 unused2 rmdb_rq_create_index 000434 rmdb_ctl_ptr rmdb_rq_create_index THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. mdbm_util_$inconsistent_get_info rmdb_create_index rmdb_execute_undo ssu_$abort_line ssu_$arg_count ssu_$arg_ptr THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$action_not_performed error_table_$badcall LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 6 000046 92 000057 107 000063 108 000073 122 000123 133 000155 134 000207 145 000240 146 000260 156 000300 158 000347 166 000373 ----------------------------------------------------------- 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