CUBRID Engine  latest
system_parameter.c
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 /*
20  * system_parameter.c - system parameters
21  */
22 
23 #ident "$Id$"
24 
25 #include "config.h"
26 
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <limits.h>
30 #include <float.h>
31 #include <errno.h>
32 #include <time.h>
33 #if defined (WINDOWS)
34 #include <io.h>
35 #include <direct.h>
36 #else
37 #include <unistd.h>
38 #endif /* !WINDOWS */
39 #include <sys/types.h>
40 #include <sys/stat.h>
41 #if !defined(WINDOWS)
42 #include <sys/param.h>
43 #endif
44 #include <assert.h>
45 #include <ctype.h>
46 
47 #include "porting.h"
48 #include "chartype.h"
49 #include "misc_string.h"
50 #include "error_manager.h"
51 #include "storage_common.h"
52 #include "system_parameter.h"
53 #include "util_func.h"
54 #include "log_comm.h"
55 #include "memory_alloc.h"
56 #include "object_representation.h"
57 #include "environment_variable.h"
58 #include "intl_support.h"
59 #include "message_catalog.h"
60 #include "language_support.h"
61 #include "connection_defs.h"
62 #if defined (SERVER_MODE) || defined (SA_MODE)
63 #include "server_support.h"
64 #include "boot_sr.h"
65 #include "page_buffer.h"
66 #include "session.h"
67 #include "vacuum.h"
68 #include "log_manager.h"
69 #include "xserver_interface.h"
70 #include "double_write_buffer.h"
71 #endif /* SERVER_MODE */
72 #if defined (LINUX)
73 #include "stack_dump.h"
74 #endif
75 #include "ini_parser.h"
76 #if defined(WINDOWS)
77 #include "wintcp.h"
78 #else /* WINDOWS */
79 #include "tcp.h"
80 #endif /* WINDOWS */
81 #include "heartbeat.h"
82 #include "log_applier.h"
83 #include "utility.h"
84 #include "tz_support.h"
85 #include "perf_monitor.h"
86 #include "fault_injection.h"
87 #include "tde.h"
88 #if defined (SERVER_MODE)
89 #include "thread_manager.hpp" // for thread_get_thread_entry_info
90 #endif // SERVER_MODE
91 
92 #if defined (SUPPRESS_STRLEN_WARNING)
93 #define strlen(s1) ((int) strlen(s1))
94 #endif /* defined (SUPPRESS_STRLEN_WARNING) */
95 
96 #define ER_LOG_FILE_DIR "server"
97 #if !defined (CS_MODE)
98 static const char sysprm_error_log_file[] = "cub_server.err";
99 #else /* CS_MODE */
100 static const char sysprm_error_log_file[] = "cub_client.err";
101 #endif /* CS_MODE */
102 static const char sysprm_conf_file_name[] = "cubrid.conf";
103 static const char sysprm_ha_conf_file_name[] = "cubrid_ha.conf";
104 
105 /*
106  * System variable names
107  */
108 
109 #define PRM_NAME_ER_LOG_DEBUG "er_log_debug"
110 
111 #define PRM_NAME_ER_BTREE_DEBUG "er_btree_debug"
112 
113 #define PRM_NAME_ER_LOG_LEVEL "error_log_level"
114 
115 #define PRM_NAME_ER_LOG_WARNING "error_log_warning"
116 
117 #define PRM_NAME_ER_EXIT_ASK "inquire_on_exit"
118 
119 #define PRM_NAME_ER_LOG_SIZE "error_log_size"
120 
121 #define PRM_NAME_ER_LOG_FILE "error_log"
122 
123 #define PRM_NAME_IO_LOCKF_ENABLE "file_lock"
124 
125 #define PRM_NAME_SR_NBUFFERS "sort_buffer_pages"
126 
127 #define PRM_NAME_SORT_BUFFER_SIZE "sort_buffer_size"
128 
129 #define PRM_NAME_PB_NBUFFERS "data_buffer_pages"
130 
131 #define PRM_NAME_PAGE_BUFFER_SIZE "data_buffer_size"
132 
133 #define PRM_NAME_PB_BUFFER_FLUSH_RATIO "data_buffer_flush_ratio"
134 
135 #define PRM_NAME_HF_UNFILL_FACTOR "unfill_factor"
136 
137 #define PRM_NAME_HF_MAX_BESTSPACE_ENTRIES "max_bestspace_entries"
138 
139 #define PRM_NAME_BT_UNFILL_FACTOR "index_unfill_factor"
140 
141 #define PRM_NAME_BT_OID_NBUFFERS "index_scan_oid_buffer_pages"
142 
143 #define PRM_NAME_BT_OID_BUFFER_SIZE "index_scan_oid_buffer_size"
144 
145 #define PRM_NAME_BT_INDEX_SCAN_OID_ORDER "index_scan_in_oid_order"
146 
147 #define PRM_NAME_BOSR_MAXTMP_PAGES "temp_file_max_size_in_pages"
148 
149 #define PRM_NAME_LK_TIMEOUT_MESSAGE_DUMP_LEVEL "lock_timeout_message_type"
150 
151 #define PRM_NAME_LK_ESCALATION_AT "lock_escalation"
152 
153 #define PRM_NAME_LK_ROLLBACK_ON_LOCK_ESCALATION "rollback_on_lock_escalation"
154 
155 #define PRM_NAME_LK_TIMEOUT_SECS "lock_timeout_in_secs"
156 
157 #define PRM_NAME_LK_TIMEOUT "lock_timeout"
158 
159 #define PRM_NAME_LK_RUN_DEADLOCK_INTERVAL "deadlock_detection_interval_in_secs"
160 
161 #define PRM_NAME_LOG_NBUFFERS "log_buffer_pages"
162 
163 #define PRM_NAME_LOG_BUFFER_SIZE "log_buffer_size"
164 
165 #define PRM_NAME_LOG_CHECKPOINT_NPAGES "checkpoint_every_npages"
166 
167 #define PRM_NAME_LOG_CHECKPOINT_SIZE "checkpoint_every_size"
168 
169 /* This parameter is stored in units of sec. */
170 #define PRM_NAME_LOG_CHECKPOINT_INTERVAL_SECS "checkpoint_interval_in_mins"
171 
172 #define PRM_NAME_LOG_CHECKPOINT_INTERVAL "checkpoint_interval"
173 
174 #define PRM_NAME_LOG_CHECKPOINT_SLEEP_MSECS "checkpoint_sleep_msecs"
175 
176 #define PRM_NAME_LOG_BACKGROUND_ARCHIVING "background_archiving"
177 
178 #define PRM_NAME_LOG_ISOLATION_LEVEL "isolation_level"
179 
180 #define PRM_NAME_LOG_MEDIA_FAILURE_SUPPORT "media_failure_support"
181 
182 #define PRM_NAME_LOG_SWEEP_CLEAN "log_file_sweep_clean"
183 
184 #define PRM_NAME_COMMIT_ON_SHUTDOWN "commit_on_shutdown"
185 
186 #define PRM_NAME_SHUTDOWN_WAIT_TIME_IN_SECS "shutdown_wait_time_in_secs"
187 
188 #define PRM_NAME_CSQL_AUTO_COMMIT "csql_auto_commit"
189 
190 #define PRM_NAME_WS_HASHTABLE_SIZE "initial_workspace_table_size"
191 
192 #define PRM_NAME_WS_MEMORY_REPORT "workspace_memory_report"
193 
194 #define PRM_NAME_GC_ENABLE "garbage_collection"
195 
196 #define PRM_NAME_TCP_PORT_ID "cubrid_port_id"
197 
198 #define PRM_NAME_TCP_CONNECTION_TIMEOUT "connection_timeout"
199 
200 #define PRM_NAME_OPTIMIZATION_LEVEL "optimization_level"
201 
202 #define PRM_NAME_QO_DUMP "qo_dump"
203 
204 #define PRM_NAME_CSS_MAX_CLIENTS "max_clients"
205 
206 #define PRM_NAME_THREAD_STACKSIZE "thread_stacksize"
207 
208 #define PRM_NAME_CFG_DB_HOSTS "db_hosts"
209 
210 #define PRM_NAME_RESET_TR_PARSER "reset_tr_parser_interval"
211 
212 #define PRM_NAME_IO_BACKUP_NBUFFERS "backup_buffer_pages"
213 
214 #define PRM_NAME_IO_BACKUP_MAX_VOLUME_SIZE "backup_volume_max_size_bytes"
215 
216 #define PRM_NAME_IO_BACKUP_SLEEP_MSECS "backup_sleep_msecs"
217 
218 #define PRM_NAME_MAX_PAGES_IN_TEMP_FILE_CACHE "max_pages_in_temp_file_cache"
219 
220 #define PRM_NAME_MAX_ENTRIES_IN_TEMP_FILE_CACHE "max_entries_in_temp_file_cache"
221 
222 #define PRM_NAME_PTHREAD_SCOPE_PROCESS "pthread_scope_process"
223 
224 #define PRM_NAME_TEMP_MEM_BUFFER_PAGES "temp_file_memory_size_in_pages"
225 
226 #define PRM_NAME_INDEX_SCAN_KEY_BUFFER_PAGES "index_scan_key_buffer_pages"
227 
228 #define PRM_NAME_INDEX_SCAN_KEY_BUFFER_SIZE "index_scan_key_buffer_size"
229 
230 #define PRM_NAME_DONT_REUSE_HEAP_FILE "dont_reuse_heap_file"
231 
232 #define PRM_NAME_INSERT_MODE "insert_execution_mode"
233 
234 #define PRM_NAME_LK_MAX_SCANID_BIT "max_index_scan_count"
235 
236 #define PRM_NAME_HOSTVAR_LATE_BINDING "hostvar_late_binding"
237 
238 #define PRM_NAME_ENABLE_HISTO "communication_histogram"
239 
240 #define PRM_NAME_MUTEX_BUSY_WAITING_CNT "mutex_busy_waiting_cnt"
241 
242 #define PRM_NAME_PB_NUM_LRU_CHAINS "num_LRU_chains"
243 
244 #define PRM_NAME_PAGE_BG_FLUSH_INTERVAL_MSECS "page_flush_interval_in_msecs"
245 
246 #define PRM_NAME_PAGE_BG_FLUSH_INTERVAL "page_flush_interval"
247 
248 #define PRM_NAME_ADAPTIVE_FLUSH_CONTROL "adaptive_flush_control"
249 
250 #define PRM_NAME_MAX_FLUSH_PAGES_PER_SECOND "max_flush_pages_per_second"
251 
252 #define PRM_NAME_MAX_FLUSH_SIZE_PER_SECOND "max_flush_size_per_second"
253 
254 #define PRM_NAME_PB_SYNC_ON_NFLUSH "sync_on_nflush"
255 
256 #define PRM_NAME_PB_SYNC_ON_FLUSH_SIZE "sync_on_flush_size"
257 
258 #define PRM_NAME_PB_DEBUG_PAGE_VALIDATION_LEVEL "page_validation_level"
259 
260 #define PRM_NAME_ORACLE_STYLE_OUTERJOIN "oracle_style_outerjoin"
261 
262 #define PRM_NAME_COMPAT_MODE "compat_mode"
263 
264 #define PRM_NAME_ANSI_QUOTES "ansi_quotes"
265 
266 #define PRM_NAME_DEFAULT_WEEK_FORMAT "default_week_format"
267 
268 #define PRM_NAME_TEST_MODE "test_mode"
269 
270 #define PRM_NAME_ONLY_FULL_GROUP_BY "only_full_group_by"
271 
272 #define PRM_NAME_PIPES_AS_CONCAT "pipes_as_concat"
273 
274 #define PRM_NAME_MYSQL_TRIGGER_CORRELATION_NAMES "mysql_trigger_correlation_names"
275 
276 #define PRM_NAME_REQUIRE_LIKE_ESCAPE_CHARACTER "require_like_escape_character"
277 
278 #define PRM_NAME_NO_BACKSLASH_ESCAPES "no_backslash_escapes"
279 
280 #define PRM_NAME_GROUP_CONCAT_MAX_LEN "group_concat_max_len"
281 
282 #define PRM_NAME_STRING_MAX_SIZE_BYTES "string_max_size_bytes"
283 
284 #define PRM_NAME_ADD_COLUMN_UPDATE_HARD_DEFAULT "add_column_update_hard_default"
285 
286 #define PRM_NAME_RETURN_NULL_ON_FUNCTION_ERRORS "return_null_on_function_errors"
287 
288 #define PRM_NAME_PLUS_AS_CONCAT "plus_as_concat"
289 
290 #define PRM_NAME_ALTER_TABLE_CHANGE_TYPE_STRICT "alter_table_change_type_strict"
291 
292 #define PRM_NAME_COMPACTDB_PAGE_RECLAIM_ONLY "compactdb_page_reclaim_only"
293 
294 #define PRM_NAME_LIKE_TERM_SELECTIVITY "like_term_selectivity"
295 
296 #define PRM_NAME_MAX_OUTER_CARD_OF_IDXJOIN "max_outer_card_of_idxjoin"
297 
298 #define PRM_NAME_ORACLE_STYLE_EMPTY_STRING "oracle_style_empty_string"
299 
300 #define PRM_NAME_SUPPRESS_FSYNC "suppress_fsync"
301 
302 #define PRM_NAME_CALL_STACK_DUMP_ON_ERROR "call_stack_dump_on_error"
303 
304 #define PRM_NAME_CALL_STACK_DUMP_ACTIVATION "call_stack_dump_activation_list"
305 
306 #define PRM_NAME_CALL_STACK_DUMP_DEACTIVATION "call_stack_dump_deactivation_list"
307 
308 #define PRM_NAME_COMPAT_NUMERIC_DIVISION_SCALE "compat_numeric_division_scale"
309 
310 #define PRM_NAME_DBFILES_PROTECT "dbfiles_protect"
311 
312 #define PRM_NAME_AUTO_RESTART_SERVER "auto_restart_server"
313 
314 #define PRM_NAME_XASL_CACHE_MAX_ENTRIES "max_plan_cache_entries"
315 #define PRM_NAME_XASL_CACHE_MAX_CLONES "max_plan_cache_clones"
316 #define PRM_NAME_XASL_CACHE_TIMEOUT "plan_cache_timeout"
317 #define PRM_NAME_XASL_CACHE_LOGGING "plan_cache_logging"
318 
319 #define PRM_NAME_FILTER_PRED_MAX_CACHE_ENTRIES "max_filter_pred_cache_entries"
320 #define PRM_NAME_FILTER_PRED_MAX_CACHE_CLONES "max_filter_pred_cache_clones"
321 
322 #define PRM_NAME_LIST_QUERY_CACHE_MODE "query_cache_mode"
323 
324 #define PRM_NAME_LIST_MAX_QUERY_CACHE_ENTRIES "max_query_cache_entries"
325 
326 #define PRM_NAME_LIST_MAX_QUERY_CACHE_PAGES "query_cache_size_in_pages"
327 
328 #define PRM_NAME_USE_ORDERBY_SORT_LIMIT "use_orderby_sort_limit"
329 
330 #define PRM_NAME_REPLICATION_MODE "replication"
331 
332 #define PRM_NAME_HA_MODE "ha_mode"
333 
334 #define PRM_NAME_HA_MODE_FOR_SA_UTILS_ONLY "ha_mode_for_sa_utils_only"
335 
336 #define PRM_NAME_HA_SERVER_STATE "ha_server_state"
337 
338 #define PRM_NAME_HA_LOG_APPLIER_STATE "ha_log_applier_state"
339 
340 #define PRM_NAME_HA_NODE_LIST "ha_node_list"
341 
342 #define PRM_NAME_HA_REPLICA_LIST "ha_replica_list"
343 
344 #define PRM_NAME_HA_DB_LIST "ha_db_list"
345 
346 #define PRM_NAME_HA_COPY_LOG_BASE "ha_copy_log_base"
347 
348 #define PRM_NAME_HA_COPY_SYNC_MODE "ha_copy_sync_mode"
349 
350 #define PRM_NAME_HA_APPLY_MAX_MEM_SIZE "ha_apply_max_mem_size"
351 
352 #define PRM_NAME_HA_PORT_ID "ha_port_id"
353 
354 #define PRM_NAME_HA_INIT_TIMER_IN_MSECS "ha_init_timer_in_msec"
355 
356 #define PRM_NAME_HA_HEARTBEAT_INTERVAL_IN_MSECS "ha_heartbeat_interval_in_msecs"
357 
358 #define PRM_NAME_HA_CALC_SCORE_INTERVAL_IN_MSECS "ha_calc_score_interval_in_msecs"
359 
360 #define PRM_NAME_HA_FAILOVER_WAIT_TIME_IN_MSECS "ha_failover_wait_time_in_msecs"
361 
362 #define PRM_NAME_HA_PROCESS_START_CONFIRM_INTERVAL_IN_MSECS "ha_process_start_confirm_interval_in_msecs"
363 
364 #define PRM_NAME_HA_PROCESS_DEREG_CONFIRM_INTERVAL_IN_MSECS "ha_process_dereg_confirm_interval_in_msecs"
365 
366 #define PRM_NAME_HA_MAX_PROCESS_START_CONFIRM "ha_max_process_start_confirm"
367 
368 #define PRM_NAME_HA_MAX_PROCESS_DEREG_CONFIRM "ha_max_process_dereg_confirm"
369 
370 #define PRM_NAME_HA_UNACCEPTABLE_PROC_RESTART_TIMEDIFF "ha_unacceptable_proc_restart_timediff"
371 
372 #define PRM_NAME_HA_CHANGEMODE_INTERVAL_IN_MSEC "ha_changemode_interval_in_msecs"
373 
374 #define PRM_NAME_HA_MAX_HEARTBEAT_GAP "ha_max_heartbeat_gap"
375 
376 #define PRM_NAME_HA_PING_HOSTS "ha_ping_hosts"
377 
378 #define PRM_NAME_HA_APPLYLOGDB_RETRY_ERROR_LIST "ha_applylogdb_retry_error_list"
379 
380 #define PRM_NAME_HA_APPLYLOGDB_IGNORE_ERROR_LIST "ha_applylogdb_ignore_error_list"
381 
382 #define PRM_NAME_HA_APPLYLOGDB_LOG_WAIT_TIME_IN_SECS "ha_applylogdb_log_wait_time_in_secs"
383 
384 #define PRM_NAME_HA_SQL_LOGGING "ha_enable_sql_logging"
385 
386 #define PRM_NAME_HA_SQL_LOG_MAX_SIZE_IN_MB "ha_sql_log_max_size_in_mbytes"
387 
388 #define PRM_NAME_HA_COPY_LOG_MAX_ARCHIVES "ha_copy_log_max_archives"
389 
390 #define PRM_NAME_HA_COPY_LOG_TIMEOUT "ha_copy_log_timeout"
391 
392 #define PRM_NAME_HA_REPLICA_DELAY "ha_replica_delay"
393 
394 #define PRM_NAME_HA_REPLICA_TIME_BOUND "ha_replica_time_bound"
395 
396 #define PRM_NAME_HA_DELAY_LIMIT "ha_delay_limit"
397 
398 #define PRM_NAME_HA_DELAY_LIMIT_DELTA "ha_delay_limit_delta"
399 
400 #define PRM_NAME_HA_APPLYLOGDB_MAX_COMMIT_INTERVAL_IN_MSECS "ha_applylogdb_max_commit_interval_in_msecs"
401 
402 #define PRM_NAME_HA_APPLYLOGDB_MAX_COMMIT_INTERVAL "ha_applylogdb_max_commit_interval"
403 
404 #define PRM_NAME_HA_CHECK_DISK_FAILURE_INTERVAL_IN_SECS "ha_check_disk_failure_interval"
405 
406 #define PRM_NAME_JAVA_STORED_PROCEDURE "java_stored_procedure"
407 
408 #define PRM_NAME_JAVA_STORED_PROCEDURE_PORT "java_stored_procedure_port"
409 
410 #define PRM_NAME_JAVA_STORED_PROCEDURE_JVM_OPTIONS "java_stored_procedure_jvm_options"
411 
412 #define PRM_NAME_JAVA_STORED_PROCEDURE_DEBUG "java_stored_procedure_debug"
413 
414 #define PRM_NAME_JAVA_STORED_PROCEDURE_RESERVE_01 "java_stored_procedure_reserve_01"
415 
416 #define PRM_NAME_ALLOW_TRUNCATED_STRING "allow_truncated_string"
417 
418 #define PRM_NAME_COMPAT_PRIMARY_KEY "compat_primary_key"
419 
420 #define PRM_NAME_INTL_MBS_SUPPORT "intl_mbs_support"
421 
422 #define PRM_NAME_LOG_HEADER_FLUSH_INTERVAL "log_header_flush_interval_in_secs"
423 
424 #define PRM_NAME_LOG_ASYNC_COMMIT "async_commit"
425 
426 #define PRM_NAME_LOG_GROUP_COMMIT_INTERVAL_MSECS "group_commit_interval_in_msecs"
427 
428 #define PRM_NAME_LOG_BG_FLUSH_INTERVAL_MSECS "log_flush_interval_in_msecs"
429 
430 #define PRM_NAME_LOG_BG_FLUSH_NUM_PAGES "log_flush_every_npages"
431 
432 #define PRM_NAME_LOG_COMPRESS "log_compress"
433 
434 #define PRM_NAME_BLOCK_NOWHERE_STATEMENT "block_nowhere_statement"
435 
436 #define PRM_NAME_BLOCK_DDL_STATEMENT "block_ddl_statement"
437 
438 #define PRM_NAME_SINGLE_BYTE_COMPARE "single_byte_compare"
439 
440 #define PRM_NAME_CSQL_HISTORY_NUM "csql_history_num"
441 
442 #define PRM_NAME_LOG_TRACE_DEBUG "log_trace_debug"
443 
444 #define PRM_NAME_DL_FORK "dl_fork"
445 
446 #define PRM_NAME_ER_PRODUCTION_MODE "error_log_production_mode"
447 
448 #define PRM_NAME_ER_STOP_ON_ERROR "stop_on_error"
449 
450 #define PRM_NAME_TCP_RCVBUF_SIZE "tcp_rcvbuf_size"
451 
452 #define PRM_NAME_TCP_SNDBUF_SIZE "tcp_sndbuf_size"
453 
454 #define PRM_NAME_TCP_NODELAY "tcp_nodelay"
455 
456 #define PRM_NAME_TCP_KEEPALIVE "tcp_keepalive"
457 
458 #define PRM_NAME_CSQL_SINGLE_LINE_MODE "csql_single_line_mode"
459 
460 #define PRM_NAME_XASL_DEBUG_DUMP "xasl_debug_dump"
461 
462 #define PRM_NAME_LOG_MAX_ARCHIVES "log_max_archives"
463 
464 #define PRM_NAME_FORCE_REMOVE_LOG_ARCHIVES "force_remove_log_archives"
465 
466 #define PRM_NAME_REMOVE_LOG_ARCHIVES_INTERVAL "remove_log_archive_interval_in_secs"
467 
468 #define PRM_NAME_LOG_NO_LOGGING "no_logging"
469 
470 #define PRM_NAME_UNLOADDB_IGNORE_ERROR "unload_ignore_error"
471 
472 #define PRM_NAME_UNLOADDB_LOCK_TIMEOUT "unload_lock_timeout"
473 
474 #define PRM_NAME_LOADDB_FLUSH_INTERVAL "load_flush_interval"
475 
476 #define PRM_NAME_IO_TEMP_VOLUME_PATH "temp_volume_path"
477 
478 #define PRM_NAME_TDE_KEYS_FILE_PATH "tde_keys_file_path"
479 
480 #define PRM_NAME_IO_VOLUME_EXT_PATH "volume_extension_path"
481 
482 #define PRM_NAME_UNIQUE_ERROR_KEY_VALUE "print_key_value_on_unique_error"
483 
484 #define PRM_NAME_USE_SYSTEM_MALLOC "use_system_malloc"
485 
486 #define PRM_NAME_EVENT_HANDLER "event_handler"
487 
488 #define PRM_NAME_EVENT_ACTIVATION "event_activation_list"
489 
490 #define PRM_NAME_READ_ONLY_MODE "read_only"
491 
492 #define PRM_NAME_MNT_WAITING_THREAD "monitor_waiting_thread"
493 
494 #define PRM_NAME_MNT_STATS_THRESHOLD "monitor_stats_threshold"
495 
496 #define PRM_NAME_SERVICE_SERVICE_LIST "service::service"
497 
498 #define PRM_NAME_SERVICE_SERVER_LIST "service::server"
499 
500 #define PRM_NAME_SESSION_STATE_TIMEOUT "session_state_timeout"
501 
502 #define PRM_NAME_MULTI_RANGE_OPT_LIMIT "multi_range_optimization_limit"
503 
504 #define PRM_NAME_ACCESS_IP_CONTROL "access_ip_control"
505 
506 #define PRM_NAME_ACCESS_IP_CONTROL_FILE "access_ip_control_file"
507 
508 #define PRM_NAME_DB_VOLUME_SIZE "db_volume_size"
509 
510 #define PRM_NAME_LOG_VOLUME_SIZE "log_volume_size"
511 
512 #define PRM_NAME_INTL_NUMBER_LANG "intl_number_lang"
513 
514 #define PRM_NAME_INTL_DATE_LANG "intl_date_lang"
515 
516 #define PRM_NAME_UNICODE_INPUT_NORMALIZATION "unicode_input_normalization"
517 
518 #define PRM_NAME_UNICODE_OUTPUT_NORMALIZATION "unicode_output_normalization"
519 
520 #define PRM_NAME_INTL_CHECK_INPUT_STRING "intl_check_input_string"
521 
522 #define PRM_NAME_CHECK_PEER_ALIVE "check_peer_alive"
523 
524 #define PRM_NAME_SQL_TRACE_EXECUTION_PLAN "sql_trace_execution_plan"
525 
526 #define PRM_NAME_SQL_TRACE_SLOW_MSECS "sql_trace_slow_msecs"
527 
528 #define PRM_NAME_SQL_TRACE_SLOW "sql_trace_slow"
529 
530 #define PRM_NAME_LOG_TRACE_FLUSH_TIME "log_trace_flush_time"
531 
532 #define PRM_NAME_INTL_COLLATION "intl_collation"
533 
534 #define PRM_NAME_GENERIC_VOL_PREALLOC_SIZE "generic_vol_prealloc_size"
535 
536 #define PRM_NAME_SORT_LIMIT_MAX_COUNT "sort_limit_max_count"
537 
538 #define PRM_NAME_SQL_TRACE_IOREADS "sql_trace_ioread_pages"
539 
540 /* For query profile. Internal use only. */
541 #define PRM_NAME_QUERY_TRACE "query_trace"
542 #define PRM_NAME_QUERY_TRACE_FORMAT "query_trace_format"
543 
544 #define PRM_NAME_MAX_RECURSION_SQL_DEPTH "max_recursion_sql_depth"
545 
546 #define PRM_NAME_UPDATE_USE_ATTRIBUTE_REFERENCES "update_use_attribute_references"
547 
548 #define PRM_NAME_PB_AOUT_RATIO "data_aout_ratio"
549 
550 #define PRM_NAME_MAX_AGG_HASH_SIZE "max_agg_hash_size"
551 #define PRM_NAME_AGG_HASH_RESPECT_ORDER "agg_hash_respect_order"
552 
553 #define PRM_NAME_USE_BTREE_FENCE_KEY "use_btree_fence_key"
554 
555 #define PRM_NAME_OPTIMIZER_ENABLE_MERGE_JOIN "optimizer_enable_merge_join"
556 #define PRM_NAME_MAX_HASH_LIST_SCAN_SIZE "max_hash_list_scan_size"
557 #define PRM_NAME_OPTIMIZER_RESERVE_02 "optimizer_reserve_02"
558 #define PRM_NAME_OPTIMIZER_RESERVE_03 "optimizer_reserve_03"
559 #define PRM_NAME_OPTIMIZER_RESERVE_04 "optimizer_reserve_04"
560 #define PRM_NAME_OPTIMIZER_RESERVE_05 "optimizer_reserve_05"
561 #define PRM_NAME_OPTIMIZER_RESERVE_06 "optimizer_reserve_06"
562 #define PRM_NAME_OPTIMIZER_RESERVE_07 "optimizer_reserve_07"
563 #define PRM_NAME_OPTIMIZER_RESERVE_08 "optimizer_reserve_08"
564 #define PRM_NAME_OPTIMIZER_RESERVE_09 "optimizer_reserve_09"
565 #define PRM_NAME_OPTIMIZER_RESERVE_10 "optimizer_reserve_10"
566 #define PRM_NAME_OPTIMIZER_RESERVE_11 "optimizer_reserve_11"
567 #define PRM_NAME_OPTIMIZER_RESERVE_12 "optimizer_reserve_12"
568 #define PRM_NAME_OPTIMIZER_RESERVE_13 "optimizer_reserve_13"
569 #define PRM_NAME_OPTIMIZER_RESERVE_14 "optimizer_reserve_14"
570 #define PRM_NAME_OPTIMIZER_RESERVE_15 "optimizer_reserve_15"
571 #define PRM_NAME_OPTIMIZER_RESERVE_16 "optimizer_reserve_16"
572 #define PRM_NAME_OPTIMIZER_RESERVE_17 "optimizer_reserve_17"
573 #define PRM_NAME_OPTIMIZER_RESERVE_18 "optimizer_reserve_18"
574 #define PRM_NAME_OPTIMIZER_RESERVE_19 "optimizer_reserve_19"
575 #define PRM_NAME_OPTIMIZER_RESERVE_20 "optimizer_reserve_20"
576 
577 #define PRM_NAME_HA_REPL_ENABLE_SERVER_SIDE_UPDATE "ha_repl_enable_server_side_update"
578 #define PRM_NAME_PB_LRU_HOT_RATIO "lru_hot_ratio"
579 #define PRM_NAME_PB_LRU_BUFFER_RATIO "lru_buffer_ratio"
580 
581 #define PRM_NAME_VACUUM_MASTER_WAKEUP_INTERVAL "vacuum_master_interval_in_msecs"
582 
583 #define PRM_NAME_VACUUM_LOG_BLOCK_PAGES "vacuum_log_block_pages"
584 #define PRM_NAME_VACUUM_WORKER_COUNT "vacuum_worker_count"
585 
586 #define PRM_NAME_DISABLE_VACUUM "vacuum_disable"
587 
588 #define PRM_NAME_SA_MODE_AUTO_VACUUM "sa_mode_auto_vacuum"
589 
590 #define PRM_NAME_ER_LOG_VACUUM "er_log_vacuum"
591 
592 #define PRM_NAME_LOG_BTREE_OPS "log_btree_operations"
593 
594 #define PRM_NAME_OBJECT_PRINT_FORMAT_OID "print_object_as_oid"
595 
596 #define PRM_NAME_TIMEZONE "timezone"
597 #define PRM_NAME_SERVER_TIMEZONE "server_timezone"
598 #define PRM_NAME_TZ_LEAP_SECOND_SUPPORT "tz_leap_second_support"
599 
600 #define PRM_NAME_OPTIMIZER_ENABLE_AGGREGATE_OPTIMIZATION "optimizer_enable_aggregate_optimization"
601 
602 #define PRM_NAME_VACUUM_PREFETCH_LOG_NBUFFERS "vacuum_prefetch_log_pages"
603 #define PRM_NAME_VACUUM_PREFETCH_LOG_BUFFER_SIZE "vacuum_prefetch_log_buffer_size"
604 #define PRM_NAME_VACUUM_PREFETCH_LOG_MODE "vacuum_prefetch_log_mode"
605 
606 #define PRM_NAME_PB_NEIGHBOR_FLUSH_NONDIRTY "data_buffer_neighbor_flush_nondirty"
607 #define PRM_NAME_PB_NEIGHBOR_FLUSH_PAGES "data_buffer_neighbor_flush_pages"
608 
609 #define PRM_NAME_FAULT_INJECTION_IDS "fault_injection_ids"
610 #define PRM_NAME_FAULT_INJECTION_TEST "fault_injection_test"
611 #define PRM_NAME_FAULT_INJECTION_ACTION_PREFER_ABORT_TO_EXIT "fault_injection_action_prefer_abort_to_exit"
612 
613 #define PRM_NAME_HA_REPL_FILTER_TYPE "ha_repl_filter_type"
614 #define PRM_NAME_HA_REPL_FILTER_FILE "ha_repl_filter_file"
615 
616 #define PRM_NAME_COMPENSATE_DEBUG "compensate_debug"
617 #define PRM_NAME_POSTPONE_DEBUG "postpone_debug"
618 
619 #define PRM_NAME_CLIENT_CLASS_CACHE_DEBUG "client_class_cache_debug"
620 
621 #define PRM_NAME_EXAMINE_CLIENT_CACHED_LOCKS "examine_client_cached_locks"
622 
623 #define PRM_NAME_PB_SEQUENTIAL_VICTIM_FLUSH "data_buffer_sequential_victim_flush"
624 
625 #define PRM_NAME_LOG_UNIQUE_STATS "log_unique_stats"
626 
627 #define PRM_NAME_LOGPB_LOGGING_DEBUG "logpb_logging_debug"
628 
629 #define PRM_NAME_FORCE_RESTART_TO_SKIP_RECOVERY "force_restart_to_skip_recovery"
630 
631 #define PRM_NAME_ENABLE_STRING_COMPRESSION "enable_string_compression"
632 
633 #define PRM_NAME_XASL_CACHE_TIME_THRESHOLD_IN_MINUTES "xasl_cache_time_threshold_in_minutes"
634 
635 #define PRM_NAME_EXTENDED_STATISTICS_ACTIVATION "extended_statistics_activation"
636 
637 #define PRM_NAME_DISK_LOGGING "disk_logging_debug"
638 #define PRM_NAME_FILE_LOGGING "file_logging_debug"
639 
640 #define PRM_NAME_PB_NUM_PRIVATE_CHAINS "num_private_chains"
641 #define PRM_NAME_PB_MONITOR_LOCKS "pgbuf_monitor_locks"
642 #define PRM_NAME_PB_MAX_DEPTH_OF_SEARCHING_FOR_VICTIMS_IN_LRU_LIST "max_depth_of_searching_for_victims_in_lru_list"
643 
644 #define PRM_NAME_CTE_MAX_RECURSIONS "cte_max_recursions"
645 
646 #define PRM_NAME_DWB_SIZE "double_write_buffer_size"
647 #define PRM_NAME_DWB_BLOCKS "double_write_buffer_blocks"
648 #define PRM_NAME_ENABLE_DWB_FLUSH_THREAD "double_write_buffer_enable_flush_thread"
649 #define PRM_NAME_DWB_LOGGING "double_write_buffer_logging"
650 
651 #define PRM_NAME_JSON_LOG_ALLOCATIONS "json_log_allocations"
652 #define PRM_NAME_JSON_MAX_ARRAY_IDX "json_max_array_idx"
653 
654 #define PRM_NAME_CONNECTION_LOGGING "connection_logging"
655 
656 #define PRM_NAME_THREAD_LOGGING_FLAG "thread_logging_flag"
657 
658 #define PRM_NAME_LOG_QUERY_LISTS "log_query_lists"
659 
660 #define PRM_NAME_THREAD_CONNECTION_POOLING "thread_connection_pooling"
661 #define PRM_NAME_THREAD_CONNECTION_TIMEOUT_SECONDS "thread_connection_timeout_seconds"
662 #define PRM_NAME_THREAD_WORKER_POOLING "thread_worker_pooling"
663 #define PRM_NAME_THREAD_WORKER_TIMEOUT_SECONDS "thread_worker_timeout_seconds"
664 
665 #define PRM_NAME_DATA_FILE_ADVISE "data_file_os_advise"
666 
667 #define PRM_NAME_DEBUG_LOG_ARCHIVES "debug_log_archives"
668 #define PRM_NAME_DEBUG_ES "debug_external_storage"
669 #define PRM_NAME_DEBUG_BESTSPACE "debug_heap_bestspace"
670 #define PRM_NAME_DEBUG_LOG_WRITER "debug_log_writer"
671 #define PRM_NAME_DEBUG_AUTOCOMMIT "debug_autocommit"
672 #define PRM_NAME_DEBUG_REPLICATION_DATA "debug_replication_data"
673 #define PRM_NAME_TRACK_REQUESTS "track_client_requests"
674 #define PRM_NAME_LOG_PGBUF_VICTIM_FLUSH "log_pgbuf_victim_flush"
675 #define PRM_NAME_LOG_CHKPT_DETAILED "detailed_checkpoint_logging"
676 #define PRM_NAME_IB_TASK_MEMSIZE "index_load_task_memsize"
677 #define PRM_NAME_STATS_ON "stats_on"
678 #define PRM_NAME_LOADDB_WORKER_COUNT "loaddb_worker_count"
679 #define PRM_NAME_PERF_TEST_MODE "perf_test_mode"
680 #define PRM_NAME_REPR_CACHE_LOG "er_log_repr_cache"
681 #define PRM_NAME_ENABLE_NEW_LFHASH "new_lfhash"
682 #define PRM_NAME_HEAP_INFO_CACHE_LOGGING "heap_info_cache_logging"
683 #define PRM_NAME_TDE_DEFAULT_ALGORITHM "tde_default_algorithm"
684 
685 #define PRM_NAME_GENERAL_RESERVE_01 "general_reserve_01"
686 
687 #define PRM_NAME_TB_DEFAULT_REUSE_OID "create_table_reuseoid"
688 
689 #define PRM_NAME_USE_STAT_ESTIMATION "use_stat_estimation"
690 #define PRM_NAME_IGNORE_TRAILING_SPACE "ignore_trailing_space"
691 
692 #define PRM_NAME_DDL_AUDIT_LOG "ddl_audit_log"
693 #define PRM_NAME_DDL_AUDIT_LOG_SIZE "ddl_audit_log_size"
694 
695 #define PRM_VALUE_DEFAULT "DEFAULT"
696 #define PRM_VALUE_MAX "MAX"
697 #define PRM_VALUE_MIN "MIN"
698 
699 /*
700  * Note about ERROR_LIST and INTEGER_LIST type
701  * ERROR_LIST type is an array of bool type with the size of -(ER_LAST_ERROR)
702  * INTEGER_LIST type is an array of int type where the first element is
703  * the size of the array. The max size of INTEGER_LIST is 255.
704  */
705 
706 /*
707  * Bit masks for flag representing status words
708  */
709 
710 /*
711  * Static flags
712  */
713 #define PRM_EMPTY_FLAG 0x00000000 /* empty flag */
714 #define PRM_USER_CHANGE 0x00000001 /* user can change, not implemented */
715 #define PRM_FOR_CLIENT 0x00000002 /* is for client parameter */
716 #define PRM_FOR_SERVER 0x00000004 /* is for server parameter */
717 #define PRM_HIDDEN 0x00000008 /* is hidden */
718 #define PRM_RELOADABLE 0x00000010 /* is reloadable */
719 #define PRM_COMPOUND 0x00000020 /* sets the value of several others */
720 #define PRM_TEST_CHANGE 0x00000040 /* can only be changed in the test mode */
721 #define PRM_FOR_HA 0x00000080 /* is for heartbeat */
722 #define PRM_FOR_SESSION 0x00000100 /* is a session parameter - all client or client/server parameters that can be
723  * changed on-line */
724 #define PRM_FORCE_SERVER 0x00000200 /* client should get value from server */
725 #define PRM_FOR_QRY_STRING 0x00000400 /* if a parameter can affect the plan generation it should be included in the
726  * query string */
727 #define PRM_CLIENT_SESSION 0x00000800 /* mark those client/server session parameters that should not affect the
728  * server */
729 #define PRM_SIZE_UNIT 0x00001000 /* has size unit interface */
730 #define PRM_TIME_UNIT 0x00002000 /* has time unit interface */
731 #define PRM_DIFFER_UNIT 0x00004000 /* parameter unit need to be changed */
732 #define PRM_FOR_HA_CONTEXT 0x00008000 /* should be replicated into HA log applier */
733 
734 #define PRM_GET_SERVER 0x00010000 /* return the value of server parameter from client/server parameter. Note that
735  * this flag only can be set if the parameter has PRM_FOR_CLIENT,
736  * PRM_FOR_SERVER, and PRM_USER_CHANGE flags. */
737 
738 #define PRM_DEPRECATED 0x40000000 /* is deprecated */
739 #define PRM_OBSOLETED 0x80000000 /* is obsoleted */
740 
741 /*
742  * Dynamic flags
743  */
744 #define PRM_SET 0x00000001 /* has been set */
745 #define PRM_ALLOCATED 0x00000002 /* storage has been malloc'd */
746 #define PRM_DEFAULT_USED 0x00000004 /* Default value has been used */
747 #define PRM_DIFFERENT 0x00000008 /* mark those parameters that have values different than their default.
748  * currently used by parameters that should be printed to query string */
749 
750 /*
751  * Macros to get data type
752  */
753 #define PRM_IS_STRING(x) ((x)->datatype == PRM_STRING)
754 #define PRM_IS_INTEGER(x) ((x)->datatype == PRM_INTEGER)
755 #define PRM_IS_FLOAT(x) ((x)->datatype == PRM_FLOAT)
756 #define PRM_IS_BOOLEAN(x) ((x)->datatype == PRM_BOOLEAN)
757 #define PRM_IS_KEYWORD(x) ((x)->datatype == PRM_KEYWORD)
758 #define PRM_IS_INTEGER_LIST(x) ((x)->datatype == PRM_INTEGER_LIST)
759 #define PRM_IS_BIGINT(x) ((x)->datatype == PRM_BIGINT)
760 
761 /*
762  * Macros to access bit fields
763  */
764 
765 #define PRM_USER_CAN_CHANGE(x) (x & PRM_USER_CHANGE)
766 #define PRM_IS_FOR_CLIENT(x) (x & PRM_FOR_CLIENT)
767 #define PRM_IS_FOR_SERVER(x) (x & PRM_FOR_SERVER)
768 #define PRM_IS_HIDDEN(x) (x & PRM_HIDDEN)
769 #define PRM_IS_RELOADABLE(x) (x & PRM_RELOADABLE)
770 #define PRM_IS_COMPOUND(x) (x & PRM_COMPOUND)
771 #define PRM_TEST_CHANGE_ONLY(x) (x & PRM_TEST_CHANGE)
772 #define PRM_IS_FOR_HA(x) (x & PRM_FOR_HA)
773 #define PRM_IS_FOR_SESSION(x) (x & PRM_FOR_SESSION)
774 #define PRM_GET_FROM_SERVER(x) (x & PRM_FORCE_SERVER)
775 #define PRM_IS_FOR_QRY_STRING(x) (x & PRM_FOR_QRY_STRING)
776 #define PRM_CLIENT_SESSION_ONLY(x) (x & PRM_CLIENT_SESSION)
777 #define PRM_HAS_SIZE_UNIT(x) (x & PRM_SIZE_UNIT)
778 #define PRM_HAS_TIME_UNIT(x) (x & PRM_TIME_UNIT)
779 #define PRM_DIFFERENT_UNIT(x) (x & PRM_DIFFER_UNIT)
780 #define PRM_IS_FOR_HA_CONTEXT(x) (x & PRM_FOR_HA_CONTEXT)
781 #define PRM_IS_GET_SERVER(x) (x & PRM_GET_SERVER)
782 #define PRM_IS_DEPRECATED(x) (x & PRM_DEPRECATED)
783 #define PRM_IS_OBSOLETED(x) (x & PRM_OBSOLETED)
784 
785 #define PRM_IS_SET(x) (x & PRM_SET)
786 #define PRM_IS_ALLOCATED(x) (x & PRM_ALLOCATED)
787 #define PRM_DEFAULT_VAL_USED(x) (x & PRM_DEFAULT_USED)
788 #define PRM_IS_DIFFERENT(x) (x & PRM_DIFFERENT)
789 
790 /*
791  * Macros to manipulate bit fields
792  */
793 
794 #define PRM_CLEAR_BIT(this, here) (here &= ~this)
795 #define PRM_SET_BIT(this, here) (here |= this)
796 
797 /*
798  * Macros to get values
799  */
800 
801 #define PRM_GET_INT(x) (*((int *) (x)))
802 #define PRM_GET_FLOAT(x) (*((float *) (x)))
803 #define PRM_GET_STRING(x) (*((char **) (x)))
804 #define PRM_GET_BOOL(x) (*((bool *) (x)))
805 #define PRM_GET_INTEGER_LIST(x) (*((int **) (x)))
806 #define PRM_GET_BIGINT(x) (*((UINT64 *) (x)))
807 
808 /*
809  * Macros to call functions
810  */
811 
812 #define PRM_ADJUST_FOR_SET_BIGINT_TO_INTEGER(prm,out_val,in_val,err) \
813  do \
814  { \
815  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
816  assert (sizeof (*(out_val)) == sizeof (int)); \
817  assert (sizeof (*(in_val)) == sizeof (UINT64)); \
818  *(err) = (SYSPRM_ERR) (*((prm)->set_dup)) ((void *) (out_val), PRM_INTEGER, (void *) (in_val), PRM_BIGINT); \
819  } \
820  while (0)
821 
822 #define PRM_ADJUST_FOR_SET_BIGINT_TO_FLOAT(prm,out_val,in_val,err) \
823  do \
824  { \
825  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
826  assert (sizeof (*(out_val)) == sizeof (float)); \
827  assert (sizeof (*(in_val)) == sizeof (UINT64)); \
828  *(err) = (SYSPRM_ERR) (*((prm)->set_dup)) ((void *) (out_val), PRM_FLOAT, (void *) (in_val), PRM_BIGINT); \
829  } \
830  while (0)
831 
832 #define PRM_ADJUST_FOR_SET_INTEGER_TO_INTEGER(prm,out_val,in_val,err) \
833  do \
834  { \
835  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
836  assert (sizeof (*(out_val)) == sizeof (int)); \
837  assert (sizeof (*(in_val)) == sizeof (int)); \
838  *(err) = (SYSPRM_ERR) (*((prm)->set_dup)) ((void *) (out_val), PRM_INTEGER, (void *) (in_val), PRM_INTEGER);\
839  } \
840  while (0)
841 
842 #define PRM_ADJUST_FOR_SET_FLOAT_TO_FLOAT(prm,out_val,in_val,err) \
843  do \
844  { \
845  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
846  assert (sizeof (*(out_val)) == sizeof (float)); \
847  assert (sizeof (*(in_val)) == sizeof (float)); \
848  *(err) = (SYSPRM_ERR) (*((prm)->set_dup)) ((void *) (out_val), PRM_FLOAT, (void *) (in_val), PRM_FLOAT); \
849  } \
850  while (0)
851 
852 #define PRM_ADJUST_FOR_SET_BIGINT_TO_BIGINT(prm,out_val,in_val,err) \
853  do \
854  { \
855  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
856  assert (sizeof (*(out_val)) == sizeof (UINT64)); \
857  assert (sizeof (*(in_val)) == sizeof (UINT64)); \
858  *(err) = (*((prm)->set_dup)) ((void *) (out_val), PRM_BIGINT, (void *) (in_val), PRM_BIGINT); \
859  } \
860  while (0)
861 
862 #define PRM_ADJUST_FOR_GET_INTEGER_TO_BIGINT(prm,out_val,in_val,err) \
863  do \
864  { \
865  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
866  assert (sizeof (*(out_val)) == sizeof (UINT64)); \
867  assert (sizeof (*(in_val)) == sizeof (int)); \
868  *(err) = (SYSPRM_ERR) (*((prm)->get_dup)) ((void *) (out_val), PRM_BIGINT, (void *) (in_val), PRM_INTEGER); \
869  } \
870  while (0)
871 
872 #define PRM_ADJUST_FOR_GET_FLOAT_TO_BIGINT(prm,out_val,in_val,err) \
873  do \
874  { \
875  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
876  assert (sizeof (*(out_val)) == sizeof (UINT64)); \
877  assert (sizeof (*(in_val)) == sizeof (float)); \
878  *(err) = (SYSPRM_ERR) (*((prm)->get_dup)) ((void *) (out_val), PRM_BIGINT, (void *) (in_val), PRM_FLOAT); \
879  } \
880  while (0)
881 
882 #define PRM_ADJUST_FOR_GET_INTEGER_TO_INTEGER(prm,out_val,in_val,err) \
883  do \
884  { \
885  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL);\
886  assert (sizeof (*(out_val)) == sizeof (int)); \
887  assert (sizeof (*(in_val)) == sizeof (int)); \
888  *(err) = (SYSPRM_ERR) (*((prm)->get_dup)) ((void *) (out_val), PRM_INTEGER, (void *) (in_val), PRM_INTEGER); \
889  } \
890  while (0)
891 
892 #define PRM_ADJUST_FOR_GET_FLOAT_TO_FLOAT(prm,out_val,in_val,err) \
893  do \
894  { \
895  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
896  assert (sizeof (*(out_val)) == sizeof (float)); \
897  assert (sizeof (*(in_val)) == sizeof (float)); \
898  *(err) = (SYSPRM_ERR) (*((prm)->get_dup)) ((void *) (out_val), PRM_FLOAT, (void *) (in_val), PRM_FLOAT); \
899  } \
900  while (0)
901 
902 #define PRM_ADJUST_FOR_GET_BIGINT_TO_BIGINT(prm,out_val,in_val,err) \
903  do \
904  { \
905  assert ((prm) != NULL && (out_val) != NULL && (in_val) != NULL); \
906  assert (sizeof (*(out_val)) == sizeof (UINT64));\
907  assert (sizeof (*(in_val)) == sizeof (UINT64)); \
908  *(err) = (SYSPRM_ERR) (*((prm)->get_dup)) ((void *) (out_val), PRM_BIGINT, (void *) (in_val), PRM_BIGINT); \
909  } \
910  while (0)
911 /*
912  * Other macros
913  */
914 #define PRM_DEFAULT_BUFFER_SIZE 256
915 
916 /* initial error and integer lists */
917 static int int_list_initial[1] = { 0 };
918 
919 /*
920  * Global variables of parameters' value
921  * Default values for the parameters
922  * Upper and lower bounds for the parameters
923  */
924 bool PRM_ER_LOG_DEBUG = false;
925 #if !defined(NDEBUG)
926 static bool prm_er_log_debug_default = true;
927 #else /* !NDEBUG */
928 static bool prm_er_log_debug_default = false;
929 #endif /* !NDEBUG */
930 static unsigned int prm_er_log_debug_flag = 0;
931 
934 static unsigned int prm_er_btree_debug_flag = 0;
935 
940 static unsigned int prm_er_log_level_flag = 0;
941 
942 bool PRM_ER_LOG_WARNING = false;
943 static bool prm_er_log_warning_default = false;
944 static unsigned int prm_er_log_warning_flag = 0;
945 
948 static unsigned int prm_er_exit_ask_flag = 0;
949 
950 int PRM_ER_LOG_SIZE = (512 * 1024 * 1024);
951 static int prm_er_log_size_default = (512 * 1024 * 1024); /* 512M */
952 static int prm_er_log_size_lower = (100 * 80);
953 static unsigned int prm_er_log_size_flag = 0;
954 
957 static unsigned int prm_er_log_file_flag = 0;
958 
960 static bool prm_access_ip_control_default = false;
961 static unsigned int prm_access_ip_control_flag = 0;
962 
963 const char *PRM_ACCESS_IP_CONTROL_FILE = "";
964 static const char *prm_access_ip_control_file_default = "";
965 static unsigned int prm_access_ip_control_file_flag = 0;
966 
967 bool PRM_IO_LOCKF_ENABLE = false;
968 static bool prm_io_lockf_enable_default = true;
969 static unsigned int prm_io_lockf_enable_flag = 0;
970 
971 int PRM_SR_NBUFFERS = 128;
972 static int prm_sr_nbuffers_default = 128;
973 static int prm_sr_nbuffers_lower = 1;
974 static unsigned int prm_sr_nbuffers_flag = 0;
975 
976 int PRM_PB_NBUFFERS = 32768;
977 static int prm_pb_nbuffers_default = 32768;
978 static int prm_pb_nbuffers_lower = 1024;
979 static unsigned int prm_pb_nbuffers_flag = 0;
980 
983 static float prm_pb_buffer_flush_ratio_lower = 0.01f;
984 static float prm_pb_buffer_flush_ratio_upper = 0.95f;
985 static unsigned int prm_pb_buffer_flush_ratio_flag = 0;
986 
987 float PRM_HF_UNFILL_FACTOR = 0.10f;
988 static float prm_hf_unfill_factor_default = 0.10f;
989 static float prm_hf_unfill_factor_lower = 0.0f;
990 static float prm_hf_unfill_factor_upper = 0.3f;
991 static unsigned int prm_hf_unfill_factor_flag = 0;
992 
994 static int prm_hf_max_bestspace_entries_default = 1000000; /* 110 M */
995 static unsigned int prm_hf_max_bestspace_entries_flag = 0;
996 
997 float PRM_BT_UNFILL_FACTOR = 0.05f;
998 static float prm_bt_unfill_factor_default = 0.05f;
999 static float prm_bt_unfill_factor_lower = 0.0f;
1000 static float prm_bt_unfill_factor_upper = 0.5f;
1001 static unsigned int prm_bt_unfill_factor_flag = 0;
1002 
1003 float PRM_BT_OID_NBUFFERS = 4.0f;
1004 static float prm_bt_oid_nbuffers_default = 4.0f;
1005 static float prm_bt_oid_nbuffers_lower = 0.049999f;
1006 static float prm_bt_oid_nbuffers_upper = 16.0f;
1007 static unsigned int prm_bt_oid_nbuffers_flag = 0;
1008 
1011 static unsigned int prm_bt_index_scan_oid_order_flag = 0;
1012 
1014 static int prm_bosr_maxtmp_pages = -1; /* Infinite */
1015 static unsigned int prm_bosr_maxtmp_flag = 0;
1016 
1019 
1021 static int prm_lk_escalation_at_default = 100000;
1023 static unsigned int prm_lk_escalation_at_flag = 0;
1024 
1028 
1030 static int prm_lk_timeout_secs_default = -1; /* Infinite */
1032 static unsigned int prm_lk_timeout_secs_flag = 0;
1033 
1037 static unsigned int prm_lk_run_deadlock_interval_flag = 0;
1038 
1039 #if !defined (SERVER_MODE) && !defined (SA_MODE)
1040 #define LOGPB_BUFFER_NPAGES_LOWER 128
1041 #endif /* !defined (SERVER_MODE) && !defined (SA_MODE) */
1043 static int prm_log_nbuffers_default = 16 * ONE_K; /* 16k pages => 64M / 128M / 256M based on log page size */
1045 static unsigned int prm_log_nbuffers_flag = 0;
1046 
1050 static unsigned int prm_log_checkpoint_npages_flag = 0;
1051 
1056 
1060 static unsigned int prm_log_checkpoint_sleep_msecs_flag = 0;
1061 
1064 static unsigned int prm_log_background_archiving_flag = 0;
1065 
1070 static unsigned int prm_log_isolation_level_flag = 0;
1071 
1072 static unsigned int prm_log_media_failure_support_flag = 0;
1073 
1076 static unsigned int prm_commit_on_shutdown_flag = 0;
1077 
1081 static unsigned int prm_shutdown_wait_time_in_secs_flag = 0;
1082 
1084 static bool prm_csql_auto_commit_default = true;
1085 static unsigned int prm_csql_auto_commit_flag = 0;
1086 
1088 static bool prm_log_sweep_clean_default = true;
1089 static unsigned int prm_log_sweep_clean_flag = 0;
1090 
1094 static unsigned int prm_ws_hashtable_size_flag = 0;
1095 
1097 static bool prm_ws_memory_report_default = false;
1098 static unsigned int prm_ws_memory_report_flag = 0;
1099 
1100 bool PRM_GC_ENABLE = false;
1101 static bool prm_gc_enable_default = false;
1102 static unsigned int prm_gc_enable_flag = 0;
1103 
1104 int PRM_TCP_PORT_ID = 1523;
1105 static int prm_tcp_port_id_default = 1523;
1106 static unsigned int prm_tcp_port_id_flag = 0;
1107 static int prm_tcp_port_id_upper = USHRT_MAX;
1108 static int prm_tcp_port_id_lower = 1;
1109 
1113 static unsigned int prm_tcp_connection_timeout_flag = 0;
1114 
1117 static unsigned int prm_optimization_level_flag = 0;
1118 
1119 bool PRM_QO_DUMP = false;
1120 static bool prm_qo_dump_default = false;
1121 static unsigned int prm_qo_dump_flag = 0;
1122 
1123 #if !defined (SERVER_MODE) && !defined (SA_MODE)
1124 #define CSS_MAX_CLIENT_COUNT 4000
1125 #endif /* !defined (SERVER_MODE) && !defined (SA_MODE) */
1130 static unsigned int prm_css_max_clients_flag = 0;
1131 
1132 UINT64 PRM_THREAD_STACKSIZE = (1024 * 1024);
1133 static UINT64 prm_thread_stacksize_default = (1024 * 1024);
1134 static UINT64 prm_thread_stacksize_lower = 64 * 1024;
1135 static UINT64 prm_thread_stacksize_upper = INT_MAX;
1136 static unsigned int prm_thread_stacksize_flag = 0;
1137 
1138 const char *PRM_CFG_DB_HOSTS = "";
1139 static const char *prm_cfg_db_hosts_default = NULL;
1140 static unsigned int prm_cfg_db_hosts_flag = 0;
1141 
1144 static unsigned int prm_reset_tr_parser_flag = 0;
1145 
1149 static unsigned int prm_io_backup_nbuffers_flag = 0;
1150 
1153 static UINT64 prm_io_backup_max_volume_size_lower = 1024 * 32;
1155 static unsigned int prm_io_backup_max_volume_size_flag = 0;
1156 
1160 static unsigned int prm_io_backup_sleep_msecs_flag = 0;
1161 
1163 static int prm_max_pages_in_temp_file_cache_default = 1000; /* pages */
1166 
1171 
1174 static unsigned int prm_pthread_scope_process_flag = 0;
1175 
1180 static unsigned int prm_temp_mem_buffer_pages_flag = 0;
1181 
1186 
1189 static unsigned int prm_dont_reuse_heap_file_flag = 0;
1190 
1191 int PRM_INSERT_MODE = 1 + 2;
1192 static int prm_insert_mode_default = 1 + 2;
1193 static int prm_insert_mode_lower = 0;
1194 static int prm_insert_mode_upper = 31; /* For backward compatibility */
1195 static unsigned int prm_insert_mode_flag = 0;
1196 
1201 static unsigned int prm_lk_max_scanid_bit_flag = 0;
1202 
1205 static unsigned int prm_hostvar_late_binding_flag = 0;
1206 
1207 bool PRM_ENABLE_HISTO = false;
1208 static bool prm_enable_histo_default = false;
1209 static unsigned int prm_enable_histo_flag = 0;
1210 
1213 static unsigned int prm_mutex_busy_waiting_cnt_flag = 0;
1214 
1216 static int prm_pb_num_LRU_chains_default = 0; /* system define */
1219 static unsigned int prm_pb_num_LRU_chains_flag = 0;
1220 
1225 
1228 static unsigned int prm_adaptive_flush_control_flag = 0;
1229 
1234 static unsigned int prm_max_flush_pages_per_second_flag = 0;
1235 
1239 static int prm_pb_sync_on_nflush_upper = INT_MAX;
1240 static unsigned int prm_pb_sync_on_nflush_flag = 0;
1241 
1242 #if !defined (SERVER_MODE) && !defined (SA_MODE)
1243 typedef enum
1244 {
1250 #endif /* !defined (SERVER_MODE) && !defined (SA_MODE) */
1252 #if !defined(NDEBUG)
1254 #else /* !NDEBUG */
1256 #endif /* !NDEBUG */
1258 
1261 static unsigned int prm_oracle_style_outerjoin_flag = 0;
1262 
1267 static unsigned int prm_compat_mode_flag = 0;
1268 
1269 bool PRM_ANSI_QUOTES = true;
1270 static bool prm_ansi_quotes_default = true;
1271 static unsigned int prm_ansi_quotes_flag = 0;
1272 
1275 static int prm_week_format_lower = 0;
1276 static int prm_week_format_upper = 7;
1277 static unsigned int prm_week_format_flag = 0;
1278 
1279 bool PRM_TEST_MODE = false;
1280 static bool prm_test_mode_default = false;
1281 static unsigned int prm_test_mode_flag = 0;
1282 
1285 static unsigned int prm_only_full_group_by_flag = 0;
1286 
1288 static bool prm_pipes_as_concat_default = true;
1289 static unsigned int prm_pipes_as_concat_flag = 0;
1290 
1294 
1298 
1301 static unsigned int prm_no_backslash_escapes_flag = 0;
1302 
1306 static UINT64 prm_group_concat_max_len_upper = INT_MAX;
1307 static unsigned int prm_group_concat_max_len_flag = 0;
1308 
1309 UINT64 PRM_STRING_MAX_SIZE_BYTES = 1024 * 1024;
1310 static UINT64 prm_string_max_size_bytes_default = 1024 * 1024;
1312 static UINT64 prm_string_max_size_bytes_upper = 32 * 1024 * 1024;
1313 static unsigned int prm_string_max_size_bytes_flag = 0;
1314 
1318 
1322 
1326 
1328 static bool prm_plus_as_concat_default = true;
1329 static unsigned int prm_plus_as_concat_flag = 0;
1330 
1334 
1339 static unsigned int prm_like_term_selectivity_flag = 0;
1340 
1344 static unsigned int prm_max_outer_card_of_idxjoin_flag = 0;
1345 
1348 static unsigned int prm_oracle_style_empty_string_flag = 0;
1349 
1352 static int prm_suppress_fsync_upper = 100;
1354 static unsigned int prm_suppress_fsync_flag = 0;
1355 
1358 static unsigned int prm_call_stack_dump_on_error_flag = 0;
1359 
1362 static unsigned int prm_call_stack_dump_activation_flag = 0;
1363 
1367 
1371 
1372 bool PRM_DBFILES_PROTECT = false;
1373 static bool prm_dbfiles_protect_default = false;
1374 static unsigned int prm_dbfiles_protect_flag = 0;
1375 
1378 static unsigned int prm_auto_restart_server_flag = 0;
1379 
1382 static unsigned int prm_xasl_cache_max_entries_flag = 0;
1383 
1388 static unsigned int prm_xasl_cache_max_clones_flag = 0;
1389 
1391 static int prm_xasl_cache_timeout_default = -1; /* infinity */
1392 static unsigned int prm_xasl_cache_timeout_flag = 0;
1393 
1396 static unsigned int prm_xasl_cache_logging_flag = 0;
1397 
1401 
1405 
1410 static unsigned int prm_list_query_cache_mode_flag = 0;
1411 
1417 
1422 static unsigned int prm_list_max_query_cache_pages_flag = 0;
1423 
1426 static unsigned int prm_use_orderby_sort_limit_flag = 0;
1427 
1428 static unsigned int prm_replication_mode_flag = 0;
1429 
1435 static unsigned int prm_ha_mode_flag = 0;
1436 
1441 static unsigned int prm_ha_server_state_flag = 0;
1442 
1447 static unsigned int prm_ha_log_applier_state_flag = 0;
1448 
1449 const char *PRM_HA_NODE_LIST = "";
1450 static const char *prm_ha_node_list_default = NULL;
1451 static unsigned int prm_ha_node_list_flag = 0;
1452 
1453 const char *PRM_HA_REPLICA_LIST = "";
1454 static const char *prm_ha_replica_list_default = NULL;
1455 static unsigned int prm_ha_replica_list_flag = 0;
1456 
1457 const char *PRM_HA_DB_LIST = "";
1458 static const char *prm_ha_db_list_default = NULL;
1459 static unsigned int prm_ha_db_list_flag = 0;
1460 
1461 const char *PRM_HA_COPY_LOG_BASE = "";
1462 static const char *prm_ha_copy_log_base_default = NULL;
1463 static unsigned int prm_ha_copy_log_base_flag = 0;
1464 
1465 const char *PRM_HA_COPY_SYNC_MODE = "";
1467 static unsigned int prm_ha_copy_sync_mode_flag = 0;
1468 
1471 static int prm_ha_apply_max_mem_size_upper = INT_MAX;
1473 static unsigned int prm_ha_apply_max_mem_size_flag = 0;
1474 
1477 static unsigned int prm_ha_port_id_flag = 0;
1478 static int prm_ha_port_id_upper = USHRT_MAX;
1479 static int prm_ha_port_id_lower = 1;
1480 
1483 static unsigned int prm_ha_init_timer_im_msecs_flag = 0;
1484 
1488 
1492 
1496 
1500 
1504 
1508 
1512 
1516 
1520 
1523 static unsigned int prm_ha_max_heartbeat_gap_flag = 0;
1524 
1525 const char *PRM_HA_PING_HOSTS = "";
1526 static const char *prm_ha_ping_hosts_default = NULL;
1527 static unsigned int prm_ha_ping_hosts_flag = 0;
1528 
1532 
1536 
1541 
1542 bool PRM_HA_SQL_LOGGING = false;
1543 static bool prm_ha_sql_logging_default = false;
1544 static unsigned int prm_ha_sql_logging_flag = 0;
1545 
1550 static unsigned int prm_ha_sql_log_max_size_in_mb_flag = 0;
1551 
1556 static unsigned int prm_ha_copy_log_max_archives_flag = 0;
1557 
1560 static int prm_ha_copy_log_timeout_upper = INT_MAX;
1562 static unsigned int prm_ha_copy_log_timeout_flag = 0;
1563 
1568 static unsigned int prm_ha_replica_delay_in_secs_flag = 0;
1569 
1570 const char *PRM_HA_REPLICA_TIME_BOUND = "";
1572 static unsigned int prm_ha_replica_time_bound_flag = 0;
1573 
1578 static unsigned int prm_ha_delay_limit_in_secs_flag = 0;
1579 
1585 
1591 
1597 
1600 static unsigned int prm_general_reserve_01_flag = 0;
1601 
1604 static unsigned int prm_compat_primary_key_flag = 0;
1605 
1606 static unsigned int prm_log_header_flush_interval_flag = 0;
1607 
1609 static bool prm_log_async_commit_default = false;
1610 static unsigned int prm_log_async_commit_flag = 0;
1611 
1616 
1618 
1619 static unsigned int prm_log_bg_flush_num_pages_flag = 0;
1620 
1622 static bool prm_intl_mbs_support_default = false;
1623 static unsigned int prm_intl_mbs_support_flag = 0;
1624 
1625 bool PRM_LOG_COMPRESS = true;
1626 static bool prm_log_compress_default = true;
1627 static unsigned int prm_log_compress_flag = 0;
1628 
1631 static unsigned int prm_block_nowhere_statement_flag = 0;
1632 
1635 static unsigned int prm_block_ddl_statement_flag = 0;
1636 
1637 #if defined (ENABLE_UNUSED_FUNCTION)
1638 bool PRM_SINGLE_BYTE_COMPARE = false;
1639 static bool prm_single_byte_compare_default = false;
1640 static unsigned int prm_single_byte_compare_flag = 0;
1641 #endif
1642 
1647 static unsigned int prm_csql_history_num_flag = 0;
1648 
1649 bool PRM_LOG_TRACE_DEBUG = false;
1650 static bool prm_log_trace_debug_default = false;
1651 static unsigned int prm_log_trace_debug_flag = 0;
1652 
1653 const char *PRM_DL_FORK = "";
1654 static const char *prm_dl_fork_default = NULL;
1655 static unsigned int prm_dl_fork_flag = 0;
1656 
1659 static unsigned int prm_er_production_mode_flag = 0;
1660 
1664 static unsigned int prm_er_stop_on_error_flag = 0;
1665 
1668 static unsigned int prm_tcp_rcvbuf_size_flag = 0;
1669 
1672 static unsigned int prm_tcp_sndbuf_size_flag = 0;
1673 
1674 bool PRM_TCP_NODELAY = false;
1675 static bool prm_tcp_nodelay_default = false;
1676 static unsigned int prm_tcp_nodelay_flag = 0;
1677 
1678 bool PRM_TCP_KEEPALIVE = true;
1679 static bool prm_tcp_keepalive_default = true;
1680 static unsigned int prm_tcp_keepalive_flag = 0;
1681 
1684 static unsigned int prm_csql_single_line_mode_flag = 0;
1685 
1686 bool PRM_XASL_DEBUG_DUMP = false;
1687 static bool prm_xasl_debug_dump_default = false;
1688 static unsigned int prm_xasl_debug_dump_flag = 0;
1689 
1690 int PRM_LOG_MAX_ARCHIVES = INT_MAX;
1691 static int prm_log_max_archives_default = INT_MAX;
1693 static unsigned int prm_log_max_archives_flag = 0;
1694 
1697 static unsigned int prm_force_remove_log_archives_flag = 0;
1698 
1703 
1704 bool PRM_LOG_NO_LOGGING = false;
1705 static bool prm_log_no_logging_default = false;
1706 static unsigned int prm_log_no_logging_flag = 0;
1707 
1710 static unsigned int prm_unloaddb_ignore_error_flag = 0;
1711 
1715 static unsigned int prm_unloaddb_lock_timeout_flag = 0;
1716 
1720 static unsigned int prm_loaddb_flush_interval_flag = 0;
1721 
1722 const char *PRM_IO_TEMP_VOLUME_PATH = "";
1724 static unsigned int prm_io_temp_volume_path_flag = 0;
1725 
1726 const char *PRM_TDE_KEYS_FILE_PATH = "";
1728 static unsigned int prm_tde_keys_file_path_flag = 0;
1729 
1730 const char *PRM_IO_VOLUME_EXT_PATH = "";
1732 static unsigned int prm_io_volume_ext_path_flag = 0;
1733 
1736 static unsigned int prm_unique_error_key_value_flag = 0;
1737 
1739 static bool prm_use_system_malloc_default = false;
1740 static unsigned int prm_use_system_malloc_flag = 0;
1741 
1742 const char *PRM_EVENT_HANDLER = "";
1743 static const char *prm_event_handler_default = NULL;
1744 static unsigned int prm_event_handler_flag = 0;
1745 
1748 static unsigned int prm_event_activation_flag = 0;
1749 
1750 bool PRM_READ_ONLY_MODE = false;
1751 static bool prm_read_only_mode_default = false;
1752 static unsigned int prm_read_only_mode_flag = 0;
1753 
1757 static unsigned int prm_mnt_waiting_thread_flag = 0;
1758 
1761 static unsigned int prm_mnt_stats_threshold_flag = 0;
1762 
1763 const char *PRM_SERVICE_SERVICE_LIST = "";
1765 static unsigned int prm_service_service_list_flag = 0;
1766 
1767 const char *PRM_SERVICE_SERVER_LIST = "";
1769 static unsigned int prm_service_server_list_flag = 0;
1770 
1771 int PRM_SESSION_STATE_TIMEOUT = 60 * 60 * 6; /* 6 hours */
1772 static int prm_session_timeout_default = 60 * 60 * 6; /* 6 hours */
1773 static int prm_session_timeout_lower = 60; /* 1 minute */
1774 static int prm_session_timeout_upper = 60 * 60 * 24 * 365; /* 1 nonleap year */
1775 static unsigned int prm_session_timeout_flag = 0;
1776 
1779 static int prm_multi_range_opt_limit_lower = 0; /* disabled */
1781 static unsigned int prm_multi_range_opt_limit_flag = 0;
1782 
1783 UINT64 PRM_DB_VOLUME_SIZE = 536870912ULL;
1784 static UINT64 prm_db_volume_size_default = 536870912ULL; /* 512M */
1785 static UINT64 prm_db_volume_size_lower = 0;
1786 static UINT64 prm_db_volume_size_upper = 21474836480ULL; /* 20G */
1787 static unsigned int prm_db_volume_size_flag = 0;
1788 
1789 UINT64 PRM_LOG_VOLUME_SIZE = 536870912ULL;
1790 static UINT64 prm_log_volume_size_default = 536870912ULL; /* 512M */
1791 static UINT64 prm_log_volume_size_lower = 20971520ULL; /* 20M */
1792 static UINT64 prm_log_volume_size_upper = 4294967296ULL; /* 4G */
1793 static unsigned int prm_log_volume_size_flag = 0;
1794 
1797 static unsigned int prm_intl_number_lang_flag = 0;
1798 
1801 static unsigned int prm_intl_date_lang_flag = 0;
1802 
1806 
1810 
1813 static unsigned int prm_intl_check_input_string_flag = 0;
1814 
1817 static unsigned int prm_check_peer_alive_flag = 0;
1818 
1820 static UINT64 prm_generic_vol_prealloc_size_default = 52428800ULL; /* 50M */
1822 static UINT64 prm_generic_vol_prealloc_size_upper = 21474836480ULL; /* 20G */
1823 static unsigned int prm_generic_vol_prealloc_size_flag = 0;
1824 
1828 static int prm_sql_trace_slow_msecs_upper = 1000 * 60 * 60 * 24; /* 24 hours */
1829 static unsigned int prm_sql_trace_slow_msecs_flag = 0;
1830 
1833 static unsigned int prm_sql_trace_execution_plan_flag = 0;
1834 
1838 static unsigned int prm_log_trace_flush_time_msecs_flag = 0;
1839 
1842 static unsigned int prm_intl_collation_flag = 0;
1843 
1846 static int prm_sort_limit_max_count_lower = 0; /* disabled */
1847 static int prm_sort_limit_max_count_upper = INT_MAX;
1848 static unsigned int prm_sort_limit_max_count_flag = 0;
1849 
1853 static unsigned int prm_sql_trace_ioreads_flag = 0;
1854 
1855 bool PRM_QUERY_TRACE = false;
1856 static bool prm_query_trace_default = false;
1857 static unsigned int prm_query_trace_flag = 0;
1858 
1863 static unsigned int prm_query_trace_format_flag = 0;
1864 
1867 static unsigned int prm_max_recursion_sql_depth_flag = 0;
1868 
1869 UINT64 PRM_MAX_AGG_HASH_SIZE = 2 * 1024 * 1024; /* 2 MB */
1870 static UINT64 prm_max_agg_hash_size_default = 2 * 1024 * 1024; /* 2 MB */
1871 static UINT64 prm_max_agg_hash_size_lower = 32 * 1024; /* 32 KB */
1872 static UINT64 prm_max_agg_hash_size_upper = 128 * 1024 * 1024; /* 128 MB */
1873 static unsigned int prm_max_agg_hash_size_flag = 0;
1874 
1877 static unsigned int prm_agg_hash_respect_order_flag = 0;
1878 
1881 static unsigned int prm_use_btree_fence_key_flag = 0;
1882 
1886 
1887 float PRM_PB_AOUT_RATIO = 0.0f;
1888 static float prm_pb_aout_ratio_default = 0.0f;
1889 static float prm_pb_aout_ratio_upper = 3.0;
1890 static float prm_pb_aout_ratio_lower = 0;
1891 static unsigned int prm_pb_aout_ratio_flag = 0;
1892 
1896 
1897 UINT64 PRM_MAX_HASH_LIST_SCAN_SIZE = 4 * 1024 * 1024; /* 4 MB */
1898 static UINT64 prm_max_hash_list_scan_size_default = 4 * 1024 * 1024; /* 4 MB */
1899 static UINT64 prm_max_hash_list_scan_size_lower = 0; /* 0 */
1900 static UINT64 prm_max_hash_list_scan_size_upper = 128 * 1024 * 1024; /* 128 MB */
1901 static unsigned int prm_max_hash_list_scan_size_flag = 0;
1902 
1905 static unsigned int prm_optimizer_reserve_02_flag = 0;
1906 
1909 static unsigned int prm_optimizer_reserve_03_flag = 0;
1910 
1913 static unsigned int prm_optimizer_reserve_04_flag = 0;
1914 
1917 static unsigned int prm_optimizer_reserve_05_flag = 0;
1918 
1921 static unsigned int prm_optimizer_reserve_06_flag = 0;
1922 
1925 static unsigned int prm_optimizer_reserve_07_flag = 0;
1926 
1929 static unsigned int prm_optimizer_reserve_08_flag = 0;
1930 
1933 static unsigned int prm_optimizer_reserve_09_flag = 0;
1934 
1937 static unsigned int prm_optimizer_reserve_10_flag = 0;
1938 
1941 static unsigned int prm_optimizer_reserve_11_flag = 0;
1942 
1945 static unsigned int prm_optimizer_reserve_12_flag = 0;
1946 
1949 static unsigned int prm_optimizer_reserve_13_flag = 0;
1950 
1953 static unsigned int prm_optimizer_reserve_14_flag = 0;
1954 
1957 static unsigned int prm_optimizer_reserve_15_flag = 0;
1958 
1961 static unsigned int prm_optimizer_reserve_16_flag = 0;
1962 
1965 static unsigned int prm_optimizer_reserve_17_flag = 0;
1966 
1969 static unsigned int prm_optimizer_reserve_18_flag = 0;
1970 
1973 static unsigned int prm_optimizer_reserve_19_flag = 0;
1974 
1977 static unsigned int prm_optimizer_reserve_20_flag = 0;
1978 
1982 
1984 static float prm_pb_lru_hot_ratio_default = 0.4f;
1985 static float prm_pb_lru_hot_ratio_upper = 0.90f;
1986 static float prm_pb_lru_hot_ratio_lower = 0.05f;
1987 static unsigned int prm_pb_lru_hot_ratio_flag = 0;
1988 
1990 static float prm_pb_lru_buffer_ratio_default = 0.05f;
1991 static float prm_pb_lru_buffer_ratio_upper = 0.90f;
1992 static float prm_pb_lru_buffer_ratio_lower = 0.05f;
1993 static unsigned int prm_pb_lru_buffer_ratio_flag = 0;
1994 
1999 
2000 #if !defined (SERVER_MODE) && !defined (SA_MODE)
2001 #define VACUUM_LOG_BLOCK_PAGES_DEFAULT 0
2002 #define VACUUM_MAX_WORKER_COUNT 0
2003 #endif /* !defined (SERVER_MODE) && !defined (SA_MODE) */
2008 static unsigned int prm_vacuum_log_block_pages_flag = 0;
2009 
2014 static unsigned int prm_vacuum_worker_count_flag = 0;
2015 
2018 static unsigned int prm_er_log_vacuum_flag = 0;
2019 
2020 bool PRM_DISABLE_VACUUM = false;
2021 static bool prm_disable_vacuum_default = false;
2022 static unsigned int prm_disable_vacuum_flag = 0;
2023 
2024 bool PRM_LOG_BTREE_OPS = false;
2025 static bool prm_log_btree_ops_default = false;
2026 static unsigned int prm_log_btree_ops_flag = 0;
2027 
2030 static unsigned int prm_object_print_format_oid_flag = 0;
2031 
2034 static unsigned int prm_timezone_flag = 0;
2035 
2038 static unsigned int prm_server_timezone_flag = 0;
2039 
2042 static unsigned int prm_leap_second_support_flag = 0;
2043 
2047 
2049 static unsigned int prm_vacuum_prefetch_log_mode_flag = 0; // obsolete; not sure it is needed
2050 
2052 static unsigned int prm_pb_neighbor_flush_nondirty_flag = 0;
2054 
2056 static unsigned int prm_pb_neighbor_flush_pages_flag = 0;
2057 static unsigned int prm_pb_neighbor_flush_pages_default = 8;
2058 static unsigned int prm_pb_neighbor_flush_pages_upper = 32;
2059 static unsigned int prm_pb_neighbor_flush_pages_lower = 0;
2060 
2064 
2070 
2074 
2079 static unsigned int prm_ha_repl_filter_type_flag = 0;
2080 
2081 const char *PRM_HA_REPL_FILTER_FILE = "";
2082 static const char *prm_ha_repl_filter_file_default = "";
2083 static unsigned int prm_ha_repl_filter_file_flag = 0;
2084 
2086 static const bool prm_compensate_debug_default = false;
2087 static unsigned int prm_compensate_debug_flag = 0;
2088 
2089 bool PRM_POSTPONE_DEBUG = false;
2090 static const bool prm_postpone_debug_default = false;
2091 static unsigned int prm_postpone_debug_flag = 0;
2092 
2094 static const bool prm_client_class_cache_debug_default = false;
2095 static unsigned int prm_client_class_cache_debug_flag = 0;
2096 
2100 
2103 static unsigned int prm_pb_sequential_victim_flush_flag = 0;
2104 
2106 static bool prm_log_unique_stats_default = false;
2107 static unsigned int prm_log_unique_stats_flag = 0;
2108 
2111 static unsigned int prm_logpb_logging_debug_flag = 0;
2112 
2116 
2121 static unsigned int prm_extended_statistics_flag = 0;
2122 
2125 static unsigned int prm_enable_string_compression_flag = 0;
2126 
2132 
2133 bool PRM_DISK_LOGGING = false;
2134 static bool prm_disk_logging_default = false;
2135 static unsigned int prm_disk_logging_flag = 0;
2136 
2137 bool PRM_FILE_LOGGING = false;
2138 static bool prm_file_logging_default = false;
2139 static unsigned int prm_file_logging_flag = 0;
2140 
2145 static unsigned int prm_pb_num_private_chains_flag = 0;
2146 
2148 static bool prm_pb_monitor_locks_default = false;
2149 static unsigned int prm_pb_monitor_locks_flag = 0;
2150 
2153 static int prm_cte_max_recursions_upper = 1000000;
2155 static unsigned int prm_cte_max_recursions_flag = 0;
2156 
2159 static unsigned int prm_json_log_allocations_flag = 0;
2160 
2163 static unsigned int prm_json_max_array_idx_flag = 0;
2166 
2169 static unsigned int prm_connection_logging_flag = 0;
2170 
2173 static unsigned int prm_thread_logging_flag_flag = 0;
2174 
2175 bool PRM_LOG_QUERY_LISTS = false;
2176 static bool prm_log_query_lists_default = false;
2177 static unsigned int prm_log_query_lists_flag = 0;
2178 
2181 static unsigned int prm_thread_connection_pooling_flag = 0;
2182 
2185 static int prm_thread_connection_timeout_seconds_upper = 60 * 60; // one hour
2188 
2191 static unsigned int prm_thread_worker_pooling_flag = 0;
2192 
2195 static int prm_thread_worker_timeout_seconds_upper = 60 * 60; // one hour
2196 static int prm_thread_worker_timeout_seconds_lower = -1; // infinite
2198 
2199 unsigned int PRM_DWB_SIZE = 2 * 1024 * 1024; /* 2M */
2200 static unsigned int prm_dwb_size_flag = 0;
2201 static unsigned int prm_dwb_size_default = (2 * 1024 * 1024); /* 2M */
2202 static unsigned int prm_dwb_size_upper = (32 * 1024 * 1024); /* 32M */
2203 static unsigned int prm_dwb_size_lower = 0;
2204 
2205 unsigned int PRM_DWB_BLOCKS = 2;
2206 static unsigned int prm_dwb_blocks_flag = 0;
2207 static unsigned int prm_dwb_blocks_default = 2;
2208 static unsigned int prm_dwb_blocks_upper = 32;
2209 static unsigned int prm_dwb_blocks_lower = 0;
2210 
2213 static unsigned int prm_enable_dwb_flush_thread_flag = 0;
2214 
2215 bool PRM_DWB_LOGGING = false;
2216 static bool prm_dwb_logging_default = false;
2217 static unsigned int prm_dwb_logging_flag = 0;
2218 
2221 static unsigned int prm_data_file_advise_flag = 0;
2222 static unsigned int prm_data_file_advise_upper = 6;
2223 static unsigned int prm_data_file_advise_lower = 0;
2224 
2227 static unsigned int prm_debug_log_archives_flag = 0;
2228 
2229 bool PRM_DEBUG_ES = false;
2230 static bool prm_debug_es_default = false;
2231 static unsigned int prm_debug_es_flag = 0;
2232 
2233 bool PRM_DEBUG_BESTSPACE = false;
2234 static bool prm_debug_bestspace_default = false;
2235 static unsigned int prm_debug_bestspace_flag = 0;
2236 
2237 bool PRM_DEBUG_LOGWR = false;
2238 static bool prm_debug_logwr_default = false;
2239 static unsigned int prm_debug_logwr_flag = 0;
2240 
2242 static bool prm_debug_autocommit_default = false;
2243 static unsigned int prm_debug_autocommit_flag = 0;
2244 
2247 static unsigned int prm_debug_replication_data_flag = 0;
2248 
2249 bool PRM_TRACK_REQUESTS = false;
2250 static bool prm_track_requests_default = false;
2251 static unsigned int prm_track_requests_flag = 0;
2252 
2255 static unsigned int prm_log_pgbuf_victim_flush_flag = 0;
2256 
2259 static unsigned int prm_log_chkpt_detailed_flag = 0;
2260 
2262 static UINT64 prm_ib_task_memsize_default = 16 * ONE_M;
2264 static UINT64 prm_ib_task_memsize_upper = 128 * ONE_M;
2265 static unsigned int prm_ib_task_memsize_flag = 0;
2266 
2267 bool PRM_STATS_ON = false;
2268 static bool prm_stats_on_default = false;
2269 static unsigned int prm_stats_on_flag = 0;
2270 
2275 static unsigned int prm_loaddb_workers_flag = 0;
2276 
2277 bool PRM_PERF_TEST_MODE = false;
2278 static bool prm_perf_test_mode_default = false;
2279 static unsigned int prm_perf_test_mode_flag = 0;
2280 
2281 bool PRM_REPR_CACHE_LOG = false;
2282 static bool prm_repr_cache_log_default = false;
2283 static unsigned int prm_repr_cache_log_flag = 0;
2284 
2285 bool PRM_NEW_LFHASH = false;
2286 static bool prm_new_lfhash_default = false;
2287 static unsigned int prm_new_lfhash_flag = 0;
2288 
2291 static unsigned int prm_heap_info_cache_logging_flag = 0;
2292 
2295 static unsigned int prm_tde_default_algorithm_flag = 0;
2296 
2299 static unsigned int prm_java_stored_procedure_flag = 0;
2300 
2305 static unsigned int prm_java_stored_procedure_port_flag = 0;
2306 
2310 
2316 
2320 
2323 static unsigned int prm_allow_truncated_string_flag = 0;
2324 
2325 bool PRM_TB_REUSE_OID = true;
2327 static unsigned int prm_create_table_reuseoid = 0;
2328 
2331 static unsigned int prm_use_stat_estimation_flag = 0;
2332 
2335 static unsigned int prm_ignore_trailing_space_flag = 0;
2336 
2337 bool PRM_DDL_AUDIT_LOG = false;
2338 static bool prm_ddl_audit_log_default = false;
2339 static unsigned int prm_ddl_audit_log_flag = 0;
2340 
2341 UINT64 PRM_DDL_AUDIT_LOG_SIZE = 10485760ULL;
2342 static UINT64 prm_ddl_audit_log_size_default = 10485760ULL; /* 10M */
2343 static UINT64 prm_ddl_audit_log_size_lower = 10485760ULL; /* 10M */
2344 static UINT64 prm_ddl_audit_log_size_upper = 2147483648ULL; /* 2G */
2345 static unsigned int prm_ddl_audit_log_size_flag = 0;
2346 
2347 typedef int (*DUP_PRM_FUNC) (void *, SYSPRM_DATATYPE, void *, SYSPRM_DATATYPE);
2348 
2349 static int prm_size_to_io_pages (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2350 static int prm_io_pages_to_size (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2351 
2352 static int prm_size_to_log_pages (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2353 static int prm_log_pages_to_size (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2354 
2355 static int prm_msec_to_sec (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2356 static int prm_sec_to_msec (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2357 
2358 static int prm_sec_to_min (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2359 static int prm_min_to_sec (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2360 
2361 static int prm_equal_to_ori (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type);
2362 #if defined(SERVER_MODE)
2363 static void update_session_state_from_sys_params (THREAD_ENTRY * thread_p, SESSION_PARAM * session_params);
2364 #endif
2365 
2367 {
2368  PARAM_ID id; /* parameter ID */
2369  const char *name; /* the keyword expected */
2370  unsigned int static_flag; /* bitmask flag representing status words */
2371  SYSPRM_DATATYPE datatype; /* value data type */
2372  unsigned int *dynamic_flag; /* shared by both original and duplicated */
2373  void *default_value; /* address of (pointer to) default value */
2374  void *value; /* address of (pointer to) current value */
2375  void *upper_limit; /* highest allowable value */
2376  void *lower_limit; /* lowest allowable value */
2377  char *force_value; /* address of (pointer to) force value string */
2378  DUP_PRM_FUNC set_dup; /* set duplicated value to original value */
2379  DUP_PRM_FUNC get_dup; /* get duplicated value from original value */
2380 };
2382 
2383 static SYSPRM_PARAM prm_Def[] = {
2387  PRM_BOOLEAN,
2389  (void *) &prm_er_log_debug_default,
2390  (void *) &PRM_ER_LOG_DEBUG,
2391  (void *) NULL, (void *) NULL,
2392  (char *) NULL,
2393  (DUP_PRM_FUNC) NULL,
2394  (DUP_PRM_FUNC) NULL},
2398  PRM_INTEGER,
2400  (void *) &prm_er_btree_debug_default,
2401  (void *) &PRM_ER_BTREE_DEBUG,
2402  (void *) NULL, (void *) NULL,
2403  (char *) NULL,
2404  (DUP_PRM_FUNC) NULL,
2405  (DUP_PRM_FUNC) NULL},
2409  PRM_KEYWORD,
2411  (void *) &prm_er_log_level_default,
2412  (void *) &PRM_ER_LOG_LEVEL,
2413  (void *) &prm_er_log_level_upper, (void *) &prm_er_log_level_lower,
2414  (char *) NULL,
2415  (DUP_PRM_FUNC) NULL,
2416  (DUP_PRM_FUNC) NULL},
2420  PRM_BOOLEAN,
2422  (void *) &prm_er_log_warning_default,
2423  (void *) &PRM_ER_LOG_WARNING,
2424  (void *) NULL, (void *) NULL,
2425  (char *) NULL,
2426  (DUP_PRM_FUNC) NULL,
2427  (DUP_PRM_FUNC) NULL},
2431  PRM_INTEGER,
2433  (void *) &prm_er_exit_ask_default,
2434  (void *) &PRM_ER_EXIT_ASK,
2435  (void *) NULL, (void *) NULL,
2436  (char *) NULL,
2437  (DUP_PRM_FUNC) NULL,
2438  (DUP_PRM_FUNC) NULL},
2442  PRM_INTEGER,
2444  (void *) &prm_er_log_size_default,
2445  (void *) &PRM_ER_LOG_SIZE,
2446  (void *) NULL, (void *) &prm_er_log_size_lower,
2447  (char *) NULL,
2448  (DUP_PRM_FUNC) NULL,
2449  (DUP_PRM_FUNC) NULL},
2453  PRM_STRING,
2455  (void *) &prm_er_log_file_default,
2456  (void *) &PRM_ER_LOG_FILE,
2457  (void *) NULL, (void *) NULL,
2458  (char *) NULL,
2459  (DUP_PRM_FUNC) NULL,
2460  (DUP_PRM_FUNC) NULL},
2464  PRM_BOOLEAN,
2467  (void *) &PRM_ACCESS_IP_CONTROL,
2468  (void *) NULL, (void *) NULL,
2469  (char *) NULL,
2470  (DUP_PRM_FUNC) NULL,
2471  (DUP_PRM_FUNC) NULL},
2475  PRM_STRING,
2478  (void *) &PRM_ACCESS_IP_CONTROL_FILE,
2479  (void *) NULL, (void *) NULL,
2480  (char *) NULL,
2481  (DUP_PRM_FUNC) NULL,
2482  (DUP_PRM_FUNC) NULL},
2486  PRM_BOOLEAN,
2488  (void *) &prm_io_lockf_enable_default,
2489  (void *) &PRM_IO_LOCKF_ENABLE,
2490  (void *) NULL, (void *) NULL,
2491  (char *) NULL,
2492  (DUP_PRM_FUNC) NULL,
2493  (DUP_PRM_FUNC) NULL},
2497  PRM_INTEGER,
2499  (void *) &prm_sr_nbuffers_default,
2500  (void *) &PRM_SR_NBUFFERS,
2501  (void *) NULL, (void *) &prm_sr_nbuffers_lower,
2502  (char *) NULL,
2503  (DUP_PRM_FUNC) NULL,
2504  (DUP_PRM_FUNC) NULL},
2508  PRM_INTEGER,
2510  (void *) &prm_sr_nbuffers_default,
2511  (void *) &PRM_SR_NBUFFERS,
2512  (void *) NULL, (void *) &prm_sr_nbuffers_lower,
2513  (char *) NULL,
2518  (PRM_FOR_SERVER | PRM_HIDDEN | PRM_USER_CHANGE), /* todo: why user change? */
2519  PRM_FLOAT,
2522  (void *) &PRM_PB_BUFFER_FLUSH_RATIO,
2525  (char *) NULL,
2526  (DUP_PRM_FUNC) NULL,
2527  (DUP_PRM_FUNC) NULL},
2531  PRM_INTEGER,
2533  (void *) &prm_pb_nbuffers_default,
2534  (void *) &PRM_PB_NBUFFERS,
2535  (void *) NULL, (void *) &prm_pb_nbuffers_lower,
2536  (char *) NULL,
2537  (DUP_PRM_FUNC) NULL,
2538  (DUP_PRM_FUNC) NULL},
2542  PRM_INTEGER,
2544  (void *) &prm_pb_nbuffers_default,
2545  (void *) &PRM_PB_NBUFFERS,
2546  (void *) NULL, (void *) &prm_pb_nbuffers_lower,
2547  (char *) NULL,
2549  (DUP_PRM_FUNC) prm_io_pages_to_size},
2553  PRM_FLOAT,
2555  (void *) &prm_hf_unfill_factor_default,
2556  (void *) &PRM_HF_UNFILL_FACTOR,
2558  (char *) NULL,
2559  (DUP_PRM_FUNC) NULL,
2560  (DUP_PRM_FUNC) NULL},
2564  PRM_INTEGER,
2567  (void *) &PRM_HF_MAX_BESTSPACE_ENTRIES,
2568  (void *) NULL, (void *) NULL,
2569  (char *) NULL,
2570  (DUP_PRM_FUNC) NULL,
2571  (DUP_PRM_FUNC) NULL},
2575  PRM_FLOAT,
2577  (void *) &prm_bt_unfill_factor_default,
2578  (void *) &PRM_BT_UNFILL_FACTOR,
2580  (char *) NULL,
2581  (DUP_PRM_FUNC) NULL,
2582  (DUP_PRM_FUNC) NULL},
2586  PRM_FLOAT,
2588  (void *) &prm_bt_oid_nbuffers_default,
2589  (void *) &PRM_BT_OID_NBUFFERS,
2591  (char *) NULL,
2592  (DUP_PRM_FUNC) NULL,
2593  (DUP_PRM_FUNC) NULL},
2597  PRM_FLOAT,
2599  (void *) &prm_bt_oid_nbuffers_default,
2600  (void *) &PRM_BT_OID_NBUFFERS,
2602  (char *) NULL,
2604  (DUP_PRM_FUNC) prm_io_pages_to_size},
2608  PRM_BOOLEAN,
2611  (void *) &PRM_BT_INDEX_SCAN_OID_ORDER,
2612  (void *) NULL, (void *) NULL,
2613  (char *) NULL,
2614  (DUP_PRM_FUNC) NULL,
2615  (DUP_PRM_FUNC) NULL},
2617  PRM_NAME_BOSR_MAXTMP_PAGES, /* todo: change me */
2618  (PRM_FOR_SERVER),
2619  PRM_INTEGER,
2621  (void *) &prm_bosr_maxtmp_pages,
2622  (void *) &PRM_BOSR_MAXTMP_PAGES,
2623  (void *) NULL, (void *) NULL,
2624  (char *) NULL,
2625  (DUP_PRM_FUNC) NULL,
2626  (DUP_PRM_FUNC) NULL},
2629  (PRM_OBSOLETED),
2630  PRM_NO_TYPE,
2632  (void *) NULL,
2633  (void *) NULL,
2634  (void *) NULL,
2635  (void *) NULL,
2636  (char *) NULL,
2637  (DUP_PRM_FUNC) NULL,
2638  (DUP_PRM_FUNC) NULL},
2642  PRM_INTEGER,
2644  (void *) &prm_lk_escalation_at_default,
2645  (void *) &PRM_LK_ESCALATION_AT,
2646  (void *) NULL, (void *) &prm_lk_escalation_at_lower,
2647  (char *) NULL,
2648  (DUP_PRM_FUNC) NULL,
2649  (DUP_PRM_FUNC) NULL},
2653  PRM_BOOLEAN,
2657  (void *) NULL, (void *) NULL,
2658  (char *) NULL,
2659  (DUP_PRM_FUNC) NULL,
2660  (DUP_PRM_FUNC) NULL},
2664  PRM_INTEGER,
2666  (void *) &prm_lk_timeout_secs_default,
2667  (void *) &PRM_LK_TIMEOUT_SECS,
2668  (void *) NULL, (void *) &prm_lk_timeout_secs_lower,
2669  (char *) NULL,
2670  (DUP_PRM_FUNC) NULL,
2671  (DUP_PRM_FUNC) NULL},
2675  PRM_INTEGER,
2677  (void *) &prm_lk_timeout_secs_default,
2678  (void *) &PRM_LK_TIMEOUT_SECS,
2679  (void *) NULL, (void *) &prm_lk_timeout_secs_lower,
2680  (char *) NULL,
2686  PRM_FLOAT,
2689  (void *) &PRM_LK_RUN_DEADLOCK_INTERVAL,
2690  (void *) NULL, (void *) &prm_lk_run_deadlock_interval_lower,
2691  (char *) NULL,
2692  (DUP_PRM_FUNC) NULL,
2693  (DUP_PRM_FUNC) NULL},
2697  PRM_INTEGER,
2699  (void *) &prm_log_nbuffers_default,
2700  (void *) &PRM_LOG_NBUFFERS,
2701  (void *) NULL, (void *) &prm_log_nbuffers_lower,
2702  (char *) NULL,
2703  (DUP_PRM_FUNC) NULL,
2704  (DUP_PRM_FUNC) NULL},
2708  PRM_INTEGER,
2710  (void *) &prm_log_nbuffers_default,
2711  (void *) &PRM_LOG_NBUFFERS,
2712  (void *) NULL, (void *) &prm_log_nbuffers_lower,
2713  (char *) NULL,
2719  PRM_INTEGER,
2722  (void *) &PRM_LOG_CHECKPOINT_NPAGES,
2723  (void *) NULL, (void *) &prm_log_checkpoint_npages_lower,
2724  (char *) NULL,
2725  (DUP_PRM_FUNC) NULL,
2726  (DUP_PRM_FUNC) NULL},
2730  PRM_INTEGER,
2733  (void *) &PRM_LOG_CHECKPOINT_NPAGES,
2734  (void *) NULL, (void *) &prm_log_checkpoint_npages_lower,
2735  (char *) NULL,
2737  (DUP_PRM_FUNC) prm_log_pages_to_size},
2741  PRM_INTEGER,
2745  (void *) NULL, (void *) &prm_log_checkpoint_interval_secs_lower,
2746  (char *) NULL,
2752  PRM_INTEGER,
2756  (void *) NULL, (void *) &prm_log_checkpoint_interval_secs_lower,
2757  (char *) NULL,
2759  (DUP_PRM_FUNC) prm_sec_to_msec},
2763  PRM_INTEGER,
2767  (void *) NULL, (void *) &prm_log_checkpoint_sleep_msecs_lower,
2768  (char *) NULL,
2769  (DUP_PRM_FUNC) NULL,
2770  (DUP_PRM_FUNC) NULL},
2774  PRM_BOOLEAN,
2777  (void *) &PRM_LOG_BACKGROUND_ARCHIVING,
2778  (void *) NULL, (void *) NULL,
2779  (char *) NULL,
2780  (DUP_PRM_FUNC) NULL,
2781  (DUP_PRM_FUNC) NULL},
2785  PRM_KEYWORD,
2788  (void *) &PRM_LOG_ISOLATION_LEVEL,
2791  (char *) NULL,
2792  (DUP_PRM_FUNC) NULL,
2793  (DUP_PRM_FUNC) NULL},
2796  (PRM_OBSOLETED),
2797  PRM_NO_TYPE,
2799  (void *) NULL,
2800  (void *) NULL,
2801  (void *) NULL,
2802  (void *) NULL,
2803  (char *) NULL,
2804  (DUP_PRM_FUNC) NULL,
2805  (DUP_PRM_FUNC) NULL},
2809  PRM_BOOLEAN,
2812  (void *) &PRM_COMMIT_ON_SHUTDOWN,
2813  (void *) NULL, (void *) NULL,
2814  (char *) NULL,
2815  (DUP_PRM_FUNC) NULL,
2816  (DUP_PRM_FUNC) NULL},
2820  PRM_INTEGER,
2824  (void *) NULL, (void *) &prm_shutdown_wait_time_in_secs_lower,
2825  (char *) NULL,
2826  (DUP_PRM_FUNC) NULL,
2827  (DUP_PRM_FUNC) NULL},
2831  PRM_BOOLEAN,
2833  (void *) &prm_csql_auto_commit_default,
2834  (void *) &PRM_CSQL_AUTO_COMMIT,
2835  (void *) NULL, (void *) NULL,
2836  (char *) NULL,
2837  (DUP_PRM_FUNC) NULL,
2838  (DUP_PRM_FUNC) NULL},
2842  PRM_BOOLEAN,
2844  (void *) &prm_log_sweep_clean_default,
2845  (void *) &PRM_LOG_SWEEP_CLEAN,
2846  (void *) NULL, (void *) NULL,
2847  (char *) NULL,
2848  (DUP_PRM_FUNC) NULL,
2849  (DUP_PRM_FUNC) NULL},
2853  PRM_INTEGER,
2856  (void *) &PRM_WS_HASHTABLE_SIZE,
2857  (void *) NULL, (void *) &prm_ws_hashtable_size_lower,
2858  (char *) NULL,
2859  (DUP_PRM_FUNC) NULL,
2860  (DUP_PRM_FUNC) NULL},
2864  PRM_BOOLEAN,
2866  (void *) &prm_ws_memory_report_default,
2867  (void *) &PRM_WS_MEMORY_REPORT,
2868  (void *) NULL, (void *) NULL,
2869  (char *) NULL,
2870  (DUP_PRM_FUNC) NULL,
2871  (DUP_PRM_FUNC) NULL},
2875  PRM_BOOLEAN,
2877  (void *) &prm_gc_enable_default,
2878  (void *) &PRM_GC_ENABLE,
2879  (void *) NULL, (void *) NULL,
2880  (char *) NULL,
2881  (DUP_PRM_FUNC) NULL,
2882  (DUP_PRM_FUNC) NULL},
2886  PRM_INTEGER,
2888  (void *) &prm_tcp_port_id_default,
2889  (void *) &PRM_TCP_PORT_ID,
2890  (void *) &prm_tcp_port_id_upper, (void *) &prm_tcp_port_id_lower,
2891  (char *) NULL,
2892  (DUP_PRM_FUNC) NULL,
2893  (DUP_PRM_FUNC) NULL},
2897  PRM_INTEGER,
2900  (void *) &PRM_TCP_CONNECTION_TIMEOUT,
2901  (void *) NULL, (void *) &prm_tcp_connection_timeout_lower,
2902  (char *) NULL,
2903  (DUP_PRM_FUNC) NULL,
2904  (DUP_PRM_FUNC) NULL},
2908  PRM_INTEGER,
2911  (void *) &PRM_OPTIMIZATION_LEVEL,
2912  (void *) NULL, (void *) NULL,
2913  (char *) NULL,
2914  (DUP_PRM_FUNC) NULL,
2915  (DUP_PRM_FUNC) NULL},
2916  {PRM_ID_QO_DUMP,
2919  PRM_BOOLEAN,
2921  (void *) &prm_qo_dump_default,
2922  (void *) &PRM_QO_DUMP,
2923  (void *) NULL, (void *) NULL,
2924  (char *) NULL,
2925  (DUP_PRM_FUNC) NULL,
2926  (DUP_PRM_FUNC) NULL},
2929  (PRM_FOR_SERVER),
2930  PRM_INTEGER,
2932  (void *) &prm_css_max_clients_default,
2933  (void *) &PRM_CSS_MAX_CLIENTS,
2934  (void *) &prm_css_max_clients_upper,
2935  (void *) &prm_css_max_clients_lower,
2936  (char *) NULL,
2937  (DUP_PRM_FUNC) NULL,
2938  (DUP_PRM_FUNC) NULL},
2942  PRM_BIGINT,
2944  (void *) &prm_thread_stacksize_default,
2945  (void *) &PRM_THREAD_STACKSIZE,
2946  (void *) &prm_thread_stacksize_upper,
2947  (void *) &prm_thread_stacksize_lower,
2948  (char *) NULL,
2949  (DUP_PRM_FUNC) NULL,
2950  (DUP_PRM_FUNC) NULL},
2954  PRM_STRING,
2956  (void *) &prm_cfg_db_hosts_default,
2957  (void *) &PRM_CFG_DB_HOSTS,
2958  (void *) NULL, (void *) NULL,
2959  (char *) NULL,
2960  (DUP_PRM_FUNC) NULL,
2961  (DUP_PRM_FUNC) NULL},
2965  PRM_INTEGER,
2967  (void *) &prm_reset_tr_parser_default,
2968  (void *) &PRM_RESET_TR_PARSER,
2969  (void *) NULL, (void *) NULL,
2970  (char *) NULL,
2971  (DUP_PRM_FUNC) NULL,
2972  (DUP_PRM_FUNC) NULL},
2976  PRM_INTEGER,
2979  (void *) &PRM_IO_BACKUP_NBUFFERS,
2980  (void *) NULL, (void *) &prm_io_backup_nbuffers_lower,
2981  (char *) NULL,
2982  (DUP_PRM_FUNC) NULL,
2983  (DUP_PRM_FUNC) NULL},
2987  PRM_BIGINT,
2993  (char *) NULL,
2994  (DUP_PRM_FUNC) NULL,
2995  (DUP_PRM_FUNC) NULL},
2999  PRM_INTEGER,
3002  (void *) &PRM_IO_BACKUP_SLEEP_MSECS,
3003  (void *) NULL, (void *) &prm_io_backup_sleep_msecs_lower,
3004  (char *) NULL,
3005  (DUP_PRM_FUNC) NULL,
3006  (DUP_PRM_FUNC) NULL},
3010  PRM_INTEGER,
3014  (void *) NULL, (void *) &prm_max_pages_in_temp_file_cache_lower,
3015  (char *) NULL,
3016  (DUP_PRM_FUNC) NULL,
3017  (DUP_PRM_FUNC) NULL},
3021  PRM_INTEGER,
3025  (void *) NULL, (void *) &prm_max_entries_in_temp_file_cache_lower,
3026  (char *) NULL,
3027  (DUP_PRM_FUNC) NULL,
3028  (DUP_PRM_FUNC) NULL},
3030  PRM_NAME_PTHREAD_SCOPE_PROCESS, /* AIX only */
3031  (PRM_FOR_SERVER),
3032  PRM_BOOLEAN,
3035  (void *) &PRM_PTHREAD_SCOPE_PROCESS,
3036  (void *) NULL, (void *) NULL,
3037  (char *) NULL,
3038  (DUP_PRM_FUNC) NULL,
3039  (DUP_PRM_FUNC) NULL},
3042  (PRM_FOR_SERVER),
3043  PRM_INTEGER,
3046  (void *) &PRM_TEMP_MEM_BUFFER_PAGES,
3049  (char *) NULL,
3050  (DUP_PRM_FUNC) NULL,
3051  (DUP_PRM_FUNC) NULL},
3055  PRM_INTEGER,
3059  (void *) NULL,
3061  (char *) NULL,
3062  (DUP_PRM_FUNC) NULL,
3063  (DUP_PRM_FUNC) NULL},
3067  PRM_INTEGER,
3071  (void *) NULL,
3073  (char *) NULL,
3075  (DUP_PRM_FUNC) prm_io_pages_to_size},
3079  PRM_BOOLEAN,
3082  (void *) &PRM_DONT_REUSE_HEAP_FILE,
3083  (void *) NULL, (void *) NULL,
3084  (char *) NULL,
3085  (DUP_PRM_FUNC) NULL,
3086  (DUP_PRM_FUNC) NULL},
3090  PRM_INTEGER,
3092  (void *) &prm_insert_mode_default,
3093  (void *) &PRM_INSERT_MODE,
3094  (void *) &prm_insert_mode_upper,
3095  (void *) &prm_insert_mode_lower,
3096  (char *) NULL,
3097  (DUP_PRM_FUNC) NULL,
3098  (DUP_PRM_FUNC) NULL},
3101  (PRM_OBSOLETED),
3102  PRM_INTEGER,
3105  (void *) &PRM_LK_MAX_SCANID_BIT,
3106  (void *) &prm_lk_max_scanid_bit_upper,
3107  (void *) &prm_lk_max_scanid_bit_lower,
3108  (char *) NULL,
3109  (DUP_PRM_FUNC) NULL,
3110  (DUP_PRM_FUNC) NULL},
3114  PRM_BOOLEAN,
3117  (void *) &PRM_HOSTVAR_LATE_BINDING,
3118  (void *) NULL, (void *) NULL,
3119  (char *) NULL,
3120  (DUP_PRM_FUNC) NULL,
3121  (DUP_PRM_FUNC) NULL},
3125  PRM_BOOLEAN,
3127  (void *) &prm_enable_histo_default,
3128  (void *) &PRM_ENABLE_HISTO,
3129  (void *) NULL, (void *) NULL,
3130  (char *) NULL,
3131  (DUP_PRM_FUNC) NULL,
3132  (DUP_PRM_FUNC) NULL},
3136  PRM_INTEGER,
3139  (void *) &PRM_MUTEX_BUSY_WAITING_CNT,
3140  (void *) NULL, (void *) NULL,
3141  (char *) NULL,
3142  (DUP_PRM_FUNC) NULL,
3143  (DUP_PRM_FUNC) NULL},
3147  PRM_INTEGER,
3150  (void *) &PRM_PB_NUM_LRU_CHAINS,
3151  (void *) &prm_pb_num_LRU_chains_upper,
3152  (void *) &prm_pb_num_LRU_chains_lower,
3153  (char *) NULL,
3154  (DUP_PRM_FUNC) NULL,
3155  (DUP_PRM_FUNC) NULL},
3159  PRM_INTEGER,
3163  (void *) NULL, (void *) &prm_page_bg_flush_interval_msec_lower,
3164  (char *) NULL,
3165  (DUP_PRM_FUNC) NULL,
3166  (DUP_PRM_FUNC) NULL},
3170  PRM_INTEGER,
3174  (void *) NULL, (void *) &prm_page_bg_flush_interval_msec_lower,
3175  (char *) NULL,
3181  PRM_BOOLEAN,
3184  (void *) &PRM_ADAPTIVE_FLUSH_CONTROL,
3185  (void *) NULL,
3186  (void *) NULL,
3187  (char *) NULL,
3188  (DUP_PRM_FUNC) NULL,
3189  (DUP_PRM_FUNC) NULL},
3193  PRM_INTEGER,
3199  (char *) NULL,
3200  (DUP_PRM_FUNC) NULL,
3201  (DUP_PRM_FUNC) NULL},
3205  PRM_INTEGER,
3211  (char *) NULL,
3213  (DUP_PRM_FUNC) prm_io_pages_to_size},
3217  PRM_INTEGER,
3220  (void *) &PRM_PB_SYNC_ON_NFLUSH,
3221  (void *) &prm_pb_sync_on_nflush_upper,
3222  (void *) &prm_pb_sync_on_nflush_lower,
3223  (char *) NULL,
3224  (DUP_PRM_FUNC) NULL,
3225  (DUP_PRM_FUNC) NULL},
3229  PRM_INTEGER,
3232  (void *) &PRM_PB_SYNC_ON_NFLUSH,
3233  (void *) &prm_pb_sync_on_nflush_upper,
3234  (void *) &prm_pb_sync_on_nflush_lower,
3235  (char *) NULL,
3237  (DUP_PRM_FUNC) prm_io_pages_to_size},
3241  PRM_KEYWORD,
3245  (void *) NULL,
3246  (void *) NULL,
3247  (char *) NULL,
3248  (DUP_PRM_FUNC) NULL,
3249  (DUP_PRM_FUNC) NULL},
3253  PRM_BOOLEAN,
3256  (void *) &PRM_ORACLE_STYLE_OUTERJOIN,
3257  (void *) NULL, (void *) NULL,
3258  (char *) NULL,
3259  (DUP_PRM_FUNC) NULL,
3260  (DUP_PRM_FUNC) NULL},
3264  PRM_BOOLEAN,
3266  (void *) &prm_ansi_quotes_default,
3267  (void *) &PRM_ANSI_QUOTES,
3268  (void *) NULL, (void *) NULL,
3269  (char *) NULL,
3270  (DUP_PRM_FUNC) NULL,
3271  (DUP_PRM_FUNC) NULL},
3275  PRM_INTEGER,
3277  (void *) &prm_week_format_default,
3278  (void *) &PRM_DEFAULT_WEEK_FORMAT,
3279  (void *) &prm_week_format_upper,
3280  (void *) &prm_week_format_lower,
3281  (char *) NULL,
3282  (DUP_PRM_FUNC) NULL,
3283  (DUP_PRM_FUNC) NULL},
3287  PRM_BOOLEAN,
3289  (void *) &prm_test_mode_default,
3290  (void *) &PRM_TEST_MODE,
3291  (void *) NULL, (void *) NULL,
3292  (char *) NULL,
3293  (DUP_PRM_FUNC) NULL,
3294  (DUP_PRM_FUNC) NULL},
3298  PRM_BOOLEAN,
3301  (void *) &PRM_ONLY_FULL_GROUP_BY,
3302  (void *) NULL, (void *) NULL,
3303  (char *) NULL,
3304  (DUP_PRM_FUNC) NULL,
3305  (DUP_PRM_FUNC) NULL},
3309  PRM_BOOLEAN,
3311  (void *) &prm_pipes_as_concat_default,
3312  (void *) &PRM_PIPES_AS_CONCAT,
3313  (void *) NULL, (void *) NULL,
3314  (char *) NULL,
3315  (DUP_PRM_FUNC) NULL,
3316  (DUP_PRM_FUNC) NULL},
3320  PRM_BOOLEAN,
3324  (void *) NULL, (void *) NULL,
3325  (char *) NULL,
3326  (DUP_PRM_FUNC) NULL,
3327  (DUP_PRM_FUNC) NULL},
3331  PRM_BOOLEAN,
3335  (void *) NULL, (void *) NULL,
3336  (char *) NULL,
3337  (DUP_PRM_FUNC) NULL,
3338  (DUP_PRM_FUNC) NULL},
3342  PRM_BOOLEAN,
3345  (void *) &PRM_NO_BACKSLASH_ESCAPES,
3346  (void *) NULL, (void *) NULL,
3347  (char *) NULL,
3348  (DUP_PRM_FUNC) NULL,
3349  (DUP_PRM_FUNC) NULL},
3353  PRM_BIGINT,
3356  (void *) &PRM_GROUP_CONCAT_MAX_LEN,
3359  (char *) NULL,
3360  (DUP_PRM_FUNC) NULL,
3361  (DUP_PRM_FUNC) NULL},
3365  PRM_BIGINT,
3368  (void *) &PRM_STRING_MAX_SIZE_BYTES,
3371  (char *) NULL,
3372  (DUP_PRM_FUNC) NULL,
3373  (DUP_PRM_FUNC) NULL},
3377  PRM_BOOLEAN,
3381  (void *) NULL, (void *) NULL,
3382  (char *) NULL,
3383  (DUP_PRM_FUNC) NULL,
3384  (DUP_PRM_FUNC) NULL},
3388  PRM_BOOLEAN,
3392  (void *) NULL, (void *) NULL,
3393  (char *) NULL,
3394  (DUP_PRM_FUNC) NULL,
3395  (DUP_PRM_FUNC) NULL},
3399  PRM_BOOLEAN,
3403  (void *) NULL, (void *) NULL,
3404  (char *) NULL,
3405  (DUP_PRM_FUNC) NULL,
3406  (DUP_PRM_FUNC) NULL},
3409  (PRM_EMPTY_FLAG),
3410  PRM_INTEGER,
3414  (void *) NULL, (void *) NULL,
3415  (char *) NULL,
3416  (DUP_PRM_FUNC) NULL,
3417  (DUP_PRM_FUNC) NULL},
3421  PRM_BOOLEAN,
3423  (void *) &prm_plus_as_concat_default,
3424  (void *) &PRM_PLUS_AS_CONCAT,
3425  (void *) NULL, (void *) NULL,
3426  (char *) NULL,
3427  (DUP_PRM_FUNC) NULL,
3428  (DUP_PRM_FUNC) NULL},
3432  PRM_FLOAT,
3435  (void *) &PRM_LIKE_TERM_SELECTIVITY,
3438  (char *) NULL,
3439  (DUP_PRM_FUNC) NULL,
3440  (DUP_PRM_FUNC) NULL},
3444  PRM_INTEGER,
3448  (void *) NULL,
3450  (char *) NULL,
3451  (DUP_PRM_FUNC) NULL,
3452  (DUP_PRM_FUNC) NULL},
3456  PRM_BOOLEAN,
3460  (void *) NULL, (void *) NULL,
3461  (char *) NULL,
3462  (DUP_PRM_FUNC) NULL,
3463  (DUP_PRM_FUNC) NULL},
3467  PRM_INTEGER,
3469  (void *) &prm_suppress_fsync_default,
3470  (void *) &PRM_SUPPRESS_FSYNC,
3471  (void *) &prm_suppress_fsync_upper,
3472  (void *) &prm_suppress_fsync_lower,
3473  (char *) NULL,
3474  (DUP_PRM_FUNC) NULL,
3475  (DUP_PRM_FUNC) NULL},
3479  PRM_BOOLEAN,
3482  (void *) &PRM_CALL_STACK_DUMP_ON_ERROR,
3483  (void *) NULL, (void *) NULL,
3484  (char *) NULL,
3485  (DUP_PRM_FUNC) NULL,
3486  (DUP_PRM_FUNC) NULL},
3494  (void *) NULL, (void *) NULL,
3495  (char *) NULL,
3496  (DUP_PRM_FUNC) NULL,
3497  (DUP_PRM_FUNC) NULL},
3505  (void *) NULL, (void *) NULL,
3506  (char *) NULL,
3507  (DUP_PRM_FUNC) NULL,
3508  (DUP_PRM_FUNC) NULL},
3512  PRM_BOOLEAN,
3516  (void *) NULL, (void *) NULL,
3517  (char *) NULL,
3518  (DUP_PRM_FUNC) NULL,
3519  (DUP_PRM_FUNC) NULL},
3523  PRM_BOOLEAN,
3525  (void *) &prm_dbfiles_protect_default,
3526  (void *) &PRM_DBFILES_PROTECT,
3527  (void *) NULL, (void *) NULL,
3528  (char *) NULL,
3529  (DUP_PRM_FUNC) NULL,
3530  (DUP_PRM_FUNC) NULL},
3534  PRM_BOOLEAN,
3537  (void *) &PRM_AUTO_RESTART_SERVER,
3538  (void *) NULL, (void *) NULL,
3539  (char *) NULL,
3540  (DUP_PRM_FUNC) NULL,
3541  (DUP_PRM_FUNC) NULL},
3545  PRM_INTEGER,
3548  (void *) &PRM_XASL_CACHE_MAX_ENTRIES,
3549  /* TODO: define a maximum value. We cannot have any size hash table. */
3550  (void *) NULL, (void *) NULL,
3551  (char *) NULL,
3552  (DUP_PRM_FUNC) NULL,
3553  (DUP_PRM_FUNC) NULL},
3556  (PRM_FOR_SERVER),
3557  PRM_INTEGER,
3560  (void *) &PRM_XASL_CACHE_MAX_CLONES,
3563  (char *) NULL,
3564  (DUP_PRM_FUNC) NULL,
3565  (DUP_PRM_FUNC) NULL},
3568  (PRM_FOR_SERVER),
3569  PRM_INTEGER,
3572  (void *) &PRM_XASL_CACHE_TIMEOUT,
3573  (void *) NULL, (void *) NULL,
3574  (char *) NULL,
3575  (DUP_PRM_FUNC) NULL,
3576  (DUP_PRM_FUNC) NULL},
3579  (PRM_FOR_SERVER),
3580  PRM_BOOLEAN,
3583  (void *) &PRM_XASL_CACHE_LOGGING,
3584  (void *) NULL, (void *) NULL,
3585  (char *) NULL,
3586  (DUP_PRM_FUNC) NULL,
3587  (DUP_PRM_FUNC) NULL},
3591  PRM_INTEGER,
3595  (void *) NULL, (void *) NULL,
3596  (char *) NULL,
3597  (DUP_PRM_FUNC) NULL,
3598  (DUP_PRM_FUNC) NULL},
3602  PRM_INTEGER,
3606  (void *) NULL, (void *) NULL,
3607  (char *) NULL,
3608  (DUP_PRM_FUNC) NULL,
3609  (DUP_PRM_FUNC) NULL},
3613  PRM_INTEGER,
3616  (void *) &PRM_LIST_QUERY_CACHE_MODE,
3619  (char *) NULL,
3620  (DUP_PRM_FUNC) NULL,
3621  (DUP_PRM_FUNC) NULL},
3625  PRM_INTEGER,
3631  (char *) NULL,
3632  (DUP_PRM_FUNC) NULL,
3633  (DUP_PRM_FUNC) NULL},
3637  PRM_INTEGER,
3643  (char *) NULL,
3644  (DUP_PRM_FUNC) NULL,
3645  (DUP_PRM_FUNC) NULL},
3649  PRM_BOOLEAN,
3652  (void *) &PRM_USE_ORDERBY_SORT_LIMIT,
3653  (void *) NULL, (void *) NULL,
3654  (char *) NULL,
3655  (DUP_PRM_FUNC) NULL,
3656  (DUP_PRM_FUNC) NULL},
3659  (PRM_OBSOLETED),
3660  PRM_NO_TYPE,
3662  (void *) NULL,
3663  (void *) NULL,
3664  (void *) NULL,
3665  (void *) NULL,
3666  (char *) NULL,
3667  (DUP_PRM_FUNC) NULL,
3668  (DUP_PRM_FUNC) NULL},
3669  {PRM_ID_HA_MODE,
3672  PRM_KEYWORD,
3674  (void *) &prm_ha_mode_default,
3675  (void *) &PRM_HA_MODE,
3676  (void *) &prm_ha_mode_upper,
3677  (void *) &prm_ha_mode_lower,
3678  (char *) NULL,
3679  (DUP_PRM_FUNC) NULL,
3680  (DUP_PRM_FUNC) NULL},
3683  (PRM_EMPTY_FLAG),
3684  PRM_KEYWORD,
3686  (void *) &prm_ha_mode_default,
3688  (void *) &prm_ha_mode_upper,
3689  (void *) &prm_ha_mode_lower,
3690  (char *) NULL,
3691  (DUP_PRM_FUNC) NULL,
3692  (DUP_PRM_FUNC) NULL},
3696  PRM_KEYWORD,
3698  (void *) &prm_ha_server_state_default,
3699  (void *) &PRM_HA_SERVER_STATE,
3700  (void *) &prm_ha_server_state_upper,
3701  (void *) &prm_ha_server_state_lower,
3702  (char *) NULL,
3703  (DUP_PRM_FUNC) NULL,
3704  (DUP_PRM_FUNC) NULL},
3708  PRM_KEYWORD,
3711  (void *) &PRM_HA_LOG_APPLIER_STATE,
3714  (char *) NULL,
3715  (DUP_PRM_FUNC) NULL,
3716  (DUP_PRM_FUNC) NULL},
3720  PRM_STRING,
3722  (void *) &prm_ha_node_list_default,
3723  (void *) &PRM_HA_NODE_LIST,
3724  (void *) NULL, (void *) NULL,
3725  (char *) NULL,
3726  (DUP_PRM_FUNC) NULL,
3727  (DUP_PRM_FUNC) NULL},
3731  PRM_STRING,
3733  (void *) &prm_ha_replica_list_default,
3734  (void *) &PRM_HA_REPLICA_LIST,
3735  (void *) NULL, (void *) NULL,
3736  (char *) NULL,
3737  (DUP_PRM_FUNC) NULL,
3738  (DUP_PRM_FUNC) NULL},
3742  PRM_STRING,
3744  (void *) &prm_ha_db_list_default,
3745  (void *) &PRM_HA_DB_LIST,
3746  (void *) NULL, (void *) NULL,
3747  (char *) NULL,
3748  (DUP_PRM_FUNC) NULL,
3749  (DUP_PRM_FUNC) NULL},
3753  PRM_STRING,
3755  (void *) &prm_ha_copy_log_base_default,
3756  (void *) &PRM_HA_COPY_LOG_BASE,
3757  (void *) NULL, (void *) NULL,
3758  (char *) NULL,
3759  (DUP_PRM_FUNC) NULL,
3760  (DUP_PRM_FUNC) NULL},
3764  PRM_STRING,
3767  (void *) &PRM_HA_COPY_SYNC_MODE,
3768  (void *) NULL, (void *) NULL,
3769  (char *) NULL,
3770  (DUP_PRM_FUNC) NULL,
3771  (DUP_PRM_FUNC) NULL},
3775  PRM_INTEGER,
3778  (void *) &PRM_HA_APPLY_MAX_MEM_SIZE,
3780  (char *) NULL,
3781  (DUP_PRM_FUNC) NULL,
3782  (DUP_PRM_FUNC) NULL},
3786  PRM_INTEGER,
3788  (void *) &prm_ha_port_id_default,
3789  (void *) &PRM_HA_PORT_ID,
3790  (void *) &prm_ha_port_id_upper, (void *) &prm_ha_port_id_lower,
3791  (char *) NULL,
3792  (DUP_PRM_FUNC) NULL,
3793  (DUP_PRM_FUNC) NULL},
3797  PRM_INTEGER,
3800  (void *) &PRM_HA_INIT_TIMER_IN_MSECS,
3801  (void *) NULL, (void *) NULL,
3802  (char *) NULL,
3803  (DUP_PRM_FUNC) NULL,
3804  (DUP_PRM_FUNC) NULL},
3808  PRM_INTEGER,
3812  (void *) NULL, (void *) NULL,
3813  (char *) NULL,
3814  (DUP_PRM_FUNC) NULL,
3815  (DUP_PRM_FUNC) NULL},
3819  PRM_INTEGER,
3823  (void *) NULL, (void *) NULL,
3824  (char *) NULL,
3825  (DUP_PRM_FUNC) NULL,
3826  (DUP_PRM_FUNC) NULL},
3830  PRM_INTEGER,
3834  (void *) NULL, (void *) NULL,
3835  (char *) NULL,
3836  (DUP_PRM_FUNC) NULL,
3837  (DUP_PRM_FUNC) NULL},
3841  PRM_INTEGER,
3845  (void *) NULL, (void *) NULL,
3846  (char *) NULL,
3847  (DUP_PRM_FUNC) NULL,
3848  (DUP_PRM_FUNC) NULL},
3852  PRM_INTEGER,
3856  (void *) NULL, (void *) NULL,
3857  (char *) NULL,
3858  (DUP_PRM_FUNC) NULL,
3859  (DUP_PRM_FUNC) NULL},
3863  PRM_INTEGER,
3867  (void *) NULL, (void *) NULL,
3868  (char *) NULL,
3869  (DUP_PRM_FUNC) NULL,
3870  (DUP_PRM_FUNC) NULL},
3874  PRM_INTEGER,
3878  (void *) NULL, (void *) NULL,
3879  (char *) NULL,
3880  (DUP_PRM_FUNC) NULL,
3881  (DUP_PRM_FUNC) NULL},
3885  PRM_INTEGER,
3889  (void *) NULL, (void *) NULL,
3890  (char *) NULL,
3891  (DUP_PRM_FUNC) NULL,
3892  (DUP_PRM_FUNC) NULL},
3896  PRM_INTEGER,
3900  (void *) NULL, (void *) NULL,
3901  (char *) NULL,
3902  (DUP_PRM_FUNC) NULL,
3903  (DUP_PRM_FUNC) NULL},
3907  PRM_INTEGER,
3910  (void *) &PRM_HA_MAX_HEARTBEAT_GAP,
3911  (void *) NULL, (void *) NULL,
3912  (char *) NULL,
3913  (DUP_PRM_FUNC) NULL,
3914  (DUP_PRM_FUNC) NULL},
3918  PRM_STRING,
3920  (void *) &prm_ha_ping_hosts_default,
3921  (void *) &PRM_HA_PING_HOSTS,
3922  (void *) NULL, (void *) NULL,
3923  (char *) NULL,
3924  (DUP_PRM_FUNC) NULL,
3925  (DUP_PRM_FUNC) NULL},
3933  (void *) NULL, (void *) NULL,
3934  (char *) NULL,
3935  (DUP_PRM_FUNC) NULL,
3936  (DUP_PRM_FUNC) NULL},
3944  (void *) NULL, (void *) NULL,
3945  (char *) NULL,
3946  (DUP_PRM_FUNC) NULL,
3947  (DUP_PRM_FUNC) NULL},
3951  PRM_INTEGER,
3956  (char *) NULL,
3957  (DUP_PRM_FUNC) NULL,
3958  (DUP_PRM_FUNC) NULL},
3962  PRM_BOOLEAN,
3964  (void *) &prm_ha_sql_logging_default,
3965  (void *) &PRM_HA_SQL_LOGGING,
3966  (void *) NULL, (void *) NULL,
3967  (char *) NULL,
3968  (DUP_PRM_FUNC) NULL,
3969  (DUP_PRM_FUNC) NULL},
3973  PRM_INTEGER,
3979  (char *) NULL,
3980  (DUP_PRM_FUNC) NULL,
3981  (DUP_PRM_FUNC) NULL},
3985  PRM_INTEGER,
3988  (void *) &PRM_HA_COPY_LOG_MAX_ARCHIVES,
3991  (char *) NULL,
3992  (DUP_PRM_FUNC) NULL,
3993  (DUP_PRM_FUNC) NULL},
3997  PRM_INTEGER,
4000  (void *) &PRM_HA_COPY_LOG_TIMEOUT,
4003  (char *) NULL,
4004  (DUP_PRM_FUNC) NULL,
4005  (DUP_PRM_FUNC) NULL},
4009  PRM_INTEGER,
4012  (void *) &PRM_HA_REPLICA_DELAY_IN_SECS,
4015  (char *) NULL,
4017  (DUP_PRM_FUNC) prm_sec_to_msec},
4021  PRM_STRING,
4024  (void *) &PRM_HA_REPLICA_TIME_BOUND,
4025  (void *) NULL, (void *) NULL,
4026  (char *) NULL,
4027  (DUP_PRM_FUNC) NULL,
4028  (DUP_PRM_FUNC) NULL},
4032  PRM_INTEGER,
4035  (void *) &PRM_HA_DELAY_LIMIT_IN_SECS,
4038  (char *) NULL,
4040  (DUP_PRM_FUNC) prm_sec_to_msec},
4044  PRM_INTEGER,
4050  (char *) NULL,
4052  (DUP_PRM_FUNC) prm_sec_to_msec},
4056  PRM_INTEGER,
4062  (char *) NULL,
4063  (DUP_PRM_FUNC) NULL,
4064  (DUP_PRM_FUNC) NULL},
4068  PRM_INTEGER,
4074  (char *) NULL,
4075  (DUP_PRM_FUNC) NULL,
4076  (DUP_PRM_FUNC) NULL},
4080  PRM_INTEGER,
4086  (char *) NULL,
4088  (DUP_PRM_FUNC) prm_sec_to_msec},
4092  PRM_BOOLEAN,
4095  (void *) &PRM_GENERAL_RESERVE_01,
4096  (void *) NULL, (void *) NULL,
4097  (char *) NULL,
4098  (DUP_PRM_FUNC) NULL,
4099  (DUP_PRM_FUNC) NULL},
4103  PRM_BOOLEAN,
4106  (void *) &PRM_COMPAT_PRIMARY_KEY,
4107  (void *) NULL, (void *) NULL,
4108  (char *) NULL,
4109  (DUP_PRM_FUNC) NULL,
4110  (DUP_PRM_FUNC) NULL},
4113  (PRM_OBSOLETED),
4114  PRM_NO_TYPE,
4116  (void *) NULL,
4117  (void *) NULL,
4118  (void *) NULL,
4119  (void *) NULL,
4120  (char *) NULL,
4121  (DUP_PRM_FUNC) NULL,
4122  (DUP_PRM_FUNC) NULL},
4126  PRM_BOOLEAN,
4128  (void *) &prm_log_async_commit_default,
4129  (void *) &PRM_LOG_ASYNC_COMMIT,
4130  (void *) NULL, (void *) NULL,
4131  (char *) NULL,
4132  (DUP_PRM_FUNC) NULL,
4133  (DUP_PRM_FUNC) NULL},
4137  PRM_INTEGER,
4141  (void *) NULL, (void *) &prm_log_group_commit_interval_msecs_lower,
4142  (char *) NULL,
4143  (DUP_PRM_FUNC) NULL,
4144  (DUP_PRM_FUNC) NULL},
4147  (PRM_OBSOLETED),
4148  PRM_NO_TYPE,
4150  (void *) NULL,
4151  (void *) NULL,
4152  (void *) NULL,
4153  (void *) NULL,
4154  (char *) NULL,
4155  (DUP_PRM_FUNC) NULL,
4156  (DUP_PRM_FUNC) NULL},
4159  (PRM_OBSOLETED),
4160  PRM_NO_TYPE,
4162  (void *) NULL,
4163  (void *) NULL,
4164  (void *) NULL,
4165  (void *) NULL,
4166  (char *) NULL,
4167  (DUP_PRM_FUNC) NULL,
4168  (DUP_PRM_FUNC) NULL},
4171  (PRM_FOR_CLIENT),
4172  PRM_BOOLEAN,
4174  (void *) &prm_intl_mbs_support_default,
4175  (void *) &PRM_INTL_MBS_SUPPORT,
4176  (void *) NULL, (void *) NULL,
4177  (char *) NULL,
4178  (DUP_PRM_FUNC) NULL,
4179  (DUP_PRM_FUNC) NULL},
4182  (PRM_FOR_SERVER),
4183  PRM_BOOLEAN,
4185  (void *) &prm_log_compress_default,
4186  (void *) &PRM_LOG_COMPRESS,
4187  (void *) NULL, (void *) NULL,
4188  (char *) NULL,
4189  (DUP_PRM_FUNC) NULL,
4190  (DUP_PRM_FUNC) NULL},
4194  PRM_BOOLEAN,
4197  (void *) &PRM_BLOCK_NOWHERE_STATEMENT,
4198  (void *) NULL, (void *) NULL,
4199  (char *) NULL,
4200  (DUP_PRM_FUNC) NULL,
4201  (DUP_PRM_FUNC) NULL},
4205  PRM_BOOLEAN,
4208  (void *) &PRM_BLOCK_DDL_STATEMENT,
4209  (void *) NULL, (void *) NULL,
4210  (char *) NULL,
4211  (DUP_PRM_FUNC) NULL,
4212  (DUP_PRM_FUNC) NULL},
4213 #if defined (ENABLE_UNUSED_FUNCTION)
4214  {PRM_ID_SINGLE_BYTE_COMPARE,
4217  PRM_BOOLEAN,
4218  &prm_single_byte_compare_flag,
4219  (void *) &prm_single_byte_compare_default,
4220  (void *) &PRM_SINGLE_BYTE_COMPARE,
4221  (void *) NULL, (void *) NULL,
4222  (char *) NULL,
4223  (DUP_PRM_FUNC) NULL,
4224  (DUP_PRM_FUNC) NULL},
4225 #endif
4229  PRM_INTEGER,
4231  (void *) &prm_csql_history_num_default,
4232  (void *) &PRM_CSQL_HISTORY_NUM,
4233  (void *) &prm_csql_history_num_upper,
4234  (void *) &prm_csql_history_num_lower,
4235  (char *) NULL,
4236  (DUP_PRM_FUNC) NULL,
4237  (DUP_PRM_FUNC) NULL},
4241  PRM_BOOLEAN,
4243  (void *) &prm_log_trace_debug_default,
4244  (void *) &PRM_LOG_TRACE_DEBUG,
4245  (void *) NULL, (void *) NULL,
4246  (char *) NULL,
4247  (DUP_PRM_FUNC) NULL,
4248  (DUP_PRM_FUNC) NULL},
4249  {PRM_ID_DL_FORK,
4252  PRM_STRING,
4254  (void *) &prm_dl_fork_default,
4255  (void *) &PRM_DL_FORK,
4256  (void *) NULL, (void *) NULL,
4257  (char *) NULL,
4258  (DUP_PRM_FUNC) NULL,
4259  (DUP_PRM_FUNC) NULL},
4263  PRM_BOOLEAN,
4266  (void *) &PRM_ER_PRODUCTION_MODE,
4267  (void *) NULL, (void *) NULL,
4268  (char *) NULL,
4269  (DUP_PRM_FUNC) NULL,
4270  (DUP_PRM_FUNC) NULL},
4274  PRM_INTEGER,
4276  (void *) &prm_er_stop_on_error_default,
4277  (void *) &PRM_ER_STOP_ON_ERROR,
4278  (void *) &prm_er_stop_on_error_upper, (void *) NULL,
4279  (char *) NULL,
4280  (DUP_PRM_FUNC) NULL,
4281  (DUP_PRM_FUNC) NULL},
4285  PRM_INTEGER,
4287  (void *) &prm_tcp_rcvbuf_size_default,
4288  (void *) &PRM_TCP_RCVBUF_SIZE,
4289  (void *) NULL, (void *) NULL,
4290  (char *) NULL,
4291  (DUP_PRM_FUNC) NULL,
4292  (DUP_PRM_FUNC) NULL},
4296  PRM_INTEGER,
4298  (void *) &prm_tcp_sndbuf_size_default,
4299  (void *) &PRM_TCP_SNDBUF_SIZE,
4300  (void *) NULL, (void *) NULL,
4301  (char *) NULL,
4302  (DUP_PRM_FUNC) NULL,
4303  (DUP_PRM_FUNC) NULL},
4307  PRM_BOOLEAN,
4309  (void *) &prm_tcp_nodelay_default,
4310  (void *) &PRM_TCP_NODELAY,
4311  (void *) NULL, (void *) NULL,
4312  (char *) NULL,
4313  (DUP_PRM_FUNC) NULL,
4314  (DUP_PRM_FUNC) NULL},
4318  PRM_BOOLEAN,
4320  (void *) &prm_tcp_keepalive_default,
4321  (void *) &PRM_TCP_KEEPALIVE,
4322  (void *) NULL, (void *) NULL,
4323  (char *) NULL,
4324  (DUP_PRM_FUNC) NULL,
4325  (DUP_PRM_FUNC) NULL},
4329  PRM_BOOLEAN,
4332  (void *) &PRM_CSQL_SINGLE_LINE_MODE,
4333  (void *) NULL, (void *) NULL,
4334  (char *) NULL,
4335  (DUP_PRM_FUNC) NULL,
4336  (DUP_PRM_FUNC) NULL},
4340  PRM_BOOLEAN,
4342  (void *) &prm_xasl_debug_dump_default,
4343  (void *) &PRM_XASL_DEBUG_DUMP,
4344  (void *) NULL, (void *) NULL,
4345  (char *) NULL,
4346  (DUP_PRM_FUNC) NULL,
4347  (DUP_PRM_FUNC) NULL},
4351  PRM_INTEGER,
4353  (void *) &prm_log_max_archives_default,
4354  (void *) &PRM_LOG_MAX_ARCHIVES,
4355  (void *) NULL, (void *) &prm_log_max_archives_lower,
4356  (char *) NULL,
4357  (DUP_PRM_FUNC) NULL,
4358  (DUP_PRM_FUNC) NULL},
4362  PRM_BOOLEAN,
4366  (void *) NULL, (void *) NULL,
4367  (char *) NULL,
4368  (DUP_PRM_FUNC) NULL,
4369  (DUP_PRM_FUNC) NULL},
4373  PRM_INTEGER,
4377  (void *) NULL, (void *) &prm_remove_log_archives_interval_lower,
4378  (char *) NULL,
4379  (DUP_PRM_FUNC) NULL,
4380  (DUP_PRM_FUNC) NULL},
4384  PRM_BOOLEAN,
4386  (void *) &prm_log_no_logging_default,
4387  (void *) &PRM_LOG_NO_LOGGING,
4388  (void *) NULL, (void *) NULL,
4389  (char *) NULL,
4390  (DUP_PRM_FUNC) NULL,
4391  (DUP_PRM_FUNC) NULL},
4395  PRM_BOOLEAN,
4398  (void *) &PRM_UNLOADDB_IGNORE_ERROR,
4399  (void *) NULL, (void *) NULL,
4400  (char *) NULL,
4401  (DUP_PRM_FUNC) NULL,
4402  (DUP_PRM_FUNC) NULL},
4406  PRM_INTEGER,
4409  (void *) &PRM_UNLOADDB_LOCK_TIMEOUT,
4410  (void *) NULL, (void *) &prm_unloaddb_lock_timeout_lower,
4411  (char *) NULL,
4412  (DUP_PRM_FUNC) NULL,
4413  (DUP_PRM_FUNC) NULL},
4417  PRM_INTEGER,
4420  (void *) &PRM_LOADDB_FLUSH_INTERVAL,
4421  (void *) NULL, (void *) &prm_loaddb_flush_interval_lower,
4422  (char *) NULL,
4423  (DUP_PRM_FUNC) NULL,
4424  (DUP_PRM_FUNC) NULL},
4427  (PRM_FOR_SERVER),
4428  PRM_STRING,
4431  (void *) &PRM_IO_TEMP_VOLUME_PATH,
4432  (void *) NULL, (void *) NULL,
4433  (char *) NULL,
4434  (DUP_PRM_FUNC) NULL,
4435  (DUP_PRM_FUNC) NULL},
4439  PRM_STRING,
4442  (void *) &PRM_IO_VOLUME_EXT_PATH,
4443  (void *) NULL, (void *) NULL,
4444  (char *) NULL,
4445  (DUP_PRM_FUNC) NULL,
4446  (DUP_PRM_FUNC) NULL},
4450  PRM_BOOLEAN,
4453  (void *) &PRM_UNIQUE_ERROR_KEY_VALUE,
4454  (void *) NULL, (void *) NULL,
4455  (char *) NULL,
4456  (DUP_PRM_FUNC) NULL,
4457  (DUP_PRM_FUNC) NULL},
4461  PRM_BOOLEAN,
4464  (void *) &PRM_USE_SYSTEM_MALLOC,
4465  (void *) NULL, (void *) NULL,
4466  (char *) NULL,
4467  (DUP_PRM_FUNC) NULL,
4468  (DUP_PRM_FUNC) NULL},
4472  PRM_STRING,
4474  (void *) &prm_event_handler_default,
4475  (void *) &PRM_EVENT_HANDLER,
4476  (void *) NULL, (void *) NULL,
4477  (char *) NULL,
4478  (DUP_PRM_FUNC) NULL,
4479  (DUP_PRM_FUNC) NULL},
4485  (void *) &prm_event_activation_default,
4486  (void *) &PRM_EVENT_ACTIVATION,
4487  (void *) NULL, (void *) NULL,
4488  (char *) NULL,
4489  (DUP_PRM_FUNC) NULL,
4490  (DUP_PRM_FUNC) NULL},
4494  PRM_BOOLEAN,
4496  (void *) &prm_read_only_mode_default,
4497  (void *) &PRM_READ_ONLY_MODE,
4498  (void *) NULL, (void *) NULL,
4499  (char *) NULL,
4500  (DUP_PRM_FUNC) NULL,
4501  (DUP_PRM_FUNC) NULL},
4505  PRM_INTEGER,
4508  (void *) &PRM_MNT_WAITING_THREAD,
4509  (void *) NULL, (void *) &prm_mnt_waiting_thread_lower,
4510  (char *) NULL,
4511  (DUP_PRM_FUNC) NULL,
4512  (DUP_PRM_FUNC) NULL},
4519  (void *) &PRM_MNT_STATS_THRESHOLD,
4520  (void *) NULL, (void *) NULL,
4521  (char *) NULL,
4522  (DUP_PRM_FUNC) NULL,
4523  (DUP_PRM_FUNC) NULL},
4526  (PRM_FOR_SERVER),
4527  PRM_STRING,
4530  (void *) &PRM_SERVICE_SERVICE_LIST,
4531  (void *) NULL, (void *) NULL,
4532  (char *) NULL,
4533  (DUP_PRM_FUNC) NULL,
4534  (DUP_PRM_FUNC) NULL},
4537  (PRM_FOR_SERVER),
4538  PRM_STRING,
4541  (void *) &PRM_SERVICE_SERVER_LIST,
4542  (void *) NULL, (void *) NULL,
4543  (char *) NULL,
4544  (DUP_PRM_FUNC) NULL,
4545  (DUP_PRM_FUNC) NULL},
4549  PRM_INTEGER,
4551  (void *) &prm_session_timeout_default,
4552  (void *) &PRM_SESSION_STATE_TIMEOUT,
4553  (void *) &prm_session_timeout_upper,
4554  (void *) &prm_session_timeout_lower,
4555  (char *) NULL,
4556  (DUP_PRM_FUNC) NULL,
4557  (DUP_PRM_FUNC) NULL},
4561  PRM_INTEGER,
4564  (void *) &PRM_MULTI_RANGE_OPT_LIMIT,
4567  (char *) NULL,
4568  (DUP_PRM_FUNC) NULL,
4569  (DUP_PRM_FUNC) NULL},
4573  PRM_STRING,
4575  (void *) &prm_intl_number_lang_default,
4576  (void *) &PRM_INTL_NUMBER_LANG,
4577  (void *) NULL, (void *) NULL,
4578  (char *) NULL,
4579  (DUP_PRM_FUNC) NULL,
4580  (DUP_PRM_FUNC) NULL},
4584  PRM_STRING,
4586  (void *) &prm_intl_date_lang_default,
4587  (void *) &PRM_INTL_DATE_LANG,
4588  (void *) NULL, (void *) NULL,
4589  (char *) NULL,
4590  (DUP_PRM_FUNC) NULL,
4591  (DUP_PRM_FUNC) NULL},
4592  /* All the compound parameters *must* be at the end of the array so that the changes they cause are not overridden by
4593  * other parameters (for example in sysprm_load_and_init the parameters are set to their default in the order they
4594  * are found in this array). */
4598  PRM_KEYWORD,
4600  (void *) &prm_compat_mode_default,
4601  (void *) &PRM_COMPAT_MODE,
4602  (void *) &prm_compat_mode_upper, (void *) &prm_compat_mode_lower,
4603  (char *) NULL,
4604  (DUP_PRM_FUNC) NULL,
4605  (DUP_PRM_FUNC) NULL},
4608  (PRM_SIZE_UNIT),
4609  PRM_BIGINT,
4611  (void *) &prm_db_volume_size_default,
4612  (void *) &PRM_DB_VOLUME_SIZE,
4613  (void *) &prm_db_volume_size_upper,
4614  (void *) &prm_db_volume_size_lower,
4615  (char *) NULL,
4616  (DUP_PRM_FUNC) NULL,
4617  (DUP_PRM_FUNC) NULL},
4620  (PRM_SIZE_UNIT),
4621  PRM_BIGINT,
4623  (void *) &prm_log_volume_size_default,
4624  (void *) &PRM_LOG_VOLUME_SIZE,
4625  (void *) &prm_log_volume_size_upper,
4626  (void *) &prm_log_volume_size_lower,
4627  (char *) NULL,
4628  (DUP_PRM_FUNC) NULL,
4629  (DUP_PRM_FUNC) NULL},
4633  PRM_BOOLEAN,
4637  (void *) NULL, (void *) NULL,
4638  (char *) NULL,
4639  (DUP_PRM_FUNC) NULL,
4640  (DUP_PRM_FUNC) NULL},
4644  PRM_BOOLEAN,
4648  (void *) NULL, (void *) NULL,
4649  (char *) NULL,
4650  (DUP_PRM_FUNC) NULL,
4651  (DUP_PRM_FUNC) NULL},
4655  PRM_BOOLEAN,
4658  (void *) &PRM_INTL_CHECK_INPUT_STRING,
4659  (void *) NULL, (void *) NULL,
4660  (char *) NULL,
4661  (DUP_PRM_FUNC) NULL,
4662  (DUP_PRM_FUNC) NULL},
4666  PRM_KEYWORD,
4668  (void *) &prm_check_peer_alive_default,
4669  (void *) &PRM_CHECK_PEER_ALIVE,
4670  (void *) NULL, (void *) NULL,
4671  (char *) NULL,
4672  (DUP_PRM_FUNC) NULL,
4673  (DUP_PRM_FUNC) NULL},
4677  PRM_INTEGER,
4680  (void *) &PRM_SQL_TRACE_SLOW_MSECS,
4683  (char *) NULL,
4684  (DUP_PRM_FUNC) NULL,
4685  (DUP_PRM_FUNC) NULL},
4689  PRM_INTEGER,
4692  (void *) &PRM_SQL_TRACE_SLOW_MSECS,
4695  (char *) NULL,
4696  (DUP_PRM_FUNC) prm_equal_to_ori,
4697  (DUP_PRM_FUNC) prm_equal_to_ori},
4701  PRM_BOOLEAN,
4704  (void *) &PRM_SQL_TRACE_EXECUTION_PLAN,
4705  (void *) NULL,
4706  (void *) NULL,
4707  (char *) NULL,
4708  (DUP_PRM_FUNC) NULL,
4709  (DUP_PRM_FUNC) NULL},
4713  PRM_INTEGER,
4717  (void *) NULL,
4719  (char *) NULL,
4720  (DUP_PRM_FUNC) NULL,
4721  (DUP_PRM_FUNC) NULL},
4725  PRM_STRING,
4727  (void *) &prm_intl_collation_default,
4728  (void *) &PRM_INTL_COLLATION,
4729  (void *) NULL, (void *) NULL,
4730  (char *) NULL,
4731  (DUP_PRM_FUNC) NULL,
4732  (DUP_PRM_FUNC) NULL},
4736  PRM_BIGINT,
4742  (char *) NULL,
4743  (DUP_PRM_FUNC) NULL,
4744  (DUP_PRM_FUNC) NULL},
4748  PRM_INTEGER,
4751  (void *) &PRM_SORT_LIMIT_MAX_COUNT,
4754  (char *) NULL,
4755  (DUP_PRM_FUNC) NULL,
4756  (DUP_PRM_FUNC) NULL},
4760  PRM_INTEGER,
4763  (void *) &PRM_SQL_TRACE_IOREADS,
4764  (void *) NULL,
4765  (void *) &prm_sql_trace_ioreads_lower,
4766  (char *) NULL,
4767  (DUP_PRM_FUNC) NULL,
4768  (DUP_PRM_FUNC) NULL},
4772  PRM_BOOLEAN,
4774  (void *) &prm_query_trace_default,
4775  (void *) &PRM_QUERY_TRACE,
4776  (void *) NULL, (void *) NULL,
4777  (char *) NULL,
4778  (DUP_PRM_FUNC) NULL,
4779  (DUP_PRM_FUNC) NULL},
4783  PRM_KEYWORD,
4786  (void *) &PRM_QUERY_TRACE_FORMAT,
4787  (void *) &prm_query_trace_format_upper,
4788  (void *) &prm_query_trace_format_lower,
4789  (char *) NULL,
4790  (DUP_PRM_FUNC) NULL,
4791  (DUP_PRM_FUNC) NULL},
4795  PRM_INTEGER,
4798  (void *) &PRM_MAX_RECURSION_SQL_DEPTH,
4799  (void *) NULL,
4800  (void *) NULL,
4801  (char *) NULL,
4802  (DUP_PRM_FUNC) NULL,
4803  (DUP_PRM_FUNC) NULL},
4807  PRM_BOOLEAN,
4811  (void *) NULL,
4812  (void *) NULL,
4813  (char *) NULL,
4814  (DUP_PRM_FUNC) NULL,
4815  (DUP_PRM_FUNC) NULL},
4819  PRM_FLOAT,
4821  (void *) &prm_pb_aout_ratio_default,
4822  (void *) &PRM_PB_AOUT_RATIO,
4823  (void *) &prm_pb_aout_ratio_upper,
4824  (void *) &prm_pb_aout_ratio_lower,
4825  (char *) NULL,
4826  (DUP_PRM_FUNC) NULL,
4827  (DUP_PRM_FUNC) NULL},
4831  PRM_BIGINT,
4834  (void *) &PRM_MAX_AGG_HASH_SIZE,
4835  (void *) &prm_max_agg_hash_size_upper,
4836  (void *) &prm_max_agg_hash_size_lower,
4837  (char *) NULL,
4838  (DUP_PRM_FUNC) NULL,
4839  (DUP_PRM_FUNC) NULL},
4843  PRM_BOOLEAN,
4846  (void *) &PRM_AGG_HASH_RESPECT_ORDER,
4847  (void *) NULL,
4848  (void *) NULL,
4849  (char *) NULL,
4850  (DUP_PRM_FUNC) NULL,
4851  (DUP_PRM_FUNC) NULL},
4855  PRM_BOOLEAN,
4858  (void *) &PRM_USE_BTREE_FENCE_KEY,
4859  (void *) NULL,
4860  (void *) NULL,
4861  (char *) NULL,
4862  (DUP_PRM_FUNC) NULL,
4863  (DUP_PRM_FUNC) NULL},
4867  PRM_BOOLEAN,
4871  (void *) NULL, (void *) NULL,
4872  (char *) NULL,
4873  (DUP_PRM_FUNC) NULL,
4874  (DUP_PRM_FUNC) NULL},
4878  PRM_BIGINT,
4881  (void *) &PRM_MAX_HASH_LIST_SCAN_SIZE,
4884  (char *) NULL,
4885  (DUP_PRM_FUNC) NULL,
4886  (DUP_PRM_FUNC) NULL},
4890  PRM_BOOLEAN,
4893  (void *) &PRM_OPTIMIZER_RESERVE_02,
4894  (void *) NULL, (void *) NULL,
4895  (char *) NULL,
4896  (DUP_PRM_FUNC) NULL,
4897  (DUP_PRM_FUNC) NULL},
4901  PRM_BOOLEAN,
4904  (void *) &PRM_OPTIMIZER_RESERVE_03,
4905  (void *) NULL, (void *) NULL,
4906  (char *) NULL,
4907  (DUP_PRM_FUNC) NULL,
4908  (DUP_PRM_FUNC) NULL},
4912  PRM_BOOLEAN,
4915  (void *) &PRM_OPTIMIZER_RESERVE_04,
4916  (void *) NULL, (void *) NULL,
4917  (char *) NULL,
4918  (DUP_PRM_FUNC) NULL,
4919  (DUP_PRM_FUNC) NULL},
4923  PRM_BOOLEAN,
4926  (void *) &PRM_OPTIMIZER_RESERVE_05,
4927  (void *) NULL, (void *) NULL,
4928  (char *) NULL,
4929  (DUP_PRM_FUNC) NULL,
4930  (DUP_PRM_FUNC) NULL},
4934  PRM_BOOLEAN,
4937  (void *) &PRM_OPTIMIZER_RESERVE_06,
4938  (void *) NULL, (void *) NULL,
4939  (char *) NULL,
4940  (DUP_PRM_FUNC) NULL,
4941  (DUP_PRM_FUNC) NULL},
4945  PRM_BOOLEAN,
4948  (void *) &PRM_OPTIMIZER_RESERVE_07,
4949  (void *) NULL, (void *) NULL,
4950  (char *) NULL,
4951  (DUP_PRM_FUNC) NULL,
4952  (DUP_PRM_FUNC) NULL},
4956  PRM_BOOLEAN,
4959  (void *) &PRM_OPTIMIZER_RESERVE_08,
4960  (void *) NULL, (void *) NULL,
4961  (char *) NULL,
4962  (DUP_PRM_FUNC) NULL,
4963  (DUP_PRM_FUNC) NULL},
4967  PRM_BOOLEAN,
4970  (void *) &PRM_OPTIMIZER_RESERVE_09,
4971  (void *) NULL, (void *) NULL,
4972  (char *) NULL,
4973  (DUP_PRM_FUNC) NULL,
4974  (DUP_PRM_FUNC) NULL},
4978  PRM_BOOLEAN,
4981  (void *) &PRM_OPTIMIZER_RESERVE_10,
4982  (void *) NULL, (void *) NULL,
4983  (char *) NULL,
4984  (DUP_PRM_FUNC) NULL,
4985  (DUP_PRM_FUNC) NULL},
4989  PRM_BOOLEAN,
4992  (void *) &PRM_OPTIMIZER_RESERVE_11,
4993  (void *) NULL, (void *) NULL,
4994  (char *) NULL,
4995  (DUP_PRM_FUNC) NULL,
4996  (DUP_PRM_FUNC) NULL},
5000  PRM_BOOLEAN,
5003  (void *) &PRM_OPTIMIZER_RESERVE_12,
5004  (void *) NULL, (void *) NULL,
5005  (char *) NULL,
5006  (DUP_PRM_FUNC) NULL,
5007  (DUP_PRM_FUNC) NULL},
5011  PRM_BOOLEAN,
5014  (void *) &PRM_OPTIMIZER_RESERVE_13,
5015  (void *) NULL, (void *) NULL,
5016  (char *) NULL,
5017  (DUP_PRM_FUNC) NULL,
5018  (DUP_PRM_FUNC) NULL},
5022  PRM_BOOLEAN,
5025  (void *) &PRM_OPTIMIZER_RESERVE_14,
5026  (void *) NULL, (void *) NULL,
5027  (char *) NULL,
5028  (DUP_PRM_FUNC) NULL,
5029  (DUP_PRM_FUNC) NULL},
5033  PRM_BOOLEAN,
5036  (void *) &PRM_OPTIMIZER_RESERVE_15,
5037  (void *) NULL, (void *) NULL,
5038  (char *) NULL,
5039  (DUP_PRM_FUNC) NULL,
5040  (DUP_PRM_FUNC) NULL},
5044  PRM_BOOLEAN,
5047  (void *) &PRM_OPTIMIZER_RESERVE_16,
5048  (void *) NULL, (void *) NULL,
5049  (char *) NULL,
5050  (DUP_PRM_FUNC) NULL,
5051  (DUP_PRM_FUNC) NULL},
5055  PRM_BOOLEAN,
5058  (void *) &PRM_OPTIMIZER_RESERVE_17,
5059  (void *) NULL, (void *) NULL,
5060  (char *) NULL,
5061  (DUP_PRM_FUNC) NULL,
5062  (DUP_PRM_FUNC) NULL},
5066  PRM_BOOLEAN,
5069  (void *) &PRM_OPTIMIZER_RESERVE_18,
5070  (void *) NULL, (void *) NULL,
5071  (char *) NULL,
5072  (DUP_PRM_FUNC) NULL,
5073  (DUP_PRM_FUNC) NULL},
5077  PRM_BOOLEAN,
5080  (void *) &PRM_OPTIMIZER_RESERVE_19,
5081  (void *) NULL, (void *) NULL,
5082  (char *) NULL,
5083  (DUP_PRM_FUNC) NULL,
5084  (DUP_PRM_FUNC) NULL},
5088  PRM_BOOLEAN,
5091  (void *) &PRM_OPTIMIZER_RESERVE_20,
5092  (void *) NULL, (void *) NULL,
5093  (char *) NULL,
5094  (DUP_PRM_FUNC) NULL,
5095  (DUP_PRM_FUNC) NULL},
5099  PRM_BOOLEAN,
5103  (void *) NULL,
5104  (void *) NULL,
5105  (char *) NULL,
5106  (DUP_PRM_FUNC) NULL,
5107  (DUP_PRM_FUNC) NULL},
5111  PRM_FLOAT,
5113  (void *) &prm_pb_lru_hot_ratio_default,
5114  (void *) &PRM_PB_LRU_HOT_RATIO,
5115  (void *) &prm_pb_lru_hot_ratio_upper,
5116  (void *) &prm_pb_lru_hot_ratio_lower,
5117  (char *) NULL,
5118  (DUP_PRM_FUNC) NULL,
5119  (DUP_PRM_FUNC) NULL},
5123  PRM_FLOAT,
5126  (void *) &PRM_PB_LRU_BUFFER_RATIO,
5129  (char *) NULL,
5130  (DUP_PRM_FUNC) NULL,
5131  (DUP_PRM_FUNC) NULL},
5135  PRM_INTEGER,
5139  (void *) NULL,
5141  (char *) NULL,
5142  (DUP_PRM_FUNC) NULL,
5143  (DUP_PRM_FUNC) NULL},
5146  (PRM_FOR_SERVER),
5147  PRM_INTEGER,
5150  (void *) &PRM_VACUUM_LOG_BLOCK_PAGES,
5153  (char *) NULL,
5154  (DUP_PRM_FUNC) NULL,
5155  (DUP_PRM_FUNC) NULL},
5158  (PRM_FOR_SERVER),
5159  PRM_INTEGER,
5162  (void *) &PRM_VACUUM_WORKER_COUNT,
5165  (char *) NULL,
5166  (DUP_PRM_FUNC) NULL,
5167  (DUP_PRM_FUNC) NULL},
5170  (PRM_FOR_SERVER),
5171  PRM_INTEGER,
5173  (void *) &prm_er_log_vacuum_default,
5174  (void *) &PRM_ER_LOG_VACUUM,
5175  (void *) NULL,
5176  (void *) NULL,
5177  (char *) NULL,
5178  (DUP_PRM_FUNC) NULL,
5179  (DUP_PRM_FUNC) NULL},
5183  PRM_BOOLEAN,
5185  (void *) &prm_disable_vacuum_default,
5186  (void *) &PRM_DISABLE_VACUUM,
5187  (void *) NULL,
5188  (void *) NULL,
5189  (char *) NULL,
5190  (DUP_PRM_FUNC) NULL,
5191  (DUP_PRM_FUNC) NULL},
5195  PRM_BOOLEAN,
5197  (void *) &prm_log_btree_ops_default,
5198  (void *) &PRM_LOG_BTREE_OPS,
5199  (void *) NULL,
5200  (void *) NULL,
5201  (char *) NULL,
5202  (DUP_PRM_FUNC) NULL,
5203  (DUP_PRM_FUNC) NULL},
5207  PRM_BOOLEAN,
5210  (void *) &PRM_OBJECT_PRINT_FORMAT_OID,
5211  (void *) NULL,
5212  (void *) NULL,
5213  (char *) NULL,
5214  (DUP_PRM_FUNC) NULL,
5215  (DUP_PRM_FUNC) NULL},
5216  {PRM_ID_TIMEZONE,
5219  PRM_STRING,
5221  (void *) &prm_timezone_default,
5222  (void *) &PRM_TIMEZONE,
5223  (void *) NULL, (void *) NULL,
5224  (char *) NULL,
5225  (DUP_PRM_FUNC) NULL,
5226  (DUP_PRM_FUNC) NULL},
5230  PRM_STRING,
5232  (void *) &prm_server_timezone_default,
5233  (void *) &PRM_SERVER_TIMEZONE,
5234  (void *) NULL, (void *) NULL,
5235  (char *) NULL,
5236  (DUP_PRM_FUNC) NULL,
5237  (DUP_PRM_FUNC) NULL},
5241  PRM_BOOLEAN,
5244  (void *) &PRM_TZ_LEAP_SECOND_SUPPORT,
5245  (void *) NULL, (void *) NULL,
5246  (char *) NULL,
5247  (DUP_PRM_FUNC) NULL,
5248  (DUP_PRM_FUNC) NULL},
5252  PRM_BOOLEAN,
5256  (void *) NULL, (void *) NULL,
5257  (char *) NULL,
5258  (DUP_PRM_FUNC) NULL,
5259  (DUP_PRM_FUNC) NULL},
5263  PRM_INTEGER,
5265  (void *) NULL,
5266  (void *) NULL,
5267  (void *) NULL,
5268  (void *) NULL,
5269  (char *) NULL,
5270  (DUP_PRM_FUNC) NULL,
5271  (DUP_PRM_FUNC) NULL},
5275  PRM_INTEGER,
5277  (void *) NULL,
5278  (void *) NULL,
5279  (void *) NULL,
5280  (void *) NULL,
5281  (char *) NULL,
5283  (DUP_PRM_FUNC) prm_log_pages_to_size},
5287  PRM_INTEGER,
5289  (void *) NULL,
5290  (void *) NULL,
5291  (void *) NULL,
5292  (void *) NULL,
5293  (char *) NULL,
5294  (DUP_PRM_FUNC) NULL,
5295  (DUP_PRM_FUNC) NULL},
5299  PRM_BOOLEAN,
5303  (void *) NULL,
5304  (void *) NULL,
5305  (char *) NULL,
5306  (DUP_PRM_FUNC) NULL,
5307  (DUP_PRM_FUNC) NULL},
5311  PRM_INTEGER,
5314  (void *) &PRM_PB_NEIGHBOR_FLUSH_PAGES,
5317  (char *) NULL,
5318  (DUP_PRM_FUNC) NULL,
5319  (DUP_PRM_FUNC) NULL},
5324  (unsigned int *) &prm_fault_injection_id_flag,
5326  (void *) &PRM_FAULT_INJECTION_IDS,
5327  (void *) NULL,
5328  (void *) NULL,
5329  (char *) NULL,
5330  (DUP_PRM_FUNC) NULL,
5331  (DUP_PRM_FUNC) NULL},
5335  PRM_KEYWORD,
5336  (unsigned int *) &prm_fault_injection_test_flag,
5338  (void *) &PRM_FAULT_INJECTION_TEST,
5341  (char *) NULL,
5342  (DUP_PRM_FUNC) NULL,
5343  (DUP_PRM_FUNC) NULL},
5347  PRM_BOOLEAN,
5351  (void *) NULL, (void *) NULL,
5352  (char *) NULL,
5353  (DUP_PRM_FUNC) NULL,
5354  (DUP_PRM_FUNC) NULL},
5358  PRM_KEYWORD,
5361  (void *) &PRM_HA_REPL_FILTER_TYPE,
5364  (char *) NULL,
5365  (DUP_PRM_FUNC) NULL,
5366  (DUP_PRM_FUNC) NULL},
5370  PRM_STRING,
5373  (void *) &PRM_HA_REPL_FILTER_FILE,
5374  (void *) NULL, (void *) NULL,
5375  (char *) NULL,
5376  (DUP_PRM_FUNC) NULL,
5377  (DUP_PRM_FUNC) NULL},
5381  PRM_BOOLEAN,
5383  (void *) &prm_compensate_debug_default,
5384  (void *) &PRM_COMPENSATE_DEBUG,
5385  (void *) NULL, (void *) NULL,
5386  (char *) NULL,
5387  (DUP_PRM_FUNC) NULL,
5388  (DUP_PRM_FUNC) NULL},
5392  PRM_BOOLEAN,
5394  (void *) &prm_postpone_debug_default,
5395  (void *) &PRM_POSTPONE_DEBUG,
5396  (void *) NULL, (void *) NULL,
5397  (char *) NULL,
5398  (DUP_PRM_FUNC) NULL,
5399  (DUP_PRM_FUNC) NULL},
5403  PRM_BOOLEAN,
5406  (void *) &PRM_CLIENT_CLASS_CACHE_DEBUG,
5407  (void *) NULL, (void *) NULL,
5408  (char *) NULL,
5409  (DUP_PRM_FUNC) NULL,
5410  (DUP_PRM_FUNC) NULL},
5414  PRM_BOOLEAN,
5418  (void *) NULL, (void *) NULL,
5419  (char *) NULL,
5420  (DUP_PRM_FUNC) NULL,
5421  (DUP_PRM_FUNC) NULL},
5425  PRM_BOOLEAN,
5429  (void *) NULL, (void *) NULL,
5430  (char *) NULL,
5431  (DUP_PRM_FUNC) NULL,
5432  (DUP_PRM_FUNC) NULL},
5436  PRM_BOOLEAN,
5438  (void *) &prm_log_unique_stats_default,
5439  (void *) &PRM_LOG_UNIQUE_STATS,
5440  (void *) NULL, (void *) NULL,
5441  (char *) NULL,
5442  (DUP_PRM_FUNC) NULL,
5443  (DUP_PRM_FUNC) NULL},
5447  PRM_BOOLEAN,
5450  (void *) &PRM_LOGPB_LOGGING_DEBUG,
5451  (void *) NULL, (void *) NULL,
5452  (char *) NULL,
5453  (DUP_PRM_FUNC) NULL,
5454  (DUP_PRM_FUNC) NULL},
5458  PRM_BOOLEAN,
5462  (void *) NULL,
5463  (void *) NULL,
5464  (char *) NULL,
5465  (DUP_PRM_FUNC) NULL,
5466  (DUP_PRM_FUNC) NULL},
5470  PRM_INTEGER,
5473  (void *) &PRM_EXTENDED_STATISTICS,
5476  (char *) NULL,
5477  (DUP_PRM_FUNC) NULL,
5478  (DUP_PRM_FUNC) NULL},
5482  PRM_BOOLEAN,
5486  (void *) NULL, (void *) NULL,
5487  (char *) NULL,
5488  (DUP_PRM_FUNC) NULL,
5489  (DUP_PRM_FUNC) NULL},
5493  PRM_INTEGER,
5499  (char *) NULL,
5500  (DUP_PRM_FUNC) NULL,
5501  (DUP_PRM_FUNC) NULL},
5505  PRM_BOOLEAN,
5507  (void *) &prm_disk_logging_default,
5508  (void *) &PRM_DISK_LOGGING,
5509  (void *) NULL, (void *) NULL,
5510  (char *) NULL,
5511  (DUP_PRM_FUNC) NULL,
5512  (DUP_PRM_FUNC) NULL},
5516  PRM_BOOLEAN,
5518  (void *) &prm_file_logging_default,
5519  (void *) &PRM_FILE_LOGGING,
5520  (void *) NULL, (void *) NULL,
5521  (char *) NULL,
5522  (DUP_PRM_FUNC) NULL,
5523  (DUP_PRM_FUNC) NULL},
5527  PRM_INTEGER,
5530  (void *) &PRM_PB_NUM_PRIVATE_CHAINS,
5533  (char *) NULL,
5534  (DUP_PRM_FUNC) NULL,
5535  (DUP_PRM_FUNC) NULL},
5539  PRM_BOOLEAN,
5541  (void *) &prm_pb_monitor_locks_default,
5542  (void *) &PRM_PB_MONITOR_LOCKS,
5543  (void *) NULL,
5544  (void *) NULL,
5545  (char *) NULL,
5546  (DUP_PRM_FUNC) NULL,
5547  (DUP_PRM_FUNC) NULL},
5551  PRM_INTEGER,
5554  (void *) &PRM_CTE_MAX_RECURSIONS,
5555  (void *) &prm_cte_max_recursions_upper,
5556  (void *) &prm_cte_max_recursions_lower,
5557  (char *) NULL,
5558  (DUP_PRM_FUNC) NULL,
5559  (DUP_PRM_FUNC) NULL},
5563  PRM_BOOLEAN,
5566  (void *) &PRM_JSON_LOG_ALLOCATIONS,
5567  (void *) NULL, (void *) NULL,
5568  (char *) NULL,
5569  (DUP_PRM_FUNC) NULL,
5570  (DUP_PRM_FUNC) NULL},
5574  PRM_INTEGER,
5577  (void *) &PRM_JSON_MAX_ARRAY_IDX,
5578  (void *) &prm_json_max_array_idx_upper,
5579  (void *) &prm_json_max_array_idx_lower,
5580  (char *) NULL,
5581  (DUP_PRM_FUNC) NULL,
5582  (DUP_PRM_FUNC) NULL},
5586  PRM_BOOLEAN,
5589  (void *) &PRM_CONNECTION_LOGGING,
5590  (void *) NULL, (void *) NULL,
5591  (char *) NULL,
5592  (DUP_PRM_FUNC) NULL,
5593  (DUP_PRM_FUNC) NULL},
5597  PRM_INTEGER,
5600  (void *) &PRM_THREAD_LOGGING_FLAG,
5601  (void *) NULL, (void *) NULL,
5602  (char *) NULL,
5603  (DUP_PRM_FUNC) NULL,
5604  (DUP_PRM_FUNC) NULL},
5608  PRM_BOOLEAN,
5610  (void *) &prm_log_query_lists_default,
5611  (void *) &PRM_LOG_QUERY_LISTS,
5612  (void *) NULL, (void *) NULL,
5613  (char *) NULL,
5614  (DUP_PRM_FUNC) NULL,
5615  (DUP_PRM_FUNC) NULL},
5618  (PRM_FOR_SERVER),
5619  PRM_BOOLEAN,
5623  (void *) NULL, (void *) NULL,
5624  (char *) NULL,
5625  (DUP_PRM_FUNC) NULL,
5626  (DUP_PRM_FUNC) NULL},
5629  (PRM_FOR_SERVER),
5630  PRM_INTEGER,
5636  (char *) NULL,
5637  (DUP_PRM_FUNC) NULL,
5638  (DUP_PRM_FUNC) NULL},
5641  (PRM_FOR_SERVER),
5642  PRM_BOOLEAN,
5645  (void *) &PRM_THREAD_WORKER_POOLING,
5646  (void *) NULL, (void *) NULL,
5647  (char *) NULL,
5648  (DUP_PRM_FUNC) NULL,
5649  (DUP_PRM_FUNC) NULL},
5652  (PRM_FOR_SERVER),
5653  PRM_INTEGER,
5659  (char *) NULL,
5660  (DUP_PRM_FUNC) NULL,
5661  (DUP_PRM_FUNC) NULL},
5662  {PRM_ID_DWB_SIZE,
5665  PRM_INTEGER,
5667  (void *) &prm_dwb_size_default,
5668  (void *) &PRM_DWB_SIZE,
5669  (void *) &prm_dwb_size_upper,
5670  (void *) &prm_dwb_size_lower,
5671  (char *) NULL,
5672  (DUP_PRM_FUNC) NULL,
5673  (DUP_PRM_FUNC) NULL},
5677  PRM_INTEGER,
5679  (void *) &prm_dwb_blocks_default,
5680  (void *) &PRM_DWB_BLOCKS,
5681  (void *) &prm_dwb_blocks_upper,
5682  (void *) &prm_dwb_blocks_lower,
5683  (char *) NULL,
5684  (DUP_PRM_FUNC) NULL,
5685  (DUP_PRM_FUNC) NULL},
5689  PRM_BOOLEAN,
5692  (void *) &PRM_ENABLE_DWB_FLUSH_THREAD,
5693  (void *) NULL, (void *) NULL,
5694  (char *) NULL,
5695  (DUP_PRM_FUNC) NULL,
5696  (DUP_PRM_FUNC) NULL},
5700  PRM_BOOLEAN,
5702  (void *) &prm_dwb_logging_default,
5703  (void *) &PRM_DWB_LOGGING,
5704  (void *) NULL, (void *) NULL,
5705  (char *) NULL,
5706  (DUP_PRM_FUNC) NULL,
5707  (DUP_PRM_FUNC) NULL},
5711  PRM_INTEGER,
5713  (void *) &prm_data_file_advise_default,
5714  (void *) &PRM_DATA_FILE_ADVISE,
5715  (void *) &prm_data_file_advise_upper,
5716  (void *) &prm_data_file_advise_lower,
5717  (char *) NULL,
5718  (DUP_PRM_FUNC) NULL,
5719  (DUP_PRM_FUNC) NULL},
5723  PRM_BOOLEAN,
5726  (void *) &PRM_DEBUG_LOG_ARCHIVES,
5727  (void *) NULL, (void *) NULL,
5728  (char *) NULL,
5729  (DUP_PRM_FUNC) NULL,
5730  (DUP_PRM_FUNC) NULL},
5731  {PRM_ID_DEBUG_ES,
5734  PRM_BOOLEAN,
5736  (void *) &prm_debug_es_default,
5737  (void *) &PRM_DEBUG_ES,
5738  (void *) NULL, (void *) NULL,
5739  (char *) NULL,
5740  (DUP_PRM_FUNC) NULL,
5741  (DUP_PRM_FUNC) NULL},
5745  PRM_BOOLEAN,
5747  (void *) &prm_debug_bestspace_default,
5748  (void *) &PRM_DEBUG_BESTSPACE,
5749  (void *) NULL, (void *) NULL,
5750  (char *) NULL,
5751  (DUP_PRM_FUNC) NULL,
5752  (DUP_PRM_FUNC) NULL},
5756  PRM_BOOLEAN,
5758  (void *) &prm_debug_logwr_default,
5759  (void *) &PRM_DEBUG_LOGWR,
5760  (void *) NULL, (void *) NULL,
5761  (char *) NULL,
5762  (DUP_PRM_FUNC) NULL,
5763  (DUP_PRM_FUNC) NULL},
5767  PRM_BOOLEAN,
5769  (void *) &prm_debug_autocommit_default,
5770  (void *) &PRM_DEBUG_AUTOCOMMIT,
5771  (void *) NULL, (void *) NULL,
5772  (char *) NULL,
5773  (DUP_PRM_FUNC) NULL,
5774  (DUP_PRM_FUNC) NULL},
5778  PRM_BOOLEAN,
5781  (void *) &PRM_DEBUG_REPLICATION_DATA,
5782  (void *) NULL, (void *) NULL,
5783  (char *) NULL,
5784  (DUP_PRM_FUNC) NULL,
5785  (DUP_PRM_FUNC) NULL},
5789  PRM_BOOLEAN,
5791  (void *) &prm_track_requests_default,
5792  (void *) &PRM_TRACK_REQUESTS,
5793  (void *) NULL, (void *) NULL,
5794  (char *) NULL,
5795  (DUP_PRM_FUNC) NULL,
5796  (DUP_PRM_FUNC) NULL},
5800  PRM_BOOLEAN,
5803  (void *) &PRM_LOG_PGBUF_VICTIM_FLUSH,
5804  (void *) NULL, (void *) NULL,
5805  (char *) NULL,
5806  (DUP_PRM_FUNC) NULL,
5807  (DUP_PRM_FUNC) NULL},
5811  PRM_BOOLEAN,
5814  (void *) &PRM_LOG_CHKPT_DETAILED,
5815  (void *) NULL, (void *) NULL,
5816  (char *) NULL,
5817  (DUP_PRM_FUNC) NULL,
5818  (DUP_PRM_FUNC) NULL},
5822  PRM_BIGINT,
5824  (void *) &prm_ib_task_memsize_default,
5825  (void *) &PRM_IB_TASK_MEMSIZE,
5827  (char *) NULL,
5828  (DUP_PRM_FUNC) NULL,
5829  (DUP_PRM_FUNC) NULL},
5830  {PRM_ID_STATS_ON,
5833  PRM_BOOLEAN,
5835  (void *) &prm_stats_on_default,
5836  (void *) &PRM_STATS_ON,
5837  (void *) NULL, (void *) NULL,
5838  (char *) NULL,
5839  (DUP_PRM_FUNC) NULL,
5840  (DUP_PRM_FUNC) NULL},
5844  PRM_INTEGER,
5846  (void *) &prm_loaddb_workers_default,
5847  (void *) &PRM_LOADDB_WORKERS,
5849  (char *) NULL,
5850  (DUP_PRM_FUNC) NULL,
5851  (DUP_PRM_FUNC) NULL},
5855  PRM_BOOLEAN,
5857  (void *) &prm_perf_test_mode_default,
5858  (void *) &PRM_PERF_TEST_MODE,
5859  (void *) NULL, (void *) NULL,
5860  (char *) NULL,
5861  (DUP_PRM_FUNC) NULL,
5862  (DUP_PRM_FUNC) NULL},
5866  PRM_BOOLEAN,
5868  (void *) &prm_repr_cache_log_default,
5869  (void *) &PRM_REPR_CACHE_LOG,
5870  (void *) NULL, (void *) NULL,
5871  (char *) NULL,
5872  (DUP_PRM_FUNC) NULL,
5873  (DUP_PRM_FUNC) NULL},
5877  PRM_BOOLEAN,
5879  (void *) &prm_new_lfhash_default,
5880  (void *) &PRM_NEW_LFHASH,
5881  (void *) NULL, (void *) NULL,
5882  (char *) NULL,
5883  (DUP_PRM_FUNC) NULL,
5884  (DUP_PRM_FUNC) NULL},
5888  PRM_BOOLEAN,
5891  (void *) &PRM_HEAP_INFO_CACHE_LOGGING,
5892  (void *) NULL, (void *) NULL,
5893  (char *) NULL,
5894  (DUP_PRM_FUNC) NULL,
5895  (DUP_PRM_FUNC) NULL},
5899  PRM_STRING,
5902  (void *) &PRM_TDE_KEYS_FILE_PATH,
5903  (void *) NULL, (void *) NULL,
5904  (char *) NULL,
5905  (DUP_PRM_FUNC) NULL,
5906  (DUP_PRM_FUNC) NULL},
5910  PRM_KEYWORD,
5912  (void *) &prm_tde_default_algorithm,
5913  (void *) &PRM_TDE_DEFAULT_ALGORITHM,
5914  (void *) NULL, (void *) NULL,
5915  (char *) NULL,
5916  (DUP_PRM_FUNC) NULL,
5917  (DUP_PRM_FUNC) NULL},
5920  (PRM_FOR_SERVER),
5921  PRM_BOOLEAN,
5924  (void *) &PRM_JAVA_STORED_PROCEDURE,
5925  (void *) NULL, (void *) NULL,
5926  (char *) NULL,
5927  (DUP_PRM_FUNC) NULL,
5928  (DUP_PRM_FUNC) NULL},
5931  (PRM_FOR_SERVER),
5932  PRM_INTEGER,
5937  (char *) NULL,
5938  (DUP_PRM_FUNC) NULL,
5939  (DUP_PRM_FUNC) NULL},
5942  (PRM_FOR_SERVER),
5943  PRM_STRING,
5947  (void *) NULL, (void *) NULL,
5948  (char *) NULL,
5949  (DUP_PRM_FUNC) NULL,
5950  (DUP_PRM_FUNC) NULL},
5954  PRM_INTEGER,
5958  (void *) NULL, (void *) NULL,
5959  (char *) NULL,
5960  (DUP_PRM_FUNC) NULL,
5961  (DUP_PRM_FUNC) NULL},
5965  PRM_BOOLEAN,
5969  (void *) NULL, (void *) NULL,
5970  (char *) NULL,
5971  (DUP_PRM_FUNC) NULL,
5972  (DUP_PRM_FUNC) NULL},
5976  PRM_BOOLEAN,
5979  (void *) &PRM_ALLOW_TRUNCATED_STRING,
5980  (void *) NULL, (void *) NULL,
5981  (char *) NULL,
5982  (DUP_PRM_FUNC) NULL,
5983  (DUP_PRM_FUNC) NULL},
5987  PRM_BOOLEAN,
5990  (void *) &PRM_TB_REUSE_OID,
5991  (void *) NULL, (void *) NULL,
5992  (char *) NULL,
5993  (DUP_PRM_FUNC) NULL,
5994  (DUP_PRM_FUNC) NULL},
5998  PRM_BOOLEAN,
6001  (void *) &PRM_USE_STAT_ESTIMATION,
6002  (void *) NULL, (void *) NULL,
6003  (char *) NULL,
6004  (DUP_PRM_FUNC) NULL,
6005  (DUP_PRM_FUNC) NULL},
6009  PRM_BOOLEAN,
6012  (void *) &PRM_IGNORE_TRAILING_SPACE,
6013  (void *) NULL, (void *) NULL,
6014  (char *) NULL,
6015  (DUP_PRM_FUNC) NULL,
6016  (DUP_PRM_FUNC) NULL},
6019  (PRM_FOR_CLIENT),
6020  PRM_BOOLEAN,
6022  (void *) &prm_ddl_audit_log_default,
6023  (void *) &PRM_DDL_AUDIT_LOG,
6024  (void *) NULL, (void *) NULL,
6025  (char *) NULL,
6026  (DUP_PRM_FUNC) NULL,
6027  (DUP_PRM_FUNC) NULL},
6030  (PRM_SIZE_UNIT),
6031  PRM_BIGINT,
6034  (void *) &PRM_DDL_AUDIT_LOG_SIZE,
6035  (void *) &prm_ddl_audit_log_size_upper,
6036  (void *) &prm_ddl_audit_log_size_lower,
6037  (char *) NULL,
6038  (DUP_PRM_FUNC) NULL,
6039  (DUP_PRM_FUNC) NULL}
6040 };
6041 
6042 #define NUM_PRM ((int)(sizeof(prm_Def)/sizeof(prm_Def[0])))
6043 #define PARAM_MSG_FMT(msgid) msgcat_message (MSGCAT_CATALOG_CUBRID, MSGCAT_SET_PARAMETERS, (msgid))
6044 
6045 #define GET_PRM(id) (&prm_Def[(id)])
6046 #define GET_PRM_STATIC_FLAG(id) ((GET_PRM (id))->static_flag)
6047 #define GET_PRM_DYNAMIC_FLAG(id) ((GET_PRM (id))->dynamic_flag)
6048 #define GET_PRM_DATATYPE(id) ((GET_PRM (id))->datatype)
6049 
6050 #if defined (CS_MODE)
6051 #define PRM_PRINT_QRY_STRING(id) (PRM_IS_DIFFERENT (*(GET_PRM_DYNAMIC_FLAG (id))) \
6052  && PRM_IS_FOR_QRY_STRING (GET_PRM_STATIC_FLAG (id)))
6053 #else
6054 #define PRM_PRINT_QRY_STRING(id) (PRM_IS_FOR_QRY_STRING (GET_PRM_STATIC_FLAG (id)))
6055 #endif
6056 
6057 #define PRM_SERVER_SESSION(id) (PRM_IS_FOR_SESSION (GET_PRM_STATIC_FLAG (id)) \
6058  && PRM_IS_FOR_SERVER (GET_PRM_STATIC_FLAG (id)) \
6059  && !PRM_CLIENT_SESSION_ONLY (GET_PRM_STATIC_FLAG (id)))
6060 
6061 static int num_session_parameters = 0;
6062 #define NUM_SESSION_PRM num_session_parameters
6063 
6064 #if defined (CS_MODE)
6065 /*
6066  * Session parameters should be cached with the default values or the values
6067  * loaded from cubrid.conf file. When a new client connects to CAS, it should
6068  * reload these parameters (because some may be changed by previous clients)
6069  */
6070 SESSION_PARAM *cached_session_parameters = NULL;
6071 #endif /* CS_MODE */
6072 
6073 /*
6074  * Keyword searches do a intl_mbs_ncasecmp(), using the LENGTH OF THE TABLE KEY
6075  * as the limit, so make sure that overlapping keywords are ordered
6076  * correctly. For example, make sure that "yes" precedes "y".
6077  */
6078 
6079 typedef struct keyval KEYVAL;
6080 struct keyval
6081 {
6082  const char *key;
6083  int val;
6084 };
6085 
6086 static KEYVAL boolean_words[] = {
6087  {"yes", 1},
6088  {"y", 1},
6089  {"1", 1},
6090  {"true", 1},
6091  {"on", 1},
6092  {"no", 0},
6093  {"n", 0},
6094  {"0", 0},
6095  {"false", 0},
6096  {"off", 0}
6097 };
6098 
6100  {"fatal", ER_FATAL_ERROR_SEVERITY},
6101  {"error", ER_ERROR_SEVERITY},
6102  {"syntax", ER_SYNTAX_ERROR_SEVERITY},
6103  {"warning", ER_WARNING_SEVERITY},
6104  {"notification", ER_NOTIFICATION_SEVERITY}
6105 };
6106 
6108  {"tran_serializable", TRAN_SERIALIZABLE},
6109  {"tran_no_phantom_read", TRAN_SERIALIZABLE},
6110 
6111  {"tran_rep_class_rep_instance", TRAN_REPEATABLE_READ},
6112  {"tran_rep_read", TRAN_REPEATABLE_READ},
6113  {"tran_rep_class_commit_instance", TRAN_READ_COMMITTED},
6114  {"tran_read_committed", TRAN_READ_COMMITTED},
6115  {"tran_cursor_stability", TRAN_READ_COMMITTED},
6116 
6117  {"serializable", TRAN_SERIALIZABLE},
6118  {"no_phantom_read", TRAN_SERIALIZABLE},
6119 
6120  {"rep_class_rep_instance", TRAN_REPEATABLE_READ},
6121  {"rep_read", TRAN_REPEATABLE_READ},
6122  {"rep_class_commit_instance", TRAN_READ_COMMITTED},
6123  {"read_committed", TRAN_READ_COMMITTED},
6124  {"cursor_stability", TRAN_READ_COMMITTED},
6125 };
6126 
6131 };
6132 
6133 static KEYVAL null_words[] = {
6134  {"null", 0},
6135  {"0", 0}
6136 };
6137 
6138 static KEYVAL ha_mode_words[] = {
6140  {"no", HA_MODE_OFF},
6141  {"n", HA_MODE_OFF},
6142  {"0", HA_MODE_OFF},
6143  {"false", HA_MODE_OFF},
6144  {"off", HA_MODE_OFF},
6145  {"yes", HA_MODE_FAIL_BACK},
6146  {"y", HA_MODE_FAIL_BACK},
6147  {"1", HA_MODE_FAIL_BACK},
6148  {"true", HA_MODE_FAIL_BACK},
6149  {"on", HA_MODE_FAIL_BACK},
6150  /* {HA_MODE_FAIL_OVER_STR, HA_MODE_FAIL_OVER}, *//* unused */
6152  /* {HA_MODE_LAZY_BACK_STR, HA_MODE_LAZY_BACK}, *//* not implemented yet */
6154  {"r", HA_MODE_REPLICA},
6155  {"repl", HA_MODE_REPLICA},
6156  {"replica", HA_MODE_REPLICA},
6157  {"2", HA_MODE_REPLICA}
6158 };
6159 
6168 };
6169 
6176 };
6177 
6178 static KEYVAL compat_words[] = {
6179  {"cubrid", COMPAT_CUBRID},
6180  {"default", COMPAT_CUBRID},
6181  {"mysql", COMPAT_MYSQL},
6182  {"oracle", COMPAT_ORACLE}
6183 };
6184 
6186  {"none", CSS_CHECK_PEER_ALIVE_NONE},
6187  {"server_only", CSS_CHECK_PEER_ALIVE_SERVER_ONLY},
6188  {"client_only", CSS_CHECK_PEER_ALIVE_CLIENT_ONLY},
6189  {"both", CSS_CHECK_PEER_ALIVE_BOTH},
6190 };
6191 
6193  {"text", QUERY_TRACE_TEXT},
6194  {"json", QUERY_TRACE_JSON},
6195 };
6196 
6197 static KEYVAL fi_test_words[] = {
6198  {"recovery", FI_GROUP_RECOVERY},
6199 };
6200 
6202  {"none", REPL_FILTER_NONE},
6203  {"include_table", REPL_FILTER_INCLUDE_TBL},
6204  {"exclude_table", REPL_FILTER_EXCLUDE_TBL}
6205 };
6206 
6208  /* {"none", TDE_ALGORITHM_NONE}, */
6209  {"aes", TDE_ALGORITHM_AES},
6210  {"aria", TDE_ALGORITHM_ARIA}
6211 };
6212 
6214  NULL, /* COMPAT_CUBRID */
6215  "no", /* COMPAT_MYSQL */
6216  NULL, /* COMPAT_ORACLE */
6218 };
6219 
6221  NULL, /* COMPAT_CUBRID */
6222  NULL, /* COMPAT_MYSQL */
6223  "yes", /* COMPAT_ORACLE */
6225 };
6226 
6228  NULL, /* COMPAT_CUBRID */
6229  NULL, /* COMPAT_MYSQL */
6230  "yes", /* COMPAT_ORACLE */
6232 };
6233 
6235  NULL, /* COMPAT_CUBRID */
6236  "no", /* COMPAT_MYSQL */
6237  NULL, /* COMPAT_ORACLE */
6239 };
6240 
6241 /* Oracle's trigger correlation names are not yet supported. */
6243  NULL, /* COMPAT_CUBRID */
6244  "yes", /* COMPAT_MYSQL */
6245  NULL, /* COMPAT_ORACLE */
6247 };
6248 
6250  NULL, /* COMPAT_CUBRID */
6251  "yes", /* COMPAT_MYSQL */
6252  NULL, /* COMPAT_ORACLE */
6254 };
6255 
6257  NULL, /* COMPAT_CUBRID */
6258  "no", /* COMPAT_MYSQL */
6259  NULL, /* COMPAT_ORACLE */
6261 };
6262 
6264  NULL, /* COMPAT_CUBRID */
6265  "yes", /* COMPAT_MYSQL */
6266  NULL, /* COMPAT_ORACLE: leave it in cubrid mode for now */
6268 };
6269 
6271  NULL, /* COMPAT_CUBRID */
6272  "yes", /* COMPAT_MYSQL */
6273  NULL, /* COMPAT_ORACLE */
6275 };
6276 
6278  "yes", /* COMPAT_CUBRID */
6279  "no", /* COMPAT_MYSQL */
6280  NULL, /* COMPAT_ORACLE */
6282 };
6283 
6284 static const char **compat_mode_values[] = {
6295 };
6296 
6297 static const int call_stack_dump_error_codes[] = {
6300  ER_IO_READ,
6301  ER_IO_WRITE,
6313  ER_LOG_READ,
6314  ER_LOG_WRITE,
6336 };
6337 
6338 typedef enum
6339 {
6343 } PRM_PRINT_MODE;
6344 
6345 typedef enum
6346 {
6350 
6351 static int prm_print (const SYSPRM_PARAM * prm, char *buf, size_t len, PRM_PRINT_MODE print_mode,
6352  PRM_PRINT_VALUE_MODE print_value_mode);
6353 static int sysprm_load_and_init_internal (const char *db_name, const char *conf_file, bool reload,
6354  const int load_flags);
6355 static void prm_check_environment (void);
6356 static int prm_check_parameters (void);
6358 static int prm_load_by_section (INI_TABLE * ini, const char *section, bool ignore_section, bool reload,
6359  const char *file, const int load_flags);
6360 static int prm_read_and_parse_ini_file (const char *prm_file_name, const char *db_name, const bool reload,
6361  const int load_flags);
6362 static void prm_report_bad_entry (const char *key, int line, int err, const char *where);
6363 static SYSPRM_ERR sysprm_get_param_range (SYSPRM_PARAM * prm, void *min, void *max);
6364 static int prm_check_range (SYSPRM_PARAM * prm, void *value);
6365 static int prm_set (SYSPRM_PARAM * prm, const char *value, bool set_flag);
6366 static int prm_set_force (SYSPRM_PARAM * prm, const char *value);
6367 static int prm_set_default (SYSPRM_PARAM * prm);
6368 static SYSPRM_PARAM *prm_find (const char *pname, const char *section);
6369 static const KEYVAL *prm_keyword (int val, const char *name, const KEYVAL * tbl, int dim);
6370 static void prm_tune_parameters (void);
6371 static int prm_compound_has_changed (SYSPRM_PARAM * prm, bool set_flag);
6372 static void prm_set_compound (SYSPRM_PARAM * param, const char **compound_param_values[], const int values_count,
6373  bool set_flag);
6374 static int prm_get_next_param_value (char **data, char **prm, char **value);
6375 static PARAM_ID sysprm_get_id (const SYSPRM_PARAM * prm);
6376 static int sysprm_compare_values (void *first_value, void *second_value, unsigned int val_type);
6377 static void sysprm_set_sysprm_value_from_parameter (SYSPRM_VALUE * prm_value, SYSPRM_PARAM * prm);
6379 static SYSPRM_ERR sysprm_generate_new_value (SYSPRM_PARAM * prm, const char *value, bool check,
6380  SYSPRM_VALUE * new_value);
6381 static int sysprm_set_value (SYSPRM_PARAM * prm, SYSPRM_VALUE value, bool set_flag, bool duplicate);
6383 static int sysprm_print_sysprm_value (PARAM_ID prm_id, SYSPRM_VALUE value, char *buf, size_t len,
6384  PRM_PRINT_MODE print_mode);
6385 
6386 static void sysprm_update_flag_different (SYSPRM_PARAM * prm);
6387 static void sysprm_update_flag_allocated (SYSPRM_PARAM * prm);
6389 
6394 
6395 #if defined (SERVER_MODE)
6396 static SYSPRM_ERR sysprm_set_session_parameter_value (SESSION_PARAM * session_parameter, int id, SYSPRM_VALUE value);
6397 static SYSPRM_ERR sysprm_set_session_parameter_default (SESSION_PARAM * session_parameter, PARAM_ID prm_id);
6398 #endif /* SERVER_MODE */
6399 
6400 #if defined (CS_MODE)
6401 static void sysprm_update_cached_session_param_val (const PARAM_ID prm_id);
6402 #endif
6403 
6404 #if defined (SA_MODE) || defined (SERVER_MODE)
6405 static void init_server_timezone_parameter (void);
6406 #endif
6407 
6408 /* conf files that have been loaded */
6409 #define MAX_NUM_OF_PRM_FILES_LOADED 10
6410 static struct
6411 {
6412  char *conf_path;
6413  char *db_name;
6415 
6416 /*
6417  * prm_file_has_been_loaded - Record the file path that has been loaded
6418  * return: none
6419  * conf_path(in): path of the conf file to be recorded
6420  * db_name(in): db name to be recorded
6421  */
6422 static void
6423 prm_file_has_been_loaded (const char *conf_path, const char *db_name)
6424 {
6425  int i;
6426  assert (conf_path != NULL);
6427 
6428  for (i = 0; i < MAX_NUM_OF_PRM_FILES_LOADED; i++)
6429  {
6430  if (prm_Files_loaded[i].conf_path == NULL)
6431  {
6432  prm_Files_loaded[i].conf_path = strdup (conf_path);
6433  prm_Files_loaded[i].db_name = db_name ? strdup (db_name) : NULL;
6434  return;
6435  }
6436  }
6437 }
6438 
6439 
6440 /*
6441  * sysprm_dump_parameters - Print out current system parameters
6442  * return: none
6443  * fp(in):
6444  */
6445 void
6447 {
6448  char buf[LINE_MAX];
6449  int i;
6450  const SYSPRM_PARAM *prm;
6451 
6452  fprintf (fp, "#\n# cubrid.conf\n#\n\n");
6453  fprintf (fp, "# system parameters were loaded from the files ([@section])\n");
6454  for (i = 0; i < MAX_NUM_OF_PRM_FILES_LOADED; i++)
6455  {
6456  if (prm_Files_loaded[i].conf_path != NULL)
6457  {
6458  fprintf (fp, "# %s", prm_Files_loaded[i].conf_path);
6459  if (prm_Files_loaded[i].db_name)
6460  {
6461  fprintf (fp, " [@%s]\n", prm_Files_loaded[i].db_name);
6462  }
6463  else
6464  {
6465  fprintf (fp, "\n");
6466  }
6467  }
6468  }
6469 
6470  fprintf (fp, "\n# system parameters\n");
6471  for (i = 0; i < NUM_PRM; i++)
6472  {
6473  prm = &prm_Def[i];
6475  {
6476  continue;
6477  }
6478  prm_print (prm, buf, LINE_MAX, PRM_PRINT_NAME, PRM_PRINT_CURR_VAL);
6479  fprintf (fp, "%s\n", buf);
6480  }
6481 
6482  return;
6483 }
6484 
6485 /*
6486  * sysprm_set_er_log_file -
6487  * return: void
6488  * base_db_name(in): database name
6489  *
6490  */
6491 void
6493 {
6494  char *s, *base_db_name;
6495  char local_db_name[DB_MAX_IDENTIFIER_LENGTH];
6496  time_t log_time;
6497  struct tm log_tm, *log_tm_p = &log_tm;
6498  char error_log_name[PATH_MAX];
6499  SYSPRM_PARAM *er_log_file;
6500 
6501  if (db_name == NULL)
6502  {
6503  return;
6504  }
6505 
6506  er_log_file = prm_find (PRM_NAME_ER_LOG_FILE, NULL);
6507  if (er_log_file == NULL || PRM_IS_SET (*er_log_file->dynamic_flag))
6508  {
6509  return;
6510  }
6511 
6512  strncpy_bufsize (local_db_name, db_name);
6513  s = strchr (local_db_name, '@');
6514  if (s)
6515  {
6516  *s = '\0';
6517  }
6518  base_db_name = basename ((char *) local_db_name);
6519  if (base_db_name == NULL)
6520  {
6521  return;
6522  }
6523 
6524  log_time = time (NULL);
6525  log_tm_p = localtime_r (&log_time, &log_tm);
6526  if (log_tm_p != NULL)
6527  {
6528  snprintf (error_log_name, PATH_MAX - 1, "%s%c%s_%04d%02d%02d_%02d%02d.err", ER_LOG_FILE_DIR, PATH_SEPARATOR,
6529  base_db_name, log_tm_p->tm_year + 1900, log_tm_p->tm_mon + 1, log_tm_p->tm_mday, log_tm_p->tm_hour,
6530  log_tm_p->tm_min);
6531  prm_set (er_log_file, error_log_name, true);
6532  }
6533 }
6534 
6535 /*
6536  * sysprm_load_and_init_internal - Read system parameters from the init files
6537  * return: NO_ERROR or ER_FAILED
6538  * db_name(in): database name
6539  * conf_file(in): config file
6540  * reload(in):
6541  * load_flags(in):
6542  *
6543  * Note: Parameters would be tuned and forced according to the internal rules.
6544  */
6545 static int
6546 sysprm_load_and_init_internal (const char *db_name, const char *conf_file, bool reload, const int load_flags)
6547 {
6548  char *base_db_name = NULL;
6549  char file_being_dealt_with[PATH_MAX];
6550  char local_db_name[DB_MAX_IDENTIFIER_LENGTH];
6551  unsigned int i;
6552  struct stat stat_buf;
6553  int r = NO_ERROR;
6554  char *s;
6555 #if defined (CS_MODE)
6556  SESSION_PARAM *sprm = NULL;
6557  int num_session_prms;
6558 #endif
6559 
6560  if (reload)
6561  {
6562  for (i = 0; i < NUM_PRM; i++)
6563  {
6564  if (PRM_IS_RELOADABLE (prm_Def[i].static_flag))
6565  {
6566  if (prm_set_default (&prm_Def[i]) != PRM_ERR_NO_ERROR)
6567  {
6568  prm_Def[i].value = (void *) NULL;
6569  }
6570  }
6571  }
6572  }
6573 
6574  if (db_name == NULL)
6575  {
6576  /* initialize message catalog at here because there could be a code path that did not call msgcat_init() before */
6577  if (msgcat_init () != NO_ERROR)
6578  {
6579  return ER_FAILED;
6580  }
6581  base_db_name = NULL;
6582  }
6583  else
6584  {
6585  strncpy_bufsize (local_db_name, db_name);
6586  s = strchr (local_db_name, '@');
6587  if (s)
6588  {
6589  *s = '\0';
6590  }
6591  base_db_name = basename ((char *) local_db_name);
6592  }
6593 
6594 #if !defined (CS_MODE)
6595  if (base_db_name != NULL && reload == false)
6596  {
6597  sysprm_set_er_log_file (base_db_name);
6598  }
6599 #endif /* !CS_MODE */
6600 
6601  /*
6602  * Read installation configuration file - $CUBRID/conf/cubrid.conf
6603  * or use conf_file if exist
6604  */
6605 
6606  if (conf_file == NULL)
6607  {
6608  /* use environment variable's value if exist */
6609  conf_file = envvar_get ("CONF_FILE");
6610  if (conf_file != NULL && *conf_file == '\0')
6611  {
6612  conf_file = NULL;
6613  }
6614  }
6615 
6616  if (conf_file != NULL)
6617  {
6618  /* use user specified config path and file */
6619  strncpy (file_being_dealt_with, conf_file, sizeof (file_being_dealt_with) - 1);
6620  }
6621  else
6622  {
6623  envvar_confdir_file (file_being_dealt_with, PATH_MAX, sysprm_conf_file_name);
6624  }
6625 
6626  if (stat (file_being_dealt_with, &stat_buf) != 0)
6627  {
6629  file_being_dealt_with, strerror (errno));
6630  }
6631  else
6632  {
6633  r = prm_read_and_parse_ini_file (file_being_dealt_with, base_db_name, reload, load_flags | SYSPRM_IGNORE_HA);
6634  }
6635 
6636  if (r != NO_ERROR)
6637  {
6638  return r;
6639  }
6640 
6641  if (PRM_HA_MODE != HA_MODE_OFF)
6642  {
6643  /* use environment variable's value if exist */
6644  conf_file = envvar_get ("HA_CONF_FILE");
6645  if (conf_file != NULL && conf_file[0] != '\0')
6646  {
6647  strncpy_bufsize (file_being_dealt_with, conf_file);
6648  }
6649  else
6650  {
6651  envvar_confdir_file (file_being_dealt_with, PATH_MAX, sysprm_ha_conf_file_name);
6652  }
6653  if (stat (file_being_dealt_with, &stat_buf) == 0)
6654  {
6655  r = prm_read_and_parse_ini_file (file_being_dealt_with, NULL, reload, load_flags);
6656  }
6657  }
6658 
6659  if (r != NO_ERROR)
6660  {
6661  return r;
6662  }
6663 
6664  /*
6665  * If a parameter is not given, set it by default
6666  */
6667  for (i = 0; i < NUM_PRM; i++)
6668  {
6669  if (!PRM_IS_SET (*prm_Def[i].dynamic_flag) && !PRM_IS_OBSOLETED (prm_Def[i].static_flag))
6670  {
6671  if (prm_set_default (&prm_Def[i]) != PRM_ERR_NO_ERROR)
6672  {
6674  prm_Def[i].name);
6675  assert (0);
6676  return ER_FAILED;
6677  }
6678  }
6679  }
6680 
6681 #if defined (SA_MODE) || defined (SERVER_MODE)
6682  init_server_timezone_parameter ();
6683 #endif
6684 
6685  /*
6686  * Perform system parameter check and tuning.
6687  */
6690 #if 0
6691  if (prm_check_parameters () != NO_ERROR)
6692  {
6693  return ER_FAILED;
6694  }
6695 #endif
6696 
6697  /*
6698  * Perform forced system parameter setting.
6699  */
6700  for (i = 0; i < DIM (prm_Def); i++)
6701  {
6702  if (prm_Def[i].force_value)
6703  {
6704  prm_set (&prm_Def[i], prm_Def[i].force_value, false);
6705  }
6706  }
6707 
6708 #if 0
6709  if (envvar_get ("PARAM_DUMP"))
6710  {
6711  sysprm_dump_parameters (stdout);
6712  }
6713 #endif
6714 
6717 
6718  /* count the number of session parameters */
6720  for (i = 0; i < NUM_PRM; i++)
6721  {
6722  if (PRM_IS_FOR_SESSION (prm_Def[i].static_flag))
6723  {
6725  }
6726  }
6727 #if defined (CS_MODE)
6728  /* cache session parameters */
6729  if (cached_session_parameters != NULL)
6730  {
6731  /* free previous cache */
6732  sysprm_free_session_parameters (&cached_session_parameters);
6733  }
6734  cached_session_parameters = sysprm_alloc_session_parameters ();
6735  num_session_prms = 0;
6736  for (i = 0; i < NUM_PRM; i++)
6737  {
6738  if (PRM_IS_FOR_SESSION (prm_Def[i].static_flag))
6739  {
6740  sprm = &cached_session_parameters[num_session_prms++];
6741  sprm->prm_id = (PARAM_ID) i;
6742  sprm->flag = *prm_Def[i].dynamic_flag;
6743  sprm->datatype = prm_Def[i].datatype;
6746  }
6747  }
6748 #endif /* CS_MODE */
6749 
6750 #if !defined(NDEBUG)
6751  /* verify flags are not incorrect or confusing */
6752  for (i = 0; i < NUM_PRM; i++)
6753  {
6754  int flag = prm_Def[i].static_flag;
6755  if (PRM_IS_FOR_SESSION (flag) && (!PRM_IS_FOR_CLIENT (flag) || !PRM_USER_CAN_CHANGE (flag)))
6756  {
6757  /* session parameters can only be parameters for client that are changeable on-line */
6758  assert (0);
6759  }
6760  if (PRM_IS_FOR_SESSION (flag) && PRM_IS_HIDDEN (flag))
6761  {
6762  /* hidden parameters are not allowed to use PRM_FOR_SESSION flag */
6763  assert (0);
6764  }
6765  if (PRM_CLIENT_SESSION_ONLY (flag) && (!PRM_IS_FOR_SERVER (flag) || !PRM_IS_FOR_SESSION (flag)))
6766  {
6767  /* client session only makes sense if the parameter is for session and for server */
6768  assert (0);
6769  }
6770  if (PRM_USER_CAN_CHANGE (flag) && PRM_TEST_CHANGE_ONLY (flag))
6771  {
6772  /* do not set both parameters: USER_CHANGE: the user can change parameter value on-line TEST_CHANGE: for QA
6773  * only */
6774  assert (0);
6775  }
6776  if (PRM_IS_GET_SERVER (flag) && (PRM_IS_FOR_SESSION (flag) || PRM_IS_HIDDEN (flag)))
6777  {
6778  /* session and hidden parameters are not allowed to use PRM_GET_SERVER flag */
6779  assert (0);
6780  }
6781  if (PRM_IS_GET_SERVER (flag)
6782  && (!PRM_IS_FOR_CLIENT (flag) || !PRM_IS_FOR_SERVER (flag) || !PRM_USER_CAN_CHANGE (flag)))
6783  {
6784  /* Note that PRM_GET_SERVER flag only can be set if the parameter has PRM_FOR_CLIENT, PRM_FOR_SERVER, and
6785  * PRM_USER_CHANGE flags. */
6786  assert (0);
6787  }
6788  }
6789 #endif
6790 
6791  return NO_ERROR;
6792 }
6793 
6794 /*
6795  * sysprm_load_and_init - Read system parameters from the init files
6796  * return: NO_ERROR or ER_FAILED
6797  * db_name(in): database name
6798  * conf_file(in): config file
6799  *
6800  */
6801 int
6802 sysprm_load_and_init (const char *db_name, const char *conf_file, const int load_flags)
6803 {
6804  return sysprm_load_and_init_internal (db_name, conf_file, false, load_flags);
6805 }
6806 
6807 /*
6808  * sysprm_load_and_init_client - Read system parameters from the init files
6809  * (client version)
6810  * return: NO_ERROR or ER_FAILED
6811  * db_name(in): database name
6812  * conf_file(in): config file
6813  *
6814  */
6815 int
6816 sysprm_load_and_init_client (const char *db_name, const char *conf_file)
6817 {
6818  return sysprm_load_and_init_internal (db_name, conf_file, false, SYSPRM_LOAD_ALL);
6819 }
6820 
6821 /*
6822  * sysprm_reload_and_init - Read system parameters from the init files
6823  * return: NO_ERROR or ER_FAILED
6824  * db_name(in): database name
6825  * conf_file(in): config file
6826  *
6827  */
6828 int
6829 sysprm_reload_and_init (const char *db_name, const char *conf_file)
6830 {
6831  return sysprm_load_and_init_internal (db_name, conf_file, true, SYSPRM_LOAD_ALL);
6832 }
6833 
6834 /*
6835  * prm_load_by_section - Set system parameters from a file
6836  * return: void
6837  * ini(in):
6838  * section(in):
6839  * ignore_section(in):
6840  * reload(in):
6841  * file(in):
6842  * load_flags(in):
6843  */
6844 static int
6845 prm_load_by_section (INI_TABLE * ini, const char *section, bool ignore_section, bool reload, const char *file,
6846  const int load_flags)
6847 {
6848  int i, error;
6849  int sec_len;
6850  const char *sec_p;
6851  const char *key, *value;
6852  SYSPRM_PARAM *prm;
6853  bool on_server = false;
6854  bool on_client = false;
6855 
6856 #if defined(SERVER_MODE)
6857  on_server = true;
6858 #endif
6859 
6860 #if defined(CS_MODE)
6861  on_client = true;
6862 #endif
6863 
6864  sec_p = (ignore_section) ? NULL : section;
6865 
6866  for (i = 0; i < ini->size; i++)
6867  {
6868  if (ini->key[i] == NULL || ini->val[i] == NULL)
6869  {
6870  continue;
6871  }
6872 
6873  key = ini->key[i];
6874  value = ini->val[i];
6875 
6876  if (ini_hassec (key))
6877  {
6878  sec_len = ini_seccmp (key, section);
6879  if (!sec_len)
6880  {
6881  continue;
6882  }
6883  sec_len++;
6884  }
6885  else
6886  {
6887  if (ignore_section)
6888  {
6889  sec_len = 1;
6890  }
6891  else
6892  {
6893  continue;
6894  }
6895  }
6896 
6897  prm = prm_find (key + sec_len, sec_p);
6898  if (prm == NULL)
6899  {
6900  error = PRM_ERR_UNKNOWN_PARAM;
6901  prm_report_bad_entry (key + sec_len, ini->lineno[i], error, file);
6902  return error;
6903  }
6904 
6905 #if defined (CS_MODE)
6907  {
6908  /* prm for only server */
6909  continue;
6910  }
6911 #endif /* CS_MODE */
6912 
6913 #if defined (SERVER_MODE)
6915  {
6916  /* prm for only client */
6917  continue;
6918  }
6919 #endif /* SERVER_MODE */
6920 
6921  if (reload && !PRM_IS_RELOADABLE (prm->static_flag))
6922  {
6923  continue;
6924  }
6925  if (!SYSPRM_LOAD_IS_IGNORE_HA (load_flags) && !PRM_IS_FOR_HA (prm->static_flag))
6926  {
6927  continue;
6928  }
6929 
6930  if (PRM_IS_OBSOLETED (prm->static_flag))
6931  {
6932  continue;
6933  }
6934 
6935  if (PRM_IS_DEPRECATED (prm->static_flag))
6936  {
6937  prm_report_bad_entry (key + sec_len, ini->lineno[i], PRM_ERR_DEPRICATED, file);
6938  }
6939 
6940  if (on_server && strcmp (prm->name, PRM_NAME_TIMEZONE) == 0)
6941  {
6942  continue;
6943  }
6944 
6945  if (SYSPRM_LOAD_IS_IGNORE_INTL (load_flags)
6946  && (strcmp (prm->name, PRM_NAME_INTL_DATE_LANG) == 0
6947  || strcmp (prm->name, PRM_NAME_INTL_NUMBER_LANG) == 0
6948  || strcmp (prm->name, PRM_NAME_INTL_CHECK_INPUT_STRING) == 0
6949  || strcmp (prm->name, PRM_NAME_INTL_COLLATION) == 0
6950  || strcmp (prm->name, PRM_NAME_INTL_MBS_SUPPORT) == 0
6951  || strcmp (prm->name, PRM_NAME_SERVER_TIMEZONE) == 0 || strcmp (prm->name, PRM_NAME_TIMEZONE) == 0))
6952  {
6953  continue;
6954  }
6955 
6956  if (strcmp (prm->name, PRM_NAME_SERVER_TIMEZONE) == 0)
6957  {
6958  TZ_REGION tz_region_system;
6959  int er_status = NO_ERROR;
6960 
6961  if (value != NULL)
6962  {
6963  /* offset timezone can work without timezone lib */
6964  er_status = tz_str_to_region (value, strlen (value), &tz_region_system);
6965  if (er_status != NO_ERROR)
6966  {
6967  /* we may have geographic region name, make sure timezone lib is loaded */
6968  if (tz_load () != NO_ERROR)
6969  {
6970  return PRM_ERR_BAD_VALUE;
6971  }
6972  er_status = tz_str_to_region (value, strlen (value), &tz_region_system);
6973  }
6974  if (er_status != NO_ERROR)
6975  {
6976  error = PRM_ERR_BAD_VALUE;
6977  prm_report_bad_entry (key + sec_len, ini->lineno[i], error, file);
6978  return error;
6979  }
6980  tz_set_tz_region_system (&tz_region_system);
6981  }
6982  }
6983 
6984  if ((on_server || on_client)
6985  && (strcmp (prm->name, PRM_NAME_SERVER_TIMEZONE) == 0 || strcmp (prm->name, PRM_NAME_TIMEZONE) == 0))
6986  {
6987  int er_status = NO_ERROR;
6988 
6989  if (value != NULL)
6990  {
6991  /* offset timezone can work without timezone lib */
6992 #if !defined(SERVER_MODE)
6993  er_status = tz_str_to_region (value, strlen (value), tz_get_client_tz_region_session ());
6994 #else
6995  er_status = tz_str_to_region (value, strlen (value), NULL);
6996 #endif
6997  if (er_status != NO_ERROR)
6998  {
6999  /* we may have geographic region name, make sure timezone lib is loaded */
7000  if (tz_load () != NO_ERROR)
7001  {
7002  return PRM_ERR_BAD_VALUE;
7003  }
7004 #if !defined(SERVER_MODE)
7005  er_status = tz_str_to_region (value, strlen (value), tz_get_client_tz_region_session ());
7006 #else
7007  er_status = tz_str_to_region (value, strlen (value), NULL);
7008 #endif
7009  }
7010  if (er_status != NO_ERROR)
7011  {
7012  error = PRM_ERR_BAD_VALUE;
7013  prm_report_bad_entry (key + sec_len, ini->lineno[i], error, file);
7014  return error;
7015  }
7016  }
7017  }
7018 
7019  if (strcmp (section, "common") == 0 && strcmp (prm->name, PRM_NAME_JAVA_STORED_PROCEDURE_PORT) == 0)
7020  {
7021  error = PRM_ERR_CANNOT_CHANGE;
7022  prm_report_bad_entry (key + sec_len, ini->lineno[i], error, file);
7023  return error;
7024  }
7025 
7026  error = prm_set (prm, value, true);
7027  if (error != NO_ERROR)
7028  {
7029  prm_report_bad_entry (key + sec_len, ini->lineno[i], error, file);
7030  return error;
7031  }
7032  }
7033 
7034  return NO_ERROR;
7035 }
7036 
7037 /*
7038  * prm_read_and_parse_ini_file - Set system parameters from a file
7039  * return: NO_ERROR or error code defined in enum SYSPRM_ERR
7040  * prm_file_name(in):
7041  * db_name(in):
7042  * reload(in):
7043  * load_flags(in):
7044  */
7045 static int
7046 prm_read_and_parse_ini_file (const char *prm_file_name, const char *db_name, const bool reload, const int load_flags)
7047 {
7048  INI_TABLE *ini;
7049  char sec_name[LINE_MAX];
7050  char host_name[CUB_MAXHOSTNAMELEN];
7051  char user_name[CUB_MAXHOSTNAMELEN];
7052  int error;
7053 
7054  ini = ini_parser_load (prm_file_name);
7055  if (ini == NULL)
7056  {
7058  prm_file_name, strerror (errno));
7059  return PRM_ERR_FILE_ERR;
7060  }
7061 
7062  error = prm_load_by_section (ini, "common", true, reload, prm_file_name, load_flags);
7063  if (error == NO_ERROR && SYSPRM_LOAD_IS_IGNORE_HA (load_flags) && db_name != NULL && *db_name != '\0')
7064  {
7065  snprintf (sec_name, LINE_MAX, "@%s", db_name);
7066  error = prm_load_by_section (ini, sec_name, true, reload, prm_file_name, load_flags);
7067  }
7068 
7069 #if defined (SA_MODE)
7070  if (error == NO_ERROR)
7071  {
7072  error = prm_load_by_section (ini, "standalone", true, reload, prm_file_name, load_flags);
7073  }
7074 #endif /* SA_MODE */
7075 
7076  if (error == NO_ERROR && SYSPRM_LOAD_IS_IGNORE_HA (load_flags))
7077  {
7078  error = prm_load_by_section (ini, "service", false, reload, prm_file_name, load_flags);
7079  }
7080  if (error == NO_ERROR && !SYSPRM_LOAD_IS_IGNORE_HA (load_flags) && PRM_HA_MODE != HA_MODE_OFF
7081  && GETHOSTNAME (host_name, CUB_MAXHOSTNAMELEN) == 0)
7082  {
7083  snprintf (sec_name, LINE_MAX, "%%%s|*", host_name);
7084  error = prm_load_by_section (ini, sec_name, true, reload, prm_file_name, load_flags);
7085  if (error == NO_ERROR && getlogin_r (user_name, CUB_MAXHOSTNAMELEN) == 0)
7086  {
7087  snprintf (sec_name, LINE_MAX, "%%%s|%s", host_name, user_name);
7088  error = prm_load_by_section (ini, sec_name, true, reload, prm_file_name, load_flags);
7089  }
7090  }
7091 
7092  ini_parser_free (ini);
7093 
7094  prm_file_has_been_loaded (prm_file_name, db_name);
7095 
7096  return error;
7097 }
7098 
7099 /*
7100  * prm_size_to_io_pages -
7101  * return: value
7102  */
7103 static int
7104 prm_size_to_io_pages (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7105 {
7106  if (out_val == NULL || in_val == NULL)
7107  {
7108  return PRM_ERR_BAD_VALUE;
7109  }
7110 
7111  if (out_type == PRM_INTEGER && in_type == PRM_BIGINT)
7112  {
7113  int *page_value = (int *) out_val;
7114  UINT64 *size_value = (UINT64 *) in_val;
7115  UINT64 tmp_value;
7116 
7117  tmp_value = *size_value / IO_PAGESIZE;
7118  if (*size_value % IO_PAGESIZE > 0)
7119  {
7120  tmp_value++;
7121  }
7122 
7123  if (tmp_value > INT_MAX)
7124  {
7125  return PRM_ERR_BAD_RANGE;
7126  }
7127  else
7128  {
7129  *page_value = (int) tmp_value;
7130  }
7131  }
7132  else if (out_type == PRM_FLOAT && in_type == PRM_BIGINT)
7133  {
7134  float *page_value = (float *) out_val;
7135  UINT64 *size_value = (UINT64 *) in_val;
7136  double tmp_value;
7137 
7138  tmp_value = (double) *size_value / IO_PAGESIZE;
7139 
7140  if (tmp_value > FLT_MAX)
7141  {
7142  return PRM_ERR_BAD_RANGE;
7143  }
7144  else
7145  {
7146  *page_value = ceilf ((float) tmp_value * 100) / 100;
7147  }
7148  }
7149  else
7150  {
7151  assert_release (false);
7152  return PRM_ERR_BAD_VALUE;
7153  }
7154 
7155  return NO_ERROR;
7156 }
7157 
7158 /*
7159  * prm_io_pages_to_size -
7160  * return: value
7161  */
7162 static int
7163 prm_io_pages_to_size (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7164 {
7165  if (out_val == NULL || in_val == NULL)
7166  {
7167  return PRM_ERR_BAD_VALUE;
7168  }
7169 
7170  if (out_type == PRM_BIGINT && in_type == PRM_INTEGER)
7171  {
7172  UINT64 *size_value = (UINT64 *) out_val;
7173  UINT64 page_value = *(int *) in_val;
7174 
7175  *size_value = (UINT64) (page_value * IO_PAGESIZE);
7176  }
7177  else if (out_type == PRM_BIGINT && in_type == PRM_FLOAT)
7178  {
7179  UINT64 *size_value = (UINT64 *) out_val;
7180  float page_value = *(float *) in_val;
7181 
7182  *size_value = (UINT64) (page_value * IO_PAGESIZE);
7183  }
7184  else
7185  {
7186  assert_release (false);
7187  return PRM_ERR_BAD_VALUE;
7188  }
7189 
7190  return NO_ERROR;
7191 }
7192 
7193 /*
7194  * prm_size_to_log_pages -
7195  * return: value
7196  */
7197 static int
7198 prm_size_to_log_pages (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7199 {
7200  if (out_val == NULL || in_val == NULL)
7201  {
7202  return PRM_ERR_BAD_VALUE;
7203  }
7204 
7205  if (out_type == PRM_INTEGER && in_type == PRM_BIGINT)
7206  {
7207  int *page_value = (int *) out_val;
7208  UINT64 *size_value = (UINT64 *) in_val;
7209  UINT64 tmp_value;
7210 
7211  tmp_value = *size_value / LOG_PAGESIZE;
7212  if (*size_value % LOG_PAGESIZE)
7213  {
7214  tmp_value++;
7215  }
7216 
7217  if (tmp_value > INT_MAX)
7218  {
7219  return PRM_ERR_BAD_RANGE;
7220  }
7221  else
7222  {
7223  *page_value = (int) tmp_value;
7224  }
7225  }
7226  else if (out_type == PRM_FLOAT && in_type == PRM_BIGINT)
7227  {
7228  float *page_value = (float *) out_val;
7229  UINT64 *size_value = (UINT64 *) in_val;
7230  double tmp_value;
7231 
7232  tmp_value = (double) *size_value / LOG_PAGESIZE;
7233 
7234  if (tmp_value > FLT_MAX)
7235  {
7236  return PRM_ERR_BAD_RANGE;
7237  }
7238  else
7239  {
7240  *page_value = ceilf ((float) tmp_value * 100) / 100;
7241  }
7242  }
7243  else
7244  {
7245  assert_release (false);
7246  return PRM_ERR_BAD_VALUE;
7247  }
7248 
7249  return NO_ERROR;
7250 }
7251 
7252 /*
7253  * prm_log_pages_to_size -
7254  * return: value
7255  */
7256 static int
7257 prm_log_pages_to_size (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7258 {
7259  if (out_val == NULL || in_val == NULL)
7260  {
7261  return PRM_ERR_BAD_VALUE;
7262  }
7263 
7264  if (out_type == PRM_BIGINT && in_type == PRM_INTEGER)
7265  {
7266  UINT64 *size_value = (UINT64 *) out_val;
7267  UINT64 page_value = *(int *) in_val;
7268 
7269  *size_value = (UINT64) (page_value * LOG_PAGESIZE);
7270  }
7271  else if (out_type == PRM_BIGINT && in_type == PRM_FLOAT)
7272  {
7273  UINT64 *size_value = (UINT64 *) out_val;
7274  float page_value = *(float *) in_val;
7275 
7276  *size_value = (UINT64) (page_value * LOG_PAGESIZE);
7277  }
7278  else if (out_type == PRM_INTEGER && in_type == PRM_INTEGER)
7279  {
7280  int *size_value = (int *) out_val;
7281  int page_value = *(int *) in_val;
7282  UINT64 t;
7283 
7284  t = ((UINT64) page_value) * LOG_PAGESIZE;
7285  if (t > INT_MAX)
7286  {
7287  return PRM_ERR_BAD_VALUE;
7288  }
7289 
7290  *size_value = (int) t;
7291  }
7292  else
7293  {
7294  assert_release (false);
7295  return PRM_ERR_BAD_VALUE;
7296  }
7297 
7298  return NO_ERROR;
7299 }
7300 
7301 /*
7302  * prm_msec_to_sec -
7303  * return: value
7304  */
7305 static int
7306 prm_msec_to_sec (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7307 {
7308  if (out_val == NULL || in_val == NULL)
7309  {
7310  return PRM_ERR_BAD_VALUE;
7311  }
7312 
7313  if (out_type == PRM_INTEGER && in_type == PRM_BIGINT)
7314  {
7315  int *sec_value = (int *) out_val;
7316  UINT64 *msec_value = (UINT64 *) in_val;
7317  UINT64 tmp_value;
7318 
7319  tmp_value = *msec_value / ONE_SEC;
7320 
7321  if (tmp_value > INT_MAX)
7322  {
7323  return PRM_ERR_BAD_RANGE;
7324  }
7325  else
7326  {
7327  *sec_value = (int) tmp_value;
7328  if (*msec_value % ONE_SEC > 0)
7329  {
7330  *sec_value = *sec_value + 1;
7331  }
7332  }
7333  }
7334  else
7335  {
7336  assert_release (false);
7337  return PRM_ERR_BAD_VALUE;
7338  }
7339 
7340  return NO_ERROR;
7341 }
7342 
7343 /*
7344  * prm_sec_to_msec -
7345  * return: value
7346  */
7347 static int
7348 prm_sec_to_msec (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7349 {
7350  if (out_val == NULL || in_val == NULL)
7351  {
7352  return PRM_ERR_BAD_VALUE;
7353  }
7354 
7355  if (out_type == PRM_BIGINT && in_type == PRM_INTEGER)
7356  {
7357  UINT64 *msec_value = (UINT64 *) out_val;
7358  int sec_value = *(int *) in_val;
7359 
7360  *msec_value = ((UINT64) sec_value) * ONE_SEC;
7361  }
7362  else if (out_type == PRM_INTEGER && in_type == PRM_INTEGER)
7363  {
7364  int *msec_value = (int *) out_val;
7365  int sec_value = *(int *) in_val;
7366  UINT64 t;
7367 
7368  t = ((UINT64) sec_value) * ONE_SEC;
7369  if (t > INT_MAX)
7370  {
7371  return PRM_ERR_BAD_VALUE;
7372  }
7373 
7374  *msec_value = (int) t;
7375  }
7376  else
7377  {
7378  assert_release (false);
7379  return PRM_ERR_BAD_VALUE;
7380  }
7381 
7382  return NO_ERROR;
7383 }
7384 
7385 /*
7386  * prm_sec_to_min -
7387  * return: value
7388  */
7389 static int
7390 prm_sec_to_min (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7391 {
7392  if (out_val == NULL || in_val == NULL)
7393  {
7394  return PRM_ERR_BAD_VALUE;
7395  }
7396 
7397  if (out_type == PRM_INTEGER && in_type == PRM_INTEGER)
7398  {
7399  int *min_value = (int *) out_val;
7400  int sec_value = *((int *) in_val);
7401 
7402  if (sec_value < 0)
7403  {
7404  *min_value = sec_value;
7405  }
7406  else
7407  {
7408  *min_value = sec_value / 60;
7409  if (sec_value % 60 > 0)
7410  {
7411  *min_value = *min_value + 1;
7412  }
7413  }
7414  }
7415  else
7416  {
7417  assert_release (false);
7418  return PRM_ERR_BAD_VALUE;
7419  }
7420 
7421  return NO_ERROR;
7422 }
7423 
7424 /*
7425  * prm_min_to_sec -
7426  * return: value
7427  */
7428 static int
7429 prm_min_to_sec (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7430 {
7431  if (out_val == NULL || in_val == NULL)
7432  {
7433  return PRM_ERR_BAD_VALUE;
7434  }
7435 
7436  if (out_type == PRM_INTEGER && in_type == PRM_INTEGER)
7437  {
7438  int *sec_value = (int *) out_val;
7439  int *min_value = (int *) in_val;
7440  UINT64 tmp_value;
7441 
7442  if (*min_value < 0)
7443  {
7444  *sec_value = *min_value;
7445  }
7446  else
7447  {
7448  tmp_value = *min_value * 60;
7449 
7450  if (tmp_value > INT_MAX)
7451  {
7452  return PRM_ERR_BAD_RANGE;
7453  }
7454  else
7455  {
7456  *sec_value = (int) tmp_value;
7457  }
7458  }
7459  }
7460  else
7461  {
7462  assert_release (false);
7463  return PRM_ERR_BAD_VALUE;
7464  }
7465 
7466  return NO_ERROR;
7467 }
7468 
7469 /*
7470  * prm_equal_to_ori -
7471  * return: value
7472  */
7473 static int
7474 prm_equal_to_ori (void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
7475 {
7476  if (out_val == NULL || in_val == NULL)
7477  {
7478  return PRM_ERR_BAD_VALUE;
7479  }
7480 
7481  if (out_type == PRM_INTEGER && in_type == PRM_INTEGER)
7482  {
7483  int *in_value = (int *) in_val;
7484  int *out_value = (int *) out_val;
7485 
7486  *out_value = *in_value;
7487  }
7488  else if (out_type == PRM_FLOAT && in_type == PRM_FLOAT)
7489  {
7490  float *in_value = (float *) in_val;
7491  float *out_value = (float *) out_val;
7492 
7493  *out_value = *in_value;
7494  }
7495  else if (out_type == PRM_BIGINT && in_type == PRM_BIGINT)
7496  {
7497  UINT64 *in_value = (UINT64 *) in_val;
7498  UINT64 *out_value = (UINT64 *) out_val;
7499 
7500  *out_value = *in_value;
7501  }
7502  else if (out_type == PRM_INTEGER && in_type == PRM_BIGINT)
7503  {
7504  UINT64 *in_value = (UINT64 *) in_val;
7505  int *out_value = (int *) out_val;
7506 
7507  if (*in_value > INT_MAX)
7508  {
7509  return PRM_ERR_BAD_RANGE;
7510  }
7511 
7512  *out_value = (int) *in_value;
7513  }
7514  else if (out_type == PRM_BIGINT && in_type == PRM_INTEGER)
7515  {
7516  int *in_value = (int *) in_val;
7517  UINT64 *out_value = (UINT64 *) out_val;
7518 
7519  *out_value = (UINT64) (*in_value);
7520  }
7521  else
7522  {
7523  assert_release (false);
7524  return PRM_ERR_BAD_VALUE;
7525  }
7526 
7527  return NO_ERROR;
7528 }
7529 
7530 /*
7531  * prm_check_parameters -
7532  * return: int
7533  */
7534 static int
7536 {
7537  /*
7538  * ha_node_list and ha_db_list should be not null for ha_mode=yes|replica
7539  */
7540  if (PRM_HA_MODE != HA_MODE_OFF)
7541  {
7542  if (PRM_HA_NODE_LIST == NULL || PRM_HA_NODE_LIST[0] == 0 || PRM_HA_DB_LIST == NULL || PRM_HA_DB_LIST[0] == 0)
7543  {
7546  return ER_FAILED;
7547  }
7548  }
7549 
7550  return NO_ERROR;
7551 }
7552 
7553 /*
7554  * prm_check_environment -
7555  * return: none
7556  */
7557 static void
7559 {
7560  int i;
7561  char buf[PRM_DEFAULT_BUFFER_SIZE];
7562 
7563  for (i = 0; i < NUM_PRM; i++)
7564  {
7565  SYSPRM_PARAM *prm;
7566  const char *str;
7567 
7568  prm = &prm_Def[i];
7569  strncpy (buf, prm->name, sizeof (buf) - 1);
7570  buf[sizeof (buf) - 1] = '\0';
7571  ustr_upper (buf);
7572 
7573  str = envvar_get (buf);
7574  if (str && str[0])
7575  {
7576  int error;
7577  error = prm_set (prm, str, true);
7578  if (error != 0)
7579  {
7580  prm_report_bad_entry (prm->name, -1, error, buf);
7581  }
7582  }
7583  }
7584 }
7585 
7586 /*
7587  * sysprm_validate_escape_char_parameters () - validate escape char setting
7588  *
7589  * return : SYSPRM_ERR
7590  * assignments_list (in) : list of assignments to validate.
7591  *
7592  * NOTE: To validate whether there will be conflictive settings between
7593  * PRM_ID_REQUIRE_LIKE_ESCAPE_CHARACTER and PRM_ID_NO_BACKSLASH_ESCAPES.
7594  * Since both must not simultaneously be true.
7595  */
7596 static SYSPRM_ERR
7598 {
7599  SYSPRM_PARAM *prm = NULL;
7600  const SYSPRM_ASSIGN_VALUE *assignment = NULL;
7601  bool set_require_like_escape, set_no_backslash_escape;
7602  bool is_require_like_escape = false, is_no_backslash_escape = false;
7603 
7604  set_require_like_escape = set_no_backslash_escape = false;
7605  for (assignment = assignment_list; assignment != NULL; assignment = assignment->next)
7606  {
7607  if (assignment->prm_id == PRM_ID_REQUIRE_LIKE_ESCAPE_CHARACTER)
7608  {
7609  set_require_like_escape = true;
7610  is_require_like_escape = assignment->value.b;
7611  }
7612  else if (assignment->prm_id == PRM_ID_NO_BACKSLASH_ESCAPES)
7613  {
7614  set_no_backslash_escape = true;
7615  is_no_backslash_escape = assignment->value.b;
7616  }
7617  }
7618 
7619  if (!set_require_like_escape && !set_no_backslash_escape)
7620  {
7621  return PRM_ERR_NO_ERROR;
7622  }
7623 
7624  if (!set_no_backslash_escape)
7625  {
7627  is_no_backslash_escape = PRM_GET_BOOL (prm->value);
7628  }
7629 
7630  if (!set_require_like_escape)
7631  {
7633  is_require_like_escape = PRM_GET_BOOL (prm->value);
7634  }
7635 
7636  if (is_require_like_escape == true && is_no_backslash_escape == true)
7637  {
7638  return PRM_ERR_CANNOT_CHANGE;
7639  }
7640 
7641  return PRM_ERR_NO_ERROR;
7642 }
7643 
7644 #if !defined (SERVER_MODE)
7645 /*
7646  * sysprm_validate_change_parameters () - validate the parameter value changes
7647  *
7648  * return : SYSPRM_ERR
7649  * data (in) : string containing "parameter = value" assignments
7650  * check (in) : check if user can change parameter and if
7651  * parameter should also change on server. set to
7652  * false if assignments are supposed to be forced and
7653  * not checked.
7654  * assignments_ptr (out) : list of assignments.
7655  *
7656  * NOTE: Data string is parsed entirely and if all changes are valid a list
7657  * of SYSPRM_ASSIGN_VALUEs is generated. If any change is invalid an
7658  * error is returned and no list is generated.
7659  * If changes need to be done on server too PRM_ERR_NOT_FOR_CLIENT or
7660  * PRM_ERR_NOT_FOR_CLIENT_NO_AUTH is returned.
7661  */
7662 SYSPRM_ERR
7663 sysprm_validate_change_parameters (const char *data, bool check, SYSPRM_ASSIGN_VALUE ** assignments_ptr)
7664 {
7665  char buf[LINE_MAX], *p = NULL, *name = NULL, *value = NULL;
7666  SYSPRM_PARAM *prm = NULL;
7668  SYSPRM_ASSIGN_VALUE *assignments = NULL, *last_assign = NULL;
7669  SYSPRM_ERR change_error = PRM_ERR_NO_ERROR;
7670 
7671  assert (assignments_ptr != NULL);
7672  *assignments_ptr = NULL;
7673 
7674  if (!data || *data == '\0')
7675  {
7676  return PRM_ERR_BAD_VALUE;
7677  }
7678 
7679  if (intl_mbs_ncpy (buf, data, sizeof (buf)) == NULL)
7680  {
7681  return PRM_ERR_BAD_VALUE;
7682  }
7683 
7684  p = buf;
7685  do
7686  {
7687  /* parse data */
7688  SYSPRM_ASSIGN_VALUE *assign = NULL;
7689 
7690  /* get parameter name and value */
7691  err = (SYSPRM_ERR) prm_get_next_param_value (&p, &name, &value);
7692  if (err != PRM_ERR_NO_ERROR || name == NULL || value == NULL)
7693  {
7694  break;
7695  }
7696 
7697  prm = prm_find (name, NULL);
7698  if (prm == NULL)
7699  {
7700  err = PRM_ERR_UNKNOWN_PARAM;
7701  break;
7702  }
7703 
7704  if (!check || PRM_USER_CAN_CHANGE (prm->static_flag)
7706  {
7707  /* We allow changing the parameter value. */
7708  }
7709  else
7710  {
7711  err = PRM_ERR_CANNOT_CHANGE;
7712  break;
7713  }
7714 
7715  /* create a SYSPRM_CHANGE_VAL object */
7716  assign = (SYSPRM_ASSIGN_VALUE *) malloc (sizeof (SYSPRM_ASSIGN_VALUE));
7717  if (assign == NULL)
7718  {
7720  err = PRM_ERR_NO_MEM_FOR_PRM;
7721  break;
7722  }
7723  err = sysprm_generate_new_value (prm, value, check, &assign->value);
7724  if (err != PRM_ERR_NO_ERROR)
7725  {
7727  {
7728  /* update change_error */
7729  if (change_error != PRM_ERR_NOT_FOR_CLIENT || err != PRM_ERR_NOT_FOR_CLIENT_NO_AUTH)
7730  {
7731  /* do not replace change_error PRM_ERR_NOT_FOR_CLIENT with PRM_ERR_NOT_FOR_CLIENT_NO_AUTH */
7732  change_error = err;
7733  }
7734  /* do not invalidate assignments */
7735  err = PRM_ERR_NO_ERROR;
7736  }
7737  else
7738  {
7739  /* bad value */
7740  free_and_init (assign);
7741  break;
7742  }
7743  }
7744  assign->prm_id = sysprm_get_id (prm);
7745  assign->next = NULL;
7746 
7747  /* append to assignments list */
7748  if (assignments != NULL)
7749  {
7750  last_assign->next = assign;
7751  last_assign = assign;
7752  }
7753  else
7754  {
7755  assignments = last_assign = assign;
7756  }
7757  }
7758  while (p);
7759 
7760  if (err == PRM_ERR_NO_ERROR)
7761  {
7762  err = sysprm_validate_escape_char_parameters (assignments);
7763  }
7764 
7765  if (err == PRM_ERR_NO_ERROR)
7766  {
7767  /* changes are valid, save assignments list */
7768  *assignments_ptr = assignments;
7769 
7770  /* return change_error in order to update values on server too */
7771  return change_error;
7772  }
7773 
7774  /* changes are not valid, clean up */
7775  sysprm_free_assign_values (&assignments);
7776  return err;
7777 }
7778 
7779 /*
7780  * sysprm_make_default_values () -
7781  *
7782  * return : SYSPRM_ERR
7783  * data (in) : string containing "parameter = value" assignments
7784  * default_val_buf(out) : string containing "parameter = def_value"
7785  * assignments created from data argument
7786  * buf_size(in) : size available in default_val_buf
7787  *
7788  */
7789 SYSPRM_ERR
7790 sysprm_make_default_values (const char *data, char *default_val_buf, const int buf_size)
7791 {
7792  char buf[LINE_MAX], *p = NULL, *out_p = NULL;
7793  char *name = NULL, *value = NULL;
7794  int remaining_size, n;
7796  SYSPRM_PARAM *prm = NULL;
7797 
7798  if (intl_mbs_ncpy (buf, data, sizeof (buf)) == NULL)
7799  {
7800  return PRM_ERR_BAD_VALUE;
7801  }
7802 
7803  p = buf;
7804  out_p = default_val_buf;
7805  remaining_size = buf_size - 1;
7806  do
7807  {
7808  /* get parameter name and value */
7809  err = (SYSPRM_ERR) prm_get_next_param_value (&p, &name, &value);
7810  if (err != PRM_ERR_NO_ERROR || name == NULL || value == NULL)
7811  {
7812  break;
7813  }
7814 
7815  prm = prm_find (name, NULL);
7816  if (prm == NULL)
7817  {
7818  err = PRM_ERR_UNKNOWN_PARAM;
7819  break;
7820  }
7821 
7822  if (PRM_ID_INTL_COLLATION == sysprm_get_id (prm))
7823  {
7824  n = snprintf (out_p, remaining_size, "%s=%s", PRM_NAME_INTL_COLLATION,
7826  }
7827  else if (PRM_ID_INTL_DATE_LANG == sysprm_get_id (prm))
7828  {
7829  n = snprintf (out_p, remaining_size, "%s=%s", PRM_NAME_INTL_DATE_LANG, lang_get_Lang_name ());
7830  }
7831  else if (PRM_ID_INTL_NUMBER_LANG == sysprm_get_id (prm))
7832  {
7833  n = snprintf (out_p, remaining_size, "%s=%s", PRM_NAME_INTL_NUMBER_LANG, lang_get_Lang_name ());
7834  }
7835  else if (PRM_ID_TIMEZONE == sysprm_get_id (prm))
7836  {
7837  n = snprintf (out_p, remaining_size, "%s=%s", PRM_NAME_TIMEZONE, tz_get_system_timezone ());
7838  }
7839  else
7840  {
7841  n = prm_print (prm, out_p, remaining_size, PRM_PRINT_NAME, PRM_PRINT_DEFAULT_VAL);
7842  }
7843 
7844  out_p += n;
7845  remaining_size -= n;
7846 
7847  n = snprintf (out_p, remaining_size, ";");
7848  out_p += n;
7849  remaining_size -= n;
7850  }
7851  while (p && remaining_size > 0);
7852 
7853  return err;
7854 }
7855 #endif /* !SERVER_MODE */
7856 
7857 /*
7858  * sysprm_change_parameter_values () - update system parameter values
7859  *
7860  * return : void
7861  * assignments (in) : list of assignments
7862  * check (in) : check if the parameter belongs to current scope
7863  * set_flag (in) : update PRM_SET flag if true
7864  *
7865  * NOTE: This function does not check if the new values are valid (e.g. in
7866  * the restricted range). First validate new values before calling this
7867  * function.
7868  */
7869 void
7870 sysprm_change_parameter_values (const SYSPRM_ASSIGN_VALUE * assignments, bool check, bool set_flag)
7871 {
7872  SYSPRM_PARAM *prm = NULL;
7873  for (; assignments != NULL; assignments = assignments->next)
7874  {
7875  prm = GET_PRM (assignments->prm_id);
7876 #if defined (CS_MODE)
7877  if (check)
7878  {
7879  if (!PRM_IS_FOR_CLIENT (prm->static_flag))
7880  {
7881  /* skip this assignment */
7882  continue;
7883  }
7884  }
7885 #endif
7886 #if defined (SERVER_MODE)
7887  if (check)
7888  {
7890  {
7891  /* skip this assignment */
7892  continue;
7893  }
7894  }
7895 #endif
7896  sysprm_set_value (prm, assignments->value, set_flag, true);
7897 #if defined (SERVER_MODE)
7899  {
7901  }
7902 #endif
7903  }
7904 }
7905 
7906 /*
7907  * prm_print - Print a parameter to the buffer
7908  * return: number of chars printed
7909  * prm(in): parameter
7910  * buf(out): print buffer
7911  * len(in): length of the buffer
7912  * print_mode(in): print name/id or just value of the parameter
7913  */
7914 static int
7915 prm_print (const SYSPRM_PARAM * prm, char *buf, size_t len, PRM_PRINT_MODE print_mode,
7916  PRM_PRINT_VALUE_MODE print_value_mode)
7917 {
7918  int n = 0;
7919  PARAM_ID id;
7920  int error = NO_ERROR;
7921  char left_side[PRM_DEFAULT_BUFFER_SIZE];
7922  void *prm_value;
7923 
7924  if (len == 0)
7925  {
7926  /* don't print anything */
7927  return 0;
7928  }
7929 
7930  memset (left_side, 0, PRM_DEFAULT_BUFFER_SIZE);
7931 
7932  assert (prm != NULL && buf != NULL && len > 0);
7933 
7934  if (PRM_DIFFERENT_UNIT (prm->static_flag))
7935  {
7936  assert (prm->get_dup != NULL);
7937  }
7938 
7939  if (print_mode == PRM_PRINT_ID)
7940  {
7941  id = sysprm_get_id (prm);
7942  snprintf (left_side, PRM_DEFAULT_BUFFER_SIZE, "%d=", id);
7943  }
7944  else if (print_mode == PRM_PRINT_NAME)
7945  {
7946  snprintf (left_side, PRM_DEFAULT_BUFFER_SIZE, "%s=", prm->name);
7947  }
7948 
7949  if (print_value_mode == PRM_PRINT_DEFAULT_VAL)
7950  {
7951  prm_value = prm->default_value;
7952  }
7953  else
7954  {
7955  prm_value = prm->value;
7956  }
7957 
7958  if (PRM_IS_INTEGER (prm))
7959  {
7960  int val = PRM_GET_INT (prm_value);
7961  int left_side_len = strlen (left_side);
7962 
7964  && !PRM_HAS_TIME_UNIT (prm->static_flag))
7965  {
7966  PRM_ADJUST_FOR_GET_INTEGER_TO_INTEGER (prm, &val, &val, &error);
7967  if (error != NO_ERROR)
7968  {
7969  assert_release (false);
7970  return n;
7971  }
7972  }
7973 
7974  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
7975  {
7976  UINT64 dup_val;
7977  val = PRM_GET_INT (prm_value);
7978 
7979  if (PRM_DIFFERENT_UNIT (prm->static_flag))
7980  {
7981  PRM_ADJUST_FOR_GET_INTEGER_TO_BIGINT (prm, &dup_val, &val, &error);
7982  if (error != NO_ERROR)
7983  {
7984  assert_release (false);
7985  return n;
7986  }
7987  }
7988  else
7989  {
7990  assert_release (false);
7991  }
7992 
7993  (void) util_byte_to_size_string (left_side + left_side_len, PRM_DEFAULT_BUFFER_SIZE - left_side_len, dup_val);
7994  n = snprintf (buf, len, "%s", left_side);
7995  }
7996  else if (PRM_HAS_TIME_UNIT (prm->static_flag))
7997  {
7998  INT64 dup_val;
7999  val = PRM_GET_INT (prm_value);
8000 
8001  if (PRM_DIFFERENT_UNIT (prm->static_flag) && val >= 0)
8002  {
8003  UINT64 tmp_val;
8004  PRM_ADJUST_FOR_GET_INTEGER_TO_BIGINT (prm, &tmp_val, &val, &error);
8005  if (error != NO_ERROR)
8006  {
8007  assert_release (false);
8008  return n;
8009  }
8010  dup_val = (INT64) tmp_val;
8011  }
8012  else
8013  {
8014  dup_val = (INT64) val;
8015  }
8016 
8017  (void) util_msec_to_time_string (left_side + left_side_len, PRM_DEFAULT_BUFFER_SIZE - left_side_len, dup_val);
8018  n = snprintf (buf, len, "%s", left_side);
8019  }
8020  else
8021  {
8022  n = snprintf (buf, len, "%s%d", left_side, val);
8023  }
8024  }
8025  else if (PRM_IS_BIGINT (prm))
8026  {
8027  UINT64 val = PRM_GET_BIGINT (prm_value);
8028  int left_side_len = strlen (left_side);
8029 
8030  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8031  {
8032  PRM_ADJUST_FOR_GET_BIGINT_TO_BIGINT (prm, &val, &val, &error);
8033  if (error != NO_ERROR)
8034  {
8035  assert_release (false);
8036  return n;
8037  }
8038  }
8039 
8040  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
8041  {
8042  (void) util_byte_to_size_string (left_side + left_side_len, PRM_DEFAULT_BUFFER_SIZE - left_side_len, val);
8043  n = snprintf (buf, len, "%s", left_side);
8044  }
8045  else
8046  {
8047  n = snprintf (buf, len, "%s%lld", left_side, (unsigned long long) val);
8048  }
8049  }
8050  else if (PRM_IS_BOOLEAN (prm))
8051  {
8052  n = snprintf (buf, len, "%s%c", left_side, (PRM_GET_BOOL (prm_value) ? 'y' : 'n'));
8053  }
8054  else if (PRM_IS_FLOAT (prm))
8055  {
8056  float val = PRM_GET_FLOAT (prm_value);
8057  int left_side_len = strlen (left_side);
8058 
8060  {
8061  PRM_ADJUST_FOR_GET_FLOAT_TO_FLOAT (prm, &val, &val, &error);
8062  if (error != NO_ERROR)
8063  {
8064  assert_release (false);
8065  return n;
8066  }
8067  }
8068 
8069  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
8070  {
8071  UINT64 dup_val;
8072  val = PRM_GET_FLOAT (prm_value);
8073 
8074  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8075  {
8076  PRM_ADJUST_FOR_GET_FLOAT_TO_BIGINT (prm, &dup_val, &val, &error);
8077  if (error != NO_ERROR)
8078  {
8079  assert_release (false);
8080  return n;
8081  }
8082  }
8083  else
8084  {
8085  assert_release (false);
8086  }
8087 
8088  (void) util_byte_to_size_string (left_side + left_side_len, PRM_DEFAULT_BUFFER_SIZE - left_side_len, dup_val);
8089  n = snprintf (buf, len, "%s", left_side);
8090  }
8091  else
8092  {
8093  n = snprintf (buf, len, "%s%f", left_side, val);
8094  }
8095  }
8096  else if (PRM_IS_STRING (prm))
8097  {
8098  n = snprintf (buf, len, "%s\"%s\"", left_side, (PRM_GET_STRING (prm_value) ? PRM_GET_STRING (prm_value) : ""));
8099  }
8100  else if (PRM_IS_KEYWORD (prm))
8101  {
8102  const KEYVAL *keyvalp = NULL;
8103 
8104  if (intl_mbs_casecmp (prm->name, PRM_NAME_ER_LOG_LEVEL) == 0)
8105  {
8106  keyvalp = prm_keyword (PRM_GET_INT (prm_value), NULL, er_log_level_words, DIM (er_log_level_words));
8107  }
8108  else if (intl_mbs_casecmp (prm->name, PRM_NAME_LOG_ISOLATION_LEVEL) == 0)
8109  {
8110  keyvalp = prm_keyword (PRM_GET_INT (prm_value), NULL, isolation_level_words, DIM (isolation_level_words));
8111  }
8113  {
8114  keyvalp =
8115  prm_keyword (PRM_GET_INT (prm_value), NULL, pgbuf_debug_page_validation_level_words,
8116  DIM (pgbuf_debug_page_validation_level_words));
8117  }
8118  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_MODE) == 0
8120 
8121  {
8122  keyvalp = prm_keyword (PRM_GET_INT (prm_value), NULL, ha_mode_words, DIM (ha_mode_words));
8123  }
8124  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_SERVER_STATE) == 0)
8125  {
8126  keyvalp = prm_keyword (PRM_GET_INT (prm_value), NULL, ha_server_state_words, DIM (ha_server_state_words));
8127  }
8128  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_LOG_APPLIER_STATE) == 0)
8129  {
8130  keyvalp =
8131  prm_keyword (PRM_GET_INT (prm_value), NULL, ha_log_applier_state_words, DIM (ha_log_applier_state_words));
8132  }
8133  else if (intl_mbs_casecmp (prm->name, PRM_NAME_COMPAT_MODE) == 0)
8134  {
8135  keyvalp = prm_keyword (PRM_GET_INT (prm_value), NULL, compat_words, DIM (compat_words));
8136  }
8137  else if (intl_mbs_casecmp (prm->name, PRM_NAME_CHECK_PEER_ALIVE) == 0)
8138  {
8139  keyvalp = prm_keyword (PRM_GET_INT (prm_value), NULL, check_peer_alive_words, DIM (check_peer_alive_words));
8140  }
8141  else if (intl_mbs_casecmp (prm->name, PRM_NAME_QUERY_TRACE_FORMAT) == 0)
8142  {
8143  keyvalp =
8144  prm_keyword (PRM_GET_INT (prm_value), NULL, query_trace_format_words, DIM (query_trace_format_words));
8145  }
8146  else if (intl_mbs_casecmp (prm->name, PRM_NAME_FAULT_INJECTION_TEST) == 0)
8147  {
8148  keyvalp = prm_keyword (PRM_GET_INT (prm_value), NULL, fi_test_words, DIM (fi_test_words));
8149  }
8150  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_REPL_FILTER_TYPE) == 0)
8151  {
8152  keyvalp =
8153  prm_keyword (PRM_GET_INT (prm->value), NULL, ha_repl_filter_type_words, DIM (ha_repl_filter_type_words));
8154  }
8156  {
8157  keyvalp = prm_keyword (PRM_GET_INT (prm->value), NULL, tde_algorithm_words, DIM (tde_algorithm_words));
8158  }
8159  else
8160  {
8161  assert (false);
8162  }
8163 
8164  if (keyvalp)
8165  {
8166  n = snprintf (buf, len, "%s\"%s\"", left_side, keyvalp->key);
8167  }
8168  else
8169  {
8170  n = snprintf (buf, len, "%s%d", left_side, PRM_GET_INT (prm_value));
8171  }
8172  }
8173  else if (PRM_IS_INTEGER_LIST (prm))
8174  {
8175  int *int_list, list_size, i;
8176  char *s;
8177 
8178  int_list = PRM_GET_INTEGER_LIST (prm_value);
8179  if (int_list)
8180  {
8181  list_size = int_list[0];
8182  s = buf;
8183  n = snprintf (s, len, "%s", left_side);
8184  s += n;
8185  len -= n;
8186 
8187  for (i = 1; i <= list_size; i++)
8188  {
8189  n = snprintf (s, len, "%d,", int_list[i]);
8190  s += n;
8191  len -= n;
8192  }
8193 
8194  if (list_size > 0)
8195  {
8196  /* remove last "," */
8197  s -= 1;
8198  len += 1;
8199  }
8200  if (len > 0)
8201  {
8202  *s = '\0';
8203  }
8204  n = strlen (buf);
8205  }
8206  else
8207  {
8208  n = snprintf (buf, len, "%s", left_side);
8209  }
8210  }
8211  else
8212  {
8213  n = snprintf (buf, len, "%s?", left_side);
8214  }
8215 
8216  return n;
8217 }
8218 
8219 /*
8220  * sysprm_print_sysprm_value () - print sysprm_value
8221  *
8222  * return : length of printed string
8223  * prm_id (in) : parameter ID (to which sysprm_value belongs).
8224  * value (in) : printed sysprm_value
8225  * buf (in/out) : printing destination
8226  * len (in) : maximum size of printed string
8227  * print_mode (in) : PRM_PRINT_MODE
8228  */
8229 static int
8230 sysprm_print_sysprm_value (PARAM_ID prm_id, SYSPRM_VALUE value, char *buf, size_t len, PRM_PRINT_MODE print_mode)
8231 {
8232  int n = 0;
8233  int error = NO_ERROR;
8234  char left_side[PRM_DEFAULT_BUFFER_SIZE];
8235  SYSPRM_PARAM *prm = NULL;
8236 
8237  if (len == 0)
8238  {
8239  /* don't print anything */
8240  return 0;
8241  }
8242 
8243  memset (left_side, 0, PRM_DEFAULT_BUFFER_SIZE);
8244 
8245  assert (buf != NULL && len > 0);
8246  prm = GET_PRM (prm_id);
8247 
8248  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8249  {
8250  assert (prm->get_dup != NULL);
8251  }
8252 
8253  if (print_mode == PRM_PRINT_ID)
8254  {
8255  snprintf (left_side, PRM_DEFAULT_BUFFER_SIZE, "%d=", prm_id);
8256  }
8257  else if (print_mode == PRM_PRINT_NAME)
8258  {
8259  snprintf (left_side, PRM_DEFAULT_BUFFER_SIZE, "%s=", prm->name);
8260  }
8261 
8262  if (PRM_IS_INTEGER (prm))
8263  {
8264  int val = value.i;
8265  int left_side_len = strlen (left_side);
8266 
8268  && !PRM_HAS_TIME_UNIT (prm->static_flag))
8269  {
8270  PRM_ADJUST_FOR_GET_INTEGER_TO_INTEGER (prm, &val, &val, &error);
8271  if (error != NO_ERROR)
8272  {
8273  assert_release (false);
8274  return n;
8275  }
8276  }
8277 
8278  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
8279  {
8280  UINT64 dup_val;
8281  val = value.i;
8282 
8283  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8284  {
8285  PRM_ADJUST_FOR_GET_INTEGER_TO_BIGINT (prm, &dup_val, &val, &error);
8286  if (error != NO_ERROR)
8287  {
8288  assert_release (false);
8289  return n;
8290  }
8291  }
8292  else
8293  {
8294  assert_release (false);
8295  }
8296 
8297  (void) util_byte_to_size_string (left_side + left_side_len, PRM_DEFAULT_BUFFER_SIZE - left_side_len, dup_val);
8298  n = snprintf (buf, len, "%s", left_side);
8299  }
8300  else if (PRM_HAS_TIME_UNIT (prm->static_flag))
8301  {
8302  INT64 dup_val;
8303  val = value.i;
8304 
8305  if (PRM_DIFFERENT_UNIT (prm->static_flag) && val >= 0)
8306  {
8307  UINT64 tmp_val;
8308  PRM_ADJUST_FOR_GET_INTEGER_TO_BIGINT (prm, &tmp_val, &val, &error);
8309  if (error != NO_ERROR)
8310  {
8311  assert_release (false);
8312  return n;
8313  }
8314  dup_val = (INT64) tmp_val;
8315  }
8316  else
8317  {
8318  dup_val = (INT64) val;
8319  }
8320 
8321  (void) util_msec_to_time_string (left_side + left_side_len, PRM_DEFAULT_BUFFER_SIZE - left_side_len, dup_val);
8322  n = snprintf (buf, len, "%s", left_side);
8323  }
8324  else
8325  {
8326  n = snprintf (buf, len, "%s%d", left_side, val);
8327  }
8328  }
8329  else if (PRM_IS_BIGINT (prm))
8330  {
8331  UINT64 val = value.bi;
8332  int left_side_len = strlen (left_side);
8333 
8334  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8335  {
8336  PRM_ADJUST_FOR_GET_BIGINT_TO_BIGINT (prm, &val, &val, &error);
8337  if (error != NO_ERROR)
8338  {
8339  assert_release (false);
8340  return n;
8341  }
8342  }
8343 
8344  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
8345  {
8346  (void) util_byte_to_size_string (left_side + left_side_len, PRM_DEFAULT_BUFFER_SIZE - left_side_len, val);
8347  n = snprintf (buf, len, "%s", left_side);
8348  }
8349  else
8350  {
8351  n = snprintf (buf, len, "%s%lld", left_side, (unsigned long long) val);
8352  }
8353  }
8354  else if (PRM_IS_BOOLEAN (prm))
8355  {
8356  n = snprintf (buf, len, "%s%c", left_side, (value.b ? 'y' : 'n'));
8357  }
8358  else if (PRM_IS_FLOAT (prm))
8359  {
8360  float val = value.f;
8361  int left_side_len = strlen (left_side);
8362 
8364  {
8365  PRM_ADJUST_FOR_GET_FLOAT_TO_FLOAT (prm, &val, &val, &error);
8366  if (error != NO_ERROR)
8367  {
8368  assert_release (false);
8369  return n;
8370  }
8371  }
8372 
8373  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
8374  {
8375  UINT64 dup_val;
8376  val = value.f;
8377 
8378  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8379  {
8380  PRM_ADJUST_FOR_GET_FLOAT_TO_BIGINT (prm, &dup_val, &val, &error);
8381  if (error != NO_ERROR)
8382  {
8383  assert_release (false);
8384  return n;
8385  }
8386  }
8387  else
8388  {
8389  assert_release (false);
8390  }
8391 
8392  (void) util_byte_to_size_string (left_side + left_side_len, PRM_DEFAULT_BUFFER_SIZE - left_side_len, dup_val);
8393  n = snprintf (buf, len, "%s", left_side);
8394  }
8395  else
8396  {
8397  n = snprintf (buf, len, "%s%f", left_side, val);
8398  }
8399  }
8400  else if (PRM_IS_STRING (prm))
8401  {
8402  n = snprintf (buf, len, "%s\"%s\"", left_side, (value.str != NULL ? value.str : ""));
8403  }
8404  else if (PRM_IS_KEYWORD (prm))
8405  {
8406  const KEYVAL *keyvalp = NULL;
8407 
8408  if (intl_mbs_casecmp (prm->name, PRM_NAME_ER_LOG_LEVEL) == 0)
8409  {
8410  keyvalp = prm_keyword (value.i, NULL, er_log_level_words, DIM (er_log_level_words));
8411  }
8412  else if (intl_mbs_casecmp (prm->name, PRM_NAME_LOG_ISOLATION_LEVEL) == 0)
8413  {
8414  keyvalp = prm_keyword (value.i, NULL, isolation_level_words, DIM (isolation_level_words));
8415  }
8417  {
8418  keyvalp =
8419  prm_keyword (value.i, NULL, pgbuf_debug_page_validation_level_words,
8420  DIM (pgbuf_debug_page_validation_level_words));
8421  }
8422  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_MODE) == 0
8424  {
8425  keyvalp = prm_keyword (value.i, NULL, ha_mode_words, DIM (ha_mode_words));
8426  }
8427  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_SERVER_STATE) == 0)
8428  {
8429  keyvalp = prm_keyword (value.i, NULL, ha_server_state_words, DIM (ha_server_state_words));
8430  }
8431  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_LOG_APPLIER_STATE) == 0)
8432  {
8433  keyvalp = prm_keyword (value.i, NULL, ha_log_applier_state_words, DIM (ha_log_applier_state_words));
8434  }
8435  else if (intl_mbs_casecmp (prm->name, PRM_NAME_COMPAT_MODE) == 0)
8436  {
8437  keyvalp = prm_keyword (value.i, NULL, compat_words, DIM (compat_words));
8438  }
8439  else if (intl_mbs_casecmp (prm->name, PRM_NAME_CHECK_PEER_ALIVE) == 0)
8440  {
8441  keyvalp = prm_keyword (value.i, NULL, check_peer_alive_words, DIM (check_peer_alive_words));
8442  }
8443  else if (intl_mbs_casecmp (prm->name, PRM_NAME_QUERY_TRACE_FORMAT) == 0)
8444  {
8445  keyvalp = prm_keyword (value.i, NULL, query_trace_format_words, DIM (query_trace_format_words));
8446  }
8447  else if (intl_mbs_casecmp (prm->name, PRM_NAME_FAULT_INJECTION_TEST) == 0)
8448  {
8449  keyvalp = prm_keyword (value.i, NULL, fi_test_words, DIM (fi_test_words));
8450  }
8451  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_REPL_FILTER_TYPE) == 0)
8452  {
8453  keyvalp = prm_keyword (value.i, NULL, ha_repl_filter_type_words, DIM (ha_repl_filter_type_words));
8454  }
8456  {
8457  keyvalp = prm_keyword (value.i, NULL, tde_algorithm_words, DIM (tde_algorithm_words));
8458  }
8459  else
8460  {
8461  assert (false);
8462  }
8463 
8464  if (keyvalp)
8465  {
8466  n = snprintf (buf, len, "%s\"%s\"", left_side, keyvalp->key);
8467  }
8468  else
8469  {
8470  n = snprintf (buf, len, "%s%d", left_side, value.i);
8471  }
8472  }
8473  else if (PRM_IS_INTEGER_LIST (prm))
8474  {
8475  int *int_list = NULL, list_size, i;
8476  char *s = NULL;
8477 
8478  int_list = value.integer_list;
8479  if (int_list)
8480  {
8481  list_size = int_list[0];
8482  s = buf;
8483  n = snprintf (s, len, "%s", left_side);
8484  s += n;
8485  len -= n;
8486 
8487  for (i = 1; i <= list_size; i++)
8488  {
8489  n = snprintf (s, len, "%d,", int_list[i]);
8490  s += n;
8491  len -= n;
8492  }
8493 
8494  if (list_size > 0)
8495  {
8496  /* remove last "," */
8497  s -= 1;
8498  len += 1;
8499  }
8500  if (len > 0)
8501  {
8502  *s = '\0';
8503  }
8504  n = strlen (buf);
8505  }
8506  else
8507  {
8508  n = snprintf (buf, len, "%s", left_side);
8509  }
8510  }
8511  else
8512  {
8513  n = snprintf (buf, len, "%s?", left_side);
8514  }
8515 
8516  return n;
8517 }
8518 
8519 /*
8520  * sysprm_obtain_parameters () - Get parameter values
8521  *
8522  * return : SYSPRM_ERR code.
8523  * data (in) : string containing the names of parameters.
8524  * prm_values_ptr (out) : list of ids and values for the parameters read from
8525  * data.
8526  *
8527  * NOTE: Multiple parameters can be obtained by providing a string like:
8528  * "param_name1; param_name2; ..."
8529  * If some values must be read from server, PRM_ERR_NOT_FOR_CLIENT is
8530  * returned.
8531  */
8532 SYSPRM_ERR
8533 sysprm_obtain_parameters (char *data, SYSPRM_ASSIGN_VALUE ** prm_values_ptr)
8534 {
8535  char buf[LINE_MAX], *p = NULL, *name = NULL;
8536  SYSPRM_PARAM *prm = NULL;
8537  SYSPRM_ASSIGN_VALUE *prm_value_list = NULL, *last_prm_value = NULL;
8538  SYSPRM_ASSIGN_VALUE *prm_value = NULL;
8540 
8541  if (!data || *data == '\0')
8542  {
8543  return PRM_ERR_BAD_VALUE;
8544  }
8545 
8546  if (intl_mbs_ncpy (buf, data, LINE_MAX) == NULL)
8547  {
8548  return PRM_ERR_BAD_VALUE;
8549  }
8550 
8551  assert (prm_values_ptr != NULL);
8552  *prm_values_ptr = NULL;
8553 
8554  p = buf;
8555  do
8556  {
8557  /* read name */
8558  while (char_isspace (*p))
8559  {
8560  p++;
8561  }
8562  if (*p == '\0')
8563  {
8564  break;
8565  }
8566  name = p;
8567 
8568  while (*p && !char_isspace (*p) && *p != ';')
8569  {
8570  p++;
8571  }
8572 
8573  if (*p)
8574  {
8575  *p++ = '\0';
8576  while (char_isspace (*p))
8577  {
8578  p++;
8579  }
8580  if (*p == ';')
8581  {
8582  p++;
8583  }
8584  }
8585 
8586  prm = prm_find (name, NULL);
8587  if (prm == NULL)
8588  {
8589  error = PRM_ERR_UNKNOWN_PARAM;
8590  break;
8591  }
8592  else if (prm->value == NULL)
8593  {
8594  error = PRM_ERR_NO_VALUE;
8595  break;
8596  }
8597 
8598 #if defined (CS_MODE)
8600  {
8601  error = PRM_ERR_CANNOT_CHANGE;
8602  break;
8603  }
8604 
8606  || PRM_IS_GET_SERVER (prm->static_flag))
8607  {
8608  /* have to read the value on server */
8609  scope_error = PRM_ERR_NOT_FOR_CLIENT;
8610  }
8611 #endif /* CS_MODE */
8612 
8613  /* create a SYSPRM_ASSING_VALUE object to store parameter value */
8614  prm_value = (SYSPRM_ASSIGN_VALUE *) malloc (sizeof (SYSPRM_ASSIGN_VALUE));
8615  if (prm_value == NULL)
8616  {
8617  error = PRM_ERR_NO_MEM_FOR_PRM;
8619  break;
8620  }
8621  prm_value->prm_id = sysprm_get_id (prm);
8622  prm_value->next = NULL;
8623 #if defined (CS_MODE)
8624  if (PRM_IS_FOR_CLIENT (prm->static_flag))
8625  {
8626  /* set the value here */
8627  sysprm_set_sysprm_value_from_parameter (&prm_value->value, prm);
8628  }
8629  else
8630  {
8631  memset (&prm_value->value, 0, sizeof (SYSPRM_VALUE));
8632  }
8633 #else /* CS_MODE */
8634  sysprm_set_sysprm_value_from_parameter (&prm_value->value, prm);
8635 #endif /* !CS_MODE */
8636 
8637  /* append prm_value to prm_value_list */
8638  if (prm_value_list != NULL)
8639  {
8640  last_prm_value->next = prm_value;
8641  last_prm_value = prm_value;
8642  }
8643  else
8644  {
8645  prm_value_list = last_prm_value = prm_value;
8646  }
8647  }
8648  while (*p);
8649 
8650  if (error == PRM_ERR_NO_ERROR)
8651  {
8652  /* all parameter names are valid and values can be obtained */
8653  *prm_values_ptr = prm_value_list;
8654  /* update error in order to get values from server too if needed */
8655  error = scope_error;
8656  }
8657  else
8658  {
8659  /* error obtaining values, clean up */
8660  sysprm_free_assign_values (&prm_value_list);
8661  }
8662 
8663  return error;
8664 }
8665 
8666 #if !defined(CS_MODE)
8667 /*
8668  * xsysprm_change_server_parameters () - changes parameter values on server
8669  *
8670  * return : void
8671  * assignments (in) : list of changes
8672  */
8673 void
8675 {
8676  sysprm_change_parameter_values (assignments, true, true);
8677 }
8678 
8679 /*
8680  * xsysprm_obtain_server_parameters () - get parameter values from server
8681  *
8682  * return : void
8683  * prm_values (in) : list of parameters
8684  *
8685  * NOTE: Obtains value for parameters that are for server only. For parameters
8686  * that are client/server, values should be obtained from client UNLESS
8687  * it has PRM_GET_SERVER flag.
8688  */
8689 void
8691 {
8692  SYSPRM_PARAM *prm = NULL;
8693 
8694  for (; prm_values != NULL; prm_values = prm_values->next)
8695  {
8696  prm = GET_PRM (prm_values->prm_id);
8697 
8699  || PRM_IS_GET_SERVER (prm->static_flag))
8700  {
8701  /* set value */
8702  sysprm_set_sysprm_value_from_parameter (&prm_values->value, prm);
8703  }
8704  }
8705 }
8706 
8707 /*
8708  * xsysprm_get_force_server_parameters () - obtain values for parameters
8709  * marked as PRM_FORCE_SERVER
8710  *
8711  * return : list of values
8712  *
8713  * NOTE: This is called after client registers to server.
8714  */
8717 {
8718  SYSPRM_ASSIGN_VALUE *force_values = NULL, *last_assign = NULL;
8719  SYSPRM_PARAM *prm = NULL;
8720  int i;
8721 
8722  for (i = 0; i < NUM_PRM; i++)
8723  {
8724  prm = GET_PRM (i);
8725  if (PRM_GET_FROM_SERVER (prm->static_flag))
8726  {
8727  SYSPRM_ASSIGN_VALUE *change_val = (SYSPRM_ASSIGN_VALUE *) malloc (sizeof (SYSPRM_ASSIGN_VALUE));
8728  if (change_val == NULL)
8729  {
8731  goto cleanup;
8732  }
8733  change_val->prm_id = (PARAM_ID) i;
8734  change_val->next = NULL;
8735  sysprm_set_sysprm_value_from_parameter (&change_val->value, prm);
8736  if (force_values != NULL)
8737  {
8738  last_assign->next = change_val;
8739  last_assign = change_val;
8740  }
8741  else
8742  {
8743  force_values = last_assign = change_val;
8744  }
8745  }
8746  }
8747 
8748  return force_values;
8749 
8750 cleanup:
8751  sysprm_free_assign_values (&force_values);
8752  return NULL;
8753 }
8754 
8755 /*
8756  * xsysprm_dump_server_parameters -
8757  * return: none
8758  * fp(in):
8759  */
8760 void
8762 {
8763  sysprm_dump_parameters (outfp);
8764 }
8765 #endif /* !CS_MODE */
8766 
8767 /*
8768  * sysprm_get_param_range - returns the minimum and maximum value for a SYSPRM_PARAM
8769  * return: error code
8770  * prm (in): the parameter for which we want the limits
8771  * min (out): the minimum possible value for the parameter
8772  * max (out): the maximum possible value for the parameter
8773  */
8774 static SYSPRM_ERR
8776 {
8778  if (PRM_IS_INTEGER (prm))
8779  {
8780  if (prm->lower_limit)
8781  {
8782  *((int *) min) = PRM_GET_INT (prm->lower_limit);
8783  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8784  {
8785  PRM_ADJUST_FOR_GET_INTEGER_TO_INTEGER (prm, (int *) min, (int *) min, &error);
8786  }
8787  }
8788  else
8789  {
8790  *((int *) min) = INT_MIN;
8791  }
8792 
8793  if (prm->upper_limit)
8794  {
8795  *((int *) max) = PRM_GET_INT (prm->upper_limit);
8796  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8797  {
8798  PRM_ADJUST_FOR_GET_INTEGER_TO_INTEGER (prm, (int *) max, (int *) max, &error);
8799  }
8800  }
8801  else
8802  {
8803  *((int *) max) = INT_MAX;
8804  }
8805  }
8806  else if (PRM_IS_FLOAT (prm))
8807  {
8808  if (prm->lower_limit)
8809  {
8810  *((float *) min) = PRM_GET_FLOAT (prm->lower_limit);
8811  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8812  {
8813  PRM_ADJUST_FOR_GET_FLOAT_TO_FLOAT (prm, (float *) min, (float *) min, &error);
8814  }
8815  }
8816  else
8817  {
8818  *((float *) min) = FLT_MIN;
8819  }
8820 
8821  if (prm->upper_limit)
8822  {
8823  *((float *) max) = PRM_GET_FLOAT (prm->upper_limit);
8824  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8825  {
8826  PRM_ADJUST_FOR_GET_FLOAT_TO_FLOAT (prm, (float *) max, (float *) max, &error);
8827  }
8828  }
8829  else
8830  {
8831  *((float *) max) = FLT_MAX;
8832  }
8833  }
8834  else if (PRM_IS_BIGINT (prm))
8835  {
8836  if (prm->lower_limit)
8837  {
8838  *((UINT64 *) min) = PRM_GET_BIGINT (prm->lower_limit);
8839  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8840  {
8841  PRM_ADJUST_FOR_GET_BIGINT_TO_BIGINT (prm, (UINT64 *) min, (UINT64 *) min, &error);
8842  }
8843  }
8844  else
8845  {
8846  *((UINT64 *) min) = 0ULL;
8847  }
8848 
8849  if (prm->upper_limit)
8850  {
8851  *((UINT64 *) max) = PRM_GET_BIGINT (prm->upper_limit);
8852  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8853  {
8854  PRM_ADJUST_FOR_GET_BIGINT_TO_BIGINT (prm, (UINT64 *) max, (UINT64 *) max, &error);
8855  }
8856  }
8857  else
8858  {
8859  *((UINT64 *) max) = ULLONG_MAX;
8860  }
8861  }
8862  else
8863  {
8864  return PRM_ERR_BAD_VALUE;
8865  }
8866 
8867  if (error != NO_ERROR)
8868  {
8869  return PRM_ERR_BAD_VALUE;
8870  }
8871 
8872  return PRM_ERR_NO_ERROR;
8873 }
8874 
8875 /*
8876  * sysprm_get_range - returns the minimum and maximum value
8877  * for a paramter, given by its name
8878  * return: error code
8879  * pname (in): parameter name
8880  * min (out): the minimum possible value for the parameter
8881  * max (out): the maximum possible value for the parameter
8882  */
8883 int
8884 sysprm_get_range (const char *pname, void *min, void *max)
8885 {
8886  SYSPRM_PARAM *prm;
8887 
8888  prm = prm_find (pname, NULL);
8889  if (prm == NULL)
8890  {
8891  return PRM_ERR_UNKNOWN_PARAM;
8892  }
8893 
8894  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8895  {
8896  assert (prm->get_dup != NULL);
8897  }
8898  return sysprm_get_param_range (prm, min, max);
8899 }
8900 
8901 /*
8902  * sysprm_check_range -
8903  * return:
8904  * pname (in): parameter name
8905  * value (in): parameter value
8906  */
8907 int
8908 sysprm_check_range (const char *pname, void *value)
8909 {
8910  int error = 0;
8911  SYSPRM_PARAM *prm;
8912 
8913  prm = prm_find (pname, NULL);
8914  if (prm == NULL)
8915  {
8916  return PRM_ERR_UNKNOWN_PARAM;
8917  }
8918 
8919  error = prm_check_range (prm, value);
8920 
8921  return error;
8922 }
8923 
8924 /*
8925  * prm_check_range -
8926  * return:
8927  * prm(in):
8928  * value (in):
8929  */
8930 static int
8932 {
8933  int error = NO_ERROR;
8934 
8935  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8936  {
8937  assert (prm->set_dup != NULL);
8938  }
8939 
8940  if (PRM_IS_INTEGER (prm) || PRM_IS_KEYWORD (prm))
8941  {
8942  int val;
8943 
8944  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8945  {
8946  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
8947  {
8948  PRM_ADJUST_FOR_SET_BIGINT_TO_INTEGER (prm, &val, (UINT64 *) value, &error);
8949  }
8950  else if (PRM_HAS_TIME_UNIT (prm->static_flag))
8951  {
8952  INT64 *dup_val = (INT64 *) value;
8953 
8954  if (*dup_val >= 0)
8955  {
8956  UINT64 tmp_val = (UINT64) * dup_val;
8957  PRM_ADJUST_FOR_SET_BIGINT_TO_INTEGER (prm, &val, &tmp_val, &error);
8958  }
8959  else
8960  {
8961  val = (int) *dup_val;
8962  }
8963  }
8964  else
8965  {
8966  PRM_ADJUST_FOR_SET_INTEGER_TO_INTEGER (prm, &val, (int *) value, &error);
8967  }
8968  if (error != NO_ERROR)
8969  {
8970  return PRM_ERR_BAD_VALUE;
8971  }
8972  }
8973  else
8974  {
8975  val = *((int *) value);
8976  }
8977 
8978  if ((prm->upper_limit && PRM_GET_INT (prm->upper_limit) < val)
8979  || (prm->lower_limit && PRM_GET_INT (prm->lower_limit) > val))
8980  {
8981  return PRM_ERR_BAD_RANGE;
8982  }
8983  }
8984  else if (PRM_IS_FLOAT (prm))
8985  {
8986  float val;
8987  float lower, upper;
8988 
8989  lower = upper = 0; /* to make compilers be silent */
8990  if (PRM_DIFFERENT_UNIT (prm->static_flag))
8991  {
8992  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
8993  {
8994  PRM_ADJUST_FOR_SET_BIGINT_TO_FLOAT (prm, &val, (UINT64 *) value, &error);
8995  }
8996  else
8997  {
8998  PRM_ADJUST_FOR_SET_FLOAT_TO_FLOAT (prm, &val, (float *) value, &error);
8999  }
9000  if (error != NO_ERROR)
9001  {
9002  return PRM_ERR_BAD_VALUE;
9003  }
9004 
9005  if (prm->upper_limit)
9006  {
9007  upper = ceilf (PRM_GET_FLOAT (prm->upper_limit) * 100) / 100;
9008  }
9009 
9010  if (prm->lower_limit)
9011  {
9012  lower = ceilf (PRM_GET_FLOAT (prm->lower_limit) * 100) / 100;
9013  }
9014  }
9015  else
9016  {
9017  val = *((float *) value);
9018 
9019  if (prm->upper_limit)
9020  {
9021  upper = PRM_GET_FLOAT (prm->upper_limit);
9022  }
9023 
9024  if (prm->lower_limit)
9025  {
9026  lower = PRM_GET_FLOAT (prm->lower_limit);
9027  }
9028  }
9029 
9030  if ((prm->upper_limit && upper < val) || (prm->lower_limit && lower > val))
9031  {
9032  return PRM_ERR_BAD_RANGE;
9033  }
9034  }
9035  else if (PRM_IS_BIGINT (prm))
9036  {
9037  UINT64 val;
9038 
9039  if (PRM_DIFFERENT_UNIT (prm->static_flag))
9040  {
9041  PRM_ADJUST_FOR_SET_BIGINT_TO_BIGINT (prm, &val, (UINT64 *) value, &error);
9042  if (error != NO_ERROR)
9043  {
9044  return PRM_ERR_BAD_VALUE;
9045  }
9046  }
9047  else
9048  {
9049  val = *((UINT64 *) value);
9050  }
9051 
9052  if ((prm->upper_limit && PRM_GET_BIGINT (prm->upper_limit) < val)
9053  || (prm->lower_limit && PRM_GET_BIGINT (prm->lower_limit) > val))
9054  {
9055  return PRM_ERR_BAD_RANGE;
9056  }
9057  }
9058  else
9059  {
9060  return PRM_ERR_BAD_VALUE;
9061  }
9062 
9063  return PRM_ERR_NO_ERROR;
9064 }
9065 
9066 /*
9067  * sysprm_generate_new_value () - converts string into a system parameter value
9068  *
9069  * return : SYSPRM_ERR
9070  * prm (in) : target system parameter
9071  * value (in) : parameter value in char * format
9072  * check (in) : check if value can be changed. set to false if value
9073  * should be forced
9074  * new_value (out) : SYSPRM_VALUE converted from string
9075  */
9076 static SYSPRM_ERR
9077 sysprm_generate_new_value (SYSPRM_PARAM * prm, const char *value, bool check, SYSPRM_VALUE * new_value)
9078 {
9079  char *end = NULL;
9080  int error = NO_ERROR;
9081  int set_min = 0, set_max = 0, set_default = 0;
9083  SYSPRM_VALUE min, max;
9084 
9085  if (prm == NULL)
9086  {
9087  return PRM_ERR_UNKNOWN_PARAM;
9088  }
9089  if (value == NULL)
9090  {
9091  return PRM_ERR_BAD_VALUE;
9092  }
9093 
9094  assert (new_value != NULL);
9095 
9096  if (PRM_DIFFERENT_UNIT (prm->static_flag))
9097  {
9098  assert (prm->set_dup != NULL);
9099  }
9100 
9101 #if defined (CS_MODE)
9102  if (check)
9103  {
9104  /* check the scope of parameter */
9105  if (PRM_IS_FOR_CLIENT (prm->static_flag))
9106  {
9107  if (PRM_IS_FOR_SESSION (prm->static_flag))
9108  {
9109  /* the value in session state must also be updated. user doesn't have to be part of DBA group. */
9111  }
9112  else if (PRM_IS_FOR_SERVER (prm->static_flag))
9113  {
9114  /* the value has to be changed on server too. user has to be part of DBA group. */
9115  ret = PRM_ERR_NOT_FOR_CLIENT;
9116  }
9117  }
9118  else
9119  {
9120  if (PRM_IS_FOR_SERVER (prm->static_flag))
9121  {
9122  /* this value is only for server. user has to be DBA. */
9123  ret = PRM_ERR_NOT_FOR_CLIENT;
9124  }
9125  else
9126  {
9127  /* not for client or server, cannot be changed on-line */
9128  return PRM_ERR_CANNOT_CHANGE;
9129  }
9130  }
9131  }
9132 #endif /* CS_MODE */
9133 
9134 #if defined (SERVER_MODE)
9135  if (check)
9136  {
9138  {
9139  return PRM_ERR_NOT_FOR_SERVER;
9140  }
9141  }
9142 #endif /* SERVER_MODE */
9143 
9144  if (strcasecmp (value, PRM_VALUE_DEFAULT) == 0)
9145  {
9146  set_default = true;
9147  }
9148  if (strcasecmp (value, PRM_VALUE_MAX) == 0)
9149  {
9150  set_max = true;
9151  }
9152  if (strcasecmp (value, PRM_VALUE_MIN) == 0)
9153  {
9154  set_min = true;
9155  }
9156 #if defined(CS_MODE)
9157  if (!set_default)
9158  {
9159  if (strcmp (prm->name, PRM_NAME_INTL_NUMBER_LANG) == 0 || strcmp (prm->name, PRM_NAME_INTL_DATE_LANG) == 0)
9160  {
9161  INTL_LANG dummy;
9162 
9163  if (lang_get_lang_id_from_name (value, &dummy) != 0)
9164  {
9165  return PRM_ERR_BAD_VALUE;
9166  }
9167  }
9168  if (strcmp (prm->name, PRM_NAME_INTL_COLLATION) == 0)
9169  {
9170  LANG_COLLATION *lc = NULL;
9171  if (value != NULL)
9172  {
9173  lc = lang_get_collation_by_name (value);
9174  }
9175 
9176  if (lc == NULL)
9177  {
9178  return PRM_ERR_BAD_VALUE;
9179  }
9180  }
9181  if (strcmp (prm->name, PRM_NAME_TIMEZONE) == 0)
9182  {
9183  int er_status = NO_ERROR;
9184 
9185  if (value != NULL)
9186  {
9187  er_status = tz_str_to_region (value, strlen (value), NULL);
9188  if (er_status != NO_ERROR)
9189  {
9190  return PRM_ERR_BAD_VALUE;
9191  }
9192  }
9193  }
9194  }
9195 #endif
9196  if (set_max || set_min)
9197  {
9198  ret = sysprm_get_param_range (prm, &min, &max);
9199  if (ret != PRM_ERR_NO_ERROR)
9200  {
9201  return PRM_ERR_BAD_VALUE;
9202  }
9203  if (set_min)
9204  {
9205  *new_value = min;
9206  }
9207  else
9208  {
9209  *new_value = max;
9210  }
9211  return PRM_ERR_NO_ERROR;
9212  }
9213  switch (prm->datatype)
9214  {
9215  case PRM_INTEGER:
9216  {
9217  /* convert string to int */
9218  int val = 0;
9219 
9220  if (set_default)
9221  {
9222  new_value->i = PRM_GET_INT (prm->default_value);
9223  break;
9224  }
9225 
9226  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
9227  {
9228  UINT64 dup_val;
9229  if (util_size_string_to_byte (&dup_val, value) != NO_ERROR)
9230  {
9231  return PRM_ERR_BAD_VALUE;
9232  }
9233 
9234  if (prm_check_range (prm, (void *) &dup_val) != NO_ERROR)
9235  {
9236  return PRM_ERR_BAD_RANGE;
9237  }
9238 
9239  if (PRM_DIFFERENT_UNIT (prm->static_flag))
9240  {
9241  PRM_ADJUST_FOR_SET_BIGINT_TO_INTEGER (prm, &val, &dup_val, &error);
9242  if (error != NO_ERROR)
9243  {
9244  return PRM_ERR_BAD_VALUE;
9245  }
9246  }
9247  else
9248  {
9249  return PRM_ERR_BAD_VALUE;
9250  }
9251  }
9252  else if (PRM_HAS_TIME_UNIT (prm->static_flag))
9253  {
9254  INT64 dup_val;
9255 
9256  if (util_time_string_to_msec (&dup_val, (char *) value) != NO_ERROR)
9257  {
9258  return PRM_ERR_BAD_VALUE;
9259  }
9260 
9261  if (prm_check_range (prm, (void *) &dup_val) != NO_ERROR)
9262  {
9263  return PRM_ERR_BAD_RANGE;
9264  }
9265 
9266  if (PRM_DIFFERENT_UNIT (prm->static_flag) && dup_val >= 0)
9267  {
9268  UINT64 tmp_val = (UINT64) dup_val;
9269  PRM_ADJUST_FOR_SET_BIGINT_TO_INTEGER (prm, &val, &tmp_val, &error);
9270  if (error != NO_ERROR)
9271  {
9272  return PRM_ERR_BAD_VALUE;
9273  }
9274  }
9275  else
9276  {
9277  val = (int) dup_val;
9278  }
9279  }
9280  else
9281  {
9282  int result;
9283 
9284  result = parse_int (&val, value, 10);
9285 
9286  if (result != 0)
9287  {
9288  return PRM_ERR_BAD_VALUE;
9289  }
9290 
9291  if (prm_check_range (prm, (void *) &val) != NO_ERROR)
9292  {
9293  return PRM_ERR_BAD_RANGE;
9294  }
9295 
9296  if (PRM_DIFFERENT_UNIT (prm->static_flag))
9297  {
9298  PRM_ADJUST_FOR_SET_INTEGER_TO_INTEGER (prm, &val, &val, &error);
9299  if (error != NO_ERROR)
9300  {
9301  return PRM_ERR_BAD_VALUE;
9302  }
9303  }
9304  }
9305 
9306  new_value->i = val;
9307  break;
9308  }
9309 
9310  case PRM_BIGINT:
9311  {
9312  /* convert string to UINT64 */
9313  int result;
9314  UINT64 val;
9315  char *end_p;
9316 
9317  if (set_default)
9318  {
9319  new_value->bi = PRM_GET_BIGINT (prm->default_value);
9320  break;
9321  }
9322 
9323  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
9324  {
9325  if (util_size_string_to_byte (&val, value) != NO_ERROR)
9326  {
9327  return PRM_ERR_BAD_VALUE;
9328  }
9329  }
9330  else
9331  {
9332  result = str_to_uint64 (&val, &end_p, value, 10);
9333  if (result != 0)
9334  {
9335  return PRM_ERR_BAD_VALUE;
9336  }
9337  }
9338 
9339  if (prm_check_range (prm, (void *) &val) != NO_ERROR)
9340  {
9341  return PRM_ERR_BAD_RANGE;
9342  }
9343 
9344  if (PRM_DIFFERENT_UNIT (prm->static_flag))
9345  {
9346  PRM_ADJUST_FOR_SET_BIGINT_TO_BIGINT (prm, &val, &val, &error);
9347  if (error != NO_ERROR)
9348  {
9349  return PRM_ERR_BAD_VALUE;
9350  }
9351  }
9352 
9353  new_value->bi = val;
9354  break;
9355  }
9356 
9357  case PRM_FLOAT:
9358  {
9359  /* convert string to float */
9360  float val = 0.f;
9361 
9362  if (set_default)
9363  {
9364  new_value->f = PRM_GET_FLOAT (prm->default_value);
9365  break;
9366  }
9367 
9368  if (PRM_HAS_SIZE_UNIT (prm->static_flag))
9369  {
9370  UINT64 dup_val;
9371  if (util_size_string_to_byte (&dup_val, value) != NO_ERROR)
9372  {
9373  return PRM_ERR_BAD_VALUE;
9374  }
9375 
9376  if (prm_check_range (prm, (void *) &dup_val) != NO_ERROR)
9377  {
9378  return PRM_ERR_BAD_RANGE;
9379  }
9380 
9381  if (PRM_DIFFERENT_UNIT (prm->static_flag))
9382  {
9383  PRM_ADJUST_FOR_SET_BIGINT_TO_FLOAT (prm, &val, &dup_val, &error);
9384  if (error != NO_ERROR)
9385  {
9386  return PRM_ERR_BAD_VALUE;
9387  }
9388  }
9389  else
9390  {
9391  return PRM_ERR_BAD_VALUE;
9392  }
9393  }
9394  else
9395  {
9396  val = (float) strtod (value, &end);
9397  if (end == value)
9398  {
9399  return PRM_ERR_BAD_VALUE;
9400  }
9401  else if (*end != '\0')
9402  {
9403  return PRM_ERR_BAD_VALUE;
9404  }
9405 
9406  if (prm_check_range (prm, (void *) &val) != NO_ERROR)
9407  {
9408  return PRM_ERR_BAD_RANGE;
9409  }
9410 
9411  if (PRM_DIFFERENT_UNIT (prm->static_flag))
9412  {
9413  PRM_ADJUST_FOR_SET_FLOAT_TO_FLOAT (prm, &val, &val, &error);
9414  if (error != NO_ERROR)
9415  {
9416  return PRM_ERR_BAD_VALUE;
9417  }
9418  }
9419  }
9420 
9421  new_value->f = val;
9422  break;
9423  }
9424 
9425  case PRM_BOOLEAN:
9426  {
9427  const KEYVAL *keyvalp = NULL;
9428 
9429  if (set_default)
9430  {
9431  new_value->b = PRM_GET_BOOL (prm->default_value);
9432  break;
9433  }
9434 
9435  /* convert string to boolean */
9436 
9437  keyvalp = prm_keyword (-1, value, boolean_words, DIM (boolean_words));
9438  if (keyvalp == NULL)
9439  {
9440  return PRM_ERR_BAD_VALUE;
9441  }
9442 
9443  new_value->b = (bool) keyvalp->val;
9444  break;
9445  }
9446 
9447  case PRM_STRING:
9448  {
9449  /* duplicate string */
9450  const char *val = NULL;
9451 
9452  if (set_default)
9453  {
9454  val = PRM_GET_STRING (prm->default_value);
9455  if (val == NULL)
9456  {
9457  switch (sysprm_get_id (prm))
9458  {
9459  case PRM_ID_INTL_COLLATION:
9461  break;
9462  case PRM_ID_INTL_DATE_LANG:
9464  val = lang_get_Lang_name ();
9465  break;
9466  case PRM_ID_TIMEZONE:
9468  break;
9469  default:
9470  /* do nothing */
9471  break;
9472  }
9473  }
9474 
9475  if (val == NULL)
9476  {
9477  new_value->str = NULL;
9478  }
9479  else
9480  {
9481  new_value->str = strdup (val);
9482  if (new_value->str == NULL)
9483  {
9485  return PRM_ERR_NO_MEM_FOR_PRM;
9486  }
9487  }
9488  break;
9489  }
9490 
9491  /* check if the value is represented as a null keyword */
9492  if (prm_keyword (-1, value, null_words, DIM (null_words)) != NULL)
9493  {
9494  new_value->str = NULL;
9495  }
9496  else
9497  {
9498  new_value->str = strdup (value);
9499  if (new_value->str == NULL)
9500  {
9502  return PRM_ERR_NO_MEM_FOR_PRM;
9503  }
9504  }
9505  break;
9506  }
9507 
9508  case PRM_INTEGER_LIST:
9509  {
9510  /* convert string into an array of integers */
9511  int *val = NULL;
9512 
9513  if (set_default && sysprm_get_id (prm) != PRM_ID_CALL_STACK_DUMP_ACTIVATION)
9514  {
9515  val = PRM_GET_INTEGER_LIST (prm->default_value);
9516  if (val == NULL)
9517  {
9518  new_value->integer_list = NULL;
9519  }
9520  else
9521  {
9522  size_t size = (size_t) ((val[0] + 1) * sizeof (int));
9523  new_value->integer_list = (int *) malloc (size);
9524 
9525  if (new_value->integer_list == NULL)
9526  {
9528  return PRM_ERR_NO_MEM_FOR_PRM;
9529  }
9530 
9531  memcpy (new_value->integer_list, val, size);
9532  }
9533 
9534  break;
9535  }
9536 
9537  /* check if the value is represented as a null keyword */
9538  if (prm_keyword (-1, value, null_words, DIM (null_words)) != NULL)
9539  {
9540  val = NULL;
9541  }
9542  else
9543  {
9544  char *s, *p;
9545  char save;
9546  int list_size, tmp;
9547 
9548  val = (int *) calloc (1024, sizeof (int)); /* max size is 1023 */
9549  if (val == NULL)
9550  {
9551  size_t size = 1024 * sizeof (int);
9553  return PRM_ERR_NO_MEM_FOR_PRM;
9554  }
9555 
9556  list_size = 0;
9557  s = (char *) value;
9558  p = s;
9559 
9560  while (true)
9561  {
9562  if (*s == ',' || *s == '\0')
9563  {
9564  save = *s;
9565  *s = '\0';
9566  if (intl_mbs_casecmp ("default", p) == 0)
9567  {
9569  {
9570  memcpy (&val[list_size + 1], call_stack_dump_error_codes,
9571  sizeof (call_stack_dump_error_codes));
9572  list_size += DIM (call_stack_dump_error_codes);
9573  }
9574  else
9575  {
9576  free_and_init (val);
9577  return PRM_ERR_BAD_VALUE;
9578  }
9579  }
9580  else
9581  {
9582  int result;
9583 
9584  result = parse_int (&tmp, p, 10);
9585  if (result != 0)
9586  {
9587  free_and_init (val);
9588  return PRM_ERR_BAD_VALUE;
9589  }
9590  val[++list_size] = tmp;
9591  }
9592  *s = save;
9593  if (*s == '\0')
9594  {
9595  break;
9596  }
9597  p = s + 1;
9598  }
9599  s++;
9600  }
9601  /* save size in the first position */
9602  val[0] = list_size;
9603  }
9604  new_value->integer_list = val;
9605  break;
9606  }
9607 
9608  case PRM_KEYWORD:
9609  {
9610  /* check if string can be identified as a keyword */
9611  int val;
9612  const KEYVAL *keyvalp = NULL;
9613 
9614  if (set_default)
9615  {
9616  new_value->i = PRM_GET_INT (prm->default_value);
9617  break;
9618  }
9619 
9620  if (intl_mbs_casecmp (prm->name, PRM_NAME_ER_LOG_LEVEL) == 0)
9621  {
9622  keyvalp = prm_keyword (-1, value, er_log_level_words, DIM (er_log_level_words));
9623  }
9624  else if (intl_mbs_casecmp (prm->name, PRM_NAME_LOG_ISOLATION_LEVEL) == 0)
9625  {
9626  keyvalp = prm_keyword (-1, value, isolation_level_words, DIM (isolation_level_words));
9627  }
9629  {
9630  keyvalp =
9631  prm_keyword (-1, value, pgbuf_debug_page_validation_level_words,
9632  DIM (pgbuf_debug_page_validation_level_words));
9633  }
9634  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_MODE) == 0
9636  {
9637  keyvalp = prm_keyword (-1, value, ha_mode_words, DIM (ha_mode_words));
9638  }
9639  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_SERVER_STATE) == 0)
9640  {
9641  keyvalp = prm_keyword (-1, value, ha_server_state_words, DIM (ha_server_state_words));
9642  }
9643  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_LOG_APPLIER_STATE) == 0)
9644  {
9645  keyvalp = prm_keyword (-1, value, ha_log_applier_state_words, DIM (ha_log_applier_state_words));
9646  }
9647  else if (intl_mbs_casecmp (prm->name, PRM_NAME_COMPAT_MODE) == 0)
9648  {
9649  keyvalp = prm_keyword (-1, value, compat_words, DIM (compat_words));
9650  }
9651  else if (intl_mbs_casecmp (prm->name, PRM_NAME_CHECK_PEER_ALIVE) == 0)
9652  {
9653  keyvalp = prm_keyword (-1, value, check_peer_alive_words, DIM (check_peer_alive_words));
9654  }
9655  else if (intl_mbs_casecmp (prm->name, PRM_NAME_QUERY_TRACE_FORMAT) == 0)
9656  {
9657  keyvalp = prm_keyword (-1, value, query_trace_format_words, DIM (query_trace_format_words));
9658  }
9659  else if (intl_mbs_casecmp (prm->name, PRM_NAME_FAULT_INJECTION_TEST) == 0)
9660  {
9661  keyvalp = prm_keyword (-1, value, fi_test_words, DIM (fi_test_words));
9662  }
9663  else if (intl_mbs_casecmp (prm->name, PRM_NAME_HA_REPL_FILTER_TYPE) == 0)
9664  {
9665  keyvalp = prm_keyword (-1, value, ha_repl_filter_type_words, DIM (ha_repl_filter_type_words));
9666  }
9668  {
9669  keyvalp = prm_keyword (-1, value, tde_algorithm_words, DIM (tde_algorithm_words));
9670  }
9671  else
9672  {
9673  assert (false);
9674  }
9675 
9676  if (keyvalp)
9677  {
9678  val = (int) keyvalp->val;
9679  }
9680  else
9681  {
9682  int result;
9683  /* check if string can be converted to an integer */
9684  result = parse_int (&val, value, 10);
9685  if (result != 0)
9686  {
9687  return PRM_ERR_BAD_VALUE;
9688  }
9689  }
9690 
9691  if ((prm->upper_limit && PRM_GET_INT (prm->upper_limit) < val)
9692  || (prm->lower_limit && PRM_GET_INT (prm->lower_limit) > val))
9693  {
9694  return PRM_ERR_BAD_RANGE;
9695  }
9696  new_value->i = val;
9697  }
9698  break;
9699  case PRM_NO_TYPE:
9700  break;
9701 
9702  default:
9703  assert (false);
9704  }
9705 
9706  return ret;
9707 }
9708 
9709 /*
9710  * prm_set () - Set a new value for parameter.
9711  *
9712  * return : SYSPRM_ERR code.
9713  * prm (in) : system parameter that will have its value changed.
9714  * value (in) : new value as string.
9715  * set_flag (in) : updates PRM_SET flag is true.
9716  */
9717 static int
9718 prm_set (SYSPRM_PARAM * prm, const char *value, bool set_flag)
9719 {
9721  SYSPRM_VALUE new_value;
9722 
9723  error = sysprm_generate_new_value (prm, value, false, &new_value);
9724  if (error != PRM_ERR_NO_ERROR)
9725  {
9726  return error;
9727  }
9728 
9729  return sysprm_set_value (prm, new_value, set_flag, false);
9730 }
9731 
9732 /*
9733  * sysprm_set_value () - Set a new value for parameter.
9734  *
9735  * return : SYSPRM_ERR code
9736  * prm (in) : system parameter that will have its value changed.
9737  * value (in) : new values as sysprm_value
9738  * set_flag (in) : updates PRM_SET flag.
9739  * duplicate (in) : duplicate values for data types that need memory
9740  * allocation.
9741  */
9742 static int
9743 sysprm_set_value (SYSPRM_PARAM * prm, SYSPRM_VALUE value, bool set_flag, bool duplicate)
9744 {
9745 #if defined (SERVER_MODE)
9746  PARAM_ID id;
9747  THREAD_ENTRY *thread_p;
9748 #endif
9749  void *tmp_ptr = NULL;
9750 
9751  if (prm == NULL)
9752  {
9753  return PRM_ERR_UNKNOWN_PARAM;
9754  }
9755 
9756  if (duplicate)
9757  {
9758  /* duplicate values for data types that need memory allocation */
9759  switch (prm->datatype)
9760  {
9761  case PRM_STRING:
9762  if (value.str != NULL)
9763  {
9764  tmp_ptr = strdup (value.str);
9765  if (tmp_ptr == NULL)
9766  {
9768  (size_t) (strlen (value.str) + 1));
9769  return PRM_ERR_NO_MEM_FOR_PRM;
9770  }
9771 
9772  value.str = (char *) tmp_ptr;
9773  }
9774  break;
9775 
9776  case PRM_INTEGER_LIST:
9777  if (value.integer_list != NULL)
9778  {
9779  int *integer_list = value.integer_list;
9780  tmp_ptr = (int *) malloc ((integer_list[0] + 1) * sizeof (int));
9781  if (tmp_ptr == NULL)
9782  {
9784  (integer_list[0] + 1) * sizeof (int));
9785  return PRM_ERR_NO_MEM_FOR_PRM;
9786  }
9787 
9788  value.integer_list = (int *) tmp_ptr;
9789  memcpy (value.integer_list, integer_list, (integer_list[0] + 1) * sizeof (int));
9790  }
9791 
9792  default:
9793  break;
9794  }
9795  }
9796 
9797 #if defined (SERVER_MODE)
9799  {
9800  SESSION_PARAM *param;
9801  TZ_REGION *session_tz_region;
9802 
9803  /* update session parameter */
9804  id = sysprm_get_id (prm);
9805  thread_p = thread_get_thread_entry_info ();
9806 
9807  param = session_get_session_parameter (thread_p, id);
9808  if (param == NULL)
9809  {
9810  if (tmp_ptr != NULL)
9811  {
9812  free (tmp_ptr);
9813  }
9814 
9815  return PRM_ERR_UNKNOWN_PARAM;
9816  }
9817 
9818  if (id == PRM_ID_TIMEZONE)
9819  {
9820  session_tz_region = session_get_session_tz_region (thread_p);
9821  if (session_tz_region != NULL)
9822  {
9823  tz_str_to_region (value.str, strlen (value.str), session_tz_region);
9824  }
9825  }
9826 
9827  return sysprm_set_session_parameter_value (param, id, value);
9828  }
9829 
9830  /* if prm is not for session or if session_parameters have not been initialized just set the system parameter stored
9831  * on server */
9832 #endif /* SERVER_MODE */
9833 
9834  sysprm_set_system_parameter_value (prm, value);
9835 
9836  /* Set the cached parsed system timezone region on the server */
9838  {
9839  TZ_REGION tz_region_system;
9840  int err_status = 0;
9841 
9842  err_status = tz_str_to_region (value.str, strlen (value.str), &tz_region_system);
9843  if (err_status != NO_ERROR)
9844  {
9845  return PRM_ERR_BAD_PARAM;
9846  }
9847  tz_set_tz_region_system (&tz_region_system);
9848  }
9849 
9850  /* Set the cached parsed session timezone region on the client */
9851 #if !defined(SERVER_MODE)
9852  if (sysprm_get_id (prm) == PRM_ID_TIMEZONE)
9853  {
9854  int err_status = 0;
9855  err_status = tz_str_to_region (value.str, strlen (value.str), tz_get_client_tz_region_session ());
9856  if (err_status != NO_ERROR)
9857  {
9858  return PRM_ERR_BAD_PARAM;
9859  }
9860  }
9861 #endif
9862 
9863  if (PRM_IS_COMPOUND (prm->static_flag))
9864  {
9865  prm_compound_has_changed (prm, set_flag);
9866  }
9867 
9868  if (set_flag)
9869  {
9870  PRM_SET_BIT (PRM_SET, *prm->dynamic_flag);
9871  /* Indicate that the default value was not used */
9873  }
9874 
9875  return PRM_ERR_NO_ERROR;
9876 }
9877 
9878 /*
9879  * sysprm_set_system_parameter_value () - change a parameter value in prm_Def
9880  * array.
9881  *
9882  * return : void.
9883  * prm (in) : parameter that needs changed.
9884  * value (in) : new value.
9885  */
9886 static void
9888 {
9889  PARAM_ID prm_id = sysprm_get_id (prm);
9890  switch (prm->datatype)
9891  {
9892  case PRM_INTEGER:
9893  case PRM_KEYWORD:
9894  prm_set_integer_value (prm_id, value.i);
9895  break;
9896 
9897  case PRM_FLOAT:
9898  prm_set_float_value (prm_id, value.f);
9899  break;
9900 
9901  case PRM_BOOLEAN:
9902  prm_set_bool_value (prm_id, value.b);
9903  break;
9904 
9905  case PRM_STRING:
9906  prm_set_string_value (prm_id, value.str);
9907  break;
9908 
9909  case PRM_INTEGER_LIST:
9910  prm_set_integer_list_value (prm_id, value.integer_list);
9911  break;
9912 
9913  case PRM_BIGINT:
9914  prm_set_bigint_value (prm_id, value.bi);
9915  break;
9916 
9917  default:
9918  assert_release (0);
9919  break;
9920  }
9921 }
9922 
9923 /*
9924  * prm_compound_has_changed () - update all affected system parameters if prm
9925  * is a compound.
9926  *
9927  * return : error code
9928  * prm (in) : system parameter that has changed
9929  * set_flag (in) : updates PRM_SET flag.
9930  */
9931 static int
9933 {
9935 
9936  if (sysprm_get_id (prm) == PRM_ID_COMPAT_MODE)
9937  {
9938  prm_set_compound (prm, compat_mode_values, DIM (compat_mode_values), set_flag);
9939  }
9940  else
9941  {
9942  assert (false);
9943  }
9944  return NO_ERROR;
9945 }
9946 
9947 
9948 /*
9949  * prm_set_force -
9950  * return: NO_ERROR or error code defined in enum SYSPRM_ERR
9951  * prm(in):
9952  * value(in):
9953  */
9954 static int
9955 prm_set_force (SYSPRM_PARAM * prm, const char *value)
9956 {
9957  if (prm->force_value)
9958  {
9960  }
9961 
9962  prm->force_value = strdup (value);
9963  if (prm->force_value == NULL)
9964  {
9965  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, ER_OUT_OF_VIRTUAL_MEMORY, 1, (size_t) (strlen (value) + 1));
9966  return PRM_ERR_NO_MEM_FOR_PRM;
9967  }
9968 
9969  return NO_ERROR;
9970 }
9971 
9972 /*
9973  * prm_set_default -
9974  * return: NO_ERROR or error code defined in enum SYSPRM_ERR
9975  * prm(in):
9976  */
9977 static int
9979 {
9980 #if defined (SERVER_MODE)
9982  {
9983  PARAM_ID id;
9984  SESSION_PARAM *sprm = NULL;
9986 
9987  id = sysprm_get_id (prm);
9988  sprm = session_get_session_parameter (thread_p, id);
9989  if (sprm == NULL)
9990  {
9991  return PRM_ERR_UNKNOWN_PARAM;
9992  }
9993 
9994  return sysprm_set_session_parameter_default (sprm, id);
9995  }
9996 #endif /* SERVER_MODE */
9997 
9998  if (prm == NULL)
9999  {
10000  return ER_FAILED;
10001  }
10002 
10003  if (PRM_IS_INTEGER (prm) || PRM_IS_KEYWORD (prm))
10004  {
10005  int val, *valp;
10006 
10007  val = PRM_GET_INT (prm->default_value);
10008  valp = (int *) prm->value;
10009  *valp = val;
10010  }
10011  if (PRM_IS_BIGINT (prm))
10012  {
10013  UINT64 val, *valp;
10014 
10015  val = PRM_GET_BIGINT (prm->default_value);
10016  valp = (UINT64 *) prm->value;
10017  *valp = val;
10018  }
10019  else if (PRM_IS_BOOLEAN (prm))
10020  {
10021  bool val, *valp;
10022 
10023  val = PRM_GET_BOOL (prm->default_value);
10024  valp = (bool *) prm->value;
10025  *valp = val;
10026  }
10027  else if (PRM_IS_FLOAT (prm))
10028  {
10029  float val, *valp;
10030 
10031  val = PRM_GET_FLOAT (prm->default_value);
10032  valp = (float *) prm->value;
10033  *valp = val;
10034  }
10035  else if (PRM_IS_STRING (prm))
10036  {
10037  char *val, **valp;
10038 
10039  if (PRM_IS_ALLOCATED (*prm->dynamic_flag))
10040  {
10041  char *str = PRM_GET_STRING (prm->value);
10042  free_and_init (str);
10044  }
10045 
10046  val = *(char **) prm->default_value;
10047  valp = (char **) prm->value;
10048  *valp = val;
10049  }
10050  else if (PRM_IS_INTEGER_LIST (prm))
10051  {
10052  int *val, **valp;
10053 
10054  if (PRM_IS_ALLOCATED (*prm->dynamic_flag))
10055  {
10056  int *int_list = PRM_GET_INTEGER_LIST (prm->value);
10057 
10058  free_and_init (int_list);
10060  }
10061 
10062  val = *(int **) prm->default_value;
10063  valp = (int **) prm->value;
10064  *valp = val;
10065  }
10066 
10067  /* Indicate that the default value was used */
10069 
10071  {
10073  }
10074 
10075  return NO_ERROR;
10076 }
10077 
10078 /*
10079  * prm_find -
10080  * return: NULL or found parameter
10081  * pname(in): parameter name to find
10082  */
10083 static SYSPRM_PARAM *
10084 prm_find (const char *pname, const char *section)
10085 {
10086  unsigned int i;
10087  char *key;
10088  char buf[4096];
10089 
10090  if (pname == NULL)
10091  {
10092  return NULL;
10093  }
10094 
10095  if (section != NULL)
10096  {
10097  snprintf (buf, sizeof (buf) - 1, "%s::%s", section, pname);
10098  key = buf;
10099  }
10100  else
10101  {
10102  key = (char *) pname;
10103  }
10104 
10105  for (i = 0; i < DIM (prm_Def); i++)
10106  {
10107  if (intl_mbs_casecmp (prm_Def[i].name, key) == 0)
10108  {
10109  return &prm_Def[i];
10110  }
10111  }
10112 
10113  return NULL;
10114 }
10115 
10116 /*
10117  * sysprm_set_force -
10118  * return: NO_ERROR or error code
10119  * pname(in): parameter name to set
10120  * pvalue(in): value to be set to the parameter
10121  */
10122 int
10123 sysprm_set_force (const char *pname, const char *pvalue)
10124 {
10125  SYSPRM_PARAM *prm;
10126 
10127  if (pname == NULL || pvalue == NULL)
10128  {
10129  return ER_PRM_BAD_VALUE;
10130  }
10131 
10132  prm = prm_find (pname, NULL);
10133  if (prm == NULL)
10134  {
10135  return ER_PRM_BAD_VALUE;
10136  }
10137 
10138  if (prm_set_force (prm, pvalue) != NO_ERROR)
10139  {
10140  return ER_PRM_CANNOT_CHANGE;
10141  }
10142 
10143  return NO_ERROR;
10144 }
10145 
10146 /*
10147  * sysprm_set_to_default -
10148  * return: NO_ERROR or error code
10149  * pname(in): parameter name to set to default value
10150  */
10151 int
10152 sysprm_set_to_default (const char *pname, bool set_to_force)
10153 {
10154  SYSPRM_PARAM *prm;
10155  char val[LINE_MAX];
10156 
10157  if (pname == NULL)
10158  {
10159  return ER_PRM_BAD_VALUE;
10160  }
10161 
10162  prm = prm_find (pname, NULL);
10163  if (prm == NULL)
10164  {
10165  return ER_PRM_BAD_VALUE;
10166  }
10167 
10168  if (prm_set_default (prm) != NO_ERROR)
10169  {
10170  return ER_PRM_CANNOT_CHANGE;
10171  }
10172 
10173  if (set_to_force)
10174  {
10175  prm_print (prm, val, LINE_MAX, PRM_PRINT_NONE, PRM_PRINT_CURR_VAL);
10176  prm_set_force (prm, val);
10177  }
10178 
10179  return NO_ERROR;
10180 }
10181 
10182 /*
10183  * prm_keyword - Search a keyword within the keyword table
10184  * return: NULL or found keyword
10185  * val(in): keyword value
10186  * name(in): keyword name
10187  * tbl(in): keyword table
10188  * dim(in): size of the table
10189  */
10190 static const KEYVAL *
10191 prm_keyword (int val, const char *name, const KEYVAL * tbl, int dim)
10192 {
10193  int i;
10194 
10195  if (name != NULL)
10196  {
10197  for (i = 0; i < dim; i++)
10198  {
10199  if (intl_mbs_casecmp (name, tbl[i].key) == 0)
10200  {
10201  return &tbl[i];
10202  }
10203  }
10204  }
10205  else
10206  {
10207  for (i = 0; i < dim; i++)
10208  {
10209  if (tbl[i].val == val)
10210  {
10211  return &tbl[i];
10212  }
10213  }
10214  }
10215 
10216  return NULL;
10217 }
10218 
10219 /*
10220  * prm_report_bad_entry -
10221  * return:
10222  * line(in):
10223  * err(in):
10224  * where(in):
10225  */
10226 static void
10227 prm_report_bad_entry (const char *key, int line, int err, const char *where)
10228 {
10229  if (line > 0)
10230  {
10231  fprintf (stderr, PARAM_MSG_FMT (PRM_ERR_BAD_LINE), key, line, where);
10232  }
10233  else if (line == 0)
10234  {
10235  fprintf (stderr, PARAM_MSG_FMT (PRM_ERR_BAD_PARAM), key, line, where);
10236  }
10237  else
10238  {
10239  fprintf (stderr, PARAM_MSG_FMT (PRM_ERR_BAD_ENV_VAR), where);
10240  }
10241 
10242  if (err > 0)
10243  {
10244  switch (err)
10245  {
10246  case PRM_ERR_DEPRICATED:
10248  fprintf (stderr, "%s\n", PARAM_MSG_FMT (err));
10249  break;
10250 
10251  case PRM_ERR_UNKNOWN_PARAM:
10253  fprintf (stderr, "%s\n", PARAM_MSG_FMT (err));
10254  break;
10255 
10256  case PRM_ERR_BAD_VALUE:
10257  case PRM_ERR_BAD_STRING:
10258  case PRM_ERR_BAD_RANGE:
10261  fprintf (stderr, "%s\n", PARAM_MSG_FMT (err));
10262  break;
10263 
10264  default:
10265  break;
10266  }
10267  }
10268  else
10269  {
10270  fprintf (stderr, PARAM_MSG_FMT (PRM_ERR_UNIX_ERROR), strerror (err));
10271  }
10272 
10273  fflush (stderr);
10274 }
10275 
10276 
10277 /*
10278  * sysprm_final - Clean up the storage allocated during parameter parsing
10279  * return: none
10280  */
10281 void
10283 {
10284  SYSPRM_PARAM *prm;
10285  int i;
10286 
10287  for (i = 0; i < NUM_PRM; i++)
10288  {
10289  prm = &prm_Def[i];
10290  if (PRM_IS_ALLOCATED (*prm->dynamic_flag))
10291  {
10292  switch (prm->datatype)
10293  {
10294  case PRM_STRING:
10297  break;
10298 
10299  case PRM_INTEGER_LIST:
10302  break;
10303 
10304  default:
10305  /* do nothing */
10306  break;
10307  }
10308  }
10309 
10310  /* reset all dynamic flags */
10311  *prm->dynamic_flag = 0;
10312  }
10313 
10314  for (i = 0; i < MAX_NUM_OF_PRM_FILES_LOADED; i++)
10315  {
10316  if (prm_Files_loaded[i].conf_path != NULL)
10317  {
10319  }
10320  if (prm_Files_loaded[i].db_name != NULL)
10321  {
10323  }
10324  }
10325 }
10326 
10327 #if defined (SA_MODE) || defined (SERVER_MODE)
10328 static void
10329 init_server_timezone_parameter (void)
10330 {
10331  SYSPRM_PARAM *prm_server_timezone;
10332 
10333  prm_server_timezone = prm_find (PRM_NAME_SERVER_TIMEZONE, NULL);
10334 
10335  if (prm_server_timezone != NULL && !PRM_IS_SET (*prm_server_timezone->dynamic_flag))
10336  {
10337  char timezone_name[TZ_GENERIC_NAME_SIZE + 1];
10338  int ret;
10339 
10340  if (PRM_GET_STRING (prm_server_timezone->value))
10341  {
10342  free_and_init (PRM_GET_STRING (prm_server_timezone->value));
10343  }
10344  PRM_CLEAR_BIT (PRM_ALLOCATED, *prm_server_timezone->dynamic_flag);
10345 
10346  ret = tz_resolve_os_timezone (timezone_name, TZ_GENERIC_NAME_SIZE);
10347  if (ret < 0)
10348  {
10349  if (tz_get_data () != NULL)
10350  {
10351  strcpy (timezone_name, "Asia/Seoul");
10352  }
10353  else
10354  {
10355  /* IANA timezone data not available, just use offset timezone */
10356  strcpy (timezone_name, "+09:00");
10357  }
10358  }
10359  prm_set (prm_server_timezone, timezone_name, true);
10360  }
10361 }
10362 #endif
10363 
10364 /*
10365  * prm_tune_parameters - Sets the values of various system parameters
10366  * depending on the value of other parameters
10367  * return: none
10368  *
10369  * Note: Used for providing a mechanism for tuning various system parameters.
10370  * The parameters are only tuned if the user has not set them
10371  * explictly, this can be ascertained by checking if the default
10372  * value has been used.
10373  */
10374 #if defined (SA_MODE) || defined (SERVER_MODE)
10375 static void
10376 prm_tune_parameters (void)
10377 {
10378  SYSPRM_PARAM *pb_aout_ratio_prm;
10379  SYSPRM_PARAM *max_clients_prm;
10380  SYSPRM_PARAM *max_plan_cache_entries_prm;
10381  SYSPRM_PARAM *query_cache_mode_prm;
10382  SYSPRM_PARAM *max_query_cache_entries_prm;
10383  SYSPRM_PARAM *query_cache_size_in_pages_prm;
10384  SYSPRM_PARAM *ha_mode_prm;
10385  SYSPRM_PARAM *ha_server_state_prm;
10386  SYSPRM_PARAM *auto_restart_server_prm;
10387  SYSPRM_PARAM *log_background_archiving_prm;
10388  SYSPRM_PARAM *ha_node_list_prm;
10389  SYSPRM_PARAM *max_log_archives_prm;
10390  SYSPRM_PARAM *force_remove_log_archives_prm;
10391  SYSPRM_PARAM *call_stack_dump_activation_prm;
10392  SYSPRM_PARAM *fault_injection_ids_prm;
10393  SYSPRM_PARAM *fault_injection_test_prm;
10394  SYSPRM_PARAM *test_mode_prm;
10395  SYSPRM_PARAM *tz_leap_second_support_prm;
10396 
10397  char newval[LINE_MAX];
10398  char host_name[CUB_MAXHOSTNAMELEN];
10399  int max_clients;
10400 
10401  /* Find the parameters that require tuning */
10402  pb_aout_ratio_prm = prm_find (PRM_NAME_PB_AOUT_RATIO, NULL);
10403  max_clients_prm = prm_find (PRM_NAME_CSS_MAX_CLIENTS, NULL);
10404  max_plan_cache_entries_prm = prm_find (PRM_NAME_XASL_CACHE_MAX_ENTRIES, NULL);
10405  query_cache_mode_prm = prm_find (PRM_NAME_LIST_QUERY_CACHE_MODE, NULL);
10406  max_query_cache_entries_prm = prm_find (PRM_NAME_LIST_MAX_QUERY_CACHE_ENTRIES, NULL);
10407  query_cache_size_in_pages_prm = prm_find (PRM_NAME_LIST_MAX_QUERY_CACHE_PAGES, NULL);
10408  test_mode_prm = prm_find (PRM_NAME_TEST_MODE, NULL);
10409  tz_leap_second_support_prm = prm_find (PRM_NAME_TZ_LEAP_SECOND_SUPPORT, NULL);
10410 
10411  /* disable AOUT list until we fix CBRD-20741 */
10412  if (pb_aout_ratio_prm != NULL)
10413  {
10414  prm_set (pb_aout_ratio_prm, "0", false);
10415  }
10416 
10417 
10418 
10419  ha_mode_prm = prm_find (PRM_NAME_HA_MODE, NULL);
10420  ha_server_state_prm = prm_find (PRM_NAME_HA_SERVER_STATE, NULL);
10421  auto_restart_server_prm = prm_find (PRM_NAME_AUTO_RESTART_SERVER, NULL);
10422  log_background_archiving_prm = prm_find (PRM_NAME_LOG_BACKGROUND_ARCHIVING, NULL);
10423  ha_node_list_prm = prm_find (PRM_NAME_HA_NODE_LIST, NULL);
10424  max_log_archives_prm = prm_find (PRM_NAME_LOG_MAX_ARCHIVES, NULL);
10425  force_remove_log_archives_prm = prm_find (PRM_NAME_FORCE_REMOVE_LOG_ARCHIVES, NULL);
10426 
10427  /* Check that max clients has been set */
10428  assert (max_clients_prm != NULL);
10429  if (max_clients_prm == NULL)
10430  {
10431  return;
10432  }
10433 
10434 #if 0
10435  if (!(PRM_IS_SET (*max_clients_prm->dynamic_flag)))
10436  {
10437  if (prm_set_default (max_clients_prm) != PRM_ERR_NO_ERROR)
10438  {
10440  max_clients_prm->name);
10441  assert (0);
10442  return;
10443  }
10444  }
10445  else
10446 #endif
10447  {
10448  max_clients = MIN (prm_css_max_clients_upper, css_get_max_socket_fds ());
10449  if (PRM_GET_INT (max_clients_prm->value) > max_clients)
10450  {
10451  sprintf (newval, "%d", max_clients);
10452  (void) prm_set (max_clients_prm, newval, false);
10453  }
10454  }
10455 
10456  /* check Plan Cache and Query Cache parameters */
10457  assert (max_plan_cache_entries_prm != NULL);
10458  assert (query_cache_mode_prm != NULL);
10459  assert (max_query_cache_entries_prm != NULL);
10460  assert (query_cache_size_in_pages_prm != NULL);
10461 
10462  if (max_plan_cache_entries_prm == NULL || query_cache_mode_prm == NULL || max_query_cache_entries_prm == NULL)
10463  {
10464  return;
10465  }
10466 
10467  if (PRM_GET_INT (max_plan_cache_entries_prm->value) == 0)
10468  {
10469  /* 0 means disable plan cache */
10470  (void) prm_set (max_plan_cache_entries_prm, "-1", false);
10471  }
10472 
10473  if (PRM_GET_INT (max_plan_cache_entries_prm->value) <= 0)
10474  {
10475  /* disable query cache mode by default */
10476  (void) prm_set (max_query_cache_entries_prm, 0, false);
10477  (void) prm_set (query_cache_size_in_pages_prm, 0, false);
10478  }
10479 
10480  /* check HA related parameters */
10481  assert (ha_mode_prm != NULL);
10482  assert (auto_restart_server_prm != NULL);
10483  if (ha_mode_prm == NULL || ha_server_state_prm == NULL || auto_restart_server_prm == NULL)
10484  {
10485  return;
10486  }
10487 
10488 #if defined (SA_MODE) || defined (WINDOWS)
10489  /* we should save original PRM_HA_MODE value before tuning */
10491 
10492  /* reset to default 'active mode' */
10493  (void) prm_set_default (ha_mode_prm);
10494  (void) prm_set (ha_server_state_prm, HA_SERVER_STATE_ACTIVE_STR, false);
10495 
10496  if (force_remove_log_archives_prm != NULL && !PRM_GET_BOOL (force_remove_log_archives_prm->value))
10497  {
10498  (void) prm_set_default (max_log_archives_prm);
10499  }
10500 #else /* SA_MODE || WINDOWS */
10501  if (PRM_GET_INT (ha_mode_prm->value) != HA_MODE_OFF)
10502  {
10503  if (PRM_DEFAULT_VAL_USED (*ha_server_state_prm->dynamic_flag))
10504  {
10505  sprintf (newval, "%s", HA_SERVER_STATE_STANDBY_STR);
10506  prm_set (ha_server_state_prm, newval, false);
10507  }
10508  prm_set (auto_restart_server_prm, "no", false);
10509 
10510  if (PRM_GET_INT (ha_mode_prm->value) == HA_MODE_REPLICA)
10511  {
10512  prm_set (force_remove_log_archives_prm, "yes", false);
10513  }
10514  }
10515  else
10516  {
10517  sprintf (newval, "%s", HA_SERVER_STATE_ACTIVE_STR);
10518  prm_set (ha_server_state_prm, newval, false);
10519 
10520  if (force_remove_log_archives_prm != NULL && !PRM_GET_BOOL (force_remove_log_archives_prm->value))
10521  {
10522  (void) prm_set_default (max_log_archives_prm);
10523  }
10524  }
10525 #endif /* !SA_MODE && !WINDOWS */
10526  /* disable them temporarily */
10527 
10528  if (ha_node_list_prm == NULL || PRM_DEFAULT_VAL_USED (*ha_node_list_prm->dynamic_flag))
10529  {
10530  if (GETHOSTNAME (host_name, sizeof (host_name)))
10531  {
10532  strncpy (host_name, "localhost", sizeof (host_name) - 1);
10533  }
10534 
10535  snprintf (newval, sizeof (newval) - 1, "%s@%s", host_name, host_name);
10536  prm_set (ha_node_list_prm, newval, false);
10537  }
10538 
10539  call_stack_dump_activation_prm = GET_PRM (PRM_ID_CALL_STACK_DUMP_ACTIVATION);
10540  if (!PRM_IS_SET (*call_stack_dump_activation_prm->dynamic_flag))
10541  {
10542  int dim;
10543  int *integer_list = NULL;
10544 
10545  if (PRM_IS_ALLOCATED (*call_stack_dump_activation_prm->dynamic_flag))
10546  {
10547  free_and_init (PRM_GET_INTEGER_LIST (call_stack_dump_activation_prm->value));
10548  }
10549 
10550  dim = DIM (call_stack_dump_error_codes);
10551  integer_list = (int *) malloc ((dim + 1) * sizeof (int));
10552  if (integer_list == NULL)
10553  {
10554  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, ER_OUT_OF_VIRTUAL_MEMORY, 1, (dim + 1) * sizeof (int));
10555  return;
10556  }
10557 
10558  integer_list[0] = dim;
10559  memcpy (&integer_list[1], call_stack_dump_error_codes, dim * sizeof (int));
10561  PRM_SET_BIT (PRM_SET, *call_stack_dump_activation_prm->dynamic_flag);
10562  PRM_CLEAR_BIT (PRM_DEFAULT_USED, *call_stack_dump_activation_prm->dynamic_flag);
10563  }
10564 
10565 #if !defined(NDEBUG)
10566  fault_injection_ids_prm = GET_PRM (PRM_ID_FAULT_INJECTION_IDS);
10567  fault_injection_test_prm = GET_PRM (PRM_ID_FAULT_INJECTION_TEST);
10568  if (PRM_IS_SET (*fault_injection_test_prm->dynamic_flag))
10569  {
10570  int group_code;
10571  int dim;
10572  int *integer_list = NULL;
10573 
10574  group_code = PRM_GET_INT (fault_injection_test_prm->value);
10575 
10576  if (PRM_IS_ALLOCATED (*fault_injection_ids_prm->dynamic_flag))
10577  {
10578  free_and_init (PRM_GET_INTEGER_LIST (fault_injection_ids_prm->value));
10579  }
10580 
10581  for (dim = 0; fi_Groups[group_code][dim] != FI_TEST_NONE; dim++)
10582  {
10583  ;
10584  }
10585 
10586  integer_list = (int *) malloc ((dim + 1) * sizeof (int));
10587  if (integer_list == NULL)
10588  {
10589  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, ER_OUT_OF_VIRTUAL_MEMORY, 1, (dim + 1) * sizeof (int));
10590  return;
10591  }
10592 
10593  integer_list[0] = dim;
10594  memcpy (&integer_list[1], fi_Groups[group_code], dim * sizeof (int));
10596  PRM_SET_BIT (PRM_SET, *fault_injection_ids_prm->dynamic_flag);
10597  PRM_CLEAR_BIT (PRM_DEFAULT_USED, *fault_injection_ids_prm->dynamic_flag);
10598  }
10599 #endif
10600 
10601  if (PRM_GET_BOOL (test_mode_prm->value) == true)
10602  {
10603  tz_leap_second_support_prm->static_flag |= PRM_FOR_QRY_STRING;
10604  }
10605 
10606  return;
10607 }
10608 #else /* SA_MODE || SERVER_MODE */
10609 static void
10611 {
10612  SYSPRM_PARAM *max_plan_cache_entries_prm;
10613  SYSPRM_PARAM *ha_node_list_prm;
10614  SYSPRM_PARAM *ha_mode_prm;
10615  SYSPRM_PARAM *ha_process_dereg_confirm_interval_in_msecs_prm;
10616  SYSPRM_PARAM *ha_max_process_dereg_confirm_prm;
10617  SYSPRM_PARAM *shutdown_wait_time_in_secs_prm;
10618  SYSPRM_PARAM *ha_copy_log_timeout_prm;
10619  SYSPRM_PARAM *ha_check_disk_failure_interval_prm;
10620  SYSPRM_PARAM *test_mode_prm;
10621  SYSPRM_PARAM *tz_leap_second_support_prm;
10622 
10623  char newval[LINE_MAX];
10624  char host_name[CUB_MAXHOSTNAMELEN];
10625 
10626  /* Find the parameters that require tuning */
10627  max_plan_cache_entries_prm = prm_find (PRM_NAME_XASL_CACHE_MAX_ENTRIES, NULL);
10628  ha_node_list_prm = prm_find (PRM_NAME_HA_NODE_LIST, NULL);
10629 
10630  ha_mode_prm = prm_find (PRM_NAME_HA_MODE, NULL);
10631  ha_process_dereg_confirm_interval_in_msecs_prm = prm_find (PRM_NAME_HA_PROCESS_DEREG_CONFIRM_INTERVAL_IN_MSECS, NULL);
10632  ha_max_process_dereg_confirm_prm = prm_find (PRM_NAME_HA_MAX_PROCESS_DEREG_CONFIRM, NULL);
10633  shutdown_wait_time_in_secs_prm = prm_find (PRM_NAME_SHUTDOWN_WAIT_TIME_IN_SECS, NULL);
10634  ha_copy_log_timeout_prm = prm_find (PRM_NAME_HA_COPY_LOG_TIMEOUT, NULL);
10635  ha_check_disk_failure_interval_prm = prm_find (PRM_NAME_HA_CHECK_DISK_FAILURE_INTERVAL_IN_SECS, NULL);
10636  test_mode_prm = prm_find (PRM_NAME_TEST_MODE, NULL);
10637  tz_leap_second_support_prm = prm_find (PRM_NAME_TZ_LEAP_SECOND_SUPPORT, NULL);
10638 
10639  assert (max_plan_cache_entries_prm != NULL);
10640  if (max_plan_cache_entries_prm == NULL)
10641  {
10642  return;
10643  }
10644 
10645  /* check Plan Cache and Query Cache parameters */
10646  if (PRM_GET_INT (max_plan_cache_entries_prm->value) == 0)
10647  {
10648  /* 0 means disable plan cache */
10649  (void) prm_set (max_plan_cache_entries_prm, "-1", false);
10650  }
10651 
10652 #if defined (WINDOWS)
10653  /* reset to default 'active mode' */
10654  (void) prm_set_default (ha_mode_prm);
10655 #endif
10656 
10657  if (PRM_GET_INT (ha_mode_prm->value) != HA_MODE_OFF)
10658  {
10659  int ha_check_disk_failure_interval_value;
10660  int ha_copy_log_timeout_value;
10661 
10662  ha_check_disk_failure_interval_value = PRM_GET_INT (ha_check_disk_failure_interval_prm->value);
10663  ha_copy_log_timeout_value = PRM_GET_INT (ha_copy_log_timeout_prm->value);
10664  if (ha_copy_log_timeout_value == -1)
10665  {
10666  prm_set (ha_check_disk_failure_interval_prm, "0", false);
10667  }
10668  else if (ha_check_disk_failure_interval_value - ha_copy_log_timeout_value <
10670  {
10671  ha_check_disk_failure_interval_value =
10672  ha_copy_log_timeout_value + HB_MIN_DIFF_CHECK_DISK_FAILURE_INTERVAL_IN_SECS;
10673  sprintf (newval, "%ds", ha_check_disk_failure_interval_value);
10674  prm_set (ha_check_disk_failure_interval_prm, newval, false);
10675  }
10676  }
10677 
10678  /* disable them temporarily */
10679 
10680  if (ha_node_list_prm == NULL || PRM_DEFAULT_VAL_USED (*ha_node_list_prm->dynamic_flag))
10681  {
10682  if (GETHOSTNAME (host_name, sizeof (host_name)))
10683  {
10684  strncpy (host_name, "localhost", sizeof (host_name) - 1);
10685  }
10686 
10687  snprintf (newval, sizeof (newval) - 1, "%s@%s", host_name, host_name);
10688  prm_set (ha_node_list_prm, newval, false);
10689  }
10690 
10691  assert (ha_mode_prm != NULL);
10692 
10693  if (PRM_GET_BOOL (test_mode_prm->value) == true)
10694  {
10695  tz_leap_second_support_prm->static_flag |= PRM_FOR_QRY_STRING;
10696  }
10697 
10698  return;
10699 }
10700 #endif /* CS_MODE */
10701 
10702 #if defined (CS_MODE)
10703 /*
10704  * sysprm_tune_client_parameters () - Synchronize system parameters marked
10705  * with PRM_FORCE_SERVER flag with server.
10706  *
10707  * return : void.
10708  */
10709 void
10711 {
10712  SYSPRM_ASSIGN_VALUE *force_server_values = NULL;
10713 
10714  /* get values from server */
10715  if (sysprm_get_force_server_parameters (&force_server_values) == NO_ERROR && force_server_values != NULL)
10716  {
10717  /* update system parameters on client */
10718  sysprm_change_parameter_values (force_server_values, false, true);
10719  }
10720 
10721  /* free list of assign_values */
10722  sysprm_free_assign_values (&force_server_values);
10723 }
10724 #endif /* CS_MODE */
10725 
10726 int
10728 {
10729  return PRM_TCP_PORT_ID;
10730 }
10731 
10732 bool
10734 {
10735  return PRM_COMMIT_ON_SHUTDOWN;
10736 }
10737 
10738 /*
10739  * prm_set_compound - Sets the values of various system parameters based on
10740  * the value of a "compound" parameter.
10741  * return: none
10742  * param(in): the compound parameter whose value has changed
10743  * compound_param_values(in): an array of arrays that indicate the name of
10744  * the parameter to change and its new value.
10745  * NULL indicates resetting the parameter to its
10746  * default. The name of the parameter is the last
10747  * element of the array, 1 past the upper limit
10748  * of the compound parameter.
10749  * values_count(in): the number of elements in the compound_param_values
10750  * array
10751  */
10752 static void
10753 prm_set_compound (SYSPRM_PARAM * param, const char **compound_param_values[], const int values_count, bool set_flag)
10754 {
10755  int i = 0;
10756  const int param_value = *(int *) param->value;
10757  const int param_upper_limit = *(int *) param->upper_limit;
10758 
10759  assert (PRM_IS_INTEGER (param) || PRM_IS_KEYWORD (param));
10760  assert (0 == *(int *) param->lower_limit);
10761  assert (param_value <= param_upper_limit);
10762 
10763  for (i = 0; i < values_count; ++i)
10764  {
10765  const char *compound_param_name = compound_param_values[i][param_upper_limit + 1];
10766  const char *compound_param_value = compound_param_values[i][param_value];
10767 
10768  assert (compound_param_name != NULL);
10769 
10770  if (compound_param_value == NULL)
10771  {
10772  prm_set_default (prm_find (compound_param_name, NULL));
10773  }
10774  else
10775  {
10776  prm_set (prm_find (compound_param_name, NULL), compound_param_value, set_flag);
10777  }
10778  }
10779 }
10780 
10781 /*
10782  * prm_get_next_param_value - get next param=value token from a string
10783  * containing a "param1=val1;param2=val2..." list
10784  * return: NO_ERROR or error code if data format is incorrect
10785  * data (in): the string containing the list
10786  * prm (out): parameter name
10787  * val (out): parameter value
10788  */
10789 static int
10790 prm_get_next_param_value (char **data, char **prm, char **val)
10791 {
10792  char *p = *data;
10793  char *name = NULL;
10794  char *value = NULL;
10795  int err = PRM_ERR_NO_ERROR;
10796 
10797  while (char_isspace (*p))
10798  {
10799  p++;
10800  }
10801 
10802  if (*p == '\0')
10803  {
10804  /* reached the end of the list */
10805  err = PRM_ERR_NO_ERROR;
10806  goto cleanup;
10807  }
10808 
10809  name = p;
10810  while (*p && !char_isspace (*p) && *p != '=')
10811  {
10812  p++;
10813  }
10814 
10815  if (*p == '\0')
10816  {
10817  err = PRM_ERR_BAD_VALUE;
10818  goto cleanup;
10819  }
10820  else if (*p == '=')
10821  {
10822  *p++ = '\0';
10823  }
10824  else
10825  {
10826  *p++ = '\0';
10827  while (char_isspace (*p))
10828  {
10829  p++;
10830  }
10831  if (*p == '=')
10832  {
10833  p++;
10834  }
10835  }
10836 
10837  while (char_isspace (*p))
10838  {
10839  p++;
10840  }
10841  if (*p == '\0')
10842  {
10843  err = PRM_ERR_NO_ERROR;
10844  goto cleanup;
10845  }
10846 
10847  value = p;
10848 
10849  if (*p == '"' || *p == '\'')
10850  {
10851  char *t, delim;
10852 
10853  delim = *p++;
10854  value = t = p;
10855  while (*t && *t != delim)
10856  {
10857  if (*t == '\\')
10858  {
10859  t++;
10860  }
10861  *p++ = *t++;
10862  }
10863  if (*t != delim)
10864  {
10865  err = PRM_ERR_BAD_STRING;
10866  goto cleanup;
10867  }
10868  }
10869  else
10870  {
10871  while (*p && !char_isspace (*p) && *p != ';')
10872  {
10873  p++;
10874  }
10875  }
10876 
10877  if (*p)
10878  {
10879  *p++ = '\0';
10880  while (char_isspace (*p))
10881  {
10882  p++;
10883  }
10884  if (*p == ';')
10885  {
10886  p++;
10887  }
10888  }
10889 
10890  *data = p;
10891  *val = value;
10892  *prm = name;
10893 
10894  return err;
10895 
10896 cleanup:
10897  *prm = NULL;
10898  *val = NULL;
10899  *data = NULL;
10900 
10901  return err;
10902 }
10903 
10904 /*
10905  * prm_get_name () - returns the name of a parameter
10906  *
10907  * return : parameter name
10908  * prm_id (in) : parameter id
10909  */
10910 const char *
10912 {
10913  assert (prm_id <= PRM_LAST_ID);
10914 
10915  return prm_Def[prm_id].name;
10916 }
10917 
10918 /*
10919  * prm_get_value () - returns a pointer to the value of a system parameter
10920  *
10921  * return : pointer to value
10922  * prm_id (in) : parameter id
10923  *
10924  * NOTE: for session parameters, in server mode, the value stored in
10925  * conn_entry->session_parameters is returned instead of the value
10926  * from prm_Def array.
10927  */
10928 void *
10930 {
10931 #if defined (SERVER_MODE)
10932  THREAD_ENTRY *thread_p;
10933 
10934  assert (prm_id <= PRM_LAST_ID);
10935 
10936  if (PRM_SERVER_SESSION (prm_id) && BO_IS_SERVER_RESTARTED ())
10937  {
10938  SESSION_PARAM *sprm;
10939  thread_p = thread_get_thread_entry_info ();
10940  sprm = session_get_session_parameter (thread_p, prm_id);
10941  if (sprm)
10942  {
10943  return &(sprm->value);
10944  }
10945  }
10946 
10947  return prm_Def[prm_id].value;
10948 #else /* SERVER_MODE */
10949  assert (prm_id <= PRM_LAST_ID);
10950 
10951  return prm_Def[prm_id].value;
10952 #endif /* SERVER_MODE */
10953 }
10954 
10955 /*
10956  * prm_get_integer_value () - get the value of a parameter of type integer
10957  *
10958  * return : value
10959  * prm_id (in) : parameter id
10960  *
10961  * NOTE: keywords are stored as integers
10962  */
10963 int
10965 {
10966  assert (prm_id <= PRM_LAST_ID);
10967  assert (PRM_IS_INTEGER (&prm_Def[prm_id]) || PRM_IS_KEYWORD (&prm_Def[prm_id]));
10968 
10969  return PRM_GET_INT (prm_get_value (prm_id));
10970 }
10971 
10972 /*
10973  * prm_get_bool_value () - get the value of a parameter of type bool
10974  *
10975  * return : value
10976  * prm_id (in) : parameter id
10977  */
10978 bool
10980 {
10981  assert (prm_id <= PRM_LAST_ID);
10982  assert (PRM_IS_BOOLEAN (&prm_Def[prm_id]));
10983 
10984  return PRM_GET_BOOL (prm_get_value (prm_id));
10985 }
10986 
10987 /*
10988  * prm_get_float_value () - get the value of a parameter of type float
10989  *
10990  * return : value
10991  * prm_id (in) : parameter id
10992  */
10993 float
10995 {
10996  assert (prm_id <= PRM_LAST_ID);
10997  assert (PRM_IS_FLOAT (&prm_Def[prm_id]));
10998 
10999  return PRM_GET_FLOAT (prm_get_value (prm_id));
11000 }
11001 
11002 /*
11003  * prm_get_string_value () - get the value of a parameter of type string
11004  *
11005  * return : value
11006  * prm_id (in) : parameter id
11007  */
11008 char *
11010 {
11011  assert (prm_id <= PRM_LAST_ID);
11012  assert (PRM_IS_STRING (&prm_Def[prm_id]));
11013 
11014  return PRM_GET_STRING (prm_get_value (prm_id));
11015 }
11016 
11017 /*
11018  * prm_get_integer_list_value () - get the value of a parameter of type
11019  * integer list
11020  *
11021  * return : value
11022  * prm_id (in) : parameter id
11023  */
11024 int *
11026 {
11027  assert (prm_id <= PRM_LAST_ID);
11028  assert (PRM_IS_INTEGER_LIST (&prm_Def[prm_id]));
11029 
11030  return PRM_GET_INTEGER_LIST (prm_get_value (prm_id));
11031 }
11032 
11033 /*
11034  * prm_get_bigint_value () - get the value of a parameter of type size
11035  *
11036  * return : value
11037  * prm_id (in) : parameter id
11038  */
11039 UINT64
11041 {
11042  assert (prm_id <= PRM_LAST_ID);
11043  assert (PRM_IS_BIGINT (&prm_Def[prm_id]));
11044 
11045  return PRM_GET_BIGINT (prm_get_value (prm_id));
11046 }
11047 
11048 /*
11049  * prm_set_integer_value () - set a new value to a parameter of type integer
11050  *
11051  * return : void
11052  * prm_id (in) : parameter id
11053  * value (in) : new value
11054  *
11055  * NOTE: keywords are stored as integers
11056  */
11057 void
11059 {
11060  assert (prm_id <= PRM_LAST_ID);
11061  assert (PRM_IS_INTEGER (&prm_Def[prm_id]) || PRM_IS_KEYWORD (&prm_Def[prm_id]));
11062 
11063  PRM_GET_INT (prm_Def[prm_id].value) = value;
11064 
11065  sysprm_update_flag_different (&prm_Def[prm_id]);
11066 }
11067 
11068 /*
11069  * prm_set_bool_value () - set a new value to a parameter of type bool
11070  *
11071  * return : void
11072  * prm_id (in) : parameter id
11073  * value (in) : new value
11074  */
11075 void
11077 {
11078  assert (prm_id <= PRM_LAST_ID);
11079  assert (PRM_IS_BOOLEAN (&prm_Def[prm_id]));
11080 
11081  PRM_GET_BOOL (prm_Def[prm_id].value) = value;
11082 
11083  sysprm_update_flag_different (&prm_Def[prm_id]);
11084 }
11085 
11086 /*
11087  * prm_set_float_value () - set a new value to a parameter of type float
11088  *
11089  * return : void
11090  * prm_id (in) : parameter id
11091  * value (in) : new value
11092  */
11093 void
11095 {
11096  assert (prm_id <= PRM_LAST_ID);
11097  assert (PRM_IS_FLOAT (&prm_Def[prm_id]));
11098 
11099  PRM_GET_FLOAT (prm_Def[prm_id].value) = value;
11100 
11101  sysprm_update_flag_different (&prm_Def[prm_id]);
11102 }
11103 
11104 /*
11105  * prm_set_string_value () - set a new value to a parameter of type string
11106  *
11107  * return : void
11108  * prm_id (in) : parameter id
11109  * value (in) : new value
11110  */
11111 void
11113 {
11114  assert (prm_id <= PRM_LAST_ID);
11115  assert (PRM_IS_STRING (&prm_Def[prm_id]));
11116 
11117  if (PRM_IS_ALLOCATED (*prm_Def[prm_id].dynamic_flag))
11118  {
11119  free_and_init (PRM_GET_STRING (prm_Def[prm_id].value));
11120  PRM_CLEAR_BIT (PRM_ALLOCATED, *prm_Def[prm_id].dynamic_flag);
11121  }
11122  PRM_GET_STRING (prm_Def[prm_id].value) = value;
11123  if (PRM_GET_STRING (prm_Def[prm_id].value) != NULL)
11124  {
11125  PRM_SET_BIT (PRM_ALLOCATED, *prm_Def[prm_id].dynamic_flag);
11126  }
11127 
11128  sysprm_update_flag_different (&prm_Def[prm_id]);
11129 }
11130 
11131 /*
11132  * prm_set_integer_list_value () - set a new value to a parameter of type
11133  * integer list
11134  *
11135  * return : void
11136  * prm_id (in) : parameter id
11137  * value (in) : new value
11138  */
11139 void
11141 {
11142  assert (prm_id <= PRM_LAST_ID);
11143  assert (PRM_IS_INTEGER_LIST (&prm_Def[prm_id]));
11144 
11145  if (PRM_IS_ALLOCATED (*prm_Def[prm_id].dynamic_flag))
11146  {
11147  free_and_init (PRM_GET_INTEGER_LIST (prm_Def[prm_id].value));
11148  PRM_CLEAR_BIT (PRM_ALLOCATED, *prm_Def[prm_id].dynamic_flag);
11149  }
11150  PRM_GET_INTEGER_LIST (prm_Def[prm_id].value) = value;
11151  if (PRM_GET_INTEGER_LIST (prm_Def[prm_id].value) != NULL)
11152  {
11153  PRM_SET_BIT (PRM_ALLOCATED, *prm_Def[prm_id].dynamic_flag);
11154  }
11155 
11156  sysprm_update_flag_different (&prm_Def[prm_id]);
11157 }
11158 
11159 /*
11160  * prm_set_bigint_value () - set a new value to a parameter of type size
11161  *
11162  * return : void
11163  * prm_id (in) : parameter id
11164  * value (in) : new value
11165  */
11166 void
11168 {
11169  assert (prm_id <= PRM_LAST_ID);
11170  assert (PRM_IS_BIGINT (&prm_Def[prm_id]));
11171 
11172  PRM_GET_BIGINT (prm_Def[prm_id].value) = value;
11173 
11174  sysprm_update_flag_different (&prm_Def[prm_id]);
11175 }
11176 
11177 /*
11178  * sysprm_find_err_in_integer_list () - function that searches a error_code in an
11179  * integer list
11180  *
11181  * return : true if error_code is found, false otherwise
11182  * prm_id (in) : id of the system parameter that contains an integer list
11183  * error_code (in) : error_code to look for
11184  */
11185 bool
11187 {
11188  int i;
11189  int *integer_list = prm_get_integer_list_value (prm_id);
11190 
11191  if (integer_list == NULL)
11192  {
11193  return false;
11194  }
11195 
11196  for (i = 1; i <= integer_list[0]; i++)
11197  {
11198  if (integer_list[i] == error_code || integer_list[i] == -error_code)
11199  {
11200  return true;
11201  }
11202  }
11203  return false;
11204 }
11205 
11206 /*
11207  * sysprm_find_fi_code_in_integer_list () - function that searches a FI_TEST_CODE in an
11208  * integer list
11209  *
11210  * return : true if FI_TEST_CODE is found, false otherwise
11211  * prm_id (in) : id of the system parameter that contains an integer list
11212  * fi_code (in) : FI_TEST_CODE to look for
11213  */
11214 bool
11216 {
11217  int i;
11218  int *integer_list = prm_get_integer_list_value (prm_id);
11219 
11220  if (integer_list == NULL)
11221  {
11222  return false;
11223  }
11224 
11225  for (i = 1; i <= integer_list[0]; i++)
11226  {
11227  if (integer_list[i] == fi_code)
11228  {
11229  return true;
11230  }
11231  }
11232  return false;
11233 }
11234 
11235 /*
11236  * sysprm_update_flag_different () - updates the PRM_DIFFERENT bit in flag.
11237  *
11238  * return : void
11239  * prm (in) : system parameter to update
11240  *
11241  * NOTE: Should be called whenever a system parameter changes value.
11242  * This only affects parameters on client (there is no use for this flag
11243  * on server side) that are also flagged with PRM_FOR_QRY_STRING.
11244  */
11245 static void
11247 {
11248 #if defined (CS_MODE)
11250  {
11251  /* nothing to do */
11252  return;
11253  }
11254 
11255  /* compare current value with default value and update PRM_DIFFERENT bit */
11256  if (sysprm_compare_values (prm->value, prm->default_value, prm->datatype) != 0)
11257  {
11259  }
11260  else
11261  {
11263  }
11264 #endif /* CS_MODE */
11265 }
11266 
11267 /*
11268  * sysprm_update_flag_allocated () - update PRM_ALLOCATED flag. If value is
11269  * NULL, the bit is cleared, if not, the bit
11270  * is set.
11271  *
11272  * return : void.
11273  * prm (in) : system parameter.
11274  */
11275 static void
11277 {
11278  bool allocated;
11279  switch (prm->datatype)
11280  {
11281  case PRM_STRING:
11282  allocated = PRM_GET_STRING (prm->value) != NULL;
11283  break;
11284 
11285  case PRM_INTEGER_LIST:
11286  allocated = PRM_GET_INTEGER_LIST (prm->value) != NULL;
11287  break;
11288 
11289  default:
11290  allocated = false;
11291  break;
11292  }
11293 
11294  if (allocated)
11295  {
11297  }
11298  else
11299  {
11301  }
11302 }
11303 
11304 /*
11305  * sysprm_update_session_prm_flag_allocated () - update PRM_ALLOCATED flag for
11306  * session parameters. If the
11307  * value is null, the bit is
11308  * cleared, if not, the bit is
11309  * set.
11310  *
11311  * return : void
11312  * prm (in) : session parameter
11313  */
11314 static void
11316 {
11317  bool allocated;
11318  switch (prm->datatype)
11319  {
11320  case PRM_STRING:
11321  allocated = prm->value.str != NULL;
11322  break;
11323 
11324  case PRM_INTEGER_LIST:
11325  allocated = prm->value.integer_list != NULL;
11326  break;
11327 
11328  default:
11329  allocated = false;
11330  break;
11331  }
11332 
11333  if (allocated)
11334  {
11335  PRM_SET_BIT (PRM_ALLOCATED, prm->flag);
11336  }
11337  else
11338  {
11340  }
11341 }
11342 
11343 /*
11344  * sysprm_clear_sysprm_value () - Clears a SYSPRM_VALUE.
11345  *
11346  * return : void.
11347  * value (in) : value that needs cleared.
11348  * datatype (in) : data type for value.
11349  */
11350 static void
11352 {
11353  switch (datatype)
11354  {
11355  case PRM_STRING:
11356  free_and_init (value->str);
11357  break;
11358 
11359  case PRM_INTEGER_LIST:
11360  free_and_init (value->integer_list);
11361  break;
11362 
11363  default:
11364  /* do nothing */
11365  break;
11366  }
11367 }
11368 
11369 /*
11370  * sysprm_alloc_session_parameters () - allocates memory for session
11371  * parameters array
11372  *
11373  * return : NULL or pointer to array of session parameters
11374  */
11375 static SESSION_PARAM *
11377 {
11378  SESSION_PARAM *result = NULL;
11379  size_t size;
11380 
11381  if (NUM_SESSION_PRM == 0)
11382  {
11383  return NULL;
11384  }
11385  size = NUM_SESSION_PRM * sizeof (SESSION_PARAM);
11386  result = (SESSION_PARAM *) malloc (size);
11387  if (result == NULL)
11388  {
11390  return NULL;
11391  }
11392  memset (result, 0, size);
11393  return result;
11394 }
11395 
11396 /*
11397  * sysprm_free_session_parameters () - free session parameter array
11398  *
11399  * return : void
11400  * session_parameters_ptr (in) : pointer to session parameter array
11401  */
11402 void
11404 {
11405  int i = 0;
11406  SESSION_PARAM *sprm = NULL;
11407 
11408  assert (session_parameters_ptr != NULL);
11409 
11410  if (*session_parameters_ptr == NULL)
11411  {
11412  return;
11413  }
11414 
11415  for (i = 0; i < NUM_SESSION_PRM; i++)
11416  {
11417  sprm = &((*session_parameters_ptr)[i]);
11419  }
11420 
11421  free_and_init (*session_parameters_ptr);
11422 }
11423 
11424 /*
11425  * sysprm_pack_sysprm_value () - Packs a sysprm_value.
11426  *
11427  * return : pointer after the packed value.
11428  * ptr (in) : pointer to position where the value should be packed.
11429  * value (in) : sysprm_value to be packed.
11430  * datatype (in) : value data type.
11431  */
11432 static char *
11434 {
11435  if (ptr == NULL)
11436  {
11437  return NULL;
11438  }
11439 
11440  ASSERT_ALIGN (ptr, INT_ALIGNMENT);
11441 
11442  switch (datatype)
11443  {
11444  case PRM_INTEGER:
11445  case PRM_KEYWORD:
11446  ptr = or_pack_int (ptr, value.i);
11447  break;
11448 
11449  case PRM_BOOLEAN:
11450  ptr = or_pack_int (ptr, value.b);
11451  break;
11452 
11453  case PRM_FLOAT:
11454  ptr = or_pack_float (ptr, value.f);
11455  break;
11456 
11457  case PRM_STRING:
11458  ptr = or_pack_string (ptr, value.str);
11459  break;
11460 
11461  case PRM_INTEGER_LIST:
11462  if (value.integer_list != NULL)
11463  {
11464  int i;
11465  ptr = or_pack_int (ptr, value.integer_list[0]);
11466  for (i = 1; i <= value.integer_list[0]; i++)
11467  {
11468  ptr = or_pack_int (ptr, value.integer_list[i]);
11469  }
11470  }
11471  else
11472  {
11473  ptr = or_pack_int (ptr, -1);
11474  }
11475  break;
11476 
11477  case PRM_BIGINT:
11478  ptr = or_pack_int64 (ptr, value.bi);
11479  break;
11480  default:
11481  assert_release (0);
11482  break;
11483  }
11484 
11485  return ptr;
11486 }
11487 
11488 /*
11489  * sysprm_packed_sysprm_value_length () - size of packed sysprm_value.
11490  *
11491  * return : size of packed sysprm_value.
11492  * value (in) : sysprm_value.
11493  * datatype (in) : value data type.
11494  * offset (in) : offset to pointer where sysprm_value will be packed
11495  * (required for PRM_BIGINT data type)
11496  */
11497 static int
11499 {
11500  switch (datatype)
11501  {
11502  case PRM_INTEGER:
11503  case PRM_KEYWORD:
11504  case PRM_BOOLEAN:
11505  return OR_INT_SIZE;
11506 
11507  case PRM_FLOAT:
11508  return OR_FLOAT_SIZE;
11509 
11510  case PRM_STRING:
11511  return or_packed_string_length (value.str, NULL);
11512 
11513  case PRM_INTEGER_LIST:
11514  if (value.integer_list != NULL)
11515  {
11516  return OR_INT_SIZE * (value.integer_list[0] + 1);
11517  }
11518  else
11519  {
11520  return OR_INT_SIZE;
11521  }
11522 
11523  case PRM_BIGINT:
11524  /* pointer will be aligned to MAX_ALIGNMENT */
11525  return DB_ALIGN (offset, MAX_ALIGNMENT) - offset + OR_INT64_SIZE;
11526 
11527  default:
11528  return 0;
11529  }
11530 }
11531 
11532 /*
11533  * sysprm_unpack_sysprm_value () - unpacks a sysprm_value.
11534  *
11535  * return : pointer after the unpacked sysprm_value.
11536  * ptr (in) : pointer to the position where sysprm_value is packed.
11537  * value (out) : pointer to unpacked sysprm_value.
11538  * datatype (in) : value data type.
11539  */
11540 static char *
11542 {
11543  assert (value != NULL);
11544 
11545  if (ptr == NULL)
11546  {
11547  return NULL;
11548  }
11549 
11550  ASSERT_ALIGN (ptr, INT_ALIGNMENT);
11551 
11552  switch (datatype)
11553  {
11554  case PRM_INTEGER:
11555  case PRM_KEYWORD:
11556  ptr = or_unpack_int (ptr, &value->i);
11557  break;
11558 
11559  case PRM_BOOLEAN:
11560  {
11561  int temp;
11562  ptr = or_unpack_int (ptr, &temp);
11563  value->b = temp;
11564  }
11565  break;
11566 
11567  case PRM_FLOAT:
11568  ptr = or_unpack_float (ptr, &value->f);
11569  break;
11570 
11571  case PRM_STRING:
11572  {
11573  char *str = NULL;
11574  ptr = or_unpack_string_nocopy (ptr, &str);
11575  if (str != NULL)
11576  {
11577  value->str = strdup (str);
11578  if (value->str == NULL)
11579  {
11581  return NULL;
11582  }
11583  }
11584  else
11585  {
11586  value->str = NULL;
11587  }
11588  }
11589  break;
11590 
11591  case PRM_INTEGER_LIST:
11592  {
11593  int temp, i;
11594  ptr = or_unpack_int (ptr, &temp);
11595  if (temp == -1)
11596  {
11597  value->integer_list = NULL;
11598  }
11599  else
11600  {
11601  value->integer_list = (int *) malloc ((temp + 1) * OR_INT_SIZE);
11602  if (value->integer_list == NULL)
11603  {
11605  (size_t) ((temp + 1) * OR_INT_SIZE));
11606  return NULL;
11607  }
11608  else
11609  {
11610  value->integer_list[0] = temp;
11611  for (i = 1; i <= temp; i++)
11612  {
11613  ptr = or_unpack_int (ptr, &value->integer_list[i]);
11614  }
11615  }
11616  }
11617  }
11618  break;
11619 
11620  case PRM_BIGINT:
11621  {
11622  INT64 size;
11623  ptr = or_unpack_int64 (ptr, &size);
11624  value->bi = (UINT64) size;
11625  }
11626  break;
11627 
11628  default:
11629  break;
11630  }
11631 
11632  return ptr;
11633 }
11634 
11635 /*
11636  * sysprm_pack_session_parameters () - packs the array of session parameters
11637  *
11638  * return : new position pointer after packing
11639  * ptr (in) : pointer to the position where the packing starts
11640  * session_parameters (in) : array of session parameters
11641  */
11642 char *
11643 sysprm_pack_session_parameters (char *ptr, SESSION_PARAM * session_parameters)
11644 {
11645  SESSION_PARAM *prm = NULL;
11646  int i = 0;
11647 
11648  if (ptr == NULL)
11649  {
11650  return NULL;
11651  }
11652 
11653  ASSERT_ALIGN (ptr, INT_ALIGNMENT);
11654 
11655  for (i = 0; i < NUM_SESSION_PRM; i++)
11656  {
11657  prm = &session_parameters[i];
11658 
11659  ptr = or_pack_int (ptr, prm->prm_id);
11660  ptr = or_pack_int (ptr, prm->flag);
11661  ptr = or_pack_int (ptr, prm->datatype);
11662  ptr = sysprm_pack_sysprm_value (ptr, prm->value, (SYSPRM_DATATYPE) prm->datatype);
11663  }
11664 
11665  return ptr;
11666 }
11667 
11668 /*
11669  * sysprm_packed_session_parameters_length () - returns the length needed to
11670  * pack an array of session
11671  * parameters
11672  *
11673  * return : size of packed data
11674  * session_parameters (in) : array of session parameters
11675  * offset (in) : the offset to packed session parameters
11676  */
11677 int
11678 sysprm_packed_session_parameters_length (SESSION_PARAM * session_parameters, int offset)
11679 {
11680  SESSION_PARAM *prm = NULL;
11681  int size = 0, i = 0;
11682 
11683  for (i = 0; i < NUM_SESSION_PRM; i++)
11684  {
11685  prm = &session_parameters[i];
11686  size += OR_INT_SIZE; /* prm_id */
11687  size += OR_INT_SIZE; /* flag */
11688  size += OR_INT_SIZE; /* datatype */
11689  size += /* value */
11690  sysprm_packed_sysprm_value_length (session_parameters[i].value, (SYSPRM_DATATYPE) prm->datatype, size + offset);
11691  }
11692 
11693  return size;
11694 }
11695 
11696 /*
11697  * sysprm_unpack_session_parameters () - unpacks an array of session parameters
11698  * from buffer
11699  *
11700  * return : new pointer position after unpacking
11701  * ptr (in) : pointer to position where unpacking starts
11702  * session_parameters_ptr (out) : pointer to the unpacked list of session
11703  * parameters
11704  */
11705 char *
11706 sysprm_unpack_session_parameters (char *ptr, SESSION_PARAM ** session_parameters_ptr)
11707 {
11708  SESSION_PARAM *prm, *session_params = NULL;
11709  int prm_index, tmp;
11710 
11711  assert (session_parameters_ptr != NULL);
11712  *session_parameters_ptr = NULL;
11713 
11714  if (ptr == NULL)
11715  {
11716  return NULL;
11717  }
11718 
11719  ASSERT_ALIGN (ptr, INT_ALIGNMENT);
11720 
11721  session_params = sysprm_alloc_session_parameters ();
11722  if (session_params == NULL)
11723  {
11725  goto error;
11726  }
11727 
11728  for (prm_index = 0; prm_index < NUM_SESSION_PRM; prm_index++)
11729  {
11730  int flag;
11731 
11732  prm = &session_params[prm_index];
11733 
11734  ptr = or_unpack_int (ptr, &tmp);
11735  prm->prm_id = (PARAM_ID) tmp;
11736 
11737  ptr = or_unpack_int (ptr, &flag);
11738  prm->flag = (unsigned int) flag;
11739 
11740  ptr = or_unpack_int (ptr, &prm->datatype);
11741 
11742  ptr = sysprm_unpack_sysprm_value (ptr, &prm->value, (SYSPRM_DATATYPE) prm->datatype);
11743  if (ptr == NULL)
11744  {
11745  /* error unpacking value */
11746  goto error;
11747  }
11749  }
11750 
11751  *session_parameters_ptr = session_params;
11752  return ptr;
11753 
11754 error:
11755  /* clean up */
11756  sysprm_free_session_parameters (&session_params);
11757  return NULL;
11758 }
11759 
11760 /*
11761  * sysprm_pack_assign_values () - packs a list of SYSPRM_ASSIGN_VALUEs.
11762  *
11763  * return : pointer after the packed list.
11764  * ptr (in) : pointer to position where the list should be packed.
11765  * assign_values (in) : list of sysprm_assign_values.
11766  */
11767 char *
11768 sysprm_pack_assign_values (char *ptr, const SYSPRM_ASSIGN_VALUE * assign_values)
11769 {
11770  char *old_ptr = ptr;
11771  int count;
11772 
11773  ASSERT_ALIGN (ptr, INT_ALIGNMENT);
11774 
11775  /* skip one int -> size of assign_values */
11776  ptr += OR_INT_SIZE;
11777 
11778  for (count = 0; assign_values != NULL; assign_values = assign_values->next, count++)
11779  {
11780  ptr = or_pack_int (ptr, assign_values->prm_id);
11781  ptr = sysprm_pack_sysprm_value (ptr, assign_values->value, GET_PRM_DATATYPE (assign_values->prm_id));
11782  }
11783 
11784  OR_PUT_INT (old_ptr, count);
11785  return ptr;
11786 }
11787 
11788 /*
11789  * sysprm_packed_assign_values_length () - size of packed list of
11790  * sysprm_assing_values.
11791  *
11792  * return : size of packed list of sysprm_assing_values.
11793  * assign_values (in) : list of sysprm_assing_values.
11794  * offset (in) : offset to pointer where assign values will be packed.
11795  */
11796 int
11797 sysprm_packed_assign_values_length (const SYSPRM_ASSIGN_VALUE * assign_values, int offset)
11798 {
11799  int size = 0;
11800 
11801  size += OR_INT_SIZE; /* size of assign_values list */
11802 
11803  for (; assign_values != NULL; assign_values = assign_values->next)
11804  {
11805  size += OR_INT_SIZE; /* prm_id */
11806  size +=
11807  sysprm_packed_sysprm_value_length (assign_values->value, GET_PRM_DATATYPE (assign_values->prm_id),
11808  size + offset);
11809  }
11810 
11811  return size;
11812 }
11813 
11814 /*
11815  * sysprm_unpack_assign_values () - Unpacks a list of sysprm_assign_values.
11816  *
11817  * return : pointer after unpacking sysprm_assing_values.
11818  * ptr (in) : pointer to the position where
11819  * sysprm_assing_values are packed.
11820  * assign_values_ptr (out) : pointer to the unpacked list of
11821  * sysprm_assing_values.
11822  */
11823 char *
11824 sysprm_unpack_assign_values (char *ptr, SYSPRM_ASSIGN_VALUE ** assign_values_ptr)
11825 {
11826  SYSPRM_ASSIGN_VALUE *assign_values = NULL, *last_assign_val = NULL;
11827  SYSPRM_ASSIGN_VALUE *assign_val = NULL;
11828  int i = 0, count = 0, tmp;
11829 
11830  assert (assign_values_ptr != NULL);
11831  *assign_values_ptr = NULL;
11832 
11833  if (ptr == NULL)
11834  {
11835  return NULL;
11836  }
11837 
11838  ASSERT_ALIGN (ptr, INT_ALIGNMENT);
11839 
11840  ptr = or_unpack_int (ptr, &count);
11841  if (count <= 0)
11842  {
11843  return ptr;
11844  }
11845 
11846  for (i = 0; i < count; i++)
11847  {
11848  assign_val = (SYSPRM_ASSIGN_VALUE *) malloc (sizeof (SYSPRM_ASSIGN_VALUE));
11849  if (assign_val == NULL)
11850  {
11852  goto error;
11853  }
11854 
11855  ptr = or_unpack_int (ptr, &tmp);
11856  assign_val->prm_id = (PARAM_ID) tmp;
11857 
11858  ptr = sysprm_unpack_sysprm_value (ptr, &assign_val->value, GET_PRM_DATATYPE (assign_val->prm_id));
11859  if (ptr == NULL)
11860  {
11861  free_and_init (assign_val);
11862  goto error;
11863  }
11864  assign_val->next = NULL;
11865  if (assign_values != NULL)
11866  {
11867  last_assign_val->next = assign_val;
11868  last_assign_val = assign_val;
11869  }
11870  else
11871  {
11872  assign_values = last_assign_val = assign_val;
11873  }
11874  }
11875 
11876  *assign_values_ptr = assign_values;
11877  return ptr;
11878 
11879 error:
11880  sysprm_free_assign_values (&assign_values);
11881  return NULL;
11882 }
11883 
11884 /*
11885  * sysprm_free_assign_values () - free a list of sysprm_assign_values.
11886  *
11887  * return : void
11888  * assign_values_ptr (in/out) : pointer to list to free.
11889  */
11890 void
11892 {
11893  SYSPRM_ASSIGN_VALUE *assignment = NULL, *save_next = NULL;
11894 
11895  if (assign_values_ptr == NULL || *assign_values_ptr == NULL)
11896  {
11897  return;
11898  }
11899  assignment = *assign_values_ptr;
11900 
11901  while (assignment != NULL)
11902  {
11903  save_next = assignment->next;
11904  sysprm_clear_sysprm_value (&assignment->value, GET_PRM_DATATYPE (assignment->prm_id));
11905  free_and_init (assignment);
11906  assignment = save_next;
11907  }
11908 
11909  *assign_values_ptr = NULL;
11910 }
11911 
11912 /*
11913  * sysprm_get_id () - returns the id for a system parameter
11914  *
11915  * return : id
11916  * prm(in) : address for system parameter
11917  */
11918 static PARAM_ID
11920 {
11921  int id = (int) (prm - prm_Def);
11922 
11923  assert (id >= PRM_FIRST_ID && id <= PRM_LAST_ID);
11924 
11925  return (PARAM_ID) id;
11926 }
11927 
11928 #if defined (SERVER_MODE)
11929 /*
11930  * update_session_state_from_sys_params () - Updates the session state members
11931  * from session system parameters
11932  *
11933  * return : void
11934  * thread_p (in) : thread entry
11935  * session_params (in) : pointer to session parameters vector
11936  *
11937  */
11938 static void
11939 update_session_state_from_sys_params (THREAD_ENTRY * thread_p, SESSION_PARAM * session_params)
11940 {
11941  TZ_REGION *session_tz_region;
11942  int i;
11943 
11944  session_tz_region = session_get_session_tz_region (thread_p);
11945  if (session_tz_region != NULL)
11946  {
11947  for (i = 0; i < NUM_SESSION_PRM; i++)
11948  {
11949  if (session_params[i].prm_id == PRM_ID_TIMEZONE)
11950  {
11951  tz_str_to_region (session_params[i].value.str, strlen (session_params[i].value.str), session_tz_region);
11952  break;
11953  }
11954  }
11955  }
11956 }
11957 
11958 /*
11959  * sysprm_session_init_session_parameters () - adds array of session
11960  * parameters to session state and
11961  * connection entry.
11962  *
11963  * return : NO_ERROR or error_code
11964  * session_parameters_ptr (in/out) : array of session parameters sent by
11965  * client while registering to server
11966  * found_session_parameters (out) : true if session parameters were found in
11967  * session state, false otherwise
11968  *
11969  * NOTE: If the session state already has session parameters, the client must
11970  * have reconnected. The values stored in session state will be used
11971  * instead of the values sent by client (this way the client recovers
11972  * the session parameters changed before disconnecting).
11973  */
11974 int
11975 sysprm_session_init_session_parameters (SESSION_PARAM ** session_parameters_ptr, int *found_session_parameters)
11976 {
11978  int error_code = NO_ERROR;
11979  SESSION_PARAM *session_params = NULL;
11980 
11981  assert (found_session_parameters != NULL);
11982  *found_session_parameters = 0;
11983 
11984  /* first check if there is a list in session state */
11985  error_code = session_get_session_parameters (thread_p, &session_params);
11986  if (error_code != NO_ERROR)
11987  {
11988  return error_code;
11989  }
11990 
11991  if (session_params == NULL)
11992  {
11993  /* set the parameter values sent by client to session state */
11994  session_params = *session_parameters_ptr;
11995  error_code = session_set_session_parameters (thread_p, session_params);
11996  if (error_code != NO_ERROR)
11997  {
11998  return error_code;
11999  }
12000  update_session_state_from_sys_params (thread_p, session_params);
12001  }
12002  else
12003  {
12004  /* use the values stored in session state and free the session parameters received from client */
12005  sysprm_free_session_parameters (session_parameters_ptr);
12006  *session_parameters_ptr = session_params;
12007  *found_session_parameters = 1;
12008  }
12009 
12010  return NO_ERROR;
12011 }
12012 
12013 /*
12014  * sysprm_set_session_parameter_value - set a new value for the session
12015  * parameter identified by id.
12016  * return : PRM_ERR_NO_ERROR or error_code
12017  * session_parameter (in) : session parameter to set the value of
12018  * id (in) : id for the session parameter that needs changed
12019  * value (in) : new value
12020  */
12021 static SYSPRM_ERR
12022 sysprm_set_session_parameter_value (SESSION_PARAM * session_parameter, int id, SYSPRM_VALUE value)
12023 {
12024  switch (session_parameter->datatype)
12025  {
12026  case PRM_INTEGER:
12027  case PRM_KEYWORD:
12028  session_parameter->value.i = value.i;
12029  break;
12030 
12031  case PRM_FLOAT:
12032  session_parameter->value.f = value.f;
12033  break;
12034 
12035  case PRM_BOOLEAN:
12036  session_parameter->value.b = value.b;
12037  break;
12038 
12039  case PRM_STRING:
12040  if (PRM_IS_ALLOCATED (session_parameter->flag))
12041  {
12042  free_and_init (session_parameter->value.str);
12043  PRM_CLEAR_BIT (PRM_ALLOCATED, session_parameter->flag);
12044  }
12045  session_parameter->value.str = value.str;
12046  if (session_parameter->value.str != NULL)
12047  {
12048  PRM_SET_BIT (PRM_ALLOCATED, session_parameter->flag);
12049  }
12050  break;
12051 
12052  case PRM_INTEGER_LIST:
12053  if (PRM_IS_ALLOCATED (session_parameter->flag))
12054  {
12055  free_and_init (session_parameter->value.integer_list);
12056  PRM_CLEAR_BIT (PRM_ALLOCATED, session_parameter->flag);
12057  }
12058  session_parameter->value.integer_list = value.integer_list;
12059  if (session_parameter->value.integer_list != NULL)
12060  {
12061  PRM_SET_BIT (PRM_ALLOCATED, session_parameter->flag);
12062  }
12063  break;
12064 
12065  case PRM_BIGINT:
12066  session_parameter->value.bi = value.bi;
12067  break;
12068  }
12069 
12070  return PRM_ERR_NO_ERROR;
12071 }
12072 
12073 /*
12074  * sysprm_set_session_parameter_default - set session parameter value to default
12075  *
12076  * return : PRM_ERR_NO_ERROR or SYSPRM_ERR error code
12077  * session_parameter(in) : session parameter
12078  * prm_id(in) : parameter id
12079  */
12080 static SYSPRM_ERR
12081 sysprm_set_session_parameter_default (SESSION_PARAM * session_parameter, PARAM_ID prm_id)
12082 {
12083  SYSPRM_PARAM *prm = &prm_Def[prm_id];
12084 
12085  switch (session_parameter->datatype)
12086  {
12087  case PRM_INTEGER:
12088  case PRM_KEYWORD:
12089  session_parameter->value.i = PRM_GET_INT (prm->default_value);
12090  break;
12091  case PRM_FLOAT:
12092  session_parameter->value.f = PRM_GET_FLOAT (prm->default_value);
12093  break;
12094  case PRM_BOOLEAN:
12095  session_parameter->value.b = PRM_GET_BOOL (prm->default_value);
12096  break;
12097  case PRM_BIGINT:
12098  session_parameter->value.bi = PRM_GET_BIGINT (prm->default_value);
12099  break;
12100  case PRM_STRING:
12101  {
12102  if (PRM_IS_ALLOCATED (session_parameter->flag))
12103  {
12104  free_and_init (session_parameter->value.str);
12105  PRM_CLEAR_BIT (PRM_ALLOCATED, session_parameter->flag);
12106  }
12107  session_parameter->value.str = PRM_GET_STRING (prm->default_value);
12108  break;
12109  }
12110  case PRM_INTEGER_LIST:
12111  {
12112  if (PRM_IS_ALLOCATED (session_parameter->flag))
12113  {
12114  free_and_init (session_parameter->value.integer_list);
12115  PRM_CLEAR_BIT (PRM_ALLOCATED, session_parameter->flag);
12116  }
12117  session_parameter->value.integer_list = PRM_GET_INTEGER_LIST (prm->default_value);
12118  break;
12119  }
12120  }
12121 
12122  return PRM_ERR_NO_ERROR;
12123 }
12124 #endif /* SERVER_MODE */
12125 
12126 /*
12127  * sysprm_compare_values () - compare two system parameter values
12128  *
12129  * return : comparison result (0 - equal, otherwise - different).
12130  * first_value (in) : pointer to first value
12131  * second_value (in) : pointer to second value
12132  * val_type (in) : datatype for values (make sure the values that are
12133  * compared have the same datatype)
12134  */
12135 static int
12136 sysprm_compare_values (void *first_value, void *second_value, unsigned int val_type)
12137 {
12138  switch (val_type)
12139  {
12140  case PRM_INTEGER:
12141  case PRM_KEYWORD:
12142  return (PRM_GET_INT (first_value) != PRM_GET_INT (second_value));
12143 
12144  case PRM_BOOLEAN:
12145  return (PRM_GET_BOOL (first_value) != PRM_GET_BOOL (second_value));
12146 
12147  case PRM_FLOAT:
12148  return (PRM_GET_FLOAT (first_value) != PRM_GET_FLOAT (second_value));
12149 
12150  case PRM_STRING:
12151  {
12152  char *first_str = PRM_GET_STRING (first_value);
12153  char *second_str = PRM_GET_STRING (second_value);
12154 
12155  if (first_str == NULL && second_str == NULL)
12156  {
12157  /* both values are null, return equal */
12158  return 0;
12159  }
12160 
12161  if (first_str == NULL || second_str == NULL)
12162  {
12163  /* only one is null, return different */
12164  return 1;
12165  }
12166 
12167  return intl_mbs_casecmp (first_str, second_str);
12168  }
12169 
12170  case PRM_BIGINT:
12171  return (PRM_GET_BIGINT (first_value) != PRM_GET_BIGINT (second_value));
12172 
12173  case PRM_INTEGER_LIST:
12174  {
12175  int i;
12176  int *first_int_list = PRM_GET_INTEGER_LIST (first_value);
12177  int *second_int_list = PRM_GET_INTEGER_LIST (second_value);
12178 
12179  if (first_int_list == NULL && second_int_list == NULL)
12180  {
12181  /* both values are null, return equal */
12182  return 0;
12183  }
12184 
12185  if (second_int_list == NULL || second_int_list == NULL)
12186  {
12187  /* only one value is null, return different */
12188  return 1;
12189  }
12190 
12191  if (first_int_list[0] != second_int_list[0])
12192  {
12193  /* different size for integer lists, return different */
12194  return 1;
12195  }
12196 
12197  for (i = 1; i <= second_int_list[0]; i++)
12198  {
12199  if (first_int_list[i] != second_int_list[i])
12200  {
12201  /* found a different integer, return different */
12202  return 0;
12203  }
12204  }
12205 
12206  /* all integers are equal, return equal */
12207  return 1;
12208  }
12209 
12210  default:
12211  assert (0);
12212  break;
12213  }
12214 
12215  return 0;
12216 }
12217 
12218 /*
12219  * sysprm_set_sysprm_value_from_parameter () - set the value of sysprm_value
12220  * from a system parameter.
12221  *
12222  * return : void.
12223  * prm_value (in) : sysprm_value.
12224  * prm (in) : system parameter.
12225  */
12226 static void
12228 {
12229  size_t size;
12230 
12231  switch (prm->datatype)
12232  {
12233  case PRM_INTEGER:
12234  case PRM_KEYWORD:
12235  prm_value->i = PRM_GET_INT (prm->value);
12236  break;
12237  case PRM_FLOAT:
12238  prm_value->f = PRM_GET_FLOAT (prm->value);
12239  break;
12240  case PRM_BOOLEAN:
12241  prm_value->b = PRM_GET_BOOL (prm->value);
12242  break;
12243  case PRM_BIGINT:
12244  prm_value->bi = PRM_GET_BIGINT (prm->value);
12245  break;
12246  case PRM_STRING:
12247  if (PRM_GET_STRING (prm->value) != NULL)
12248  {
12249  prm_value->str = strdup (PRM_GET_STRING (prm->value));
12250  if (prm_value->str == NULL)
12251  {
12253  (size_t) (strlen (PRM_GET_STRING (prm->value)) + 1));
12254  }
12255  }
12256  else
12257  {
12258  prm_value->str = NULL;
12259  }
12260  break;
12261  case PRM_INTEGER_LIST:
12262  {
12263  int *integer_list = PRM_GET_INTEGER_LIST (prm->value);
12264  if (integer_list != NULL)
12265  {
12266  size = (integer_list[0] + 1) * sizeof (int);
12267  prm_value->integer_list = (int *) malloc (size);
12268  if (prm_value->integer_list == NULL)
12269  {
12271  }
12272  else
12273  {
12274  memcpy (prm_value->integer_list, integer_list, size);
12275  }
12276  }
12277  else
12278  {
12279  prm_value->integer_list = NULL;
12280  }
12281  break;
12282  }
12283  case PRM_NO_TYPE:
12284  break;
12285  default:
12286  assert_release (0);
12287  break;
12288  }
12289 }
12290 
12291 #if defined (CS_MODE)
12292 /*
12293  * sysprm_update_client_session_parameters () - update the session parameters
12294  * stored on client from array of
12295  * session parameters
12296  *
12297  * return : void
12298  * session_parameters (in) : array of session parameters
12299  */
12300 void
12301 sysprm_update_client_session_parameters (SESSION_PARAM * session_parameters)
12302 {
12303  int i;
12304 
12305  if (session_parameters == NULL)
12306  {
12307  /* nothing to do */
12308  return;
12309  }
12310 
12311  for (i = 0; i < NUM_SESSION_PRM; i++)
12312  {
12313  /* update value */
12314  sysprm_set_value (GET_PRM (session_parameters[i].prm_id), session_parameters[i].value, true, true);
12315  }
12316 }
12317 #endif /* CS_MODE */
12318 
12319 /*
12320  * sysprm_print_assign_values () - print list of sysprm_assign_values.
12321  *
12322  * return : size of printed string.
12323  * prm_values (in) : list of values that need printing.
12324  * buffer (in) : print destination.
12325  * length (in) : maximum allowed size for printed string.
12326  */
12327 int
12328 sysprm_print_assign_values (SYSPRM_ASSIGN_VALUE * prm_values, char *buffer, int length)
12329 {
12330  int n = 0;
12331 
12332  if (length == 0)
12333  {
12334  /* don't print anything */
12335  return 0;
12336  }
12337 
12338  for (; prm_values != NULL; prm_values = prm_values->next)
12339  {
12340  n += sysprm_print_sysprm_value (prm_values->prm_id, prm_values->value, buffer + n, length - n, PRM_PRINT_NAME);
12341  if (prm_values->next)
12342  {
12343  n += snprintf (buffer + n, length - n, "; ");
12344  }
12345  }
12346  return n;
12347 }
12348 
12349 #if !defined (SERVER_MODE)
12350 /*
12351  * sysprm_print_parameters_for_qry_string () - print parameters for query
12352  * string
12353  *
12354  * return : Printed string of system parameters. Only parameters marked with
12355  * both PRM_FOR_QRY_STRING and PRM_DIFFERENT flags are printed.
12356  */
12357 char *
12359 {
12360  int i, n, len = LINE_MAX;
12361  char buf[LINE_MAX];
12362  char *ptr = NULL, *q = NULL;
12363  int size;
12364 
12365  memset (buf, 0, LINE_MAX);
12366  ptr = buf;
12367 
12368  for (i = 0; i < NUM_PRM; i++)
12369  {
12370  if (PRM_PRINT_QRY_STRING (i))
12371  {
12372  n = prm_print (GET_PRM (i), ptr, len, PRM_PRINT_ID, PRM_PRINT_CURR_VAL);
12373  ptr += n;
12374  len -= n;
12375 
12376  n = snprintf (ptr, len, ";");
12377  ptr += n;
12378  len -= n;
12379  }
12380  }
12381 
12382  /* verify the length of the printed parameters does not exceed LINE_MAX */
12383  assert (len > 0);
12384 
12385  size = (LINE_MAX - len) * sizeof (char);
12386  if (size == 0)
12387  {
12388  return NULL;
12389  }
12390 
12391  q = (char *) malloc (size + 1);
12392  if (q == NULL)
12393  {
12395  return NULL;
12396  }
12397 
12398  memcpy (q, buf, size + 1);
12399 
12400  return q;
12401 }
12402 
12403 /*
12404  * sysprm_print_parameters_for_ha_repl () - print parameters for HA
12405  * replication
12406  *
12407  * return : Printed string of system parameters which should be reproduced
12408  * in HA log applier context before HA replication
12409  */
12410 char *
12412 {
12413  int i, n, len = LINE_MAX;
12414  char buf[LINE_MAX];
12415  char *ptr = NULL, *q = NULL;
12416  size_t size;
12417 
12418  memset (buf, 0, LINE_MAX);
12419  ptr = buf;
12420 
12421  for (i = 0; i < NUM_PRM; i++)
12422  {
12423  unsigned int flag = GET_PRM_STATIC_FLAG (i);
12424 
12425  if (!PRM_IS_FOR_HA_CONTEXT (flag))
12426  {
12427  continue;
12428  }
12429 
12431  {
12432  char *val = prm_get_string_value ((PARAM_ID) i);
12433 
12434  if (val == NULL)
12435  {
12436  continue;
12437  }
12438 
12439  if (i == PRM_ID_INTL_COLLATION
12441  {
12442  continue;
12443  }
12444 
12446  && strcasecmp (val, lang_get_Lang_name ()) == 0)
12447  {
12448  continue;
12449  }
12450  }
12451  else if (!PRM_IS_DIFFERENT (*(GET_PRM_DYNAMIC_FLAG (i))))
12452  {
12453  continue;
12454  }
12455 
12456  n = prm_print (GET_PRM (i), ptr, len, PRM_PRINT_NAME, PRM_PRINT_CURR_VAL);
12457  ptr += n;
12458  len -= n;
12459 
12460  n = snprintf (ptr, len, ";");
12461  ptr += n;
12462  len -= n;
12463  }
12464 
12465  /* verify the length of the printed parameters does not exceed LINE_MAX */
12466  assert (len > 0);
12467 
12468  size = (LINE_MAX - len) * sizeof (char);
12469  if (size == 0)
12470  {
12471  return NULL;
12472  }
12473 
12474  q = (char *) malloc (size + 1);
12475  if (q == NULL)
12476  {
12478  return NULL;
12479  }
12480 
12481  memcpy (q, buf, size + 1);
12482 
12483  return q;
12484 }
12485 
12486 /*
12487  * sysprm_init_intl_param () -
12488  *
12489  * return:
12490  */
12491 int
12493 {
12494  SYSPRM_PARAM *prm_date_lang;
12495  SYSPRM_PARAM *prm_number_lang;
12496  SYSPRM_PARAM *prm_intl_collation;
12497  SYSPRM_PARAM *prm_timezone;
12498  int error = NO_ERROR;
12499 
12500  prm_date_lang = prm_find (PRM_NAME_INTL_DATE_LANG, NULL);
12501  prm_number_lang = prm_find (PRM_NAME_INTL_NUMBER_LANG, NULL);
12502  prm_intl_collation = prm_find (PRM_NAME_INTL_COLLATION, NULL);
12503  prm_timezone = prm_find (PRM_NAME_TIMEZONE, NULL);
12504 
12505  /* intl system parameters are session based and depend on system language; The language is read from DB (and client
12506  * from server), after the system parameters module was initialized and default values read from configuration file.
12507  * This function avoids to override any value already read from config. If no values are set from config, then this
12508  * function sets the values according to the default language. On client (CAS), we set the client copy of the value,
12509  * and also the cached session parameter value (which is the default starting value, when the existing CAS serves
12510  * another session) is intialized. */
12511 
12512  if (prm_date_lang != NULL && !PRM_IS_SET (*prm_date_lang->dynamic_flag))
12513  {
12514  prm_set (prm_date_lang, lang_get_Lang_name (), true);
12515 #if defined (CS_MODE)
12516  sysprm_update_cached_session_param_val (PRM_ID_INTL_DATE_LANG);
12517 #endif
12518  }
12519 
12520  if (prm_number_lang != NULL && !PRM_IS_SET (*prm_number_lang->dynamic_flag))
12521  {
12522  prm_set (prm_number_lang, lang_get_Lang_name (), true);
12523 #if defined (CS_MODE)
12524  sysprm_update_cached_session_param_val (PRM_ID_INTL_NUMBER_LANG);
12525 #endif
12526  }
12527 
12528  if (prm_intl_collation != NULL && !PRM_IS_SET (*prm_intl_collation->dynamic_flag))
12529  {
12531 #if defined (CS_MODE)
12532  sysprm_update_cached_session_param_val (PRM_ID_INTL_COLLATION);
12533 #endif
12534  }
12535 
12536  if (prm_timezone != NULL && !PRM_IS_SET (*prm_timezone->dynamic_flag))
12537  {
12538  prm_set (prm_timezone, prm_get_string_value (PRM_ID_SERVER_TIMEZONE), true);
12539 #if defined (CS_MODE)
12540  sysprm_update_cached_session_param_val (PRM_ID_TIMEZONE);
12541 #endif
12542  }
12543 
12544  return error;
12545 }
12546 #endif /* !SERVER_MODE */
12547 
12548 /*
12549  * sysprm_set_error () - sets an error for system parameter errors
12550  *
12551  * return : error code
12552  * rc (in) : SYSPRM_ERR error
12553  * data (in) : data to be printed with error
12554  */
12555 int
12556 sysprm_set_error (SYSPRM_ERR rc, const char *data)
12557 {
12558  int error;
12559 
12560  /* first check if error was already set */
12561  error = er_errid ();
12562  if (error != NO_ERROR)
12563  {
12564  /* already set */
12565  return error;
12566  }
12567 
12568  if (rc != PRM_ERR_NO_ERROR)
12569  {
12570  switch (rc)
12571  {
12572  case PRM_ERR_UNKNOWN_PARAM:
12573  case PRM_ERR_BAD_VALUE:
12574  case PRM_ERR_BAD_STRING:
12575  case PRM_ERR_BAD_RANGE:
12576  if (data)
12577  {
12578  error = ER_PRM_BAD_VALUE;
12579  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, error, 1, data);
12580  }
12581  else
12582  {
12583  error = ER_PRM_BAD_VALUE_NO_DATA;
12584  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, error, 0);
12585  }
12586  break;
12587  case PRM_ERR_CANNOT_CHANGE:
12590  if (data)
12591  {
12592  error = ER_PRM_CANNOT_CHANGE;
12593  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, error, 1, data);
12594  }
12595  else
12596  {
12598  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, error, 0);
12599  }
12600  break;
12601  case PRM_ERR_NOT_SOLE_TRAN:
12602  error = ER_NOT_SOLE_TRAN;
12603  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, error, 0);
12604  break;
12605  case PRM_ERR_COMM_ERR:
12606  error = ER_NET_SERVER_COMM_ERROR;
12607  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, error, 1, "db_set_system_parameters");
12608  break;
12610  default:
12611  error = ER_GENERIC_ERROR;
12612  er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, error, 0);
12613  break;
12614  }
12615  }
12616 
12617  return error;
12618 }
12619 
12620 /*
12621  * sysprm_get_session_parameters_count () - get the count of session
12622  * parameters
12623  * return : count
12624  */
12625 int
12627 {
12628  return NUM_SESSION_PRM;
12629 }
12630 
12631 #if defined (CS_MODE)
12632 /*
12633  * sysprm_update_cached_session_param_val () - updates value of a cached
12634  * session parameter
12635  * prm_id (in) : cached session system paramater id to update
12636  *
12637  * Note : cached session parameters (global cached_session_parameters) are
12638  * default value copies of the system parameters which can be changed
12639  * in a session context; this should be used only during init process
12640  * to alter the default initial value of system parameter for session.
12641  */
12642 static void
12643 sysprm_update_cached_session_param_val (const PARAM_ID prm_id)
12644 {
12645  SESSION_PARAM *cached_session_prm;
12646  SYSPRM_PARAM *sys_prm;
12647  int i;
12648 
12649  assert (NUM_SESSION_PRM > 0);
12650 
12651  sys_prm = GET_PRM (prm_id);
12652 
12653  for (i = 0; i < NUM_SESSION_PRM; i++)
12654  {
12655  cached_session_prm = &cached_session_parameters[i];
12656  if (cached_session_prm->prm_id != prm_id)
12657  {
12658  continue;
12659  }
12660 
12661  cached_session_prm->flag = *sys_prm->dynamic_flag;
12662  sysprm_set_sysprm_value_from_parameter (&cached_session_prm->value, sys_prm);
12663  sysprm_update_session_prm_flag_allocated (cached_session_prm);
12664  break;
12665  }
12666 }
12667 #endif /* CS_MODE */
#define PRM_NAME_PB_NUM_LRU_CHAINS
#define PRM_NAME_HA_APPLYLOGDB_LOG_WAIT_TIME_IN_SECS
static unsigned int prm_optimizer_reserve_09_flag
bool PRM_PTHREAD_SCOPE_PROCESS
static int prm_min_to_sec(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
static int prm_json_max_array_idx_default
#define PRM_NAME_MAX_FLUSH_PAGES_PER_SECOND
static int prm_loaddb_flush_interval_default
static unsigned int prm_disable_vacuum_flag
int PRM_PB_NBUFFERS
static unsigned int prm_vacuum_prefetch_log_mode_flag
static unsigned int prm_ha_failover_wait_time_in_msecs_flag
#define ER_PRM_CANNOT_CHANGE_NO_DATA
Definition: error_code.h:1390
bool PRM_ADAPTIVE_FLUSH_CONTROL
int PRM_FILTER_PRED_MAX_CACHE_CLONES
#define PRM_VALUE_MAX
static int prm_week_format_lower
#define PRM_TEST_CHANGE
int char_isspace(int c)
Definition: chartype.c:109
static bool prm_unloaddb_ignore_error_default
static bool prm_agg_hash_respect_order_default
#define PRM_NAME_TCP_CONNECTION_TIMEOUT
#define PRM_NAME_INDEX_SCAN_KEY_BUFFER_PAGES
#define ER_LOG_FILE_DIR
static unsigned int prm_shutdown_wait_time_in_secs_flag
static unsigned int prm_lk_max_scanid_bit_flag
static unsigned int prm_log_header_flush_interval_flag
#define PRM_NAME_CFG_DB_HOSTS
static int prm_xasl_cache_max_clones_default
static unsigned int prm_call_stack_dump_deactivation_flag
#define PRM_ADJUST_FOR_GET_INTEGER_TO_INTEGER(prm, out_val, in_val, err)
static int prm_list_max_query_cache_pages_lower
static bool prm_ha_sql_logging_default
static unsigned int prm_optimizer_reserve_05_flag
static int prm_css_max_clients_lower
static int sysprm_set_value(SYSPRM_PARAM *prm, SYSPRM_VALUE value, bool set_flag, bool duplicate)
int PRM_TEMP_MEM_BUFFER_PAGES
#define ER_PAGE_LATCH_ABORTED
Definition: error_code.h:1074
static unsigned int prm_use_btree_fence_key_flag
static int prm_ha_delay_limit_delta_in_secs_default
static unsigned int prm_ddl_audit_log_size_flag
static int prm_filter_pred_max_cache_clones_default
static int prm_er_exit_ask_default
static int prm_ha_mode_lower
bool PRM_OPTIMIZER_RESERVE_12
static int prm_ha_copy_log_max_archives_default
#define PRM_NAME_OPTIMIZER_RESERVE_04
#define PRM_NAME_DWB_BLOCKS
#define PRM_NAME_GENERIC_VOL_PREALLOC_SIZE
bool PRM_LOG_SWEEP_CLEAN
static UINT64 prm_ddl_audit_log_size_upper
int(* DUP_PRM_FUNC)(void *, SYSPRM_DATATYPE, void *, SYSPRM_DATATYPE)
#define PRM_NAME_JAVA_STORED_PROCEDURE_DEBUG
static int prm_max_pages_in_temp_file_cache_default
#define ER_HEAP_BAD_RELOCATION_RECORD
Definition: error_code.h:104
#define PRM_NAME_VACUUM_PREFETCH_LOG_BUFFER_SIZE
#define PRM_NAME_LOG_BG_FLUSH_NUM_PAGES
static int prm_pb_num_LRU_chains_default
#define PRM_NAME_FAULT_INJECTION_IDS
#define PRM_NAME_LOG_MAX_ARCHIVES
static int prm_lk_max_scanid_bit_upper
bool prm_tz_leap_second_support_default
#define ER_FILE_TABLE_OVERFLOW
Definition: error_code.h:1219
static int prm_sort_limit_max_count_upper
int PRM_PB_SYNC_ON_NFLUSH
static int prm_check_peer_alive_default
static bool prm_intl_mbs_support_default
int PRM_LK_ESCALATION_AT
cubthread::entry * thread_get_thread_entry_info(void)
#define VACUUM_MAX_WORKER_COUNT
#define PRM_NAME_FILE_LOGGING
static int prm_lk_timeout_secs_default
#define NO_ERROR
Definition: error_code.h:46
static bool prm_ha_repl_enable_server_side_update_default
static float prm_lk_run_deadlock_interval_default
void prm_set_float_value(PARAM_ID prm_id, float value)
int PRM_HA_PROCESS_DEREG_CONFIRM_INTERVAL_IN_MSECS
static bool prm_optimizer_reserve_12_default
#define ER_DISK_UNKNOWN_SECTOR
Definition: error_code.h:72
int PRM_MAX_ENTRIES_IN_TEMP_FILE_CACHE
#define PRM_IS_HIDDEN(x)
#define PRM_NAME_HA_REPL_FILTER_FILE
static unsigned int prm_ha_copy_log_max_archives_flag
int * PRM_CALL_STACK_DUMP_ACTIVATION
static int prm_pb_num_private_chains_default
static int prm_er_stop_on_error_default
static unsigned int prm_ha_unacceptable_proc_restart_timediff_flag
int PRM_THREAD_CONNECTION_TIMEOUT_SECONDS
#define PRM_DIFFER_UNIT
char ** key
Definition: ini_parser.h:40
#define MAX_NUM_OF_PRM_FILES_LOADED
static int prm_pb_sync_on_nflush_default
static unsigned int prm_io_backup_sleep_msecs_flag
char * ustr_upper(char *s)
Definition: misc_string.c:98
static bool prm_update_use_attribute_references_default
bool PRM_USE_BTREE_FENCE_KEY
#define GET_PRM_DYNAMIC_FLAG(id)
int PRM_HA_SERVER_STATE
static unsigned int prm_tcp_rcvbuf_size_flag
int PRM_HA_REPLICA_DELAY_IN_SECS
bool PRM_ER_LOG_WARNING
#define PRM_NAME_SORT_LIMIT_MAX_COUNT
static int prm_read_and_parse_ini_file(const char *prm_file_name, const char *db_name, const bool reload, const int load_flags)
static int prm_index_scan_key_buffer_pages_default
#define ER_LOG_REDO_INTERFACE
Definition: error_code.h:149
static bool prm_ws_memory_report_default
static char * prm_intl_date_lang_default
#define LANG_GET_BINARY_COLLATION(c)
int PRM_HA_COPY_LOG_TIMEOUT
#define PRM_NAME_DISK_LOGGING
#define PRM_NAME_UNLOADDB_LOCK_TIMEOUT
#define ER_LOG_MAYNEED_MEDIA_RECOVERY
Definition: error_code.h:155
#define PRM_NAME_HA_PROCESS_START_CONFIRM_INTERVAL_IN_MSECS
int PRM_MAX_PAGES_IN_TEMP_FILE_CACHE
static unsigned int prm_ha_max_process_start_confirm_flag
static const char * compat_mode_values_PRM_REQUIRE_LIKE_ESCAPE_CHARACTER[COMPAT_ORACLE+2]
#define ER_DESC_ISCAN_ABORTED
Definition: error_code.h:1344
static int prm_lk_escalation_at_lower
bool intl_String_validation
Definition: intl_support.c:87
static unsigned int prm_timezone_flag
SYSPRM_DATATYPE datatype
int sysprm_get_force_server_parameters(SYSPRM_ASSIGN_VALUE **change_values)
#define ER_DISK_UNKNOWN_PAGE
Definition: error_code.h:73
bool PRM_ACCESS_IP_CONTROL
#define PRM_NAME_LOG_NO_LOGGING
#define HB_DEFAULT_UNACCEPTABLE_PROC_RESTART_TIMEDIFF_IN_MSECS
Definition: heartbeat.h:45
#define PRM_NAME_USE_BTREE_FENCE_KEY
static int prm_io_backup_sleep_msecs_default
bool PRM_DEBUG_BESTSPACE
static bool prm_optimizer_enable_aggregate_optimization_default
#define PRM_NAME_IO_BACKUP_SLEEP_MSECS
static int prm_max_outer_card_of_idxjoin_lower
#define IO_PAGESIZE
static char * prm_timezone_default
static unsigned int prm_test_mode_flag
#define PRM_SET
#define BO_IS_SERVER_RESTARTED()
Definition: boot_sr.h:84
static int prm_ha_init_timer_im_msecs_default
static unsigned int prm_lk_rollback_on_lock_escalation_flag
#define PRM_NAME_ER_EXIT_ASK
unsigned int PRM_PB_NEIGHBOR_FLUSH_PAGES
#define PRM_IS_DEPRECATED(x)
static unsigned int prm_perf_test_mode_flag
int PRM_TCP_RCVBUF_SIZE
static int prm_er_log_level_lower
const char * PRM_HA_DB_LIST
#define HA_SERVER_STATE_IDLE_STR
Definition: boot.h:127
bool PRM_ENABLE_HISTO
static unsigned int prm_db_volume_size_flag
#define PRM_NAME_THREAD_CONNECTION_TIMEOUT_SECONDS
bool PRM_PB_SEQUENTIAL_VICTIM_FLUSH
#define PRM_ADJUST_FOR_SET_INTEGER_TO_INTEGER(prm, out_val, in_val, err)
static unsigned int prm_debug_logwr_flag
static bool prm_fault_injection_action_prefer_abort_to_exit_default
static unsigned int prm_java_stored_procedure_port_flag
#define PRM_NAME_ACCESS_IP_CONTROL
static unsigned int prm_ha_delay_limit_delta_in_secs_flag
static unsigned int prm_log_checkpoint_sleep_msecs_flag
bool PRM_TCP_NODELAY
int PRM_HF_MAX_BESTSPACE_ENTRIES
static unsigned int prm_hostvar_late_binding_flag
int PRM_COMPAT_MODE
static void sysprm_update_flag_different(SYSPRM_PARAM *prm)
int sysprm_set_force(const char *pname, const char *pvalue)
static unsigned int prm_intl_collation_flag
static int prm_ha_process_dereg_confirm_interval_in_msecs_default
static bool prm_er_log_debug_default
static unsigned int prm_optimizer_reserve_15_flag
int util_size_string_to_byte(UINT64 *size_num, const char *size_str)
Definition: util_common.c:1027
#define PRM_NAME_OPTIMIZER_RESERVE_06
#define PRM_NAME_HA_INIT_TIMER_IN_MSECS
static unsigned int prm_force_restart_to_skip_recovery_flag
#define ER_FILE_TABLE_CORRUPTED
Definition: error_code.h:721
int sysprm_packed_assign_values_length(const SYSPRM_ASSIGN_VALUE *assign_values, int offset)
#define PRM_NAME_LK_TIMEOUT_MESSAGE_DUMP_LEVEL
static unsigned int prm_access_ip_control_flag
static int prm_list_max_query_cache_pages_upper
static const char * prm_ha_repl_filter_file_default
#define PRM_NAME_BLOCK_DDL_STATEMENT
bool PRM_BLOCK_DDL_STATEMENT
static unsigned int prm_dwb_size_lower
#define PRM_NAME_CTE_MAX_RECURSIONS
int PRM_HA_MODE_FOR_SA_UTILS_ONLY
#define PRM_NAME_STATS_ON
static int prm_ha_port_id_default
static unsigned int prm_bt_index_scan_oid_order_flag
bool PRM_UNICODE_INPUT_NORMALIZATION
static unsigned int prm_max_recursion_sql_depth_flag
unsigned int * dynamic_flag
#define PRM_NAME_ER_LOG_VACUUM
bool PRM_OPTIMIZER_RESERVE_05
static unsigned int prm_log_pgbuf_victim_flush_flag
bool PRM_AGG_HASH_RESPECT_ORDER
static const char * compat_mode_values_PRM_PIPES_AS_CONCAT[COMPAT_ORACLE+2]
static UINT64 prm_ib_task_memsize_default
static unsigned int prm_service_service_list_flag
static int prm_pb_nbuffers_default
#define HB_DEFAULT_APPLY_MAX_MEM_SIZE
Definition: heartbeat.h:33
int PRM_HA_PORT_ID
#define PRM_NAME_ENABLE_HISTO
void xsysprm_obtain_server_parameters(SYSPRM_ASSIGN_VALUE *prm_values)
static unsigned int prm_unloaddb_lock_timeout_flag
static int prm_load_by_section(INI_TABLE *ini, const char *section, bool ignore_section, bool reload, const char *file, const int load_flags)
bool PRM_ADD_COLUMN_UPDATE_HARD_DEFAULT
static int prm_max_entries_in_temp_file_cache_lower
static unsigned int prm_ha_applylogdb_log_wait_time_in_secs_flag
static int prm_json_max_array_idx_upper
#define PRM_NAME_UNICODE_INPUT_NORMALIZATION
static bool prm_object_print_format_oid_default
const char * key
static int prm_log_checkpoint_npages_lower
#define ER_TF_BUFFER_OVERFLOW
Definition: error_code.h:388
#define SYSPRM_LOAD_IS_IGNORE_INTL(flags)
static unsigned int prm_optimizer_enable_merge_join_flag
bool PRM_TEST_MODE
#define PRM_NAME_LOG_CHECKPOINT_INTERVAL
#define PRM_ADJUST_FOR_SET_BIGINT_TO_BIGINT(prm, out_val, in_val, err)
static int prm_list_max_query_cache_pages_default
int PRM_MULTI_RANGE_OPT_LIMIT
#define PRM_NAME_EVENT_HANDLER
int PRM_MAX_FLUSH_PAGES_PER_SECOND
#define PRM_NAME_FORCE_RESTART_TO_SKIP_RECOVERY
static bool prm_use_btree_fence_key_default
#define PRM_NAME_LOG_CHECKPOINT_SLEEP_MSECS
#define PRM_NAME_VACUUM_MASTER_WAKEUP_INTERVAL
static unsigned int prm_sort_limit_max_count_flag
static unsigned int prm_log_trace_debug_flag
int lang_get_lang_id_from_name(const char *lang_name, INTL_LANG *lang_id)
static unsigned int prm_log_chkpt_detailed_flag
#define ER_LOG_PAGE_CORRUPTED
Definition: error_code.h:140
static bool prm_enable_dwb_flush_thread_default
#define HA_LOG_APPLIER_STATE_UNREGISTERED_STR
static unsigned int prm_call_stack_dump_activation_flag
static UINT64 prm_max_hash_list_scan_size_default
static int prm_log_nbuffers_default
static unsigned int prm_page_bg_flush_interval_msec_flag
static unsigned int prm_log_query_lists_flag
#define PRM_NAME_TIMEZONE
static unsigned int prm_ha_repl_filter_type_flag
char * conf_path
static int prm_list_max_query_cache_entries_default
UINT64 PRM_GENERIC_VOL_PREALLOC_SIZE
#define PRM_FOR_CLIENT
static int prm_fault_injection_test_default
bool PRM_DEBUG_AUTOCOMMIT
static int prm_log_trace_flush_time_msecs_lower
static unsigned int prm_use_system_malloc_flag
#define PRM_CLEAR_BIT(this, here)
int parse_int(int *ret_p, const char *str_p, int base)
Definition: porting.c:2290
bool PRM_GC_ENABLE
static char * prm_io_temp_volume_path_default
static unsigned int prm_bt_oid_nbuffers_flag
#define HA_MODE_OFF_STR
static int prm_page_bg_flush_interval_msec_default
static int prm_temp_mem_buffer_pages_lower
#define PRM_NAME_HA_PING_HOSTS
#define ER_FAILED
Definition: error_code.h:47
#define PRM_HAS_TIME_UNIT(x)
const TZ_DATA * tz_get_data(void)
Definition: tz_support.c:687
static int sysprm_load_and_init_internal(const char *db_name, const char *conf_file, bool reload, const int load_flags)
bool PRM_FILE_LOGGING
static const char ** compat_mode_values[]
static unsigned int prm_log_btree_ops_flag
#define PRM_SIZE_UNIT
#define PRM_NAME_ADD_COLUMN_UPDATE_HARD_DEFAULT
#define PRM_IS_KEYWORD(x)
PRM_PRINT_VALUE_MODE
static bool prm_optimizer_reserve_03_default
static int prm_json_max_array_idx_lower
int PRM_HA_HEARTBEAT_INTERVAL_IN_MSECS
static const char * prm_access_ip_control_file_default
#define PRM_ADJUST_FOR_SET_FLOAT_TO_FLOAT(prm, out_val, in_val, err)
static int prm_temp_mem_buffer_pages_default
static bool prm_hostvar_late_binding_default
static int prm_css_max_clients_default
#define ER_BTREE_UNKNOWN_KEY
Definition: error_code.h:483
static bool prm_optimizer_reserve_02_default
#define HB_DEFAULT_MAX_PROCESS_DEREG_CONFIRM
Definition: heartbeat.h:44
#define PRM_NAME_OPTIMIZER_RESERVE_05
static int prm_pb_debug_page_validation_level_default
int PRM_XASL_CACHE_MAX_ENTRIES
static int prm_multi_range_opt_limit_lower
static int prm_ha_applylogdb_max_commit_interval_in_msecs_default
bool PRM_FORCE_RESTART_TO_SKIP_RECOVERY
#define PRM_NAME_QO_DUMP
static int prm_sr_nbuffers_lower
unsigned int static_flag
static bool prm_log_chkpt_detailed_default
static int prm_ha_applylogdb_log_wait_time_in_secs_default
static int prm_tcp_sndbuf_size_default
static unsigned int prm_insert_mode_flag
int PRM_CSQL_HISTORY_NUM
#define HB_DEFAULT_DEREG_CONFIRM_INTERVAL_IN_MSECS
Definition: heartbeat.h:42
static unsigned int prm_loaddb_flush_interval_flag
bool PRM_JSON_LOG_ALLOCATIONS
SESSION_PARAM * session_get_session_parameter(THREAD_ENTRY *thread_p, PARAM_ID id)
Definition: session.c:2714
bool PRM_LOG_PGBUF_VICTIM_FLUSH
static unsigned int prm_intl_check_input_string_flag
#define PRM_ADJUST_FOR_GET_FLOAT_TO_FLOAT(prm, out_val, in_val, err)
static bool prm_log_trace_debug_default
static int prm_io_backup_nbuffers_lower
static int prm_java_stored_procedure_port_lower
static unsigned int prm_ha_applylogdb_max_commit_interval_in_msecs_flag
#define PRM_NAME_IO_TEMP_VOLUME_PATH
#define PRM_NAME_ENABLE_NEW_LFHASH
#define PRM_NAME_FAULT_INJECTION_TEST
const char * PRM_HA_REPL_FILTER_FILE
#define PRM_NAME_HA_DELAY_LIMIT
static int prm_ha_copy_log_timeout_lower
int sysprm_set_error(SYSPRM_ERR rc, const char *data)
#define PRM_NAME_ORACLE_STYLE_OUTERJOIN
static void sysprm_set_system_parameter_value(SYSPRM_PARAM *prm, SYSPRM_VALUE value)
static unsigned int prm_hf_unfill_factor_flag
#define PRM_NAME_HOSTVAR_LATE_BINDING
static unsigned int prm_max_agg_hash_size_flag
#define ER_CT_UNKNOWN_REPRID
Definition: error_code.h:493
#define PRM_NAME_TDE_DEFAULT_ALGORITHM
int PRM_XASL_CACHE_MAX_CLONES
static int prm_ha_log_applier_state_lower
char * or_pack_string(char *ptr, const char *string)
bool PRM_OPTIMIZER_ENABLE_AGGREGATE_OPTIMIZATION
#define PRM_NAME_ONLY_FULL_GROUP_BY
#define PRM_NAME_UNICODE_OUTPUT_NORMALIZATION
PGBUF_DEBUG_PAGE_VALIDATION_LEVEL
bool PRM_OPTIMIZER_RESERVE_07
enum param_id PARAM_ID
static int prm_ha_applylogdb_max_commit_interval_in_msecs_lower
static int prm_unloaddb_lock_timeout_lower
#define PRM_NAME_BT_OID_BUFFER_SIZE
static int prm_pb_nbuffers_lower
static unsigned int prm_java_stored_procedure_flag
bool PRM_XASL_CACHE_LOGGING
static unsigned int prm_use_orderby_sort_limit_flag
static bool prm_general_reserve_01_default
bool PRM_OPTIMIZER_RESERVE_15
static unsigned int prm_replication_mode_flag
int PRM_HA_CHECK_DISK_FAILURE_INTERVAL_IN_SECS
static unsigned int prm_object_print_format_oid_flag
bool PRM_NO_BACKSLASH_ESCAPES
static float prm_hf_unfill_factor_default
static const bool prm_postpone_debug_default
int PRM_THREAD_WORKER_TIMEOUT_SECONDS
#define assert_release(e)
Definition: error_manager.h:96
int session_set_session_parameters(THREAD_ENTRY *thread_p, SESSION_PARAM *session_parameters)
Definition: session.c:1641
static int prm_shutdown_wait_time_in_secs_default
static unsigned int prm_xasl_cache_max_clones_flag
static void prm_report_bad_entry(const char *key, int line, int err, const char *where)
static int prm_week_format_upper
int tz_resolve_os_timezone(char *timezone, int buf_len)
Definition: tz_support.c:4588
static unsigned int prm_bosr_maxtmp_flag
bool PRM_DEBUG_LOG_ARCHIVES
#define PRM_NAME_DEFAULT_WEEK_FORMAT
#define PRM_NAME_INTL_NUMBER_LANG
static unsigned int prm_unloaddb_ignore_error_flag
#define PRM_NAME_OPTIMIZER_RESERVE_03
#define PRM_NAME_HA_MAX_HEARTBEAT_GAP
static int prm_xasl_cache_time_threshold_in_minutes_upper
static bool prm_java_stored_procedure_default
static bool prm_log_query_lists_default
#define PRM_NAME_CALL_STACK_DUMP_DEACTIVATION
static bool prm_read_only_mode_default
void tz_set_tz_region_system(const TZ_REGION *tz_region)
Definition: tz_support.c:4650
int util_byte_to_size_string(char *buf, size_t len, UINT64 size_num)
Definition: util_common.c:955
int ini_seccmp(const char *key1, const char *key2)
Definition: ini_parser.c:786
int PRM_ER_LOG_VACUUM
static UINT64 prm_log_volume_size_default
bool PRM_CSQL_AUTO_COMMIT
static bool prm_gc_enable_default
static unsigned int prm_pb_lru_buffer_ratio_flag
#define PRM_IS_RELOADABLE(x)
static int prm_ha_copy_log_timeout_default
static unsigned int prm_gc_enable_flag
static const bool prm_compensate_debug_default
static void prm_tune_parameters(void)
static unsigned int prm_pb_aout_ratio_flag
#define PRM_EMPTY_FLAG
#define PRM_NAME_LK_ESCALATION_AT
#define PRM_NAME_THREAD_CONNECTION_POOLING
static unsigned int prm_log_media_failure_support_flag
#define PRM_IS_DIFFERENT(x)
bool PRM_INTL_MBS_SUPPORT
bool PRM_LOGPB_LOGGING_DEBUG
#define ER_PARTITION_NOT_EXIST
Definition: error_code.h:1110
const char * PRM_SERVICE_SERVER_LIST
#define PRM_NAME_CLIENT_CLASS_CACHE_DEBUG
#define PRM_NAME_FILTER_PRED_MAX_CACHE_ENTRIES
static int num_session_parameters
static unsigned int prm_tcp_nodelay_flag
static int prm_css_max_clients_upper
#define PRM_NAME_FORCE_REMOVE_LOG_ARCHIVES
int PRM_HA_UNACCEPTABLE_PROC_RESTART_TIMEDIFF
#define PRM_NAME_DWB_SIZE
static bool prm_dont_reuse_heap_file_default
static const char * prm_ha_db_list_default
static int prm_week_format_default
#define PRM_NAME_OPTIMIZER_RESERVE_17
bool PRM_OPTIMIZER_RESERVE_13
static int prm_ha_copy_log_max_archives_upper
static float prm_pb_lru_hot_ratio_default
static unsigned int prm_tcp_sndbuf_size_flag
#define PRM_NAME_CONNECTION_LOGGING
static bool prm_debug_logwr_default
static int prm_pb_sync_on_nflush_upper
static UINT64 prm_max_agg_hash_size_upper
static unsigned int prm_check_peer_alive_flag
int PRM_ER_LOG_LEVEL
static unsigned int prm_debug_bestspace_flag
bool PRM_NEW_LFHASH
static int prm_xasl_cache_time_threshold_in_minutes_default
static unsigned int prm_event_activation_flag
static bool prm_access_ip_control_default
#define PRM_NAME_PAGE_BG_FLUSH_INTERVAL
static unsigned int prm_ha_init_timer_im_msecs_flag
#define ER_PRM_BAD_VALUE
Definition: error_code.h:1048
int PRM_SHUTDOWN_WAIT_TIME_IN_SECS
static int prm_io_backup_nbuffers_default
#define PRM_NAME_HA_APPLY_MAX_MEM_SIZE
static bool prm_compat_numeric_division_scale_default
#define PRM_NAME_READ_ONLY_MODE
#define PRM_NAME_TZ_LEAP_SECOND_SUPPORT
#define PRM_NAME_HA_REPL_ENABLE_SERVER_SIDE_UPDATE
static bool prm_optimizer_reserve_05_default
#define PRM_NAME_LOADDB_FLUSH_INTERVAL
#define PRM_NAME_HA_SQL_LOG_MAX_SIZE_IN_MB
static unsigned int prm_er_log_size_flag
static int prm_er_stop_on_error_upper
char * sysprm_pack_assign_values(char *ptr, const SYSPRM_ASSIGN_VALUE *assign_values)
static const char sysprm_ha_conf_file_name[]
char * PRM_SERVER_TIMEZONE
static unsigned int prm_compactdb_page_reclaim_only_flag
static const char sysprm_error_log_file[]
#define OR_INT64_SIZE
static int prm_index_scan_key_buffer_pages_lower
static const char * prm_er_log_file_default
int tz_load(void)
Definition: tz_support.c:337
static bool * prm_call_stack_dump_activation_default
#define HB_MIN_DIFF_CHECK_DISK_FAILURE_INTERVAL_IN_SECS
Definition: heartbeat.h:48
static bool * prm_ha_applylogdb_retry_error_list_default
static int prm_compat_mode_default
const char * name
static bool prm_plus_as_concat_default
#define PRM_COMPOUND
#define PRM_NAME_HA_APPLYLOGDB_MAX_COMMIT_INTERVAL
#define PARAM_MSG_FMT(msgid)
#define PRM_NAME_IB_TASK_MEMSIZE
#define PRM_GET_FLOAT(x)
static unsigned int prm_loaddb_workers_flag
static unsigned int prm_max_hash_list_scan_size_flag
char * or_unpack_string_nocopy(char *ptr, char **string)
#define PRM_NAME_LOG_NBUFFERS
static int prm_csql_history_num_default
#define HB_DEFAULT_CALC_SCORE_INTERVAL_IN_MSECS
Definition: heartbeat.h:37
static bool prm_log_pgbuf_victim_flush_default
#define PRM_NAME_PB_SYNC_ON_NFLUSH
#define PRM_NAME_EXAMINE_CLIENT_CACHED_LOCKS
void ini_parser_free(INI_TABLE *ini)
Definition: ini_parser.c:683
static UINT64 prm_string_max_size_bytes_lower
static int prm_sort_limit_max_count_default
static unsigned int prm_lk_timeout_message_dump_level_flag
const char * PRM_IO_VOLUME_EXT_PATH
static bool prm_optimizer_reserve_07_default
int util_time_string_to_msec(INT64 *msec_num, char *time_str)
Definition: util_common.c:1155
static unsigned int prm_dl_fork_flag
static unsigned int prm_ha_port_id_flag
static bool prm_only_full_group_by_default
static unsigned int prm_adaptive_flush_control_flag
bool PRM_DEBUG_REPLICATION_DATA
static unsigned int prm_postpone_debug_flag
int PRM_LIST_QUERY_CACHE_MODE
static unsigned int prm_ha_heartbeat_interval_in_msecs_flag
int PRM_THREAD_LOGGING_FLAG
static int prm_tcp_connection_timeout_lower
static unsigned int prm_pb_nbuffers_flag
static int prm_suppress_fsync_upper
int er_errid(void)
static unsigned int prm_read_only_mode_flag
#define PRM_NAME_LOG_BACKGROUND_ARCHIVING
static unsigned int prm_ha_replica_list_flag
#define ER_IO_FORMAT_BAD_NPAGES
Definition: error_code.h:56
static unsigned int prm_general_reserve_01_flag
static unsigned int prm_list_query_cache_mode_flag
int PRM_LOG_CHECKPOINT_SLEEP_MSECS
static int prm_er_log_size_lower
#define PRM_NAME_MUTEX_BUSY_WAITING_CNT
#define PRM_NAME_LK_ROLLBACK_ON_LOCK_ESCALATION
static bool prm_unique_error_key_value_default
static float prm_lk_run_deadlock_interval_lower
#define PRM_GET_BIGINT(x)
#define PRM_NAME_LOGPB_LOGGING_DEBUG
const char * PRM_HA_PING_HOSTS
#define PRM_NAME_OPTIMIZER_RESERVE_16
void sysprm_free_assign_values(SYSPRM_ASSIGN_VALUE **assign_values_ptr)
static unsigned int prm_ha_process_dereg_confirm_interval_in_msecs_flag
static unsigned int prm_ha_copy_sync_mode_flag
#define bool
Definition: dbi_compat.h:31
#define ER_TF_BUFFER_UNDERFLOW
Definition: error_code.h:387
static unsigned int prm_dwb_size_default
static unsigned int prm_debug_autocommit_flag
int PRM_HA_PROCESS_START_CONFIRM_INTERVAL_IN_MSECS
#define ER_NOT_SOLE_TRAN
Definition: error_code.h:1051
#define PRM_IS_INTEGER_LIST(x)
static bool prm_bt_index_scan_oid_order_default
int sysprm_load_and_init_client(const char *db_name, const char *conf_file)
SYSPRM_ERR sysprm_obtain_parameters(char *data, SYSPRM_ASSIGN_VALUE **prm_values_ptr)
int css_get_max_socket_fds(void)
Definition: tcp.c:1315
static unsigned int prm_er_log_vacuum_flag
int util_msec_to_time_string(char *buf, size_t len, INT64 msec_num)
Definition: util_common.c:1112
INI_TABLE * ini_parser_load(const char *ininame)
Definition: ini_parser.c:569
static UINT64 prm_db_volume_size_default
bool PRM_SQL_TRACE_EXECUTION_PLAN
static bool prm_lk_rollback_on_lock_escalation_default
static int prm_list_max_query_cache_entries_upper
#define PRM_NAME_EXTENDED_STATISTICS_ACTIVATION
int sysprm_init_intl_param(void)
float PRM_BT_UNFILL_FACTOR
int PRM_DATA_FILE_ADVISE
static int prm_ha_repl_filter_type_default
static int prm_sql_trace_slow_msecs_upper
static bool prm_allow_truncated_string_default
static bool prm_er_production_mode_default
int PRM_HA_MAX_PROCESS_DEREG_CONFIRM
bool PRM_DWB_LOGGING
static unsigned int prm_log_trace_flush_time_msecs_flag
int PRM_LOG_MAX_ARCHIVES
#define PRM_NAME_DWB_LOGGING
bool PRM_POSTPONE_DEBUG
#define ER_FILE_ALLOC_NOPAGES
Definition: error_code.h:687
#define PRM_NAME_XASL_CACHE_MAX_CLONES
#define PRM_GET_INT(x)
static int prm_log_checkpoint_interval_secs_lower
bool PRM_PLUS_AS_CONCAT
#define PRM_NAME_BOSR_MAXTMP_PAGES
static int prm_ha_check_disk_failure_interval_in_secs_default
#define PRM_NAME_LOG_COMPRESS
#define PRM_NAME_HA_DB_LIST
static bool prm_log_no_logging_default
static KEYVAL ha_log_applier_state_words[]
static int prm_ha_delay_limit_in_secs_upper
static bool prm_repr_cache_log_default
static unsigned int prm_ignore_trailing_space_flag
static bool prm_tcp_nodelay_default
static bool prm_unicode_output_normalization_default
static int prm_set(SYSPRM_PARAM *prm, const char *value, bool set_flag)
#define PRM_NAME_HA_PORT_ID
void prm_set_integer_value(PARAM_ID prm_id, int value)
static int prm_filter_pred_max_cache_entries_default
#define PRM_NAME_SORT_BUFFER_SIZE
int PRM_HA_DELAY_LIMIT_DELTA_IN_SECS
void sysprm_final(void)
#define PRM_NAME_OPTIMIZER_RESERVE_10
static unsigned int prm_xasl_cache_time_threshold_in_minutes_flag
#define PRM_NAME_LOG_ISOLATION_LEVEL
#define PRM_NAME_TB_DEFAULT_REUSE_OID
static unsigned int prm_unicode_input_normalization_flag
float PRM_LK_RUN_DEADLOCK_INTERVAL
#define ULLONG_MAX
Definition: porting.h:81
#define ER_PRM_CANNOT_CHANGE
Definition: error_code.h:1049
static unsigned int prm_filter_pred_max_cache_clones_flag
int PRM_CSS_MAX_CLIENTS
static bool prm_no_backslash_escapes_default
#define PRM_NAME_COMPAT_PRIMARY_KEY
bool PRM_LOG_BTREE_OPS
#define PRM_NAME_OPTIMIZER_RESERVE_12
static unsigned int prm_pipes_as_concat_flag
static int prm_log_checkpoint_interval_secs_default
static unsigned int prm_track_requests_flag
static int prm_hf_max_bestspace_entries_default
static unsigned int prm_ha_node_list_flag
static unsigned int prm_cfg_db_hosts_flag
static bool prm_debug_es_default
bool PRM_UNICODE_OUTPUT_NORMALIZATION
static int prm_lk_max_scanid_bit_default
#define HA_LOG_APPLIER_STATE_WORKING_STR
int PRM_CHECK_PEER_ALIVE
UINT64 PRM_IO_BACKUP_MAX_VOLUME_SIZE
static int prm_sort_limit_max_count_lower
#define PRM_NAME_LK_TIMEOUT_SECS
#define PRM_NAME_JAVA_STORED_PROCEDURE_JVM_OPTIONS
#define MAX_ALIGNMENT
Definition: memory_alloc.h:70
static unsigned int prm_pthread_scope_process_flag
#define PRM_FOR_SERVER
#define PRM_NAME_TCP_KEEPALIVE
#define ER_CT_INVALID_REPRID
Definition: error_code.h:494
static unsigned int prm_block_nowhere_statement_flag
#define PRM_NAME_HA_COPY_LOG_TIMEOUT
static unsigned int prm_ha_copy_log_base_flag
#define PRM_NAME_TRACK_REQUESTS
#define HA_MODE_FAIL_BACK_STR
bool PRM_REPR_CACHE_LOG
static int prm_check_parameters(void)
static int prm_ha_port_id_lower
#define PRM_NAME_SERVICE_SERVER_LIST
static float prm_bt_oid_nbuffers_upper
static float prm_bt_oid_nbuffers_default
#define PRM_NAME_LOG_UNIQUE_STATS
static int prm_ha_sql_log_max_size_in_mb_lower
const char * PRM_ER_LOG_FILE
#define PRM_NAME_LOG_BTREE_OPS
#define PRM_NAME_OPTIMIZER_RESERVE_20
static unsigned int prm_optimizer_reserve_20_flag
bool PRM_LOG_CHKPT_DETAILED
static unsigned int prm_pb_neighbor_flush_pages_upper
static unsigned int prm_ha_calc_score_interval_in_msecs_flag
void prm_set_integer_list_value(PARAM_ID prm_id, int *value)
static unsigned int prm_pb_debug_page_validation_level_flag
static unsigned int prm_log_isolation_level_flag
#define HB_DEFAULT_MAX_PROCESS_START_CONFIRM
Definition: heartbeat.h:43
static bool prm_debug_bestspace_default
static bool prm_optimizer_reserve_20_default
static bool prm_log_sweep_clean_default
static void prm_set_compound(SYSPRM_PARAM *param, const char **compound_param_values[], const int values_count, bool set_flag)
bool PRM_OBJECT_PRINT_FORMAT_OID
static int prm_log_isolation_level_upper
char * sysprm_pack_session_parameters(char *ptr, SESSION_PARAM *session_parameters)
int PRM_WS_HASHTABLE_SIZE
static float prm_pb_lru_hot_ratio_lower
#define HB_DEFAULT_START_CONFIRM_INTERVAL_IN_MSECS
Definition: heartbeat.h:41
bool PRM_LOG_BACKGROUND_ARCHIVING
#define PRM_GET_SERVER
static int prm_er_log_size_default
static unsigned int prm_access_ip_control_file_flag
bool PRM_USE_STAT_ESTIMATION
float PRM_PB_LRU_HOT_RATIO
static int prm_ha_sql_log_max_size_in_mb_default
#define OR_FLOAT_SIZE
int PRM_FILTER_PRED_MAX_CACHE_ENTRIES
#define PRM_NAME_ER_LOG_LEVEL
#define SYSPRM_LOAD_IS_IGNORE_HA(flags)
static bool prm_query_trace_default
static unsigned int prm_dwb_blocks_flag
static unsigned int prm_plus_as_concat_flag
static unsigned int prm_server_timezone_flag
#define PRM_NAME_LIST_MAX_QUERY_CACHE_PAGES
static int prm_max_entries_in_temp_file_cache_default
bool PRM_PB_NEIGHBOR_FLUSH_NONDIRTY
static unsigned int prm_hf_max_bestspace_entries_flag
static bool prm_debug_autocommit_default
static unsigned int prm_er_exit_ask_flag
static unsigned int prm_sql_trace_ioreads_flag
static bool prm_thread_worker_pooling_default
#define PRM_NAME_MULTI_RANGE_OPT_LIMIT
void * prm_get_value(PARAM_ID prm_id)
int PRM_ER_BTREE_DEBUG
static int prm_ha_replica_delay_in_secs_upper
static bool * prm_call_stack_dump_deactivation_default
static unsigned int prm_return_null_on_function_errors_flag
int PRM_INSERT_MODE
int PRM_REMOVE_LOG_ARCHIVES_INTERVAL
bool PRM_QO_DUMP
static const char * prm_ha_ping_hosts_default
static UINT64 prm_ddl_audit_log_size_default
#define PRM_NAME_OPTIMIZER_RESERVE_02
static unsigned int prm_agg_hash_respect_order_flag
#define TZ_GENERIC_NAME_SIZE
char * intl_mbs_ncpy(char *mbs1, const char *mbs2, size_t n)
Definition: intl_support.c:489
static unsigned int prm_debug_replication_data_flag
void THREAD_ENTRY
#define PRM_NAME_ER_STOP_ON_ERROR
static int prm_multi_range_opt_limit_default
int PRM_JSON_MAX_ARRAY_IDX
bool PRM_LOG_QUERY_LISTS
#define PRM_NAME_TEST_MODE
static int prm_list_query_cache_mode_upper
static unsigned int prm_thread_worker_timeout_seconds_flag
#define PRM_NAME_OPTIMIZER_RESERVE_07
#define PRM_NAME_PB_NUM_PRIVATE_CHAINS
#define PRM_NAME_PTHREAD_SCOPE_PROCESS
static unsigned int prm_er_log_level_flag
static int prm_page_bg_flush_interval_msec_lower
bool PRM_BLOCK_NOWHERE_STATEMENT
#define PRM_NAME_HA_CHANGEMODE_INTERVAL_IN_MSEC
int PRM_HA_APPLY_MAX_MEM_SIZE
int PRM_FAULT_INJECTION_TEST
static bool prm_mysql_trigger_correlation_names_default
static unsigned int prm_ha_replica_time_bound_flag
#define PRM_NAME_CALL_STACK_DUMP_ON_ERROR
static unsigned int prm_optimizer_reserve_18_flag
int PRM_LIST_MAX_QUERY_CACHE_ENTRIES
#define PRM_NAME_HF_UNFILL_FACTOR
UINT64 PRM_MAX_AGG_HASH_SIZE
static bool prm_pb_neighbor_flush_nondirty_default
static unsigned int prm_allow_truncated_string_flag
#define PRM_IS_BIGINT(x)
static bool prm_use_stat_estimation_default
static unsigned int prm_dont_reuse_heap_file_flag
static int prm_log_checkpoint_sleep_msecs_lower
void sysprm_tune_client_parameters(void)
#define ER_LOG_READ
Definition: error_code.h:137
#define ER_PB_UNFIXED_PAGEPTR
Definition: error_code.h:69
static int prm_compat_mode_upper
static UINT64 prm_io_backup_max_volume_size_upper
static int prm_ha_replica_delay_in_secs_lower
const char * lang_get_collation_name(const int coll_id)
#define PRM_NAME_DDL_AUDIT_LOG
static int prm_vacuum_worker_count_default
#define ER_IO_READ
Definition: error_code.h:62
static bool prm_sql_trace_execution_plan_default
#define PRM_NAME_REPLICATION_MODE
TZ_REGION * session_get_session_tz_region(THREAD_ENTRY *thread_p)
Definition: session.c:2950
#define PRM_NAME_THREAD_LOGGING_FLAG
#define PRM_NAME_TCP_PORT_ID
static unsigned int prm_disk_logging_flag
char * or_pack_int64(char *ptr, INT64 number)
static int prm_ws_hashtable_size_lower
#define PRM_NAME_USE_ORDERBY_SORT_LIMIT
static unsigned int prm_thread_connection_timeout_seconds_flag
bool PRM_DISK_LOGGING
#define PRM_PRINT_QRY_STRING(id)
int css_set_accessible_ip_info(void)
static unsigned int prm_string_max_size_bytes_flag
static float prm_hf_unfill_factor_lower
UINT64 prm_get_bigint_value(PARAM_ID prm_id)
#define PRM_NAME_LOG_ASYNC_COMMIT
static int prm_ha_max_process_start_confirm_default
bool PRM_OPTIMIZER_RESERVE_14
#define PRM_NAME_OPTIMIZER_ENABLE_AGGREGATE_OPTIMIZATION
static unsigned int prm_ha_max_heartbeat_gap_flag
static bool prm_thread_connection_pooling_default
static unsigned int prm_debug_es_flag
#define PRM_NAME_AUTO_RESTART_SERVER
const char * PRM_HA_COPY_LOG_BASE
#define PRM_IS_COMPOUND(x)
#define PRM_NAME_HA_SQL_LOGGING
const char * PRM_JAVA_STORED_PROCEDURE_JVM_OPTIONS
static int prm_fault_injection_test_upper
static UINT64 prm_group_concat_max_len_default
bool PRM_ANSI_QUOTES
static unsigned int prm_tde_default_algorithm_flag
static unsigned int prm_ha_sql_logging_flag
#define PRM_ADJUST_FOR_SET_BIGINT_TO_FLOAT(prm, out_val, in_val, err)
static unsigned int prm_force_remove_log_archives_flag
static unsigned int prm_block_ddl_statement_flag
static bool prm_oracle_style_empty_string_default
static unsigned int prm_dwb_size_upper
static unsigned int prm_thread_connection_pooling_flag
static unsigned int prm_auto_restart_server_flag
#define PRM_NAME_DATA_FILE_ADVISE
char * or_pack_float(char *ptr, float number)
static float prm_like_term_selectivity_upper
static int prm_ha_mode_default
static int prm_xasl_cache_max_entries_default
#define PRM_NAME_SHUTDOWN_WAIT_TIME_IN_SECS
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
bool PRM_HEAP_INFO_CACHE_LOGGING
static unsigned int prm_debug_log_archives_flag
static int prm_cte_max_recursions_default
static UINT64 prm_ddl_audit_log_size_lower
static int prm_pb_num_private_chains_lower
bool PRM_CALL_STACK_DUMP_ON_ERROR
static unsigned int prm_io_backup_max_volume_size_flag
static bool prm_auto_restart_server_default
static unsigned int prm_optimizer_reserve_16_flag
static unsigned int prm_sql_trace_slow_msecs_flag
#define PRM_IS_FOR_HA_CONTEXT(x)
static unsigned int prm_log_checkpoint_npages_flag
static KEYVAL pgbuf_debug_page_validation_level_words[]
static bool prm_force_restart_to_skip_recovery_default
int PRM_TDE_DEFAULT_ALGORITHM
bool PRM_OPTIMIZER_RESERVE_18
#define PRM_NAME_WS_MEMORY_REPORT
static unsigned int prm_dbfiles_protect_flag
static char * prm_tde_keys_file_path_default
static int prm_ha_failover_wait_time_in_msecs_default
#define PRM_NAME_OPTIMIZER_RESERVE_11
static bool prm_test_mode_default
static bool prm_log_background_archiving_default
static int prm_cte_max_recursions_lower
static int prm_pb_num_LRU_chains_upper
static unsigned int prm_ws_hashtable_size_flag
static float prm_pb_lru_hot_ratio_upper
static int prm_ha_sql_log_max_size_in_mb_upper
#define NUM_PRM
static int prm_ha_log_applier_state_upper
bool PRM_FAULT_INJECTION_ACTION_PREFER_ABORT_TO_EXIT
#define PRM_NAME_PB_BUFFER_FLUSH_RATIO
static unsigned int prm_thread_worker_pooling_flag
#define assert(x)
static SYSPRM_PARAM * prm_find(const char *pname, const char *section)
static UINT64 prm_ib_task_memsize_lower
static unsigned int prm_fault_injection_action_prefer_abort_to_exit_flag
#define PRM_NAME_ADAPTIVE_FLUSH_CONTROL
int PRM_XASL_CACHE_TIME_THRESHOLD_IN_MINUTES
static unsigned int prm_enable_histo_flag
#define PRM_NAME_ORACLE_STYLE_EMPTY_STRING
#define PRM_IS_SET(x)
#define PRM_NAME_HA_MAX_PROCESS_DEREG_CONFIRM
static SYSPRM_ERR sysprm_validate_escape_char_parameters(const SYSPRM_ASSIGN_VALUE *assignment_list)
#define ER_LK_PAGE_TIMEOUT
Definition: error_code.h:134
#define PRM_FOR_HA_CONTEXT
static unsigned int prm_require_like_escape_character_flag
static int prm_ha_delay_limit_delta_in_secs_upper
static unsigned int prm_ansi_quotes_flag
static unsigned int prm_log_group_commit_interval_msecs_flag
bool PRM_JAVA_STORED_PROCEDURE_RESERVE_01
#define PRM_NAME_JSON_LOG_ALLOCATIONS
UINT64 PRM_MAX_HASH_LIST_SCAN_SIZE
static unsigned int prm_tde_keys_file_path_flag
FI_TEST_CODE * fi_Groups[FI_GROUP_MAX+1]
void sysprm_set_er_log_file(const char *db_name)
const char * PRM_SERVICE_SERVICE_LIST
int or_packed_string_length(const char *string, int *strlen)
static int prm_thread_connection_timeout_seconds_default
static int prm_thread_worker_timeout_seconds_upper
int PRM_PB_NUM_LRU_CHAINS
#define ASSERT_ALIGN(ptr, alignment)
static unsigned int prm_stats_on_flag
static unsigned int prm_alter_table_change_type_strict_flag
#define PRM_NAME_USE_SYSTEM_MALLOC
static int prm_fault_injection_test_flag
#define PRM_FORCE_SERVER
static int prm_max_pages_in_temp_file_cache_lower
static SYSPRM_ERR sysprm_generate_new_value(SYSPRM_PARAM *prm, const char *value, bool check, SYSPRM_VALUE *new_value)
#define NUM_SESSION_PRM
#define PRM_NAME_SERVICE_SERVICE_LIST
#define PRM_NAME_MNT_WAITING_THREAD
#define PRM_IS_FOR_SESSION(x)
static bool prm_create_table_reuseoid_default
static bool prm_optimizer_reserve_18_default
static unsigned int prm_thread_logging_flag_flag
int prm_get_integer_value(PARAM_ID prm_id)
static int prm_extended_statistics_default
static int prm_size_to_io_pages(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
#define ER_GENERIC_ERROR
Definition: error_code.h:49
#define PRM_NAME_LOG_GROUP_COMMIT_INTERVAL_MSECS
static int prm_data_file_advise_default
static unsigned int prm_log_compress_flag
#define PRM_NAME_MAX_FLUSH_SIZE_PER_SECOND
static int prm_vacuum_master_wakeup_interval_default
static int prm_ha_repl_filter_type_upper
static unsigned int prm_extended_statistics_flag
bool PRM_ENABLE_DWB_FLUSH_THREAD
#define PRM_NAME_UPDATE_USE_ATTRIBUTE_REFERENCES
static int prm_tcp_rcvbuf_size_default
int PRM_HA_COPY_LOG_MAX_ARCHIVES
static unsigned int prm_compat_numeric_division_scale_flag
static unsigned int prm_ha_applylogdb_retry_error_list_flag
static int prm_temp_mem_buffer_pages_upper
static void sysprm_update_session_prm_flag_allocated(SESSION_PARAM *prm)
static int prm_ha_applylogdb_max_commit_interval_in_msecs_upper
static char * prm_server_timezone_default
int PRM_INDEX_SCAN_KEY_BUFFER_PAGES
static unsigned int prm_max_pages_in_temp_file_cache_flag
static int prm_loaddb_workers_lower
bool PRM_UNLOADDB_IGNORE_ERROR
#define PRM_NAME_HA_REPLICA_DELAY
static float prm_pb_buffer_flush_ratio_lower
#define ER_PAGE_LATCH_TIMEDOUT
Definition: error_code.h:1042
#define HB_DEFAULT_HEARTBEAT_INTERVAL_IN_MSECS
Definition: heartbeat.h:36
static bool prm_pipes_as_concat_default
static bool prm_ignore_trailing_space_default
static int prm_vacuum_master_wakeup_interval_lower
static int * prm_fault_injection_id_default
#define ER_OUT_OF_VIRTUAL_MEMORY
Definition: error_code.h:50
static bool prm_log_unique_stats_default
static unsigned int prm_enable_dwb_flush_thread_flag
bool PRM_ONLY_FULL_GROUP_BY
static bool prm_block_ddl_statement_default
static UINT64 prm_thread_stacksize_lower
static int prm_tcp_port_id_lower
int PRM_LOG_GROUP_COMMIT_INTERVAL_MSECS
#define ER_HEAP_OVFADDRESS_CORRUPTED
Definition: error_code.h:106
int PRM_RESET_TR_PARSER
static int prm_io_backup_sleep_msecs_lower
#define PRM_NAME_LIST_MAX_QUERY_CACHE_ENTRIES
#define PRM_NAME_DISABLE_VACUUM
static int prm_insert_mode_default
char * PRM_TIMEZONE
static unsigned int prm_ha_server_state_flag
#define PRM_NAME_NO_BACKSLASH_ESCAPES
#define HB_DEFAULT_INIT_TIMER_IN_MSECS
Definition: heartbeat.h:35
static int prm_session_timeout_default
static int prm_ha_log_applier_state_default
#define PRM_GET_INTEGER_LIST(x)
int PRM_DEFAULT_WEEK_FORMAT
bool PRM_DONT_REUSE_HEAP_FILE
static bool prm_optimizer_reserve_06_default
static int prm_remove_log_archives_interval_lower
LANG_COLLATION * lang_get_collation_by_name(const char *coll_name)
#define PRM_NAME_SESSION_STATE_TIMEOUT
static unsigned int prm_xasl_cache_max_entries_flag
static int prm_ha_apply_max_mem_size_upper
char * sysprm_unpack_assign_values(char *ptr, SYSPRM_ASSIGN_VALUE **assign_values_ptr)
static unsigned int prm_json_max_array_idx_flag
#define PRM_NAME_ALTER_TABLE_CHANGE_TYPE_STRICT
#define HA_SERVER_STATE_DEAD_STR
Definition: boot.h:133
#define PRM_NAME_HA_PROCESS_DEREG_CONFIRM_INTERVAL_IN_MSECS
#define PRM_IS_FOR_CLIENT(x)
static int prm_suppress_fsync_default
static bool prm_pthread_scope_process_default
bool PRM_DDL_AUDIT_LOG
static int prm_reset_tr_parser_default
int sysprm_load_and_init(const char *db_name, const char *conf_file, const int load_flags)
static int prm_lk_escalation_at_default
static int prm_query_trace_format_default
static int prm_msec_to_sec(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
static int prm_tde_default_algorithm
static unsigned int prm_optimizer_reserve_12_flag
SYSPRM_ASSIGN_VALUE * xsysprm_get_force_server_parameters(void)
int sysprm_packed_session_parameters_length(SESSION_PARAM *session_parameters, int offset)
static bool prm_use_orderby_sort_limit_default
int prm_get_master_port_id(void)
static unsigned int prm_dwb_blocks_default
#define PRM_NAME_LK_RUN_DEADLOCK_INTERVAL
#define PRM_NAME_LIST_QUERY_CACHE_MODE
static int prm_check_range(SYSPRM_PARAM *prm, void *value)
int PRM_SESSION_STATE_TIMEOUT
#define PRM_NAME_MAX_ENTRIES_IN_TEMP_FILE_CACHE
bool PRM_LK_ROLLBACK_ON_LOCK_ESCALATION
static int prm_sql_trace_slow_msecs_lower
#define PRM_NAME_DEBUG_BESTSPACE
#define ER_HA_GENERIC_ERROR
Definition: error_code.h:1297
#define HA_SERVER_STATE_MAINTENANCE_STR
Definition: boot.h:132
#define PRM_NAME_OPTIMIZER_ENABLE_MERGE_JOIN
static bool prm_new_lfhash_default
static int prm_vacuum_log_block_pages_default
int sysprm_print_assign_values(SYSPRM_ASSIGN_VALUE *prm_values, char *buffer, int length)
static UINT64 prm_string_max_size_bytes_default
int PRM_SORT_LIMIT_MAX_COUNT
#define DB_MAX_IDENTIFIER_LENGTH
Definition: dbtype_def.h:495
static bool prm_use_system_malloc_default
static void sysprm_set_sysprm_value_from_parameter(SYSPRM_VALUE *prm_value, SYSPRM_PARAM *prm)
bool PRM_RETURN_NULL_ON_FUNCTION_ERRORS
int str_to_uint64(UINT64 *ret_p, char **end_p, const char *str_p, int base)
Definition: porting.c:2449
#define PRM_NAME_IO_BACKUP_MAX_VOLUME_SIZE
#define PRM_NAME_IO_BACKUP_NBUFFERS
static int prm_multi_range_opt_limit_upper
static unsigned int prm_optimizer_reserve_14_flag
#define PRM_NAME_USE_STAT_ESTIMATION
static unsigned int prm_suppress_fsync_flag
#define PRM_NAME_MYSQL_TRIGGER_CORRELATION_NAMES
int sysprm_check_range(const char *pname, void *value)
int PRM_LOG_TRACE_FLUSH_TIME_MSECS
static const char * prm_ha_replica_list_default
static int prm_size_to_log_pages(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
#define PRM_NAME_THREAD_STACKSIZE
static unsigned int prm_optimizer_reserve_10_flag
int * PRM_EVENT_ACTIVATION
const char * PRM_EVENT_HANDLER
static int prm_list_query_cache_mode_lower
static int prm_csql_history_num_lower
static bool prm_tcp_keepalive_default
#define HA_SERVER_STATE_TO_BE_STANDBY_STR
Definition: boot.h:131
static bool prm_optimizer_reserve_13_default
SYSPRM_DATATYPE
#define PRM_NAME_HEAP_INFO_CACHE_LOGGING
int size
Definition: ini_parser.h:37
#define HB_DEFAULT_CHANGEMODE_INTERVAL_IN_MSECS
Definition: heartbeat.h:46
static unsigned int prm_log_nbuffers_flag
static int prm_pb_sync_on_nflush_lower
struct session_param SESSION_PARAM
#define PRM_NAME_OPTIMIZER_RESERVE_13
bool PRM_CSQL_SINGLE_LINE_MODE
void xsysprm_change_server_parameters(const SYSPRM_ASSIGN_VALUE *assignments)
static int prm_csql_history_num_upper
#define min(a, b)
int PRM_EXTENDED_STATISTICS
static bool prm_return_null_on_function_errors_default
static bool prm_examine_client_cached_locks_default
static float prm_pb_lru_buffer_ratio_default
#define PRM_NAME_DEBUG_LOG_WRITER
bool PRM_OPTIMIZER_RESERVE_16
#define PRM_NAME_PAGE_BUFFER_SIZE
int PRM_LOG_NBUFFERS
#define PRM_NAME_PB_AOUT_RATIO
bool PRM_OPTIMIZER_RESERVE_06
static unsigned int prm_examine_client_cached_locks_flag
int session_get_session_parameters(THREAD_ENTRY *thread_p, SESSION_PARAM **session_parameters_ptr)
Definition: session.c:1613
static const char * compat_mode_values_PRM_ANSI_QUOTES[COMPAT_ORACLE+2]
static KEYVAL boolean_words[]
static unsigned int prm_ha_repl_filter_file_flag
static unsigned int prm_pb_buffer_flush_ratio_flag
#define PRM_NAME_DEBUG_LOG_ARCHIVES
int tz_str_to_region(const char *tz_str, const int tz_str_size, TZ_REGION *tz_region)
Definition: tz_support.c:1286
static unsigned int prm_er_log_warning_flag
#define PRM_NAME_HA_REPLICA_TIME_BOUND
static unsigned int prm_ha_delay_limit_in_secs_flag
static bool prm_track_requests_default
static bool prm_pb_monitor_locks_default
static int prm_sql_trace_ioreads_default
static const char * prm_java_stored_procedure_jvm_options_default
#define PRM_DIFFERENT
#define HA_LOG_APPLIER_STATE_ERROR_STR
#define PRM_ALLOCATED
int PRM_SQL_TRACE_SLOW_MSECS
bool PRM_FORCE_REMOVE_LOG_ARCHIVES
static const char sysprm_conf_file_name[]
static unsigned int prm_enable_string_compression_flag
#define PRM_NAME_OPTIMIZER_RESERVE_09
static unsigned int prm_temp_mem_buffer_pages_flag
#define PRM_ADJUST_FOR_GET_FLOAT_TO_BIGINT(prm, out_val, in_val, err)
int sysprm_reload_and_init(const char *db_name, const char *conf_file)
static int prm_max_flush_pages_per_second_default
static bool prm_file_logging_default
#define PRM_NAME_DEBUG_ES
static bool prm_optimizer_enable_merge_join_default
static UINT64 prm_group_concat_max_len_upper
#define PRM_NAME_ENABLE_DWB_FLUSH_THREAD
#define PRM_NAME_CSQL_SINGLE_LINE_MODE
static unsigned int prm_oracle_style_empty_string_flag
static int prm_sec_to_min(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
#define PRM_NAME_FILTER_PRED_MAX_CACHE_CLONES
#define PRM_DEFAULT_VAL_USED(x)
unsigned int flag
static int prm_log_max_archives_lower
static unsigned int prm_only_full_group_by_flag
static int prm_session_timeout_upper
bool PRM_UNIQUE_ERROR_KEY_VALUE
static int prm_extended_statistics_lower
#define GET_PRM_STATIC_FLAG(id)
bool PRM_AUTO_RESTART_SERVER
static int prm_ha_server_state_upper
static void cleanup(int signo)
Definition: broker.c:717
bool PRM_INTL_CHECK_INPUT_STRING
bool PRM_OPTIMIZER_RESERVE_19
#define PRM_NAME_ER_BTREE_DEBUG
bool PRM_TRACK_REQUESTS
static bool prm_debug_log_archives_default
static unsigned int prm_dwb_blocks_upper
#define PRM_ADJUST_FOR_GET_INTEGER_TO_BIGINT(prm, out_val, in_val, err)
int PRM_JAVA_STORED_PROCEDURE_PORT
const char * PRM_TDE_KEYS_FILE_PATH
static int prm_ha_apply_max_mem_size_default
static bool prm_optimizer_reserve_17_default
int PRM_PAGE_BG_FLUSH_INTERVAL_MSEC
static unsigned int prm_generic_vol_prealloc_size_flag
static unsigned int prm_log_no_logging_flag
#define PRM_NAME_LOADDB_WORKER_COUNT
#define PRM_NAME_OPTIMIZER_RESERVE_08
static int prm_optimization_level_default
#define NULL
Definition: freelistheap.h:34
static UINT64 prm_ib_task_memsize_upper
char * PRM_INTL_DATE_LANG
static unsigned int prm_optimizer_reserve_06_flag
int PRM_QUERY_TRACE_FORMAT
static unsigned int prm_csql_single_line_mode_flag
static int prm_log_pages_to_size(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
bool PRM_LOG_TRACE_DEBUG
#define PRM_NAME_OPTIMIZER_RESERVE_14
static unsigned int prm_qo_dump_flag
#define strncpy_bufsize(buf, str)
Definition: porting.h:340
static int prm_java_stored_procedure_debug_upper
bool PRM_PIPES_AS_CONCAT
int PRM_LK_MAX_SCANID_BIT
#define PRM_NAME_ER_LOG_WARNING
static bool prm_log_btree_ops_default
static unsigned int prm_optimizer_reserve_04_flag
#define PRM_NAME_LOG_HEADER_FLUSH_INTERVAL
static bool prm_alter_table_change_type_strict_default
bool PRM_LOG_NO_LOGGING
int PRM_MNT_WAITING_THREAD
#define PRM_NAME_LOG_QUERY_LISTS
#define PRM_NAME_LOG_PGBUF_VICTIM_FLUSH
static int prm_xasl_cache_timeout_default
#define HB_DEFAULT_MAX_HEARTBEAT_GAP
Definition: heartbeat.h:47
char * or_unpack_float(char *ptr, float *number)
int PRM_HA_FAILOVER_WAIT_TIME_IN_MSECS
int PRM_LOADDB_WORKERS
static unsigned int prm_io_temp_volume_path_flag
bool prm_get_commit_on_shutdown(void)
UINT64 PRM_DDL_AUDIT_LOG_SIZE
static bool prm_json_log_allocations_default
bool PRM_THREAD_CONNECTION_POOLING
static int prm_ha_copy_log_timeout_upper
static unsigned int prm_log_volume_size_flag
#define PRM_NAME_UNLOADDB_IGNORE_ERROR
static unsigned int prm_ha_mode_flag
static int prm_get_next_param_value(char **data, char **prm, char **value)
int PRM_ER_EXIT_ASK
static bool prm_xasl_debug_dump_default
float PRM_PB_AOUT_RATIO
static unsigned int prm_vacuum_master_wakeup_interval_flag
static const char * prm_service_server_list_default
static UINT64 prm_thread_stacksize_default
static const char * compat_mode_values_PRM_ORACLE_STYLE_OUTERJOIN[COMPAT_ORACLE+2]
static unsigned int prm_compat_primary_key_flag
#define PRM_NAME_VACUUM_LOG_BLOCK_PAGES
static UINT64 prm_max_agg_hash_size_default
static int prm_bosr_maxtmp_pages
#define PRM_IS_FOR_SERVER(x)
static unsigned int prm_optimizer_reserve_07_flag
static char * sysprm_pack_sysprm_value(char *ptr, SYSPRM_VALUE value, SYSPRM_DATATYPE datatype)
static PARAM_ID sysprm_get_id(const SYSPRM_PARAM *prm)
UINT64 PRM_DB_VOLUME_SIZE
static KEYVAL tde_algorithm_words[]
const char * PRM_DL_FORK
int PRM_VACUUM_WORKER_COUNT
static bool prm_ansi_quotes_default
#define PRM_NAME_HA_COPY_LOG_BASE
bool PRM_IGNORE_TRAILING_SPACE
#define err(fd,...)
Definition: porting.h:431
static bool prm_qo_dump_default
PRM_PRINT_MODE
#define ER_PB_BAD_PAGEID
Definition: error_code.h:67
static int prm_ha_mode_upper
static int prm_mnt_waiting_thread_default
#define PRM_NAME_IO_LOCKF_ENABLE
#define PRM_NAME_HA_NODE_LIST
static int prm_session_timeout_lower
static bool prm_enable_histo_default
static int prm_vacuum_log_block_pages_upper
int PRM_JAVA_STORED_PROCEDURE_DEBUG
int PRM_VACUUM_LOG_BLOCK_PAGES
static int prm_log_group_commit_interval_msecs_lower
bool PRM_USE_SYSTEM_MALLOC
static float prm_bt_unfill_factor_default
#define PRM_HAS_SIZE_UNIT(x)
static unsigned int prm_data_file_advise_lower
int * PRM_HA_APPLYLOGDB_IGNORE_ERROR_LIST
SYSPRM_ERR sysprm_validate_change_parameters(const char *data, bool check, SYSPRM_ASSIGN_VALUE **assignments_ptr)
static float prm_pb_aout_ratio_upper
#define PRM_NAME_HF_MAX_BESTSPACE_ENTRIES
static char * prm_intl_number_lang_default
static int prm_ws_hashtable_size_default
static unsigned int prm_heap_info_cache_logging_flag
static int prm_mutex_busy_waiting_cnt_default
#define PRM_NAME_COMPENSATE_DEBUG
static int prm_ha_check_disk_failure_interval_in_secs_upper
int PRM_CTE_MAX_RECURSIONS
static char * sysprm_unpack_sysprm_value(char *ptr, SYSPRM_VALUE *value, SYSPRM_DATATYPE datatype)
char * or_unpack_int(char *ptr, int *number)
void sysprm_dump_parameters(FILE *fp)
#define PRM_NAME_HA_MAX_PROCESS_START_CONFIRM
#define ONE_M
Definition: porting.h:63
int sysprm_set_to_default(const char *pname, bool set_to_force)
#define PRM_NAME_ANSI_QUOTES
bool PRM_PB_MONITOR_LOCKS
static int prm_compat_mode_lower
static unsigned int prm_max_entries_in_temp_file_cache_flag
static unsigned int prm_index_scan_key_buffer_pages_flag
#define PRM_NAME_HA_REPLICA_LIST
static int prm_ha_replica_delay_in_secs_default
static unsigned int prm_ha_db_list_flag
#define PRM_NAME_LOG_MEDIA_FAILURE_SUPPORT
static bool prm_logpb_logging_debug_default
bool PRM_DEBUG_ES
int msgcat_init(void)
static int prm_max_outer_card_of_idxjoin_default
#define CSS_MAX_CLIENT_COUNT
bool PRM_DEBUG_LOGWR
bool PRM_LOG_UNIQUE_STATS
#define PRM_NAME_CSQL_HISTORY_NUM
#define PRM_NAME_ENABLE_STRING_COMPRESSION
bool PRM_XASL_DEBUG_DUMP
char * or_unpack_int64(char *ptr, INT64 *number)
static KEYVAL ha_repl_filter_type_words[]
bool PRM_HA_SQL_LOGGING
static UINT64 prm_max_hash_list_scan_size_upper
static int prm_list_max_query_cache_entries_lower
static float prm_pb_buffer_flush_ratio_upper
#define HA_MODE_ROLE_CHANGE_STR
bool PRM_BT_INDEX_SCAN_OID_ORDER
#define PRM_DIFFERENT_UNIT(x)
static bool prm_perf_test_mode_default
static unsigned int prm_event_handler_flag
static int prm_log_group_commit_interval_msecs_default
#define PRM_ADJUST_FOR_SET_BIGINT_TO_INTEGER(prm, out_val, in_val, err)
#define PRM_NAME_HA_MODE
bool PRM_DBFILES_PROTECT
char * db_name
static unsigned int prm_mnt_waiting_thread_flag
#define ER_LOG_NOTIN_ARCHIVE
Definition: error_code.h:156
int PRM_SQL_TRACE_IOREADS
static int prm_ha_server_state_default
float PRM_LIKE_TERM_SELECTIVITY
static int prm_sql_trace_slow_msecs_default
static SYSPRM_PARAM prm_Def[]
static UINT64 prm_max_agg_hash_size_lower
#define PRM_VALUE_MIN
#define PRM_NAME_OPTIMIZER_RESERVE_19
#define PRM_NAME_REQUIRE_LIKE_ESCAPE_CHARACTER
int count(int &result, const cub_regex_object &reg, const std::string &src, const int position, const INTL_CODESET codeset)
#define MSGCAT_CATALOG_CUBRID
static unsigned int prm_mysql_trigger_correlation_names_flag
static bool prm_dbfiles_protect_default
static unsigned int prm_log_checkpoint_interval_secs_flag
static int prm_sql_trace_ioreads_lower
static bool prm_dwb_logging_default
static int prm_ha_copy_log_max_archives_lower
static unsigned int prm_cte_max_recursions_flag
static int prm_fault_injection_id_flag
static float prm_bt_unfill_factor_lower
#define PRM_NAME_LIKE_TERM_SELECTIVITY
#define PRM_NAME_VACUUM_PREFETCH_LOG_MODE
static unsigned int prm_io_backup_nbuffers_flag
static unsigned int prm_new_lfhash_flag
#define PRM_GET_STRING(x)
bool PRM_TB_REUSE_OID
static bool prm_log_async_commit_default
static bool prm_unicode_input_normalization_default
static int prm_tcp_port_id_default
static const char * prm_dl_fork_default
#define PRM_NAME_COMPACTDB_PAGE_RECLAIM_ONLY
static int sysprm_packed_sysprm_value_length(SYSPRM_VALUE value, SYSPRM_DATATYPE datatype, int offset)
#define PRM_NAME_LOG_BUFFER_SIZE
static unsigned int prm_io_volume_ext_path_flag
#define ONE_SEC
Definition: porting.h:68
static bool prm_optimizer_reserve_16_default
#define ER_LOG_WRITE
Definition: error_code.h:138
static unsigned int prm_like_term_selectivity_flag
#define PRM_IS_INTEGER(x)
#define PRM_IS_GET_SERVER(x)
#define ER_IO_WRITE
Definition: error_code.h:63
static int prm_thread_connection_timeout_seconds_lower
#define PRM_NAME_HA_CALC_SCORE_INTERVAL_IN_MSECS
bool PRM_OPTIMIZER_RESERVE_09
static int prm_ha_delay_limit_delta_in_secs_lower
#define max(a, b)
float PRM_HF_UNFILL_FACTOR
static unsigned int prm_ha_sql_log_max_size_in_mb_flag
static unsigned int prm_use_stat_estimation_flag
#define PRM_IS_ALLOCATED(x)
void sysprm_free_session_parameters(SESSION_PARAM **session_parameters_ptr)
static bool prm_disable_vacuum_default
#define PRM_NAME_MAX_OUTER_CARD_OF_IDXJOIN
const char * PRM_IO_TEMP_VOLUME_PATH
#define PRM_ADJUST_FOR_GET_BIGINT_TO_BIGINT(prm, out_val, in_val, err)
#define PRM_NAME_STRING_MAX_SIZE_BYTES
#define PRM_IS_OBSOLETED(x)
#define PRM_NAME_XASL_CACHE_MAX_ENTRIES
int PRM_HA_DELAY_LIMIT_IN_SECS
static int prm_thread_worker_timeout_seconds_default
int PRM_UNLOADDB_LOCK_TIMEOUT
SYSPRM_ERR sysprm_make_default_values(const char *data, char *default_val_buf, const int buf_size)
#define PRM_USER_CAN_CHANGE(x)
#define PRM_NAME_TDE_KEYS_FILE_PATH
#define PRM_NAME_PB_SEQUENTIAL_VICTIM_FLUSH
static bool prm_heap_info_cache_logging_default
#define PRM_NAME_LOG_BG_FLUSH_INTERVAL_MSECS
static bool prm_csql_single_line_mode_default
#define PRM_NAME_PLUS_AS_CONCAT
#define PRM_NAME_UNIQUE_ERROR_KEY_VALUE
bool PRM_OPTIMIZER_RESERVE_10
static KEYVAL ha_server_state_words[]
#define PRM_NAME_ER_LOG_FILE
static unsigned int prm_pb_neighbor_flush_nondirty_flag
const char * envvar_get(const char *name)
static bool prm_optimizer_reserve_08_default
static float prm_pb_lru_buffer_ratio_lower
#define PRM_NAME_PAGE_BG_FLUSH_INTERVAL_MSECS
#define PRM_NAME_PB_NEIGHBOR_FLUSH_NONDIRTY
unsigned int PRM_DWB_SIZE
#define PRM_NAME_ER_LOG_SIZE
static void error(const char *msg)
Definition: gencat.c:331
int PRM_HA_MAX_HEARTBEAT_GAP
int PRM_HA_SQL_LOG_MAX_SIZE_IN_MB
static unsigned int prm_group_concat_max_len_flag
#define PRM_NAME_SQL_TRACE_SLOW_MSECS
static int prm_shutdown_wait_time_in_secs_lower
const char * PRM_CFG_DB_HOSTS
static bool prm_er_log_warning_default
bool PRM_MYSQL_TRIGGER_CORRELATION_NAMES
#define LOGPB_BUFFER_NPAGES_LOWER
#define PRM_SET_BIT(this, here)
#define ER_SP_INVALID_HEADER
Definition: error_code.h:1443
static const bool prm_client_class_cache_debug_default
static unsigned int prm_ib_task_memsize_flag
static unsigned int prm_optimizer_reserve_13_flag
static unsigned int prm_reset_tr_parser_flag
static int rc
Definition: serial.c:50
#define PRM_NAME_DONT_REUSE_HEAP_FILE
char * or_pack_int(char *ptr, int number)
static KEYVAL isolation_level_words[]
int PRM_LK_TIMEOUT_MESSAGE_DUMP_LEVEL
static unsigned int prm_sql_trace_execution_plan_flag
static unsigned int prm_optimizer_reserve_03_flag
static unsigned int prm_optimizer_reserve_08_flag
static int prm_loaddb_flush_interval_lower
#define PRM_IS_FOR_HA(x)
#define PRM_NAME_JAVA_STORED_PROCEDURE_PORT
static unsigned int prm_optimizer_reserve_11_flag
static int prm_insert_mode_lower
#define HA_SERVER_STATE_STANDBY_STR
Definition: boot.h:130
#define PRM_FOR_SESSION
bool PRM_GENERAL_RESERVE_01
static float prm_pb_buffer_flush_ratio_default
static bool prm_csql_auto_commit_default
bool PRM_OPTIMIZER_RESERVE_02
static int prm_remove_log_archives_interval_default
static float prm_bt_oid_nbuffers_lower
#define PRM_IS_FLOAT(x)
#define PRM_NAME_HA_APPLYLOGDB_IGNORE_ERROR_LIST
static unsigned int prm_tcp_port_id_flag
int PRM_LK_TIMEOUT_SECS
#define PRM_NAME_PB_NBUFFERS
#define PRM_NAME_PB_NEIGHBOR_FLUSH_PAGES
bool PRM_ORACLE_STYLE_OUTERJOIN
static unsigned int prm_dwb_logging_flag
static unsigned int prm_compensate_debug_flag
#define PRM_NAME_CHECK_PEER_ALIVE
#define PRM_NAME_ACCESS_IP_CONTROL_FILE
static unsigned int prm_xasl_cache_timeout_flag
int PRM_PB_DEBUG_PAGE_VALIDATION_LEVEL
static unsigned int prm_pb_num_LRU_chains_flag
#define PRM_NAME_VACUUM_PREFETCH_LOG_NBUFFERS
#define PRM_NAME_CSS_MAX_CLIENTS
int * PRM_HA_APPLYLOGDB_RETRY_ERROR_LIST
static unsigned int prm_java_stored_procedure_jvm_options_flag
#define PRM_NAME_RETURN_NULL_ON_FUNCTION_ERRORS
int PRM_IO_BACKUP_SLEEP_MSECS
static int prm_loaddb_workers_default
static unsigned int prm_call_stack_dump_on_error_flag
static KEYVAL null_words[]
#define PRM_NAME_LOG_CHECKPOINT_INTERVAL_SECS
bool PRM_ALLOW_TRUNCATED_STRING
#define PRM_NAME_XASL_DEBUG_DUMP
static int * prm_mnt_stats_threshold_default
static const char * compat_mode_values_PRM_ORACLE_STYLE_EMPTY_STRING[COMPAT_ORACLE+2]
static unsigned int prm_pb_monitor_locks_flag
static bool prm_call_stack_dump_on_error_default
static UINT64 prm_string_max_size_bytes_upper
static unsigned int prm_week_format_flag
static unsigned int prm_er_log_file_flag
#define ER_SP_UNKNOWN_SLOTID
Definition: error_code.h:99
#define ARG_FILE_LINE
Definition: error_manager.h:44
static unsigned int prm_pb_neighbor_flush_pages_default
static int sysprm_compare_values(void *first_value, void *second_value, unsigned int val_type)
static unsigned int prm_ddl_audit_log_flag
static unsigned int prm_ha_changemode_interval_in_msecs_flag
#define PRM_NAME_HA_CHECK_DISK_FAILURE_INTERVAL_IN_SECS
bool PRM_HOSTVAR_LATE_BINDING
unsigned int INTL_LANG
Definition: intl_support.h:132
bool PRM_USE_ORDERBY_SORT_LIMIT
#define DB_BIGINT_MAX
Definition: dbtype_def.h:640
bool PRM_LOG_COMPRESS
static unsigned int prm_optimizer_reserve_19_flag
bool PRM_OPTIMIZER_RESERVE_17
#define PRM_NAME_PB_MONITOR_LOCKS
static int prm_er_log_vacuum_default
static float prm_pb_aout_ratio_default
bool PRM_QUERY_TRACE
#define PRM_USER_CHANGE
static unsigned int prm_query_trace_format_flag
#define PRM_NAME_DEBUG_REPLICATION_DATA
static unsigned int prm_max_outer_card_of_idxjoin_flag
static unsigned int prm_lk_timeout_secs_flag
static unsigned int prm_xasl_cache_logging_flag
static bool prm_debug_replication_data_default
static KEYVAL check_peer_alive_words[]
#define PRM_NAME_PB_SYNC_ON_FLUSH_SIZE
static const char * prm_ha_copy_log_base_default
static UINT64 prm_max_hash_list_scan_size_lower
#define PRM_NAME_CALL_STACK_DUMP_ACTIVATION
#define PRM_NAME_THREAD_WORKER_TIMEOUT_SECONDS
#define PRM_TIME_UNIT
static int prm_mnt_waiting_thread_lower
float prm_get_float_value(PARAM_ID prm_id)
static UINT64 prm_group_concat_max_len_lower
static int prm_query_trace_format_lower
static int prm_io_pages_to_size(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
static int sysprm_print_sysprm_value(PARAM_ID prm_id, SYSPRM_VALUE value, char *buf, size_t len, PRM_PRINT_MODE print_mode)
int PRM_HA_APPLYLOGDB_LOG_WAIT_TIME_IN_SECS
int PRM_LIST_MAX_QUERY_CACHE_PAGES
static int prm_sr_nbuffers_default
int PRM_SR_NBUFFERS
#define PRM_NAME_MAX_RECURSION_SQL_DEPTH
#define PRM_NAME_TCP_NODELAY
bool PRM_PERF_TEST_MODE
static int prm_pb_num_private_chains_upper
#define PRM_CLIENT_SESSION
static bool prm_connection_logging_default
#define PRM_NAME_LOG_SWEEP_CLEAN
#define PRM_FOR_QRY_STRING
bool PRM_OPTIMIZER_RESERVE_03
static int prm_max_recursion_sql_depth_default
static int prm_ha_port_id_upper
#define PRM_NAME_LOG_TRACE_FLUSH_TIME
static unsigned int prm_er_production_mode_flag
#define PRM_NAME_HA_LOG_APPLIER_STATE
#define PRM_NAME_INSERT_MODE
#define PRM_VALUE_DEFAULT
static int prm_xasl_cache_max_clones_lower
#define PRM_FOR_HA
static int prm_ha_check_disk_failure_interval_in_secs_lower
static int prm_ha_apply_max_mem_size_lower
static const char * compat_mode_values_PRM_MYSQL_TRIGGER_CORRELATION_NAMES[COMPAT_ORACLE+2]
bool PRM_COMPENSATE_DEBUG
bool PRM_TCP_KEEPALIVE
static bool prm_optimizer_reserve_11_default
static unsigned int prm_json_log_allocations_flag
char * PRM_INTL_COLLATION
int PRM_HA_MODE
static int prm_ha_delay_limit_in_secs_default
bool PRM_COMMIT_ON_SHUTDOWN
static unsigned int prm_optimizer_reserve_02_flag
static bool prm_compat_primary_key_default
bool PRM_ER_PRODUCTION_MODE
static unsigned int prm_add_column_update_hard_default_flag
bool PRM_LOG_ASYNC_COMMIT
int PRM_HA_CALC_SCORE_INTERVAL_IN_MSECS
const char * PRM_HA_REPLICA_LIST
static unsigned int prm_log_max_archives_flag
void sysprm_change_parameter_values(const SYSPRM_ASSIGN_VALUE *assignments, bool check, bool set_flag)
int PRM_LOG_ISOLATION_LEVEL
static bool prm_optimizer_reserve_19_default
static int prm_vacuum_worker_count_upper
static int prm_tcp_port_id_upper
#define PRM_NAME_MAX_PAGES_IN_TEMP_FILE_CACHE
#define free_and_init(ptr)
Definition: memory_alloc.h:147
int PRM_ER_STOP_ON_ERROR
#define PRM_NAME_PB_LRU_HOT_RATIO
int PRM_MUTEX_BUSY_WAITING_CNT
static unsigned int prm_pb_neighbor_flush_pages_lower
static float prm_like_term_selectivity_lower
#define DB_ALIGN(offset, align)
Definition: memory_alloc.h:84
#define PRM_NAME_HA_SERVER_STATE
static unsigned int prm_log_sweep_clean_flag
bool PRM_THREAD_WORKER_POOLING
static unsigned int prm_intl_number_lang_flag
#define PRM_NAME_HA_HEARTBEAT_INTERVAL_IN_MSECS
bool PRM_ORACLE_STYLE_EMPTY_STRING
const char * PRM_ACCESS_IP_CONTROL_FILE
static unsigned int prm_repr_cache_log_flag
static int prm_loaddb_workers_upper
#define PRM_NAME_PB_DEBUG_PAGE_VALIDATION_LEVEL
bool PRM_DISABLE_VACUUM
char * prm_get_string_value(PARAM_ID prm_id)
int PRM_LOADDB_FLUSH_INTERVAL
int sysprm_get_range(const char *pname, void *min, void *max)
static int prm_java_stored_procedure_port_default
static bool prm_optimizer_reserve_04_default
#define HA_SERVER_STATE_TO_BE_ACTIVE_STR
Definition: boot.h:129
static unsigned int prm_log_async_commit_flag
#define PRM_NAME_BT_INDEX_SCAN_OID_ORDER
static int prm_log_max_archives_default
static unsigned int prm_vacuum_log_block_pages_flag
static int int_list_initial[1]
#define PRM_NAME_XASL_CACHE_LOGGING
static float prm_pb_lru_buffer_ratio_upper
static unsigned int prm_ha_copy_log_timeout_flag
static SYSPRM_ERR sysprm_get_param_range(SYSPRM_PARAM *prm, void *min, void *max)
static unsigned int prm_tcp_connection_timeout_flag
void xsysprm_dump_server_parameters(FILE *outfp)
static int prm_fault_injection_test_lower
static const char * prm_cfg_db_hosts_default
int PRM_LOG_CHECKPOINT_INTERVAL_SECS
#define ER_LOG_CHECKPOINT_SKIP_INVALID_PAGE
Definition: error_code.h:1360
static bool prm_block_nowhere_statement_default
const char * tz_get_system_timezone(void)
Definition: tz_support.c:749
static int prm_suppress_fsync_lower
bool PRM_HA_REPL_ENABLE_SERVER_SIDE_UPDATE
static unsigned int prm_ha_max_process_dereg_confirm_flag
#define PRM_NAME_OPTIMIZATION_LEVEL
static int prm_ha_max_heartbeat_gap_default
#define PRM_NAME_LK_TIMEOUT
static unsigned int prm_no_backslash_escapes_flag
static unsigned int prm_mnt_stats_threshold_flag
static int prm_ha_heartbeat_interval_in_msecs_default
static int prm_ha_server_state_lower
static const KEYVAL * prm_keyword(int val, const char *name, const KEYVAL *tbl, int dim)
#define ER_HEAP_UNKNOWN_OBJECT
Definition: error_code.h:102
static int prm_er_btree_debug_default
static int prm_lk_timeout_secs_lower
static unsigned int prm_commit_on_shutdown_flag
#define PRM_NAME_RESET_TR_PARSER
#define PRM_IS_FOR_QRY_STRING(x)
#define PRM_NAME_HA_MODE_FOR_SA_UTILS_ONLY
#define PRM_NAME_MNT_STATS_THRESHOLD
static unsigned int prm_pb_neighbor_flush_pages_flag
static int prm_set_default(SYSPRM_PARAM *prm)
int PRM_MAX_OUTER_CARD_OF_IDXJOIN
#define PRM_NAME_IGNORE_TRAILING_SPACE
static bool prm_oracle_style_outerjoin_default
bool prm_get_bool_value(PARAM_ID prm_id)
#define PRM_NAME_QUERY_TRACE
bool intl_Mbs_support
Definition: intl_support.c:86
#define INT_ALIGNMENT
Definition: memory_alloc.h:61
#define PRM_HIDDEN
#define PRM_NAME_GC_ENABLE
static int prm_thread_logging_flag_default
static int prm_ha_delay_limit_in_secs_lower
#define PRM_NAME_HA_DELAY_LIMIT_DELTA
#define PRM_NAME_INTL_CHECK_INPUT_STRING
static unsigned int prm_dwb_blocks_lower
static int prm_print(const SYSPRM_PARAM *prm, char *buf, size_t len, PRM_PRINT_MODE print_mode, PRM_PRINT_VALUE_MODE print_value_mode)
bool PRM_REQUIRE_LIKE_ESCAPE_CHARACTER
int PRM_LOG_CHECKPOINT_NPAGES
#define PRM_NAME_SQL_TRACE_SLOW
int PRM_TCP_CONNECTION_TIMEOUT
int intl_mbs_casecmp(const char *mbs1, const char *mbs2)
Definition: intl_support.c:358
#define OR_PUT_INT(ptr, val)
static unsigned int prm_ha_repl_enable_server_side_update_flag
int ini_hassec(const char *key)
Definition: ini_parser.c:772
bool PRM_COMPAT_PRIMARY_KEY
static int prm_xasl_cache_max_clones_upper
#define PRM_NAME_OPTIMIZER_RESERVE_15
char * basename(const char *path)
Definition: porting.c:1132
#define GET_PRM(id)
#define PRM_NAME_LOG_TRACE_DEBUG
#define PRM_NAME_JAVA_STORED_PROCEDURE
static unsigned int prm_er_btree_debug_flag
static int prm_ha_changemode_interval_in_msecs_default
#define PRM_DEFAULT_USED
static int prm_ha_max_process_dereg_confirm_default
static int prm_sec_to_msec(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
static unsigned int prm_compat_mode_flag
TZ_REGION * tz_get_client_tz_region_session(void)
Definition: tz_support.c:4662
static int prm_ha_process_start_confirm_interval_in_msecs_default
static unsigned int prm_data_file_advise_upper
SYSPRM_ERR
static int prm_thread_worker_timeout_seconds_lower
static int prm_thread_connection_timeout_seconds_upper
#define PRM_NAME_DB_VOLUME_SIZE
static unsigned int prm_xasl_debug_dump_flag
static int prm_tcp_connection_timeout_default
static unsigned int prm_log_bg_flush_interval_msecs_flag
static unsigned int prm_csql_history_num_flag
static bool prm_stats_on_default
#define PRM_NAME_ALLOW_TRUNCATED_STRING
#define PRM_NAME_HA_APPLYLOGDB_RETRY_ERROR_LIST
static bool prm_commit_on_shutdown_default
#define PRM_OBSOLETED
static unsigned int prm_er_stop_on_error_flag
int PRM_COMPACTDB_PAGE_RECLAIM_ONLY
static unsigned int prm_max_flush_pages_per_second_flag
bool PRM_OPTIMIZER_RESERVE_20
static void prm_file_has_been_loaded(const char *conf_path, const char *db_name)
static UINT64 prm_generic_vol_prealloc_size_lower
int PRM_HA_MAX_PROCESS_START_CONFIRM
#define ONE_K
Definition: porting.h:62
static bool prm_adaptive_flush_control_default
static char * prm_io_volume_ext_path_default
static unsigned int prm_multi_range_opt_limit_flag
static unsigned int prm_connection_logging_flag
#define PRM_NAME_SINGLE_BYTE_COMPARE
#define PRM_NAME_XASL_CACHE_TIME_THRESHOLD_IN_MINUTES
static UINT64 prm_io_backup_max_volume_size_lower
int PRM_HA_APPLYLOGDB_MAX_COMMIT_INTERVAL_IN_MSECS
#define PRM_IS_STRING(x)
static bool prm_log_compress_default
static unsigned int prm_leap_second_support_flag
int i
Definition: dynamic_load.c:954
static int prm_vacuum_worker_count_lower
#define strlen(s1)
char * msgcat_message(int cat_id, int set_id, int msg_id)
#define PRM_NAME_INTL_COLLATION
#define PRM_NAME_HA_UNACCEPTABLE_PROC_RESTART_TIMEDIFF
static int prm_unloaddb_lock_timeout_default
#define PRM_NAME_PIPES_AS_CONCAT
static int prm_cte_max_recursions_upper
static int prm_set_force(SYSPRM_PARAM *prm, const char *value)
const char * prm_get_name(PARAM_ID prm_id)
static int prm_java_stored_procedure_debug_default
static unsigned int prm_io_lockf_enable_flag
static int prm_insert_mode_upper
DUP_PRM_FUNC get_dup
static int prm_query_trace_format_upper
static const int call_stack_dump_error_codes[]
static bool prm_enable_string_compression_default
bool PRM_STATS_ON
static int prm_log_checkpoint_npages_default
int PRM_HA_LOG_APPLIER_STATE
bool PRM_ER_LOG_DEBUG
static unsigned int prm_remove_log_archives_interval_flag
bool PRM_OPTIMIZER_RESERVE_08
static bool * prm_ha_applylogdb_ignore_error_list_default
static bool prm_java_stored_procedure_reserve_01_default
static bool prm_optimizer_reserve_10_default
int PRM_XASL_CACHE_TIMEOUT
static unsigned int prm_tcp_keepalive_flag
static unsigned int prm_file_logging_flag
static unsigned int prm_data_file_advise_flag
static unsigned int prm_lk_run_deadlock_interval_flag
static unsigned int prm_unicode_output_normalization_flag
static unsigned int prm_pb_lru_hot_ratio_flag
#define PRM_NAME_FAULT_INJECTION_ACTION_PREFER_ABORT_TO_EXIT
static UINT64 prm_io_backup_max_volume_size_default
static UINT64 prm_log_volume_size_lower
static bool prm_ddl_audit_log_default
static unsigned int prm_session_timeout_flag
static int prm_ha_repl_filter_type_lower
static bool prm_disk_logging_default
char * strdup(const char *str)
Definition: porting.c:901
static unsigned int prm_update_use_attribute_references_flag
int * PRM_MNT_STATS_THRESHOLD
static const char * prm_service_service_list_default
#define PRM_NAME_LOG_CHECKPOINT_SIZE
static unsigned int prm_java_stored_procedure_debug_flag
#define PRM_NAME_INTL_MBS_SUPPORT
static int prm_log_isolation_level_lower
static int prm_er_log_level_default
#define PRM_NAME_MAX_AGG_HASH_SIZE
#define PRM_RELOADABLE
void prm_set_string_value(PARAM_ID prm_id, char *value)
#define GET_PRM_DATATYPE(id)
#define ER_PARTITION_WORK_FAILED
Definition: error_code.h:1109
static int prm_list_query_cache_mode_default
static int prm_java_stored_procedure_debug_lower
static int prm_extended_statistics_upper
static bool prm_add_column_update_hard_default_default
static UINT64 prm_db_volume_size_upper
#define PRM_NAME_VACUUM_WORKER_COUNT
#define HB_DEFAULT_FAILOVER_WAIT_TIME_IN_MSECS
Definition: heartbeat.h:40
static int prm_xasl_cache_time_threshold_in_minutes_lower
static int prm_log_nbuffers_lower
char * sysprm_print_parameters_for_ha_repl(void)
static unsigned int prm_optimizer_enable_aggregate_optimization_flag
char * sysprm_print_parameters_for_qry_string(void)
static bool prm_xasl_cache_logging_default
#define LOG_PAGESIZE
static const char * compat_mode_values_PRM_PLUS_AS_CONCAT[COMPAT_ORACLE+2]
#define PRM_NAME_POSTPONE_DEBUG
static unsigned int prm_oracle_style_outerjoin_flag
static void sysprm_clear_sysprm_value(SYSPRM_VALUE *value, SYSPRM_DATATYPE datatype)
static unsigned int prm_java_stored_procedure_reserve_01_flag
bool PRM_EXAMINE_CLIENT_CACHED_LOCKS
#define PRM_NAME_TEMP_MEM_BUFFER_PAGES
char * sysprm_unpack_session_parameters(char *ptr, SESSION_PARAM **session_parameters_ptr)
#define PRM_TEST_CHANGE_ONLY(x)
static unsigned int prm_ha_apply_max_mem_size_flag
static unsigned int prm_vacuum_prefetch_log_nbuffers_flag
static bool prm_optimizer_reserve_14_default
#define PRM_GET_BOOL(x)
#define PRM_CLIENT_SESSION_ONLY(x)
const char * PRM_HA_COPY_SYNC_MODE
static float prm_hf_unfill_factor_upper
bool PRM_TZ_LEAP_SECOND_SUPPORT
static bool prm_io_lockf_enable_default
float PRM_BT_OID_NBUFFERS
static unsigned int prm_css_max_clients_flag
char * PRM_INTL_NUMBER_LANG
#define PRM_NAME_CSQL_AUTO_COMMIT
static int prm_log_trace_flush_time_msecs_default
int * PRM_CALL_STACK_DUMP_DEACTIVATION
#define PRM_NAME_LOG_CHECKPOINT_NPAGES
#define PRM_GET_FROM_SERVER(x)
static unsigned int prm_dwb_size_flag
#define PRM_NAME_THREAD_WORKER_POOLING
static KEYVAL fi_test_words[]
#define PRM_SERVER_SESSION(id)
static int prm_compactdb_page_reclaim_only_default
#define PRM_NAME_REMOVE_LOG_ARCHIVES_INTERVAL
bool PRM_CLIENT_CLASS_CACHE_DEBUG
const char * PRM_HA_NODE_LIST
static int prm_er_log_level_upper
#define PRM_NAME_LOG_CHKPT_DETAILED
#define HB_DEFAULT_HA_PORT_ID
Definition: heartbeat.h:32
#define PRM_NAME_PB_LRU_BUFFER_RATIO
#define PRM_NAME_DBFILES_PROTECT
static int prm_lk_max_scanid_bit_lower
static bool prm_pb_sequential_victim_flush_default
bool PRM_OPTIMIZER_RESERVE_11
static unsigned int prm_service_server_list_flag
#define PRM_NAME_COMPAT_MODE
static int prm_ha_unacceptable_proc_restart_timediff_default
static int prm_compound_has_changed(SYSPRM_PARAM *prm, bool set_flag)
static KEYVAL ha_mode_words[]
#define PRM_NAME_HA_REPL_FILTER_TYPE
bool PRM_CONNECTION_LOGGING
#define PRM_NAME_QUERY_TRACE_FORMAT
static int prm_max_flush_pages_per_second_lower
#define LANG_SYS_CODESET
UINT64 PRM_STRING_MAX_SIZE_BYTES
#define ER_SP_BAD_INSERTION_SLOT
Definition: error_code.h:98
UINT64 PRM_IB_TASK_MEMSIZE
bool PRM_READ_ONLY_MODE
#define PRM_NAME_IO_VOLUME_EXT_PATH
#define PRM_NAME_ER_PRODUCTION_MODE
#define PRM_IS_BOOLEAN(x)
void prm_set_bool_value(PARAM_ID prm_id, bool value)
#define PRM_NAME_MAX_HASH_LIST_SCAN_SIZE
#define PRM_NAME_WS_HASHTABLE_SIZE
static int prm_log_checkpoint_sleep_msecs_default
bool PRM_ALTER_TABLE_CHANGE_TYPE_STRICT
int PRM_HA_REPL_FILTER_TYPE
unsigned int PRM_DWB_BLOCKS
int PRM_SUPPRESS_FSYNC
static unsigned int prm_ws_memory_report_flag
static unsigned int prm_query_trace_flag
#define ER_PRM_BAD_VALUE_NO_DATA
Definition: error_code.h:1389
static int prm_ha_applylogdb_log_wait_time_in_secs_lower
UINT64 PRM_THREAD_STACKSIZE
static bool * prm_event_activation_default
int sysprm_get_session_parameters_count(void)
static UINT64 prm_log_volume_size_upper
int PRM_MAX_RECURSION_SQL_DEPTH
#define PRM_NAME_INDEX_SCAN_KEY_BUFFER_SIZE
static unsigned int prm_ha_ping_hosts_flag
int PRM_TCP_SNDBUF_SIZE
#define PRM_NAME_REPR_CACHE_LOG
static int prm_java_stored_procedure_port_upper
int * lineno
Definition: ini_parser.h:42
#define PRM_NAME_OBJECT_PRINT_FORMAT_OID
static const char * compat_mode_values_PRM_NO_BACKSLASH_ESCAPES[COMPAT_ORACLE+2]
#define HA_SERVER_STATE_ACTIVE_STR
Definition: boot.h:128
#define PRM_NAME_GROUP_CONCAT_MAX_LEN
#define PRM_NAME_TCP_RCVBUF_SIZE
#define CUB_MAXHOSTNAMELEN
Definition: porting.h:379
int PRM_OPTIMIZATION_LEVEL
#define PRM_NAME_OPTIMIZER_RESERVE_18
DUP_PRM_FUNC set_dup
#define PRM_NAME_BT_UNFILL_FACTOR
int PRM_BOSR_MAXTMP_PAGES
bool PRM_ENABLE_STRING_COMPRESSION
int * prm_get_integer_list_value(PARAM_ID prm_id)
static unsigned int prm_thread_stacksize_flag
static UINT64 prm_generic_vol_prealloc_size_upper
#define PRM_NAME_BT_OID_NBUFFERS
static const char * prm_ha_replica_time_bound_default
static const char * compat_mode_values_PRM_ADD_COLUMN_UPDATE_HARD_DEFAULT[COMPAT_ORACLE+2]
static unsigned int prm_mutex_busy_waiting_cnt_flag
static unsigned int prm_intl_date_lang_flag
static unsigned int prm_log_unique_stats_flag
bool PRM_OPTIMIZER_RESERVE_04
static unsigned int prm_log_background_archiving_flag
#define PRM_NAME_BLOCK_NOWHERE_STATEMENT
#define PRM_NAME_DDL_AUDIT_LOG_SIZE
float PRM_PB_BUFFER_FLUSH_RATIO
SYSPRM_ASSIGN_VALUE * next
bool PRM_UPDATE_USE_ATTRIBUTE_REFERENCES
#define PRM_NAME_SQL_TRACE_EXECUTION_PLAN
#define PRM_NAME_INTL_DATE_LANG
#define PRM_NAME_EVENT_ACTIVATION
#define ER_CT_INVALID_CLASSID
Definition: error_code.h:492
SYSPRM_VALUE value
#define PRM_NAME_SR_NBUFFERS
static unsigned int prm_sr_nbuffers_flag
#define PRM_NAME_HA_COPY_SYNC_MODE
char ** val
Definition: ini_parser.h:41
#define PRM_NAME_GENERAL_RESERVE_01
static int prm_ha_calc_score_interval_in_msecs_default
static unsigned int prm_logpb_logging_debug_flag
static bool prm_force_remove_log_archives_default
#define PRM_NAME_DL_FORK
static unsigned int prm_ha_applylogdb_ignore_error_list_flag
#define PRM_NAME_SUPPRESS_FSYNC
bool PRM_WS_MEMORY_REPORT
int PRM_IO_BACKUP_NBUFFERS
#define ER_NET_SERVER_COMM_ERROR
Definition: error_code.h:265
static float prm_bt_unfill_factor_upper
static bool prm_intl_check_input_string_default
float PRM_PB_LRU_BUFFER_RATIO
const char * lang_get_Lang_name(void)
static KEYVAL compat_words[]
static int prm_vacuum_log_block_pages_lower
int PRM_PB_NUM_PRIVATE_CHAINS
static const char * compat_mode_values_PRM_RETURN_NULL_ON_FUNCTION_ERRORS[COMPAT_ORACLE+2]
static float prm_like_term_selectivity_default
static int prm_equal_to_ori(void *out_val, SYSPRM_DATATYPE out_type, void *in_val, SYSPRM_DATATYPE in_type)
UINT64 PRM_LOG_VOLUME_SIZE
static KEYVAL er_log_level_words[]
static UINT64 prm_thread_stacksize_upper
static UINT64 prm_generic_vol_prealloc_size_default
void prm_set_bigint_value(PARAM_ID prm_id, UINT64 value)
bool sysprm_find_err_in_integer_list(PARAM_ID prm_id, int error_code)
static void sysprm_update_flag_allocated(SYSPRM_PARAM *prm)
static unsigned int prm_create_table_reuseoid
#define PRM_NAME_HA_COPY_LOG_MAX_ARCHIVES
#define PRM_NAME_JSON_MAX_ARRAY_IDX
static unsigned int prm_optimization_level_flag
#define PRM_NAME_SERVER_TIMEZONE
#define PRM_NAME_COMMIT_ON_SHUTDOWN
static unsigned int prm_list_max_query_cache_entries_flag
#define PRM_NAME_AGG_HASH_RESPECT_ORDER
static unsigned int prm_list_max_query_cache_pages_flag
#define PATH_SEPARATOR
Definition: porting.h:347
#define PRM_NAME_XASL_CACHE_TIMEOUT
#define ER_HEAP_BAD_OBJECT_TYPE
Definition: error_code.h:105
int PRM_HA_INIT_TIMER_IN_MSECS
bool PRM_JAVA_STORED_PROCEDURE
static bool prm_optimizer_reserve_15_default
static int prm_log_isolation_level_default
#define PRM_DEPRECATED
static unsigned int prm_vacuum_worker_count_flag
#define PRM_DEFAULT_BUFFER_SIZE
static char * prm_intl_collation_default
#define PRM_NAME_LOG_VOLUME_SIZE
#define GETHOSTNAME(p, l)
Definition: porting.h:381
static int prm_pb_num_LRU_chains_lower
static unsigned int prm_optimizer_reserve_17_flag
static unsigned int prm_client_class_cache_debug_flag
#define PRM_NAME_DEBUG_AUTOCOMMIT
const char ** p
Definition: dynamic_load.c:945
static unsigned int prm_unique_error_key_value_flag
static int prm_max_flush_pages_per_second_upper
#define VACUUM_LOG_BLOCK_PAGES_DEFAULT
static bool prm_optimizer_reserve_09_default
static struct @30 prm_Files_loaded[MAX_NUM_OF_PRM_FILES_LOADED]
static bool prm_require_like_escape_character_default
bool PRM_OPTIMIZER_ENABLE_MERGE_JOIN
#define PRM_NAME_PERF_TEST_MODE
static const char * prm_ha_node_list_default
int PRM_VACUUM_MASTER_WAKEUP_INTERVAL
int PRM_TCP_PORT_ID
static unsigned int prm_pb_sync_on_nflush_flag
#define PRM_NAME_ER_LOG_DEBUG
#define MSGCAT_SET_PARAMETERS
static const char * prm_ha_copy_sync_mode_default
static unsigned int prm_ha_replica_delay_in_secs_flag
#define PRM_NAME_COMPAT_NUMERIC_DIVISION_SCALE
#define HA_LOG_APPLIER_STATE_DONE_STR
static const char * prm_event_handler_default
#define PRM_NAME_SQL_TRACE_IOREADS
static unsigned int prm_csql_auto_commit_flag
static unsigned int prm_bt_unfill_factor_flag
static unsigned int prm_ha_log_applier_state_flag
bool PRM_COMPAT_NUMERIC_DIVISION_SCALE
static unsigned int prm_er_log_debug_flag
#define PRM_NAME_HA_APPLYLOGDB_MAX_COMMIT_INTERVAL_IN_MSECS
#define PRM_NAME_LK_MAX_SCANID_BIT
static unsigned int prm_lk_escalation_at_flag
const char * PRM_HA_REPLICA_TIME_BOUND
#define PRM_NAME_JAVA_STORED_PROCEDURE_RESERVE_01
#define ER_PRM_UNKNOWN_SYSPRM
Definition: error_code.h:1348
#define PRM_NAME_HA_FAILOVER_WAIT_TIME_IN_MSECS
int PRM_HA_CHANGEMODE_INTERVAL_IN_MSECS
static unsigned int prm_ha_check_disk_failure_interval_in_secs_flag
static unsigned int prm_intl_mbs_support_flag
static unsigned int prm_pb_num_private_chains_flag
static KEYVAL query_trace_format_words[]
static unsigned int prm_ha_process_start_confirm_interval_in_msecs_flag
static float prm_pb_aout_ratio_lower
static void prm_check_environment(void)
char * envvar_confdir_file(char *path, size_t size, const char *filename)
UINT64 PRM_GROUP_CONCAT_MAX_LEN
#define PRM_NAME_TCP_SNDBUF_SIZE
static unsigned int prm_filter_pred_max_cache_entries_flag
#define HA_LOG_APPLIER_STATE_RECOVERING_STR
static unsigned int prm_pb_sequential_victim_flush_flag
int * PRM_FAULT_INJECTION_IDS
static SESSION_PARAM * sysprm_alloc_session_parameters(void)
static unsigned int prm_log_bg_flush_num_pages_flag
int PRM_ER_LOG_SIZE
static UINT64 prm_db_volume_size_lower
bool PRM_IO_LOCKF_ENABLE
bool sysprm_find_fi_code_in_integer_list(PARAM_ID prm_id, int fi_code)