1/*
2 * PROGRAM: JRD Access Method
3 * MODULE: inf.h
4 * DESCRIPTION: Information call declarations.
5 *
6 * The contents of this file are subject to the Interbase Public
7 * License Version 1.0 (the "License"); you may not use this file
8 * except in compliance with the License. You may obtain a copy
9 * of the License at http://www.Inprise.com/IPL.html
10 *
11 * Software distributed under the License is distributed on an
12 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
13 * or implied. See the License for the specific language governing
14 * rights and limitations under the License.
15 *
16 * The Original Code was created by Inprise Corporation
17 * and its predecessors. Portions created by Inprise Corporation are
18 * Copyright (C) Inprise Corporation.
19 *
20 * All Rights Reserved.
21 * Contributor(s): ______________________________________.
22 *
23 * 2001.07.28: John Bellardo: Added isc_info_rsb_skip to support LIMIT.
24 */
25
26#ifndef JRD_INF_PUB_H
27#define JRD_INF_PUB_H
28
29/* Common, structural codes */
30/****************************/
31
32#define isc_info_end 1
33#define isc_info_truncated 2
34#define isc_info_error 3
35#define isc_info_data_not_ready 4
36#define isc_info_length 126
37#define isc_info_flag_end 127
38
39/******************************/
40/* Database information items */
41/******************************/
42
43enum db_info_types
44{
45 isc_info_db_id = 4,
46 isc_info_reads = 5,
47 isc_info_writes = 6,
48 isc_info_fetches = 7,
49 isc_info_marks = 8,
50
51 isc_info_implementation = 11,
52 isc_info_isc_version = 12,
53 isc_info_base_level = 13,
54 isc_info_page_size = 14,
55 isc_info_num_buffers = 15,
56 isc_info_limbo = 16,
57 isc_info_current_memory = 17,
58 isc_info_max_memory = 18,
59 isc_info_window_turns = 19,
60 isc_info_license = 20,
61
62 isc_info_allocation = 21,
63 isc_info_attachment_id = 22,
64 isc_info_read_seq_count = 23,
65 isc_info_read_idx_count = 24,
66 isc_info_insert_count = 25,
67 isc_info_update_count = 26,
68 isc_info_delete_count = 27,
69 isc_info_backout_count = 28,
70 isc_info_purge_count = 29,
71 isc_info_expunge_count = 30,
72
73 isc_info_sweep_interval = 31,
74 isc_info_ods_version = 32,
75 isc_info_ods_minor_version = 33,
76 isc_info_no_reserve = 34,
77 /* Begin deprecated WAL and JOURNAL items. */
78 isc_info_logfile = 35,
79 isc_info_cur_logfile_name = 36,
80 isc_info_cur_log_part_offset = 37,
81 isc_info_num_wal_buffers = 38,
82 isc_info_wal_buffer_size = 39,
83 isc_info_wal_ckpt_length = 40,
84
85 isc_info_wal_cur_ckpt_interval = 41,
86 isc_info_wal_prv_ckpt_fname = 42,
87 isc_info_wal_prv_ckpt_poffset = 43,
88 isc_info_wal_recv_ckpt_fname = 44,
89 isc_info_wal_recv_ckpt_poffset = 45,
90 isc_info_wal_grpc_wait_usecs = 47,
91 isc_info_wal_num_io = 48,
92 isc_info_wal_avg_io_size = 49,
93 isc_info_wal_num_commits = 50,
94 isc_info_wal_avg_grpc_size = 51,
95 /* End deprecated WAL and JOURNAL items. */
96
97 isc_info_forced_writes = 52,
98 isc_info_user_names = 53,
99 isc_info_page_errors = 54,
100 isc_info_record_errors = 55,
101 isc_info_bpage_errors = 56,
102 isc_info_dpage_errors = 57,
103 isc_info_ipage_errors = 58,
104 isc_info_ppage_errors = 59,
105 isc_info_tpage_errors = 60,
106
107 isc_info_set_page_buffers = 61,
108 isc_info_db_sql_dialect = 62,
109 isc_info_db_read_only = 63,
110 isc_info_db_size_in_pages = 64,
111
112 /* Values 65 -100 unused to avoid conflict with InterBase */
113
114 frb_info_att_charset = 101,
115 isc_info_db_class = 102,
116 isc_info_firebird_version = 103,
117 isc_info_oldest_transaction = 104,
118 isc_info_oldest_active = 105,
119 isc_info_oldest_snapshot = 106,
120 isc_info_next_transaction = 107,
121 isc_info_db_provider = 108,
122 isc_info_active_transactions = 109,
123 isc_info_active_tran_count = 110,
124 isc_info_creation_date = 111,
125 isc_info_db_file_size = 112,
126 fb_info_page_contents = 113,
127
128 fb_info_implementation = 114,
129
130 isc_info_db_last_value /* Leave this LAST! */
131};
132
133#define isc_info_version isc_info_isc_version
134
135
136/**************************************/
137/* Database information return values */
138/**************************************/
139
140enum info_db_implementations
141{
142 isc_info_db_impl_rdb_vms = 1,
143 isc_info_db_impl_rdb_eln = 2,
144 isc_info_db_impl_rdb_eln_dev = 3,
145 isc_info_db_impl_rdb_vms_y = 4,
146 isc_info_db_impl_rdb_eln_y = 5,
147 isc_info_db_impl_jri = 6,
148 isc_info_db_impl_jsv = 7,
149
150 isc_info_db_impl_isc_apl_68K = 25,
151 isc_info_db_impl_isc_vax_ultr = 26,
152 isc_info_db_impl_isc_vms = 27,
153 isc_info_db_impl_isc_sun_68k = 28,
154 isc_info_db_impl_isc_os2 = 29,
155 isc_info_db_impl_isc_sun4 = 30, /* 30 */
156
157 isc_info_db_impl_isc_hp_ux = 31,
158 isc_info_db_impl_isc_sun_386i = 32,
159 isc_info_db_impl_isc_vms_orcl = 33,
160 isc_info_db_impl_isc_mac_aux = 34,
161 isc_info_db_impl_isc_rt_aix = 35,
162 isc_info_db_impl_isc_mips_ult = 36,
163 isc_info_db_impl_isc_xenix = 37,
164 isc_info_db_impl_isc_dg = 38,
165 isc_info_db_impl_isc_hp_mpexl = 39,
166 isc_info_db_impl_isc_hp_ux68K = 40, /* 40 */
167
168 isc_info_db_impl_isc_sgi = 41,
169 isc_info_db_impl_isc_sco_unix = 42,
170 isc_info_db_impl_isc_cray = 43,
171 isc_info_db_impl_isc_imp = 44,
172 isc_info_db_impl_isc_delta = 45,
173 isc_info_db_impl_isc_next = 46,
174 isc_info_db_impl_isc_dos = 47,
175 isc_info_db_impl_m88K = 48,
176 isc_info_db_impl_unixware = 49,
177 isc_info_db_impl_isc_winnt_x86 = 50,
178
179 isc_info_db_impl_isc_epson = 51,
180 isc_info_db_impl_alpha_osf = 52,
181 isc_info_db_impl_alpha_vms = 53,
182 isc_info_db_impl_netware_386 = 54,
183 isc_info_db_impl_win_only = 55,
184 isc_info_db_impl_ncr_3000 = 56,
185 isc_info_db_impl_winnt_ppc = 57,
186 isc_info_db_impl_dg_x86 = 58,
187 isc_info_db_impl_sco_ev = 59,
188 isc_info_db_impl_i386 = 60,
189
190 isc_info_db_impl_freebsd = 61,
191 isc_info_db_impl_netbsd = 62,
192 isc_info_db_impl_darwin_ppc = 63,
193 isc_info_db_impl_sinixz = 64,
194
195 isc_info_db_impl_linux_sparc = 65,
196 isc_info_db_impl_linux_amd64 = 66,
197
198 isc_info_db_impl_freebsd_amd64 = 67,
199
200 isc_info_db_impl_winnt_amd64 = 68,
201
202 isc_info_db_impl_linux_ppc = 69,
203 isc_info_db_impl_darwin_x86 = 70,
204 isc_info_db_impl_linux_mipsel = 71,
205 isc_info_db_impl_linux_mips = 72,
206 isc_info_db_impl_darwin_x64 = 73,
207 isc_info_db_impl_sun_amd64 = 74,
208
209 isc_info_db_impl_linux_arm = 75,
210 isc_info_db_impl_linux_ia64 = 76,
211
212 isc_info_db_impl_darwin_ppc64 = 77,
213 isc_info_db_impl_linux_s390x = 78,
214 isc_info_db_impl_linux_s390 = 79,
215
216 isc_info_db_impl_linux_sh = 80,
217 isc_info_db_impl_linux_sheb = 81,
218
219 isc_info_db_impl_last_value // Leave this LAST!
220};
221
222enum info_db_class
223{
224 isc_info_db_class_access = 1,
225 isc_info_db_class_y_valve = 2,
226 isc_info_db_class_rem_int = 3,
227 isc_info_db_class_rem_srvr = 4,
228 isc_info_db_class_pipe_int = 7,
229 isc_info_db_class_pipe_srvr = 8,
230 isc_info_db_class_sam_int = 9,
231 isc_info_db_class_sam_srvr = 10,
232 isc_info_db_class_gateway = 11,
233 isc_info_db_class_cache = 12,
234 isc_info_db_class_classic_access = 13,
235 isc_info_db_class_server_access = 14,
236
237 isc_info_db_class_last_value /* Leave this LAST! */
238};
239
240enum info_db_provider
241{
242 isc_info_db_code_rdb_eln = 1,
243 isc_info_db_code_rdb_vms = 2,
244 isc_info_db_code_interbase = 3,
245 isc_info_db_code_firebird = 4,
246
247 isc_info_db_code_last_value /* Leave this LAST! */
248};
249
250
251/*****************************/
252/* Request information items */
253/*****************************/
254
255#define isc_info_number_messages 4
256#define isc_info_max_message 5
257#define isc_info_max_send 6
258#define isc_info_max_receive 7
259#define isc_info_state 8
260#define isc_info_message_number 9
261#define isc_info_message_size 10
262#define isc_info_request_cost 11
263#define isc_info_access_path 12
264#define isc_info_req_select_count 13
265#define isc_info_req_insert_count 14
266#define isc_info_req_update_count 15
267#define isc_info_req_delete_count 16
268
269
270/*********************/
271/* Access path items */
272/*********************/
273
274#define isc_info_rsb_end 0
275#define isc_info_rsb_begin 1
276#define isc_info_rsb_type 2
277#define isc_info_rsb_relation 3
278#define isc_info_rsb_plan 4
279
280/*************/
281/* RecordSource (RSB) types */
282/*************/
283
284#define isc_info_rsb_unknown 1
285#define isc_info_rsb_indexed 2
286#define isc_info_rsb_navigate 3
287#define isc_info_rsb_sequential 4
288#define isc_info_rsb_cross 5
289#define isc_info_rsb_sort 6
290#define isc_info_rsb_first 7
291#define isc_info_rsb_boolean 8
292#define isc_info_rsb_union 9
293#define isc_info_rsb_aggregate 10
294#define isc_info_rsb_merge 11
295#define isc_info_rsb_ext_sequential 12
296#define isc_info_rsb_ext_indexed 13
297#define isc_info_rsb_ext_dbkey 14
298#define isc_info_rsb_left_cross 15
299#define isc_info_rsb_select 16
300#define isc_info_rsb_sql_join 17
301#define isc_info_rsb_simulate 18
302#define isc_info_rsb_sim_cross 19
303#define isc_info_rsb_once 20
304#define isc_info_rsb_procedure 21
305#define isc_info_rsb_skip 22
306#define isc_info_rsb_virt_sequential 23
307#define isc_info_rsb_recursive 24
308#define isc_info_rsb_window 25
309#define isc_info_rsb_singular 26
310#define isc_info_rsb_writelock 27
311#define isc_info_rsb_buffer 28
312#define isc_info_rsb_hash 29
313
314/**********************/
315/* Bitmap expressions */
316/**********************/
317
318#define isc_info_rsb_and 1
319#define isc_info_rsb_or 2
320#define isc_info_rsb_dbkey 3
321#define isc_info_rsb_index 4
322
323#define isc_info_req_active 2
324#define isc_info_req_inactive 3
325#define isc_info_req_send 4
326#define isc_info_req_receive 5
327#define isc_info_req_select 6
328#define isc_info_req_sql_stall 7
329
330/**************************/
331/* Blob information items */
332/**************************/
333
334#define isc_info_blob_num_segments 4
335#define isc_info_blob_max_segment 5
336#define isc_info_blob_total_length 6
337#define isc_info_blob_type 7
338
339/*********************************/
340/* Transaction information items */
341/*********************************/
342
343#define isc_info_tra_id 4
344#define isc_info_tra_oldest_interesting 5
345#define isc_info_tra_oldest_snapshot 6
346#define isc_info_tra_oldest_active 7
347#define isc_info_tra_isolation 8
348#define isc_info_tra_access 9
349#define isc_info_tra_lock_timeout 10
350#define fb_info_tra_dbpath 11
351
352// isc_info_tra_isolation responses
353#define isc_info_tra_consistency 1
354#define isc_info_tra_concurrency 2
355#define isc_info_tra_read_committed 3
356
357// isc_info_tra_read_committed options
358#define isc_info_tra_no_rec_version 0
359#define isc_info_tra_rec_version 1
360
361// isc_info_tra_access responses
362#define isc_info_tra_readonly 0
363#define isc_info_tra_readwrite 1
364
365
366/*************************/
367/* SQL information items */
368/*************************/
369
370#define isc_info_sql_select 4
371#define isc_info_sql_bind 5
372#define isc_info_sql_num_variables 6
373#define isc_info_sql_describe_vars 7
374#define isc_info_sql_describe_end 8
375#define isc_info_sql_sqlda_seq 9
376#define isc_info_sql_message_seq 10
377#define isc_info_sql_type 11
378#define isc_info_sql_sub_type 12
379#define isc_info_sql_scale 13
380#define isc_info_sql_length 14
381#define isc_info_sql_null_ind 15
382#define isc_info_sql_field 16
383#define isc_info_sql_relation 17
384#define isc_info_sql_owner 18
385#define isc_info_sql_alias 19
386#define isc_info_sql_sqlda_start 20
387#define isc_info_sql_stmt_type 21
388#define isc_info_sql_get_plan 22
389#define isc_info_sql_records 23
390#define isc_info_sql_batch_fetch 24
391#define isc_info_sql_relation_alias 25
392#define isc_info_sql_explain_plan 26
393#define isc_info_sql_stmt_flags 27
394
395/*********************************/
396/* SQL information return values */
397/*********************************/
398
399#define isc_info_sql_stmt_select 1
400#define isc_info_sql_stmt_insert 2
401#define isc_info_sql_stmt_update 3
402#define isc_info_sql_stmt_delete 4
403#define isc_info_sql_stmt_ddl 5
404#define isc_info_sql_stmt_get_segment 6
405#define isc_info_sql_stmt_put_segment 7
406#define isc_info_sql_stmt_exec_procedure 8
407#define isc_info_sql_stmt_start_trans 9
408#define isc_info_sql_stmt_commit 10
409#define isc_info_sql_stmt_rollback 11
410#define isc_info_sql_stmt_select_for_upd 12
411#define isc_info_sql_stmt_set_generator 13
412#define isc_info_sql_stmt_savepoint 14
413
414#endif /* JRD_INF_PUB_H */
415
416