~ubuntu-branches/ubuntu/karmic/firebird2.1/karmic

« back to all changes in this revision

Viewing changes to src/jrd/inf_pub.h

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2008-05-26 23:59:25 UTC
  • Revision ID: james.westby@ubuntu.com-20080526235925-2pnqj6nxpppoeaer
Tags: upstream-2.1.0.17798-0.ds2
ImportĀ upstreamĀ versionĀ 2.1.0.17798-0.ds2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
43
enum 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
 
 
127
        isc_info_db_last_value   /* Leave this LAST! */
 
128
};
 
129
 
 
130
#define isc_info_version isc_info_isc_version
 
131
 
 
132
 
 
133
/**************************************/
 
134
/* Database information return values */
 
135
/**************************************/
 
136
 
 
137
enum  info_db_implementations
 
138
{
 
139
        isc_info_db_impl_rdb_vms = 1,
 
140
        isc_info_db_impl_rdb_eln = 2,
 
141
        isc_info_db_impl_rdb_eln_dev = 3,
 
142
        isc_info_db_impl_rdb_vms_y = 4,
 
143
        isc_info_db_impl_rdb_eln_y = 5,
 
144
        isc_info_db_impl_jri = 6,
 
145
        isc_info_db_impl_jsv = 7,
 
146
 
 
147
        isc_info_db_impl_isc_apl_68K = 25,
 
148
        isc_info_db_impl_isc_vax_ultr = 26,
 
149
        isc_info_db_impl_isc_vms = 27,
 
150
        isc_info_db_impl_isc_sun_68k = 28,
 
151
        isc_info_db_impl_isc_os2 = 29,
 
152
        isc_info_db_impl_isc_sun4 = 30,    /* 30 */
 
153
        
 
154
        isc_info_db_impl_isc_hp_ux = 31,
 
155
        isc_info_db_impl_isc_sun_386i = 32,
 
156
        isc_info_db_impl_isc_vms_orcl = 33,
 
157
        isc_info_db_impl_isc_mac_aux = 34,
 
158
        isc_info_db_impl_isc_rt_aix = 35,
 
159
        isc_info_db_impl_isc_mips_ult = 36,
 
160
        isc_info_db_impl_isc_xenix = 37,
 
161
        isc_info_db_impl_isc_dg = 38,
 
162
        isc_info_db_impl_isc_hp_mpexl = 39,
 
163
        isc_info_db_impl_isc_hp_ux68K = 40,       /* 40 */
 
164
 
 
165
        isc_info_db_impl_isc_sgi = 41,
 
166
        isc_info_db_impl_isc_sco_unix = 42,
 
167
        isc_info_db_impl_isc_cray = 43,
 
168
        isc_info_db_impl_isc_imp = 44,
 
169
        isc_info_db_impl_isc_delta = 45,
 
170
        isc_info_db_impl_isc_next = 46,
 
171
        isc_info_db_impl_isc_dos = 47,
 
172
        isc_info_db_impl_m88K = 48,
 
173
        isc_info_db_impl_unixware = 49,
 
174
        isc_info_db_impl_isc_winnt_x86 = 50,
 
175
 
 
176
        isc_info_db_impl_isc_epson = 51,
 
177
        isc_info_db_impl_alpha_osf = 52,
 
178
        isc_info_db_impl_alpha_vms = 53,
 
179
        isc_info_db_impl_netware_386 = 54, 
 
180
        isc_info_db_impl_win_only = 55,
 
181
        isc_info_db_impl_ncr_3000 = 56,
 
182
        isc_info_db_impl_winnt_ppc = 57,
 
183
        isc_info_db_impl_dg_x86 = 58,
 
184
        isc_info_db_impl_sco_ev = 59,
 
185
        isc_info_db_impl_i386 = 60,
 
186
 
 
187
        isc_info_db_impl_freebsd = 61,
 
188
        isc_info_db_impl_netbsd = 62,
 
189
        isc_info_db_impl_darwin_ppc = 63,
 
190
        isc_info_db_impl_sinixz = 64,
 
191
 
 
192
        isc_info_db_impl_linux_sparc = 65,
 
193
        isc_info_db_impl_linux_amd64 = 66,
 
194
        
 
195
        isc_info_db_impl_freebsd_amd64 = 67,
 
196
 
 
197
        isc_info_db_impl_winnt_amd64 = 68,
 
198
 
 
199
        isc_info_db_impl_linux_ppc = 69,
 
200
        isc_info_db_impl_darwin_x86 = 70,
 
201
        isc_info_db_impl_linux_mipsel = 71,
 
202
        isc_info_db_impl_linux_mips = 72,
 
203
        isc_info_db_impl_darwin_x64 = 73,
 
204
 
 
205
        isc_info_db_impl_last_value   // Leave this LAST!
 
206
};
 
207
 
 
208
#define isc_info_db_impl_isc_a            isc_info_db_impl_isc_apl_68K
 
209
#define isc_info_db_impl_isc_u            isc_info_db_impl_isc_vax_ultr
 
210
#define isc_info_db_impl_isc_v            isc_info_db_impl_isc_vms
 
211
#define isc_info_db_impl_isc_s            isc_info_db_impl_isc_sun_68k
 
212
 
 
213
 
 
214
enum info_db_class
 
215
{
 
216
        isc_info_db_class_access = 1,
 
217
        isc_info_db_class_y_valve = 2,
 
218
        isc_info_db_class_rem_int = 3,
 
219
        isc_info_db_class_rem_srvr = 4,
 
220
        isc_info_db_class_pipe_int = 7,
 
221
        isc_info_db_class_pipe_srvr = 8,
 
222
        isc_info_db_class_sam_int = 9,
 
223
        isc_info_db_class_sam_srvr = 10,
 
224
        isc_info_db_class_gateway = 11,
 
225
        isc_info_db_class_cache = 12,
 
226
        isc_info_db_class_classic_access = 13,
 
227
        isc_info_db_class_server_access = 14,
 
228
 
 
229
        isc_info_db_class_last_value   /* Leave this LAST! */
 
230
};
 
231
 
 
232
enum info_db_provider
 
233
{
 
234
        isc_info_db_code_rdb_eln = 1,
 
235
        isc_info_db_code_rdb_vms = 2,
 
236
        isc_info_db_code_interbase = 3,
 
237
        isc_info_db_code_firebird = 4,
 
238
 
 
239
        isc_info_db_code_last_value   /* Leave this LAST! */
 
240
};
 
241
 
 
242
 
 
243
/*****************************/
 
244
/* Request information items */
 
245
/*****************************/
 
246
 
 
247
#define isc_info_number_messages        4
 
248
#define isc_info_max_message            5
 
249
#define isc_info_max_send               6
 
250
#define isc_info_max_receive            7
 
251
#define isc_info_state                  8
 
252
#define isc_info_message_number 9
 
253
#define isc_info_message_size           10
 
254
#define isc_info_request_cost           11
 
255
#define isc_info_access_path            12
 
256
#define isc_info_req_select_count       13
 
257
#define isc_info_req_insert_count       14
 
258
#define isc_info_req_update_count       15
 
259
#define isc_info_req_delete_count       16
 
260
 
 
261
 
 
262
/*********************/
 
263
/* Access path items */
 
264
/*********************/
 
265
 
 
266
#define isc_info_rsb_end                0
 
267
#define isc_info_rsb_begin              1
 
268
#define isc_info_rsb_type               2
 
269
#define isc_info_rsb_relation           3
 
270
#define isc_info_rsb_plan                       4
 
271
 
 
272
/*************/
 
273
/* RecordSource (RSB) types */
 
274
/*************/
 
275
 
 
276
#define isc_info_rsb_unknown            1
 
277
#define isc_info_rsb_indexed            2
 
278
#define isc_info_rsb_navigate           3
 
279
#define isc_info_rsb_sequential 4
 
280
#define isc_info_rsb_cross              5
 
281
#define isc_info_rsb_sort               6
 
282
#define isc_info_rsb_first              7
 
283
#define isc_info_rsb_boolean            8
 
284
#define isc_info_rsb_union              9
 
285
#define isc_info_rsb_aggregate          10
 
286
#define isc_info_rsb_merge              11
 
287
#define isc_info_rsb_ext_sequential     12
 
288
#define isc_info_rsb_ext_indexed        13
 
289
#define isc_info_rsb_ext_dbkey          14
 
290
#define isc_info_rsb_left_cross 15
 
291
#define isc_info_rsb_select             16
 
292
#define isc_info_rsb_sql_join           17
 
293
#define isc_info_rsb_simulate           18
 
294
#define isc_info_rsb_sim_cross          19
 
295
#define isc_info_rsb_once               20
 
296
#define isc_info_rsb_procedure          21
 
297
#define isc_info_rsb_skip               22
 
298
#define isc_info_rsb_virt_sequential    23
 
299
#define isc_info_rsb_recursive  24
 
300
 
 
301
/**********************/
 
302
/* Bitmap expressions */
 
303
/**********************/
 
304
 
 
305
#define isc_info_rsb_and                1
 
306
#define isc_info_rsb_or         2
 
307
#define isc_info_rsb_dbkey              3
 
308
#define isc_info_rsb_index              4
 
309
 
 
310
#define isc_info_req_active             2
 
311
#define isc_info_req_inactive           3
 
312
#define isc_info_req_send               4
 
313
#define isc_info_req_receive            5
 
314
#define isc_info_req_select             6
 
315
#define isc_info_req_sql_stall          7
 
316
 
 
317
/**************************/
 
318
/* Blob information items */
 
319
/**************************/
 
320
 
 
321
#define isc_info_blob_num_segments      4
 
322
#define isc_info_blob_max_segment       5
 
323
#define isc_info_blob_total_length      6
 
324
#define isc_info_blob_type              7
 
325
 
 
326
/*********************************/
 
327
/* Transaction information items */
 
328
/*********************************/
 
329
 
 
330
#define isc_info_tra_id                                         4
 
331
#define isc_info_tra_oldest_interesting         5
 
332
#define isc_info_tra_oldest_snapshot            6
 
333
#define isc_info_tra_oldest_active                      7
 
334
#define isc_info_tra_isolation                          8
 
335
#define isc_info_tra_access                                     9
 
336
#define isc_info_tra_lock_timeout                       10
 
337
 
 
338
// isc_info_tra_isolation responses
 
339
#define isc_info_tra_consistency                1
 
340
#define isc_info_tra_concurrency                2
 
341
#define isc_info_tra_read_committed             3
 
342
 
 
343
// isc_info_tra_read_committed options
 
344
#define isc_info_tra_no_rec_version             0
 
345
#define isc_info_tra_rec_version                1
 
346
 
 
347
// isc_info_tra_access responses
 
348
#define isc_info_tra_readonly   0
 
349
#define isc_info_tra_readwrite  1
 
350
 
 
351
 
 
352
/*************************/
 
353
/* SQL information items */
 
354
/*************************/
 
355
 
 
356
#define isc_info_sql_select             4
 
357
#define isc_info_sql_bind               5
 
358
#define isc_info_sql_num_variables      6
 
359
#define isc_info_sql_describe_vars      7
 
360
#define isc_info_sql_describe_end       8
 
361
#define isc_info_sql_sqlda_seq          9
 
362
#define isc_info_sql_message_seq        10
 
363
#define isc_info_sql_type               11
 
364
#define isc_info_sql_sub_type           12
 
365
#define isc_info_sql_scale              13
 
366
#define isc_info_sql_length             14
 
367
#define isc_info_sql_null_ind           15
 
368
#define isc_info_sql_field              16
 
369
#define isc_info_sql_relation           17
 
370
#define isc_info_sql_owner              18
 
371
#define isc_info_sql_alias              19
 
372
#define isc_info_sql_sqlda_start        20
 
373
#define isc_info_sql_stmt_type          21
 
374
#define isc_info_sql_get_plan             22
 
375
#define isc_info_sql_records              23
 
376
#define isc_info_sql_batch_fetch          24
 
377
#define isc_info_sql_relation_alias             25
 
378
 
 
379
/*********************************/
 
380
/* SQL information return values */
 
381
/*********************************/
 
382
 
 
383
#define isc_info_sql_stmt_select          1
 
384
#define isc_info_sql_stmt_insert          2
 
385
#define isc_info_sql_stmt_update          3
 
386
#define isc_info_sql_stmt_delete          4
 
387
#define isc_info_sql_stmt_ddl             5
 
388
#define isc_info_sql_stmt_get_segment     6
 
389
#define isc_info_sql_stmt_put_segment     7
 
390
#define isc_info_sql_stmt_exec_procedure  8
 
391
#define isc_info_sql_stmt_start_trans     9
 
392
#define isc_info_sql_stmt_commit          10
 
393
#define isc_info_sql_stmt_rollback        11
 
394
#define isc_info_sql_stmt_select_for_upd  12
 
395
#define isc_info_sql_stmt_set_generator   13
 
396
#define isc_info_sql_stmt_savepoint       14
 
397
 
 
398
#endif /* JRD_INF_PUB_H */
 
399