87 #if defined (SUPPRESS_STRLEN_WARNING) 88 #define strlen(s1) ((int) strlen(s1)) 91 #define NET_COPY_AREA_SENDRECV_SIZE (OR_INT_SIZE * 3) 92 #define NET_SENDRECV_BUFFSIZE (OR_INT_SIZE) 94 #define STATDUMP_BUF_SIZE (2 * 16 * 1024) 95 #define QUERY_INFO_BUF_SIZE (2048 + STATDUMP_BUF_SIZE) 97 #define NET_DEFER_END_QUERIES_MAX 10 100 #define QEWC_SAFE_GUARD_SIZE 1024 102 #define QEWC_MAX_DATA_SIZE (DB_PAGESIZE - QEWC_SAFE_GUARD_SIZE) 112 QUERY_ID * p_end_queries,
int n_query_ids,
bool need_abort,
113 bool has_updated,
bool * end_query_allowed,
114 TRAN_STATE * tran_state,
bool * should_conn_reset)
125 UINT64 * diff_stats,
char *queryinfo_string);
220 int n_query_ids,
bool need_abort,
bool has_updated,
bool * end_query_allowed,
221 TRAN_STATE * tran_state,
bool * should_conn_reset)
223 int error_code, all_error_code,
i;
225 assert (tran_state !=
NULL && should_conn_reset !=
NULL && end_query_allowed !=
NULL);
227 *should_conn_reset =
false;
229 if (*end_query_allowed ==
false)
243 for (i = 0; i < n_query_ids; i++)
245 if (p_end_queries[i] > 0)
250 all_error_code = error_code;
260 *end_query_allowed =
false;
262 else if (need_abort ==
false)
305 bool flag_abort =
false;
351 bool flag_abort =
false;
362 conn = thread_p->conn_entry;
368 tran_state = tdes->
state;
380 if (flag_abort ==
true)
418 int capabilities = 0;
451 const char *client_host)
488 server_cap & NET_CAP_REMOTE_DISABLED, client_host, client_cap & NET_CAP_REMOTE_DISABLED);
493 thread_p->conn_entry->ignore_repl_delay =
true;
496 client_cap & NET_CAP_HA_IGNORE_REPL_DELAY);
512 int client_val, server_val;
544 char *ptr, *client_release, *client_host;
545 const char *server_release;
548 int strlen1, strlen2;
560 if (client_release !=
NULL)
567 client_release =
NULL;
568 client_bit_platform = 0;
569 client_capabilities = 0;
577 client_bit_platform);
583 if (client_release ==
NULL)
597 &compat, client_host) != client_capabilities)
659 char *desc_ptr =
NULL;
664 int fetch_version_type;
684 if (copy_area !=
NULL)
703 if (copy_area ==
NULL)
710 desc_size, content_ptr, content_size);
742 char *desc_ptr =
NULL;
755 success =
xlocator_get_class (thread_p, &class_oid, class_chn, &oid, lock, prefetching, ©_area);
761 if (copy_area !=
NULL)
781 if (copy_area ==
NULL)
788 desc_size, content_ptr, content_size);
814 OID class_oid, last_oid;
815 int nobjects, nfetched;
819 int fetch_version_type;
822 char *desc_ptr =
NULL;
839 &nfetched, &last_oid, ©_area);
846 if (copy_area !=
NULL)
869 if (copy_area ==
NULL)
876 desc_size, content_ptr, content_size);
901 int chn, class_chn, prefetch, doesexist;
904 int fetch_version_type;
909 char *desc_ptr =
NULL;
927 need_fetching, prefetch, ©_area);
934 if (copy_area !=
NULL)
954 if (copy_area ==
NULL)
961 desc_size, content_ptr, content_size);
989 char *desc_ptr =
NULL;
1002 if (copy_area !=
NULL)
1022 if (copy_area ==
NULL)
1029 desc_size, content_ptr, content_size);
1060 char *content_ptr =
NULL, *new_content_ptr =
NULL;
1061 char *reply_content_ptr =
NULL;
1063 char *packed_desc =
NULL;
1064 int packed_desc_size;
1066 char *desc_ptr =
NULL;
1094 if (content_size > 0)
1098 if (new_content_ptr !=
NULL)
1100 memcpy (content_ptr, new_content_ptr, size);
1124 num_objs =
locator_send_copy_area (reply_copy_area, &reply_content_ptr, &content_size, &desc_ptr, &desc_size);
1137 desc_ptr, desc_size, reply_content_ptr, content_size);
1146 if (copy_area !=
NULL)
1150 if (reply_copy_area !=
NULL)
1184 char *content_ptr =
NULL, *new_content_ptr =
NULL;
1186 char *packed_desc =
NULL;
1187 int packed_desc_size;
1188 int multi_update_flags;
1190 int i, num_ignore_error_list;
1199 for (i = 0; i < num_ignore_error_list; i++)
1212 assert (csserror || packed_desc_size == received_size);
1227 if (content_size > 0)
1231 if (new_content_ptr !=
NULL)
1233 memcpy (content_ptr, new_content_ptr, received_size);
1245 success =
xlocator_force (thread_p, copy_area, num_ignore_error_list, ignore_error_list);
1264 packed_desc, packed_desc_size,
NULL, 0);
1277 if (copy_area !=
NULL)
1309 char *packed =
NULL;
1329 if ((lockset ==
NULL) || (lockset->
length <= 0))
1355 if (copy_area !=
NULL)
1371 packed = lockset->
packed;
1381 if (copy_area ==
NULL && lockset ==
NULL)
1388 send_size, desc_ptr, desc_size, content_ptr, content_size);
1390 if (copy_area !=
NULL)
1401 while (copy_area && lockset
1437 char *desc_ptr =
NULL;
1443 char *packed =
NULL;
1460 &lockset, ©_area);
1471 packed = lockset->
packed;
1481 if (copy_area !=
NULL)
1502 if (copy_area ==
NULL && lockset ==
NULL)
1509 send_size, desc_ptr, desc_size, content_ptr, content_size);
1510 if (copy_area !=
NULL)
1515 if (lockset !=
NULL)
1592 malloc_size = ((
sizeof (
char *) +
sizeof (
OID)) * num_classes);
1594 if (malloc_area !=
NULL)
1596 classnames = (
char **) malloc_area;
1597 class_oids = (
OID *) ((
char *) malloc_area + (
sizeof (
char *) * num_classes));
1598 for (i = 0; i < num_classes; i++)
1701 char *oldname, *newname;
1737 int expected_length;
1738 OID class_oid, perm_oid;
1777 unsigned int timestamp;
1788 if (buffer ==
NULL && buffer_length < 0)
1830 #if defined(ENABLE_UNUSED_FUNCTION) 1843 slogtb_has_updated (
THREAD_ENTRY * thread_p,
unsigned int rid,
char *request,
int reqlen)
1945 int isolation, error_code;
2004 file_size = ftell (outfp);
2014 while (file_size > 0)
2016 if (file_size > buffer_size)
2018 send_size = buffer_size;
2022 send_size = file_size;
2025 file_size -= send_size;
2026 if (fread (buffer, 1, send_size, outfp) == 0)
2066 real_loc_size =
strlen (real_locator) + 1;
2123 char *locator, *new_locator;
2246 file_size = ftell (outfp);
2256 while (file_size > 0)
2258 if (file_size > buffer_size)
2260 send_size = buffer_size;
2264 send_size = file_size;
2267 file_size -= send_size;
2268 if (fread (buffer, 1, send_size, outfp) == 0)
2324 file_size = ftell (outfp);
2334 while (file_size > 0)
2336 if (file_size > buffer_size)
2338 send_size = buffer_size;
2342 send_size = file_size;
2345 file_size -= send_size;
2346 if (fread (buffer, 1, send_size, outfp) == 0)
2387 error =
xheap_create (thread_p, &hfid, &class_oid, (
bool) reuse_oid);
2412 #if defined(ENABLE_UNUSED_FUNCTION) 2546 char *reply, *
area, *ptr;
2601 char mk_path[PATH_MAX] = { 0, };
2604 char *reply, *
area, *ptr;
2652 time_t created_time, set_time;
2718 bool retain_lock, should_conn_reset =
false;
2723 int n_query_ids = 0,
i = 0;
2731 for (
i = 0;
i < n_query_ids;
i++)
2740 retain_lock = (
bool) xretain_lock;
2768 bool should_conn_reset =
false, has_updated;
2952 int isactive_has_updated;
3082 buffer = malloc (size);
3174 int count, *gtrids, size,
i;
3180 gtrids = (
int *) malloc (
sizeof (
int) * size);
3188 if (count < 0 || count > size)
3194 reply = (
char *) malloc (reply_size);
3201 (void) memset (reply, 0, reply_size);
3203 for (i = 0; i <
count; i++)
3344 int tran_index, client_lock_wait;
3347 int area_size, strlen1, strlen2, strlen3, strlen4;
3348 char *reply, *
area, *ptr;
3355 memset (&server_credential, 0,
sizeof (server_credential));
3357 unpacker.
set_buffer (request, (
size_t) reqlen);
3358 unpacker.
unpack_all (client_credential, client_lock_wait, xint);
3361 tran_index =
xboot_register_client (thread_p, &client_credential, client_lock_wait, client_isolation, &tran_state,
3362 &server_credential);
3443 if (thread_p ==
NULL)
3446 if (thread_p ==
NULL)
3451 conn = thread_p->conn_entry;
3464 xboot_notify_unregister_client (thread_p, tran_index);
3493 int delete_unneeded_logarchives;
3494 char *backup_verbose_file;
3514 xboot_backup (thread_p, backup_path, backup_level, delete_unneeded_logarchives, backup_verbose_file, num_threads,
3515 zip_method, zip_level, skip_activelog, sleep_msecs, separate_keys);
3556 ext_info.
path = unpack_char;
3558 ext_info.
name = unpack_char;
3602 if (request ==
NULL)
3610 oids = (
OID *) malloc (
sizeof (
OID) * num);
3616 for (
i = 0;
i < num;
i++)
3745 int req_state, force, timeout;
3827 int error, with_fullscan;
3860 int error, with_fullscan;
3895 int attr_id, unique_pk;
3906 return_btid =
xbtree_add_index (thread_p, &btid, key_type, &class_oid, attr_id, unique_pk, 0, 0, 0);
3907 if (return_btid ==
NULL)
3938 int unique_pk, not_null_flag;
3940 BTID fk_refcls_pk_btid;
3941 char *bt_name, *fk_name;
3942 int n_classes, n_attrs, *attr_ids =
NULL;
3943 int *attr_prefix_lengths =
NULL;
3948 char *pred_stream =
NULL;
3949 int pred_stream_size = 0, size = 0;
3950 int func_col_id = -1, expr_stream_size = 0, func_attr_index_start = -1;
3951 int index_info_type;
3952 char *expr_stream =
NULL;
3954 int index_status = 0;
4002 switch (index_info_type)
4006 if (pred_stream_size > 0)
4023 if (expr_stream_size > 0)
4046 attr_prefix_lengths, hfids, unique_pk, not_null_flag, &fk_refcls_oid,
4047 &fk_refcls_pk_btid, fk_name, pred_stream, pred_stream_size, expr_stream,
4048 expr_stream_size, func_col_id, func_attr_index_start, ib_thread_count);
4053 xbtree_load_index (thread_p, &btid, bt_name, key_type, class_oids, n_classes, n_attrs, attr_ids,
4054 attr_prefix_lengths, hfids, unique_pk, not_null_flag, &fk_refcls_oid, &fk_refcls_pk_btid,
4055 fk_name, pred_stream, pred_stream_size, expr_stream, expr_stream_size, func_col_id,
4056 func_attr_index_start);
4059 if (return_btid ==
NULL)
4068 if (return_btid ==
NULL)
4098 if (class_oids !=
NULL)
4103 if (attr_ids !=
NULL)
4108 if (attr_prefix_lengths !=
NULL)
4118 if (expr_stream !=
NULL)
4265 int count, needs_pruning,
i, found = 0, area_size = 0;
4289 for (i = 0; i <
count; i++)
4299 for (i = 0; i <
count; i++)
4322 for (i = 0; i < found; i++)
4348 for (i = 0; i <
count; i++)
4424 volid = (
VOLID) int_volid;
4457 volid = (
VOLID) int_volid;
4666 char *reply =
NULL, *reply_buffer =
NULL;
4667 int csserror, reply_buffer_size = 0, get_xasl_header = 0;
4668 int xasl_cache_pinned = 0, recompile_xasl_cache_pinned = 0;
4669 int recompile_xasl = 0;
4675 bool was_recompile_xasl =
false;
4676 bool force_recompile =
false;
4705 if (get_xasl_header)
4759 reply_buffer_size += force_recompile ?
OR_INT_SIZE : 0;
4760 assert (reply_buffer_size > 0);
4762 reply_buffer = (
char *) malloc (reply_buffer_size);
4763 if (reply_buffer ==
NULL)
4765 reply_buffer_size = 0;
4772 if (get_xasl_header)
4776 if (force_recompile)
4794 if (reply_buffer !=
NULL)
4813 bool * can_end_transaction)
4821 int i,
flag, compressed_size = 0, decompressed_size = 0, diff_size, val_length;
4823 bool found_compressible_string_domain, exceed_a_page;
4827 *can_end_transaction =
false;
4844 *can_end_transaction =
true;
4849 found_compressible_string_domain =
false;
4852 pr_type = domains[
i]->
type;
4857 found_compressible_string_domain =
true;
4862 if (!found_compressible_string_domain)
4865 *can_end_transaction =
true;
4876 exceed_a_page =
false;
4877 while (!exceed_a_page)
4885 tuple_p = tuple_record.
tpl;
4894 pr_type = domains[
i]->
type;
4899 if (compressed_size != 0)
4902 diff_size += decompressed_size - compressed_size;
4906 exceed_a_page =
true;
4912 tuple_p += val_length;
4924 *can_end_transaction = !exceed_a_page;
4949 int csserror, dbval_cnt, data_size, replydata_size,
page_size;
4950 QUERY_ID query_id = NULL_QUERY_ID;
4951 char *ptr, *data =
NULL, *reply, *replydata =
NULL;
4963 int response_time = 0;
4968 int queryinfo_string_length = 0;
4971 UINT64 *base_stats =
NULL;
4972 UINT64 *current_stats =
NULL;
4973 UINT64 *diff_stats =
NULL;
4974 char *sql_id =
NULL;
4976 int trace_slow_msec, trace_ioreads;
4977 bool tran_abort =
false, has_xasl_entry =
false;
4981 int n_query_ids = 0,
i = 0;
4982 bool end_query_allowed, should_conn_reset;
4985 bool is_tran_auto_commit;
4990 if (trace_slow_msec >= 0 || trace_ioreads > 0)
4992 perfmon_start_watch (thread_p);
4995 if (base_stats == NULL)
5004 if (trace_slow_msec >= 0)
5006 thread_p->event_stats.trace_slow_query =
true;
5032 p_net_Deferred_end_queries = (QUERY_ID *) malloc ((n_query_ids + 1) *
sizeof (QUERY_ID));
5033 if (p_net_Deferred_end_queries == NULL)
5036 (
size_t) (n_query_ids + 1) *
sizeof (QUERY_ID));
5042 for (
i = 0;
i < n_query_ids;
i++)
5052 data = aligned_data_buf;
5053 memcpy (data, ptr, data_size);
5055 else if (0 < dbval_cnt)
5059 if (csserror || data == NULL)
5074 list_id =
xqmgr_execute_query (thread_p, &xasl_id, &query_id, dbval_cnt, data, &query_flag, &clt_cache_time,
5075 &srv_cache_time, query_timeout, &xasl_cache_entry_p);
5077 if (data != NULL && data != aligned_data_buf)
5082 if (xasl_cache_entry_p != NULL)
5084 info = xasl_cache_entry_p->
sql_info;
5089 tran_state = tdes->
state;
5090 has_updated =
false;
5093 if (list_id == NULL && !
CACHE_TIME_EQ (&clt_cache_time, &srv_cache_time))
5110 sql_id ? sql_id :
"(UNKNOWN SQL_ID)",
5123 if (xasl_cache_entry_p != NULL)
5128 has_xasl_entry =
true;
5130 xasl_cache_entry_p =
NULL;
5145 if (list_id != NULL)
5157 if (page_ptr != NULL)
5171 memcpy (aligned_page_buf, page_ptr, page_size);
5173 page_ptr = aligned_page_buf;
5195 if (0 < replydata_size)
5199 if (replydata != NULL)
5212 if (tran_abort ==
false)
5214 if (trace_slow_msec >= 0 || trace_ioreads > 0)
5218 response_time = (tv_diff.tv_sec * 1000) + (tv_diff.tv_usec / 1000);
5220 if (base_stats == NULL)
5223 if (base_stats == NULL)
5231 if (current_stats == NULL)
5237 if (diff_stats == NULL)
5246 if (response_time >= trace_slow_msec)
5248 queryinfo_string_length =
5249 er_log_slow_query (thread_p, &info, response_time, diff_stats, queryinfo_string);
5253 if (trace_ioreads > 0
5259 perfmon_stop_watch (thread_p);
5262 if (thread_p->event_stats.temp_expand_pages > 0)
5268 if (xasl_cache_entry_p != NULL)
5270 has_xasl_entry =
true;
5272 xasl_cache_entry_p =
NULL;
5291 p_net_Deferred_end_queries[n_query_ids++] = query_id;
5297 assert (end_query_allowed ==
true);
5304 end_query_allowed =
false;
5309 tran_abort, has_updated, &end_query_allowed, &tran_state, &should_conn_reset);
5311 if (end_query_allowed ==
true)
5327 #if !defined(NDEBUG) 5333 replydata_size, page_ptr, page_size, queryinfo_string, queryinfo_string_length);
5336 if (replydata != NULL)
5340 if (list_id != NULL)
5346 if (p_net_Deferred_end_queries != net_Deferred_end_queries)
5350 if (base_stats != NULL)
5354 if (current_stats != NULL)
5358 if (diff_stats != NULL)
5375 char *queryinfo_string)
5379 int queryinfo_string_length;
5380 const char *line =
"--------------------------------------------------------------------------------";
5381 const char *title =
"Operation";
5399 queryinfo_string_length =
5400 snprintf (queryinfo_string,
QUERY_INFO_BUF_SIZE,
"%s\n%s\n%s\n %s\n\n /* SQL_ID: %s */ %s%s \n\n%s\n%s\n", line,
5414 queryinfo_string[queryinfo_string_length] =
'\0';
5419 return queryinfo_string_length;
5444 if (tdes ==
NULL || log_fp ==
NULL)
5457 fprintf (log_fp,
"%*ctime: %d\n", indent,
' ', time);
5458 fprintf (log_fp,
"%*cbuffer: fetch=%lld, ioread=%lld, iowrite=%lld\n", indent,
' ',
5462 fprintf (log_fp,
"%*cwait: cs=%d, lock=%d, latch=%d\n\n", indent,
' ',
TO_MSEC (thread_p->event_stats.cs_waits),
5463 TO_MSEC (thread_p->event_stats.lock_waits),
TO_MSEC (thread_p->event_stats.latch_waits));
5490 if (tdes ==
NULL || log_fp ==
NULL)
5503 fprintf (log_fp,
"%*ctime: %d\n", indent,
' ', time);
5504 fprintf (log_fp,
"%*cioreads: %lld\n\n", indent,
' ',
5530 if (tdes ==
NULL || log_fp ==
NULL)
5543 fprintf (log_fp,
"%*ctime: %d\n", indent,
' ',
TO_MSEC (thread_p->event_stats.temp_expand_time));
5544 fprintf (log_fp,
"%*cpages: %d\n\n", indent,
' ', thread_p->event_stats.temp_expand_pages);
5564 int var_count, var_datasize, var_actual_datasize;
5567 int csserror, listid_length;
5569 int xasl_stream_size;
5570 char *ptr, *var_data, *list_data;
5575 int dummy_plan_size = 0;
5579 bool is_tran_auto_commit;
5584 xasl_stream_size = 0;
5606 if (var_count && var_datasize)
5637 if (q_result ==
NULL)
5675 memcpy (aligned_page_buf, page_ptr, page_size);
5699 if (listid_length > 0)
5702 if (list_data ==
NULL)
5727 #if !defined(NDEBUG) 5733 listid_length, aligned_page_buf, page_size,
NULL, dummy_plan_size);
5775 int n_query_ids = 0,
i = 0;
5780 for (
i = 0;
i < n_query_ids;
i++)
5788 all_error_code = error_code;
5879 file_size = ftell (outfp);
5889 while (file_size > 0)
5891 if (file_size > buffer_size)
5893 send_size = buffer_size;
5897 send_size = file_size;
5900 file_size -= send_size;
5901 if (fread (buffer, 1, send_size, outfp) == 0)
5958 file_size = ftell (outfp);
5968 while (file_size > 0)
5970 if (file_size > buffer_size)
5972 send_size = buffer_size;
5976 send_size = file_size;
5979 file_size -= send_size;
5980 if (fread (buffer, 1, send_size, outfp) == 0)
6007 #if defined(ENABLE_UNUSED_FUNCTION) 6104 int cached_num, num_alloc, is_auto_increment;
6105 int buffer_length, errid;
6119 errid =
xserial_get_next_value (thread_p, &next_val, &oid, cached_num, num_alloc, is_auto_increment,
true);
6200 perfmon_start_watch (thread_p);
6223 perfmon_stop_watch (thread_p);
6244 int nr_statistic_values;
6245 UINT64 *stats =
NULL;
6288 int nr_statistic_values;
6289 UINT64 *stats =
NULL;
6380 #if !defined(NDEBUG) 6386 if (databuf ==
NULL)
6430 bool continue_checking =
true;
6473 bool continue_checking =
true;
6559 char **many_classnames;
6561 int *many_need_subclasses =
NULL;
6562 OID *guessed_class_oids =
NULL;
6563 int *guessed_class_chns =
NULL;
6565 int quit_on_errors, lock_rr_tran;
6569 char *desc_ptr =
NULL;
6575 char *packed =
NULL;
6584 found_lockhint =
NULL;
6591 malloc_size = ((
sizeof (
char *) +
sizeof (
LOCK) +
sizeof (int) +
sizeof (
int) +
sizeof (
OID) +
sizeof (
int))
6595 if (malloc_area !=
NULL)
6597 many_classnames = (
char **) malloc_area;
6598 many_locks = (
LOCK *) ((
char *) malloc_area + (
sizeof (
char *) * num_classes));
6599 many_need_subclasses = (
int *) ((
char *) many_locks + (
sizeof (
LOCK) * num_classes));
6600 many_flags = (
LC_PREFETCH_FLAGS *) ((
char *) many_need_subclasses + (
sizeof (int) * num_classes));
6601 guessed_class_oids = (
OID *) ((
char *) many_flags + (
sizeof (int) * num_classes));
6602 guessed_class_chns = (
int *) ((
char *) guessed_class_oids + (
sizeof (
OID) * num_classes));
6604 for (i = 0; i < num_classes; i++)
6616 many_need_subclasses, many_flags, guessed_class_oids, guessed_class_chns,
6617 quit_on_errors, &found_lockhint, ©_area);
6635 if (found_lockhint !=
NULL && found_lockhint->
length > 0)
6639 packed = found_lockhint->
packed;
6649 if (copy_area !=
NULL)
6670 if (copy_area ==
NULL && found_lockhint ==
NULL)
6677 send_size, desc_ptr, desc_size, content_ptr, content_size);
6678 if (copy_area !=
NULL)
6683 if (found_lockhint !=
NULL)
6726 char *packed =
NULL;
6746 if ((lockhint ==
NULL) || (lockhint->
length <= 0))
6771 if (copy_area !=
NULL)
6787 packed = lockhint->
packed;
6797 if (copy_area ==
NULL && lockhint ==
NULL)
6804 send_size, desc_ptr, desc_size, content_ptr, content_size);
6806 if (copy_area !=
NULL)
6840 int kill_tran_index;
6883 int *tran_index_list;
6884 int num_tran_index, interrupt_only;
6885 int num_killed_tran = 0;
6886 int is_dba_group_member = 0;
6893 for (i = 0; i < num_tran_index; i++)
6917 if (tran_index_list)
6965 file_size = ftell (outfp);
6975 while (file_size > 0)
6977 if (file_size > buffer_size)
6979 send_size = buffer_size;
6983 send_size = file_size;
6986 file_size -= send_size;
6987 if (fread (buffer, 1, send_size, outfp) == 0)
7019 int include_query_exec_info;
7080 file_size = ftell (outfp);
7090 while (file_size > 0)
7092 if (file_size > buffer_size)
7094 send_size = buffer_size;
7098 send_size = file_size;
7101 file_size -= send_size;
7102 if (fread (buffer, 1, send_size, outfp) == 0)
7129 unsigned int rid,
rc;
7130 int data_len, print_len;
7142 if (databuf ==
NULL)
7181 const char *failure_prompt,
int range_low,
int range_high,
const char *secondary_prompt,
7186 int prompt_length, strlen1, strlen2, strlen3;
7187 unsigned int rid,
rc;
7206 if (databuf ==
NULL)
7242 unsigned int rid,
rc;
7303 *fpageid_ptr = first_pageid;
7326 int success, approximation, nobjs, npages;
7407 char *reply_data =
NULL;
7409 int reply_data_size;
7423 if (key_type !=
NULL)
7427 reply_data = (
char *) malloc (reply_data_size);
7428 if (reply_data ==
NULL)
7432 reply_data_size = 0;
7441 reply_data_size = 0;
7452 if (reply_data !=
NULL)
7475 char *ptr, *buffer =
NULL;
7477 int server_info_bits;
7516 if (server_info_bits & SI_SYS_DATETIME)
7522 if (server_info_bits & SI_LOCAL_TRANSACTION_ID)
7527 #if !defined(NDEBUG) 7529 memset (ptr, 0, buffer_length - (ptr - buffer));
7600 if (change_values ==
NULL)
7606 area = (
char *) malloc (area_size);
7642 char *ptr =
NULL, *reply_data =
NULL;
7643 int reply_data_size;
7649 reply_data = (
char *) malloc (reply_data_size);
7650 if (reply_data ==
NULL)
7654 reply_data_size = 0;
7664 if (reply_data !=
NULL)
7668 if (prm_values !=
NULL)
7713 file_size = ftell (outfp);
7723 while (file_size > 0)
7725 if (file_size > buffer_size)
7727 send_size = buffer_size;
7731 send_size = file_size;
7734 file_size -= send_size;
7735 if (fread (buffer, 1, send_size, outfp) == 0)
7771 int has_visible_instance;
7869 repl_info.
info = (
char *) &repl_schema;
7931 int n_attrs, *attr_ids =
NULL;
7933 char *fk_name =
NULL;
7964 if (attr_ids !=
NULL)
7969 if (fk_name !=
NULL)
7995 int m,
error, remote_error;
8002 error = xlogwr_get_log_pages (thread_p, first_pageid, mode);
8036 int success, n_classes, reply_size,
i;
8039 int *ids_repr =
NULL;
8041 int space_to_process = 0, instance_lock_timeout = 0, delete_old_repr = 0;
8042 int class_lock_timeout = 0;
8043 OID last_processed_class_oid, last_processed_oid;
8045 int *modified_objects =
NULL, *big_objects =
NULL;
8139 xboot_compact_db (thread_p, class_oids, n_classes, space_to_process, instance_lock_timeout, class_lock_timeout,
8140 (
bool) delete_old_repr, &last_processed_class_oid, &last_processed_oid, total_objects,
8141 failed_objects, modified_objects, big_objects, ids_repr);
8163 ptr =
or_pack_oid (ptr, &last_processed_class_oid);
8166 for (i = 0; i < n_classes; i++)
8171 for (i = 0; i < n_classes; i++)
8176 for (i = 0; i < n_classes; i++)
8181 for (i = 0; i < n_classes; i++)
8186 for (i = 0; i < n_classes; i++)
8319 char new_path[PATH_MAX];
8320 int path_size = 0, ret;
8325 ret = xes_posix_create_file (new_path);
8332 path_size =
strlen (new_path) + 1;
8359 INT64 ret, tmp_int64;
8360 int csserror, buf_size;
8367 offset = (off_t) tmp_int64;
8369 count = (size_t) tmp_int64;
8379 ret = xes_posix_write_file (path, buf, count, offset);
8412 INT64 ret, tmp_int64;
8419 offset = (off_t) tmp_int64;
8421 count = (size_t) tmp_int64;
8430 ret = xes_posix_read_file (path, buf, count, offset);
8465 ret = xes_posix_delete_file (path);
8489 char *src_path, *metaname, new_path[PATH_MAX];
8490 int path_size = 0, ret;
8498 ret = xes_posix_copy_file (src_path, metaname, new_path);
8505 path_size =
strlen (new_path) + 1;
8528 char *src_path, *metaname, new_path[PATH_MAX];
8529 int path_size = 0, ret;
8537 ret = xes_posix_rename_file (src_path, metaname, new_path);
8544 path_size =
strlen (new_path) + 1;
8575 file_size = xes_posix_get_file_size (path);
8637 int row_count = -1, area_size;
8673 error = sysprm_session_init_session_parameters (&session_params, &update_parameter_values);
8696 if (update_parameter_values)
8702 area = (
char *) malloc (area_size);
8709 if (update_parameter_values)
8723 if (db_user !=
NULL)
8849 char *data_reply =
NULL;
8852 int update_last_insert_id;
8867 if (data_reply ==
NULL)
8883 if (data_reply !=
NULL)
8927 char *name =
NULL, *alias_print =
NULL;
8929 char *data_request =
NULL;
8931 int data_size = 0,
err = 0;
8949 if (alias_print !=
NULL)
8966 info = (
char *) malloc (data_size);
8972 memcpy (info, data_request, data_size);
8984 if (data_request !=
NULL)
8997 if (data_request !=
NULL)
9005 if (alias_print !=
NULL)
9026 char *name =
NULL, *stmt_info =
NULL;
9033 int get_xasl_header = 0;
9040 if (get_xasl_header)
9043 xasl_header_p = &xasl_header;
9055 if (get_xasl_header)
9059 data_reply = (
char *) malloc (reply_size);
9060 if (data_reply ==
NULL)
9068 if (get_xasl_header)
9087 if (data_reply !=
NULL)
9103 if (data_reply !=
NULL)
9107 if (stmt_info !=
NULL)
9166 char *username =
NULL;
9169 if (username ==
NULL)
9249 if (data_request !=
NULL)
9297 data_reply = (
char *) malloc (size);
9298 if (data_reply !=
NULL)
9318 if (data_reply !=
NULL)
9398 file_size = ftell (outfp);
9408 while (file_size > 0)
9410 if (file_size > buffer_size)
9412 send_size = buffer_size;
9416 send_size = file_size;
9419 file_size -= send_size;
9420 if (fread (buffer, 1, send_size, outfp) == 0)
9523 if (data_request !=
NULL)
9581 assert (found_coll == collation_cnt);
9583 for (
i = 0;
i < lang_cnt;
i++)
9597 while (lld !=
NULL);
9602 data_reply = (
char *) malloc (size);
9603 if (data_reply !=
NULL)
9633 assert (found_coll == collation_cnt);
9636 for (
i = 0;
i < lang_cnt;
i++)
9654 while (lld !=
NULL);
9670 if (data_reply !=
NULL)
9701 data_reply = (
char *) malloc (size);
9703 if (data_reply !=
NULL)
9721 if (data_reply !=
NULL)
9757 repl_info.
info = (
char *) &repl_stmt;
9835 oid_list = (
OID *) malloc (nr_oids *
sizeof (
OID));
9836 if (oid_list ==
NULL)
9844 for (i = 0; i < nr_oids; i++)
9851 if (oid_list !=
NULL)
9889 char *data_reply =
NULL;
9890 int data_reply_length = 0;
9931 assert (ptr - data_reply == data_reply_length);
9950 if (data_reply !=
NULL)
10011 bool is_ignored =
false;
10017 batch.
unpack (unpacker);
10021 std::string cls_name;
10025 error_code = session->
install_class (*thread_p, batch, is_ignored, cls_name);
10042 int buf_sz = (int) cls_name.length ();
10048 (
char *) cls_name.c_str (), buf_sz);
10063 char *reply_data =
NULL;
10064 int reply_data_size = 0;
10066 bool use_temp_batch =
false;
10068 if (!use_temp_batch)
10071 batch->
unpack (unpacker);
10074 bool is_batch_accepted =
false;
10082 error_code = session->
load_batch (*thread_p, batch, use_temp_batch, is_batch_accepted, status);
10103 char *ptr =
or_pack_int (reply, reply_data_size);
10118 char *buffer =
NULL;
10119 int buffer_size = 0;
10197 char *buffer =
NULL;
10198 int buffer_size = 0;
#define QFILE_TUPLE_VALUE_HEADER_SIZE
void stran_server_2pc_recovery_prepared(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
TRAN_STATE xtran_server_2pc_prepare_global_tran(THREAD_ENTRY *thread_p, int gtrid)
char * locator_pack_oid_set(char *buffer, LC_OIDSET *oidset)
void sloaddb_destroy(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
LC_FIND_CLASSNAME xlocator_delete_class_name(THREAD_ENTRY *thread_p, const char *classname)
void set_buffer_and_pack_all(ExtBlk &eb, Args &&...args)
bool xlocator_notify_isolation_incons(THREAD_ENTRY *thread_p, LC_COPYAREA **synch_area)
#define ER_QPROC_XASLNODE_RECOMPILE_REQUESTED
#define ER_LK_UNILATERALLY_ABORTED
void sbtree_delete_index(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slog_drop_lob_locator(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sboot_check_db_consistency(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define LANG_MAX_COLLATIONS
int xsession_delete_prepared_statement(THREAD_ENTRY *thread_p, const char *name)
char * or_unpack_hfid_array(char *ptr, int n, HFID **hfids)
int xboot_compact_start(THREAD_ENTRY *thread_p)
char * or_unpack_oid(char *ptr, OID *oid)
#define OR_BTID_ALIGNED_SIZE
cubload::session load_session
unsigned int css_send_data_to_client(CSS_CONN_ENTRY *conn, unsigned int eid, char *buffer, int buffer_size)
void sbtree_find_unique(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_pack_btid(char *buf, const BTID *btid)
void stran_server_is_active_and_has_updated(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xheap_get_class_num_objects_pages(THREAD_ENTRY *thread_p, const HFID *hfid, int approximation, int *nobjs, int *npages)
cubthread::entry * thread_get_thread_entry_info(void)
void set_buffer(const char *storage, const size_t amount)
DB_INFO * cfg_find_db(const char *db_name)
int xsession_get_prepared_statement(THREAD_ENTRY *thread_p, const char *name, char **info, int *info_len, XASL_ID *xasl_id, xasl_node_header *xasl_header_p)
char * perfmon_pack_stats(char *buf, UINT64 *stats)
void stran_server_2pc_prepare(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sthread_kill_tran_index(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define DB_ROW_COUNT_NOT_SET
void shf_heap_reclaim_addresses(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xlogtb_get_mvcc_snapshot(THREAD_ENTRY *thread_p)
void stran_server_2pc_start(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void ssession_find_or_create_session(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void stran_server_savepoint(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xs_send_method_call_info_to_client(THREAD_ENTRY *thread_p, qfile_list_id *list_id, method_sig_list *methsg_list)
int xheap_has_instance(THREAD_ENTRY *thread_p, const HFID *hfid, OID *class_oid, int has_visible_instance)
void sboot_get_locales_info(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int file_spacedb(THREAD_ENTRY *thread_p, SPACEDB_FILES *spacedb)
STATIC_INLINE int or_get_varchar_compression_lengths(OR_BUF *buf, int *compressed_size, int *decompressed_size) __attribute__((ALWAYS_INLINE))
XASL_NODE_HEADER * xasl_header
void ssession_create_prepared_statement(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
struct qmgr_temp_file * tfile_vfid
void sqfile_get_list_file_page(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_unpack_string(char *ptr, char **string)
#define CACHE_TIME_RESET(T)
void ssession_get_row_count(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define ER_NET_DIFFERENT_RELEASE
int boot_compact_stop(THREAD_ENTRY *thread_p)
void slocator_upgrade_instances_domain(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define NET_COPY_AREA_SENDRECV_SIZE
int xboot_check_db_consistency(THREAD_ENTRY *thread_p, int check_flag, OID *oids, int num_oids, BTID *index_btid)
int xacl_reload(THREAD_ENTRY *thread_p)
#define ER_KILL_TR_NOT_ALLOWED
QFILE_TUPLE_VALUE_TYPE_LIST type_list
DB_TRAN_ISOLATION TRAN_ISOLATION
#define ER_INVALID_PARTITION_REQUEST
int sysprm_packed_assign_values_length(const SYSPRM_ASSIGN_VALUE *assign_values, int offset)
void slocator_fetch_all(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sbtree_get_statistics(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slocator_fetch(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define rmutex_unlock(a, b)
void stde_change_mk_on_server(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
unsigned int css_get_comm_request_id(THREAD_ENTRY *thread_p)
int xlocator_fetch_lockhint_classes(THREAD_ENTRY *thread_p, LC_LOCKHINT *lockhint, LC_COPYAREA **fetch_area)
#define QFILE_FREE_AND_INIT_LIST_ID(list_id)
void slocator_fetch_lockhint_classes(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xboot_heap_compact(THREAD_ENTRY *thread_p, OID *class_oid)
void stran_server_has_updated(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void xsysprm_obtain_server_parameters(SYSPRM_ASSIGN_VALUE *prm_values)
void smnt_server_stop_stats(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int or_listid_length(void *listid)
#define SHA1_HASH_INITIALIZER
void locator_free_copy_area(LC_COPYAREA *copyarea)
void stde_get_mk_info(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
enum db_client_type BOOT_CLIENT_TYPE
#define NET_SENDRECV_BUFFSIZE
char * or_pack_errcode(char *ptr, int error)
int db_get_int(const DB_VALUE *value)
void update_class_statistics(cubthread::entry &thread_ref)
int btree_get_stats(THREAD_ENTRY *thread_p, BTREE_STATS *stat_info_p, bool with_fullscan)
unsigned int css_send_reply_and_3_data_to_client(CSS_CONN_ENTRY *conn, unsigned int eid, char *reply, int reply_size, char *buffer1, int buffer1_size, char *buffer2, int buffer2_size, char *buffer3, int buffer3_size)
LC_LOCKHINT * locator_allocate_and_unpack_lockhint(char *unpacked, int unpacked_size, bool unpack_classes, bool reg_unpacked)
void ssession_reset_cur_insert_id(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define ER_NET_SERVER_DATA_RECEIVE
int xsession_get_row_count(THREAD_ENTRY *thread_p, int *row_count)
PAGE_PTR qmgr_get_old_page(THREAD_ENTRY *thread_p, VPID *vpid_p, QMGR_TEMP_FILE *tfile_vfid_p)
int xfile_apply_tde_to_class_files(THREAD_ENTRY *thread_p, const OID *class_oid)
void stran_lock_rep_read(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
TRAN_STATE xtran_server_partial_abort(THREAD_ENTRY *thread_p, const char *savept_name, LOG_LSA *savept_lsa)
void sboot_add_volume_extension(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sboot_find_last_permanent(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
FILEIO_REMOTE_PROMPT_TYPE
const TZ_DATA * tz_get_data(void)
void server_ping(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int perfmon_calc_diff_stats(UINT64 *stats_diff, UINT64 *new_stats, UINT64 *old_stats)
int install_class(cubthread::entry &thread_ref, const batch &batch, bool &is_ignored, std::string &cls_name)
TRAN_ABORT_REASON tran_abort_reason
const char * boot_db_name(void)
void slog_add_lob_locator(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xlogtb_kill_tran_index(THREAD_ENTRY *thread_p, int kill_tran_index, char *kill_user, char *kill_host, int kill_pid)
#define ER_DB_NO_MODIFICATIONS
char * xdisk_get_remarks(THREAD_ENTRY *thread_p, VOLID volid)
char * or_unpack_string_alloc(char *ptr, char **string)
int lang_locales_count(bool check_codeset)
char * locator_unpack_copy_area_descriptor(int num_objs, LC_COPYAREA *copyarea, char *desc)
int xs_receive_data_from_client_with_timeout(THREAD_ENTRY *thread_p, char **area, int *datasize, int timeout)
char * or_pack_db_value(char *buffer, DB_VALUE *var)
int rel_compare(const char *rel_a, const char *rel_b)
int rel_bit_platform(void)
void sprm_server_get_force_parameters(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
SCAN_CODE qfile_scan_list_next(THREAD_ENTRY *thread_p, QFILE_LIST_SCAN_ID *scan_id_p, QFILE_TUPLE_RECORD *tuple_record_p, int peek)
int xboot_register_client(THREAD_ENTRY *thread_p, BOOT_CLIENT_CREDENTIAL *client_credential, int client_lock_wait, TRAN_ISOLATION client_isolation, TRAN_STATE *tran_state, BOOT_SERVER_CREDENTIAL *server_credential)
LOG_LSA * xrepl_log_get_append_lsa(void)
void sync_dump_statistics(FILE *fp, SYNC_PRIMITIVE_TYPE type)
void sserial_get_current_value(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void stran_wait_server_active_trans(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void unpack(cubpacking::unpacker &deserializator) override
void ses_posix_copy_file(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int sysprm_set_error(SYSPRM_ERR rc, const char *data)
int xserial_get_current_value(THREAD_ENTRY *thread_p, DB_VALUE *result_num, const OID *oid_p, int cached_num)
PSTAT_METADATA pstat_Metadata[]
char * or_pack_string(char *ptr, const char *string)
int css_change_ha_server_state(THREAD_ENTRY *thread_p, HA_SERVER_STATE state, bool force, int timeout, bool heartbeat)
int css_increment_num_conn(BOOT_CLIENT_TYPE client_type)
void xlogtb_dump_trantable(THREAD_ENTRY *thread_p, FILE *out_fp)
void sboot_compact_db(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xcatalog_check_rep_dir(THREAD_ENTRY *thread_p, OID *class_id, OID *rep_dir_p)
char * or_pack_value(char *buf, DB_VALUE *value)
#define ASSERT_ERROR_AND_SET(error_code)
#define NET_CAP_HA_REPL_DELAY
int num_classes_processed
int xlocator_force(THREAD_ENTRY *thread_p, LC_COPYAREA *copy_area, int num_ignore_error_list, int *ignore_error_list)
BTID * xbtree_add_index(THREAD_ENTRY *thread_p, BTID *btid, TP_DOMAIN *key_type, OID *class_oid, int attr_id, int unique_pk, int num_oids, int num_nulls, int num_keys)
int xlog_send_log_pages_to_client(THREAD_ENTRY *thread_p, char *logpg_area, int area_size, LOGWR_MODE mode)
void stran_server_commit(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define assert_release(e)
#define REL_MAX_RELEASE_LENGTH
void sboot_notify_unregister_client(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define LOG_CHECK_LOG_APPLIER(thread_p)
int xtran_server_start_topop(THREAD_ENTRY *thread_p, LOG_LSA *topop_lsa)
const char * get_host_name() const
int xrepl_set_info(THREAD_ENTRY *thread_p, REPL_INFO *repl_info)
void stran_server_2pc_attach_global_tran(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define NET_CAP_HA_REPLICA
#define NET_CAP_FORWARD_COMPATIBLE
char * er_get_area_error(char *buffer, int *length)
void slogtb_set_interrupt(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
VOLID xboot_find_last_permanent(THREAD_ENTRY *thread_p)
#define OR_ALIGNED_BUF(size)
void sboot_compact_start(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
BTREE_SEARCH xbtree_find_multi_uniques(THREAD_ENTRY *thread_p, OID *class_oid, int pruning_type, BTID *btids, DB_VALUE *values, int count, SCAN_OPERATION_TYPE op_type, OID **oids, int *oids_count)
#define QEWC_MAX_DATA_SIZE
TRAN_STATE xtran_server_commit(THREAD_ENTRY *thrd, bool retain_lock)
struct timeval TSCTIMEVAL
#define OID_SET_NULL(oidp)
void locator_free_lockhint(LC_LOCKHINT *lockhint)
bool xtran_should_connection_reset(THREAD_ENTRY *thread_p, bool has_updated)
void smnt_server_copy_global_stats(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xbtree_delete_index(THREAD_ENTRY *thread_p, BTID *btid)
void sqmgr_dump_query_plans(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xqmgr_end_query(THREAD_ENTRY *thrd, QUERY_ID query_id)
int xlocator_fetch_all(THREAD_ENTRY *thread_p, const HFID *hfid, LOCK *lock, LC_FETCH_VERSION_TYPE fetch_type, OID *class_oid, int *nobjects, int *nfetched, OID *last_oid, LC_COPYAREA **fetch_area)
char * sysprm_pack_assign_values(char *ptr, const SYSPRM_ASSIGN_VALUE *assign_values)
FILE * event_log_start(THREAD_ENTRY *thread_p, const char *event_name)
bool is_xasl_pinned_reference
void stran_get_local_transaction_id(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xtran_server_2pc_attach_global_tran(THREAD_ENTRY *thread_p, int gtrid)
int xtran_server_set_global_tran_info(THREAD_ENTRY *thread_p, int gtrid, void *info, int size)
LOG_TDES * LOG_FIND_TDES(int tran_index)
void tsc_elapsed_time_usec(TSCTIMEVAL *tv, TSC_TICKS end_tick, TSC_TICKS start_tick)
STATIC_INLINE TRAN_STATE stran_server_commit_internal(THREAD_ENTRY *thread_p, unsigned int rid, bool retain_lock, bool *should_conn_reset) __attribute__((ALWAYS_INLINE))
char * or_unpack_string_nocopy(char *ptr, char **string)
enum lc_prefetch_flags LC_PREFETCH_FLAGS
int xlocator_redistribute_partition_data(THREAD_ENTRY *thread_p, OID *class_oid, int no_oids, OID *oid_list)
void ssession_get_last_insert_id(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slocator_redistribute_partition_data(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xtx_add_lob_locator(cubthread::entry *thread_p, const char *locator, LOB_LOCATOR_STATE state)
void qmgr_setup_empty_list_file(char *page_p)
int xqfile_get_list_file_page(THREAD_ENTRY *thread_p, QUERY_ID query_id, VOLID volid, PAGEID pageid, char *page_bufp, int *page_sizep)
#define OR_ALIGNED_BUF_SIZE(abuf)
int xlog_get_page_request_with_reply(THREAD_ENTRY *thread_p, LOG_PAGEID *fpageid_ptr, LOGWR_MODE *mode_ptr, int timeout)
char * or_pack_oid(char *ptr, const OID *oid)
void sboot_register_client(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sysprm_free_assign_values(SYSPRM_ASSIGN_VALUE **assign_values_ptr)
TRAN_STATE xtran_server_abort(THREAD_ENTRY *thrd)
void slog_change_state_of_locator(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define PTR_ALIGN(addr, boundary)
void stran_server_partial_abort(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void xserial_decache(THREAD_ENTRY *thread_p, OID *oidp)
#define NET_CAP_INTERRUPT_ENABLED
void locator_free_lockset(LC_LOCKSET *lockset)
unsigned int css_send_reply_and_2_data_to_client(CSS_CONN_ENTRY *conn, unsigned int eid, char *reply, int reply_size, char *buffer1, int buffer1_size, char *buffer2, int buffer2_size)
int or_packed_domain_size(struct tp_domain *domain, int include_classoids)
void sbtree_find_multi_uniques(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define er_log_debug(...)
int xsession_create_new(THREAD_ENTRY *thread_p, SESSION_ID *id)
void sprm_server_dump_parameters(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_unpack_int_array(char *ptr, int n, int **number_array)
void slogtb_get_mvcc_snapshot(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void xlogpb_dump_stat(FILE *outfp)
static void event_log_slow_query(THREAD_ENTRY *thread_p, EXECUTION_INFO *info, int time, UINT64 *diff_stats)
void slocator_reserve_classnames(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xboot_compact_db(THREAD_ENTRY *thread_p, OID *class_oids, int n_classes, int space_to_process, int instance_lock_timeout, int class_lock_timeout, bool delete_old_repr, OID *last_processed_class_oid, OID *last_processed_oid, int *total_objects, int *failed_objects, int *modified_objects, int *big_objects, int *initial_last_repr_id)
void slogtb_dump_trantable(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void _er_log_debug(const char *file_name, const int line_no, const char *fmt,...)
BOOT_SERVER_STATUS boot_Server_status
void ses_posix_delete_file(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
unsigned int css_receive_data_from_client_with_timeout(CSS_CONN_ENTRY *conn, unsigned int eid, char **buffer, int *size, int timeout)
void wait_for_completion()
int xsession_get_session_variable(THREAD_ENTRY *thread_p, const DB_VALUE *name, DB_VALUE *value)
void slocator_fetch_lockset(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sprm_server_obtain_parameters(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sserial_decache(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
LOCK lock_get_object_lock(const OID *oid, const OID *class_oid)
void shf_get_class_num_objs_and_pages(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * sysprm_pack_session_parameters(char *ptr, SESSION_PARAM *session_parameters)
int xboot_find_number_temp_volumes(THREAD_ENTRY *thread_p)
void stran_server_start_topop(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xtde_get_mk_info(THREAD_ENTRY *thread_p, int *mk_index, time_t *created_time, time_t *set_time)
LANG_LOCALE_DATA * next_lld
int xlogtb_reset_wait_msecs(THREAD_ENTRY *thread_p, int wait_msecs)
int xlogin_user(THREAD_ENTRY *thread_p, const char *username)
bool xlogtb_does_active_user_exist(THREAD_ENTRY *thread_p, const char *user_name)
void slocator_delete_class_name(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void css_set_ha_num_of_hosts(int num)
int xlocator_assign_oid_batch(THREAD_ENTRY *thread_p, LC_OIDSET *oidset)
void stran_is_blocked(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void xlogtb_set_interrupt(THREAD_ENTRY *thread_p, int set)
void sacl_dump(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int or_packed_stream_length(size_t len)
int xtran_wait_server_active_trans(THREAD_ENTRY *thrd)
#define OR_ALIGNED_BUF_START(abuf)
void sloaddb_update_stats(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define STATDUMP_BUF_SIZE
BTREE_SEARCH xbtree_find_unique(THREAD_ENTRY *thread_p, BTID *btid, SCAN_OPERATION_TYPE scan_op_type, DB_VALUE *key, OID *class_oid, OID *oid, bool is_all_class_srch)
char * or_pack_int64(char *ptr, INT64 number)
char boot_Host_name[CUB_MAXHOSTNAMELEN]
VACOMM_BUFFER_CLIENT_ACTION
void sqmgr_end_query(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int session_set_load_session(THREAD_ENTRY *thread_p, load_session *load_session_p)
char * perfmon_allocate_packed_values_buffer(void)
#define QFILE_GET_TUPLE_VALUE_FLAG(ptr)
static int client_capabilities(void)
void sthread_kill_or_interrupt_tran(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
const LANG_LOCALE_DATA * lang_get_first_locale_for_lang(const INTL_LANG lang)
void slocator_get_reserved_class_name_oid(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
unsigned int DB_TIMESTAMP
const char * boot_db_full_name()
LC_FIND_CLASSNAME xlocator_reserve_class_names(THREAD_ENTRY *thread_p, const int num_classes, const char **classname, OID *class_oid)
void slog_find_lob_locator(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_pack_float(char *ptr, float number)
int xboot_compact_stop(THREAD_ENTRY *thread_p)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
char * xdisk_get_fullname(THREAD_ENTRY *thread_p, VOLID volid, char *vol_fullname)
int xlocator_does_exist(THREAD_ENTRY *thread_p, OID *oid, int chn, LOCK lock, LC_FETCH_VERSION_TYPE fetch_version_type, OID *class_oid, int class_chn, int need_fetching, int prefetching, LC_COPYAREA **fetch_area)
int xboot_find_number_permanent_volumes(THREAD_ENTRY *thread_p)
char * or_pack_hfid(const char *ptr, const HFID *hfid)
int xbtree_class_test_unique(THREAD_ENTRY *thread_p, char *buf, int buf_size)
char * or_pack_stream(char *ptr, const char *stream, size_t len)
LANG_COLLATION * lang_get_collation(const int coll_id)
int xlocator_repl_force(THREAD_ENTRY *thread_p, LC_COPYAREA *copy_area, LC_COPYAREA **reply_area)
void sqmgr_execute_query(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xlocator_fetch(THREAD_ENTRY *thrd, OID *oid, int chn, LOCK lock, LC_FETCH_VERSION_TYPE fetch_version_type, LC_FETCH_VERSION_TYPE initial_fetch_version_type, OID *class_oid, int class_chn, int prefetching, LC_COPYAREA **fetch_area)
int session_get_load_session(THREAD_ENTRY *thread_p, REFPTR(load_session, load_session_ref_ptr))
void xqmgr_dump_query_plans(THREAD_ENTRY *thread_p, FILE *outfp)
void slocator_demote_class_lock(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xheap_destroy_newly_created(THREAD_ENTRY *thread_p, const HFID *hfid, const OID *class_oid)
char checksum[TZ_CHECKSUM_SIZE+1]
#define ER_LC_PARTIALLY_FAILED_TO_FLUSH
int xchksum_insert_repl_log_and_demote_table_lock(THREAD_ENTRY *thread_p, REPL_INFO *repl_info, const OID *class_oidp)
int or_packed_string_length(const char *string, int *strlen)
static bool need_to_abort_tran(THREAD_ENTRY *thread_p, int *errid)
int xtx_drop_lob_locator(cubthread::entry *thread_p, const char *locator)
void sloaddb_fetch_status(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xtran_lock_rep_read(THREAD_ENTRY *thread_p, LOCK lock_rr_tran)
void ssession_set_session_variables(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_unpack_btid(char *buf, BTID *btid)
int xlocator_assign_oid(THREAD_ENTRY *thread_p, const HFID *hfid, OID *perm_oid, int expected_length, OID *class_oid, const char *classname)
int prm_get_integer_value(PARAM_ID prm_id)
void sdk_totalpgs(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
bool boot_can_compact(THREAD_ENTRY *thread_p)
size_t get_current_size(void)
int xcallback_console_print(THREAD_ENTRY *thread_p, char *print_str)
int xlocator_remove_class_from_index(THREAD_ENTRY *thread_p, OID *oid, BTID *btid, HFID *hfid)
LC_FIND_CLASSNAME xlocator_find_class_oid(THREAD_ENTRY *thread_p, const char *classname, OID *class_oid, LOCK lock)
REL_COMPATIBILITY rel_get_net_compatible(const char *client_rel_str, const char *server_rel_str)
void logtb_set_current_user_name(THREAD_ENTRY *thread_p, const char *client_name)
#define TDE_DATA_KEY_LENGTH
#define ER_OUT_OF_VIRTUAL_MEMORY
void ssession_get_prepared_statement(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void srepl_set_info(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define OR_PACK_XASL_NODE_HEADER(PTR, X)
void sdk_vlabel(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_pack_spacedb(char *ptr, const SPACEDB_ALL *all, const SPACEDB_ONEVOL *vols, const SPACEDB_FILES *files)
char * or_unpack_hfid(char *ptr, HFID *hfid)
#define QFILE_PAGE_HEADER_SIZE
#define OR_VALUE_ALIGNED_SIZE(value)
char * sysprm_unpack_assign_values(char *ptr, SYSPRM_ASSIGN_VALUE **assign_values_ptr)
void sboot_notify_ha_log_applier_state(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xsession_get_last_insert_id(THREAD_ENTRY *thread_p, DB_VALUE *value, bool update_last_insert_id)
void shf_has_instance(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_unpack_lock(char *ptr, LOCK *lock)
int db_sys_date_and_epoch_time(DB_VALUE *dt_dbval, DB_VALUE *ts_dbval)
void log_wakeup_checkpoint_daemon()
void sserial_get_next_value(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sfile_apply_tde_to_class_files(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
SYSPRM_ASSIGN_VALUE * xsysprm_get_force_server_parameters(void)
static void event_log_temp_expand_pages(THREAD_ENTRY *thread_p, EXECUTION_INFO *info)
int sysprm_packed_session_parameters_length(SESSION_PARAM *session_parameters, int offset)
int or_db_value_size(DB_VALUE *var)
void ssession_set_row_count(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slogtb_reset_wait_msecs(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define IS_QUERY_EXECUTED_WITHOUT_DATA_BUFFERS(flag)
void sct_check_rep_dir(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define ER_QUERY_EXECUTION_ERROR
void tde_make_keys_file_fullname(char *keys_vol_fullname, const char *db_full_name, bool ignore_parm)
#define NET_CAP_HA_IGNORE_REPL_DELAY
void xcache_unfix(THREAD_ENTRY *thread_p, XASL_CACHE_ENTRY *xcache_entry)
void sloaddb_load_batch(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
bool css_is_shutdowning_server()
int xsession_create_prepared_statement(THREAD_ENTRY *thread_p, char *name, char *alias_print, SHA1Hash *sha1, char *info, int info_len)
LC_LOCKSET * locator_allocate_and_unpack_lockset(char *unpacked, int unpacked_size, bool unpack_classes, bool unpack_objects, bool reg_unpacked)
static enum scanner_mode mode
void xsysprm_change_server_parameters(const SYSPRM_ASSIGN_VALUE *assignments)
int db_Disable_modifications
void stran_server_abort(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void xlogtb_set_suppress_repl_on_transaction(THREAD_ENTRY *thread_p, int set)
#define ER_NET_DIFFERENT_BIT_PLATFORM
unsigned char perm_key[TDE_DATA_KEY_LENGTH]
bool logtb_has_updated(THREAD_ENTRY *thread_p)
void unpack(cubpacking::unpacker &deserializator) override
TRAN_STATE xtran_server_end_topop(THREAD_ENTRY *thread_p, LOG_RESULT_TOPOP result, LOG_LSA *topop_lsa)
int xboot_backup(THREAD_ENTRY *thread_p, const char *backup_path, FILEIO_BACKUP_LEVEL backup_level, bool delete_unneeded_logarchives, const char *backup_verbose_file, int num_threads, FILEIO_ZIP_METHOD zip_method, FILEIO_ZIP_LEVEL zip_level, int skip_activelog, int sleep_msecs, bool separate_keys)
void sdk_freepgs(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void ssession_get_session_variable(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
enum ha_log_applier_state HA_LOG_APPLIER_STATE
int perfmon_get_number_of_statistic_values(void)
int lang_collation_count(void)
void sqmgr_prepare_query(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void event_log_bind_values(THREAD_ENTRY *thread_p, FILE *log_fp, int tran_index, int bind_index)
void smnt_server_start_stats(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sboot_find_number_temp_volumes(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sqmgr_dump_query_cache(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define NET_CAP_BACKWARD_COMPATIBLE
void slocator_fetch_all_reference_lockset(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xheap_create(THREAD_ENTRY *thread_p, HFID *hfid, const OID *class_oid, bool reuse_oid)
int xlogtb_reset_isolation(THREAD_ENTRY *thread_p, TRAN_ISOLATION isolation)
int xsession_check_session(THREAD_ENTRY *thread_p, const SESSION_ID id)
void shf_create(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
unsigned int css_receive_data_from_client(CSS_CONN_ENTRY *conn, unsigned int eid, char **buffer, int *size)
int xs_send_action_to_client(THREAD_ENTRY *thread_p, VACOMM_BUFFER_CLIENT_ACTION action)
static void cleanup(int signo)
#define QFILE_GET_TUPLE_VALUE_LENGTH(ptr)
int xtde_change_mk_without_flock(THREAD_ENTRY *thread_p, const int mk_index)
int db_sys_timestamp(DB_VALUE *result_timestamp)
void event_log_end(THREAD_ENTRY *thread_p)
#define QFILE_TUPLE_LENGTH_SIZE
char * or_unpack_sha1(char *ptr, SHA1Hash *sha1)
void sbtree_get_key_type(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define QFILE_GET_TUPLE_LENGTH(tpl)
static int server_capabilities(void)
#define rmutex_lock(a, b)
LC_FIND_CLASSNAME xlocator_rename_class_name(THREAD_ENTRY *thread_p, const char *oldname, const char *newname, OID *class_oid)
int xqmgr_prepare_query(THREAD_ENTRY *thrd, compile_context *ctx, xasl_stream *stream)
void tsc_getticks(TSC_TICKS *tck)
#define CACHE_TIME_EQ(T1, T2)
void sthread_dump_cs_stat(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void css_end_server_request(CSS_CONN_ENTRY *conn)
int xio_send_user_prompt_to_client(THREAD_ENTRY *thread_p, FILEIO_REMOTE_PROMPT_TYPE prompt_id, const char *prompt, const char *failure_prompt, int range_low, int range_high, const char *secondary_prompt, int reprompt_value)
void smnt_server_copy_stats(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xbtree_get_key_type(THREAD_ENTRY *thread_p, BTID btid, TP_DOMAIN **key_type)
DKNPAGES xdisk_get_total_numpages(THREAD_ENTRY *thread_p, VOLID volid)
void unpack_bool(bool &value)
void slock_dump(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sloaddb_init(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define db_private_free_and_init(thrd, ptr)
int xserial_get_next_value(THREAD_ENTRY *thread_p, DB_VALUE *result_num, const OID *oid_p, int cached_num, int num_alloc, int is_auto_increment, bool force_set_last_insert_id)
int xvacuum(THREAD_ENTRY *thread_p)
int or_method_sig_list_length(void *method_sig_list_ptr)
static int failed_objects
void slogtb_set_suppress_repl_on_transaction(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xsession_set_session_variables(THREAD_ENTRY *thread_p, DB_VALUE *values, const int count)
void ssession_delete_prepared_statement(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void xvacuum_dump(THREAD_ENTRY *thread_p, FILE *outfp)
char * or_unpack_int(char *ptr, int *number)
#define db_private_free(thrd, ptr)
void or_init(OR_BUF *buf, char *data, int length)
HA_SERVER_STATE ha_server_state
void sloaddb_interrupt(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define db_private_alloc(thrd, size)
void shf_destroy_when_new(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sboot_heap_compact(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_unpack_int64(char *ptr, INT64 *number)
#define ER_NET_DATA_RECEIVE_TIMEDOUT
void sbtree_class_test_unique(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void xperfmon_server_copy_stats(THREAD_ENTRY *thread_p, UINT64 *to_stats)
#define OR_PTR_ALIGNED_SIZE
void sjsp_get_server_port(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define OR_LOG_LSA_ALIGNED_SIZE
#define OR_PACK_CACHE_TIME(PTR, T)
int xtran_server_get_global_tran_info(THREAD_ENTRY *thread_p, int gtrid, void *buffer, int size)
void er_set_with_oserror(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
void slocator_rename_class_name(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void xlock_dump(THREAD_ENTRY *thread_p, FILE *outfp)
int count(int &result, const cub_regex_object ®, const std::string &src, const int position, const INTL_CODESET codeset)
int or_packed_spacedb_size(const SPACEDB_ALL *all, const SPACEDB_ONEVOL *vols, const SPACEDB_FILES *files)
int pr_clear_value(DB_VALUE *value)
int qfile_open_list_scan(QFILE_LIST_ID *list_id_p, QFILE_LIST_SCAN_ID *scan_id_p)
void shf_destroy(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define ER_LDR_INVALID_STATE
int xtran_server_is_active_and_has_updated(THREAD_ENTRY *thread_p)
void locator_free_oid_set(THREAD_ENTRY *thread_p, LC_OIDSET *oidset)
LC_FIND_CLASSNAME xlocator_find_lockhint_class_oids(THREAD_ENTRY *thread_p, int num_classes, const char **many_classnames, LOCK *many_locks, int *many_need_subclasses, LC_PREFETCH_FLAGS *many_flags, OID *guessed_class_oids, int *guessed_class_chns, bool quit_on_errors, LC_LOCKHINT **hlock, LC_COPYAREA **fetch_area)
int xsession_drop_session_variables(THREAD_ENTRY *thread_p, DB_VALUE *values, const int count)
void fetch_status(load_status &status, bool has_lock=false)
void ses_posix_write_file(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void net_cleanup_server_queues(unsigned int rid)
int xsession_reset_cur_insert_id(THREAD_ENTRY *thread_p)
LC_COPYAREA * locator_recv_allocate_copyarea(int num_objs, char **packed_desc, int packed_desc_length, char **contents_ptr, int contents_length)
unsigned int css_send_abort_to_client(CSS_CONN_ENTRY *conn, unsigned int eid)
void ses_posix_rename_file(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xs_receive_data_from_client(THREAD_ENTRY *thread_p, char **area, int *datasize)
int load_batch(cubthread::entry &thread_ref, const batch *batch, bool use_temp_batch, bool &is_batch_accepted, load_status &status)
int xsession_end_session(THREAD_ENTRY *thread, const SESSION_ID id)
bool logtb_is_interrupted(THREAD_ENTRY *thread_p, bool clear, bool *continue_checking)
int xsession_set_tran_auto_commit(THREAD_ENTRY *thread_p, bool auto_commit)
void slocator_find_class_oid(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define OR_UNPACK_XASL_ID(PTR, X)
static void error(const char *msg)
#define ER_CSS_CLIENTS_EXCEEDED
#define ER_NET_SERVER_HAND_SHAKE
#define VPID_ISNULL(vpid_ptr)
int xsession_set_row_count(THREAD_ENTRY *thread_p, int row_count)
void sqp_get_sys_timestamp(THREAD_ENTRY *thread_p, unsigned int rid, char *request_ignore, int reqlen_ignore)
char * or_pack_int(char *ptr, int number)
void stran_server_set_global_tran_info(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xtran_server_savepoint(THREAD_ENTRY *thread_p, const char *savept_name, LOG_LSA *savept_lsa)
void qfile_close_scan(THREAD_ENTRY *thread_p, QFILE_LIST_SCAN_ID *scan_id_p)
LOG_TDES * LOG_FIND_CURRENT_TDES(THREAD_ENTRY *thread_p=NULL)
#define LOG_FIND_THREAD_TRAN_INDEX(thrd)
#define IS_TRAN_AUTO_COMMIT(flag)
const char * xboot_get_server_session_key(void)
void sboot_find_number_permanent_volumes(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
static void event_log_many_ioreads(THREAD_ENTRY *thread_p, EXECUTION_INFO *info, int time, UINT64 *diff_stats)
void stran_server_end_topop(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define NET_CAP_UPDATE_DISABLED
int xstats_update_all_statistics(THREAD_ENTRY *thread_p, bool with_fullscan)
TRAN_STATE tran_server_unilaterally_abort_tran(THREAD_ENTRY *thread_p)
#define NET_DEFER_END_QUERIES_MAX
int xheap_destroy(THREAD_ENTRY *thread_p, const HFID *hfid, const OID *class_oid)
void event_log_print_client_info(int tran_index, int indent)
void sboot_change_ha_mode(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_pack_listid(char *ptr, void *listid)
char * or_pack_method_sig_list(char *ptr, void *method_sig_list)
unsigned char temp_key[TDE_DATA_KEY_LENGTH]
int locator_pack_lockhint(LC_LOCKHINT *lockhint, bool pack_classes)
void sboot_find_last_temp(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void ssession_end_session(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slocator_get_class(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sprm_server_change_parameters(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slocator_find_lockhint_class_oids(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
BTID * xbtree_load_online_index(THREAD_ENTRY *thread_p, BTID *btid, const char *bt_name, TP_DOMAIN *key_type, OID *class_oids, int n_classes, int n_attrs, int *attr_ids, int *attrs_prefix_length, HFID *hfids, int unique_pk, int not_null_flag, OID *fk_refcls_oid, BTID *fk_refcls_pk_btid, const char *fk_name, char *pred_stream, int pred_stream_size, char *expr_stream, int expr_steram_size, int func_col_id, int func_attr_index_start, int ib_thread_count)
void ses_posix_read_file(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define OR_CACHE_TIME_SIZE
const char * get_db_user() const
void slogtb_reset_isolation(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slocator_force(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define free_and_init(ptr)
void stran_server_2pc_prepare_global_tran(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define OR_UNPACK_CACHE_TIME(PTR, T)
void sdk_remarks(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_pack_lock(char *ptr, LOCK lock)
char * or_unpack_ptr(char *ptr, UINTPTR *ptrval)
void css_set_user_access_status(const char *db_user, const char *host, const char *program_name)
int xstats_update_statistics(THREAD_ENTRY *thread_p, OID *classoid, bool with_fullscan)
int xlogtb_get_pack_tran_table(THREAD_ENTRY *thread_p, char **buffer_p, int *size_p, int include_query_exec_info)
bool recompile_xasl_pinned
char * or_pack_string_with_length(char *ptr, const char *string, int length)
#define STATS_WITH_FULLSCAN
int xlogtb_kill_or_interrupt_tran(THREAD_ENTRY *thread_p, int tran_id, bool is_dba_group_member, bool interrupt_only)
void xsysprm_dump_server_parameters(FILE *outfp)
void slocator_assign_oid(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void ses_posix_get_file_size(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * or_pack_domain(char *ptr, struct tp_domain *domain, int include_classoids, int is_null)
bool xtran_server_has_updated(THREAD_ENTRY *thread_p)
int disk_spacedb(THREAD_ENTRY *thread_p, SPACEDB_ALL *spaceall, SPACEDB_ONEVOL **spacevols)
void slogtb_get_pack_tran_table(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void ssession_stop_attached_threads(void *session)
void xacl_dump(THREAD_ENTRY *thread_p, FILE *outfp)
DKNPAGES xdisk_get_free_numpages(THREAD_ENTRY *thread_p, VOLID volid)
char * xstats_get_statistics_from_server(THREAD_ENTRY *thread_p, OID *class_id, unsigned int timestamp, int *length)
bool prm_get_bool_value(PARAM_ID prm_id)
#define LC_MANYOBJS_PTR_IN_COPYAREA(copy_areaptr)
void schksum_insert_repl_log_and_demote_table_lock(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
DB_TIMESTAMP * db_get_timestamp(const DB_VALUE *value)
bool css_is_ha_repl_delayed(void)
HA_SERVER_STATE css_ha_server_state(void)
void slogpb_dump_stat(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int jsp_server_port(void)
void sqmgr_prepare_and_execute_query(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void unpack_all(Args &&...args)
char * or_unpack_value(const char *buf, DB_VALUE *value)
int xlocator_fetch_lockset(THREAD_ENTRY *thread_p, LC_LOCKSET *lockset, LC_COPYAREA **fetch_area)
void perfmon_server_dump_stats_to_buffer(const UINT64 *stats, char *buffer, int buf_size, const char *substr)
char * or_pack_ptr(char *ptr, UINTPTR ptrval)
#define NET_CAP_REMOTE_DISABLED
enum logwr_mode LOGWR_MODE
#define XASL_NODE_HEADER_SIZE
char ES_URI[ES_MAX_URI_LEN]
void slogin_user(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void srepl_log_get_append_lsa(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
unsigned int css_send_reply_and_data_to_client(CSS_CONN_ENTRY *conn, unsigned int eid, char *reply, int reply_size, char *buffer, int buffer_size)
char * locator_pack_copy_area_descriptor(int num_objs, LC_COPYAREA *copyarea, char *desc, int desc_len)
void sbtree_load_index(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define ERR_CSS_ERROR_FROM_SERVER
QFILE_LIST_ID * xqmgr_execute_query(THREAD_ENTRY *thrd, const XASL_ID *xasl_id, QUERY_ID *query_idp, int dbval_cnt, void *data, QUERY_FLAG *flagp, CACHE_TIME *clt_cache_time, CACHE_TIME *srv_cache_time, int query_timeout, xasl_cache_ent **ret_cache_entry_p)
int db_make_null(DB_VALUE *value)
enum lob_locator_state LOB_LOCATOR_STATE
void slocator_assign_oid_batch(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
TDE_DATA_KEY_SET data_keys
UINT64 * perfmon_allocate_values(void)
#define XASL_ID_IS_NULL(X)
bool xtran_is_blocked(THREAD_ENTRY *thread_p, int tran_index)
void svacuum_dump(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slocator_remove_class_from_index(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void ses_posix_create_file(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slog_checkpoint(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slocator_notify_isolation_incons(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define SERVER_SESSION_KEY_SIZE
char * or_pack_log_lsa(const char *ptr, const struct log_lsa *lsa)
#define QFILE_GET_LAST_TUPLE_OFFSET(ptr)
void stran_server_get_global_tran_info(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slogtb_does_active_user_exist(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int num_classes_of_reqobjs_processed
void slocator_check_fk_validity(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void stde_get_data_keys(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define QUERY_INFO_BUF_SIZE
char coll_name[COLL_NAME_SIZE]
void xperfmon_server_copy_global_stats(UINT64 *to_stats)
#define BTID_IS_NULL(btid)
BTID * xbtree_load_index(THREAD_ENTRY *thread_p, BTID *btid, const char *bt_name, TP_DOMAIN *key_type, OID *class_oids, int n_classes, int n_attrs, int *attr_ids, int *attrs_prefix_length, HFID *hfids, int unique_pk, int not_null_flag, OID *fk_refcls_oid, BTID *fk_refcls_pk_btid, const char *fk_name, char *pred_stream, int pred_stream_size, char *expr_stream, int expr_steram_size, int func_col_id, int func_attr_index_start)
int db_value_clear(DB_VALUE *value)
void svacuum(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
char * sysprm_unpack_session_parameters(char *ptr, SESSION_PARAM **session_parameters_ptr)
unsigned char log_key[TDE_DATA_KEY_LENGTH]
int xtx_change_state_of_locator(cubthread::entry *thread_p, const char *locator, const char *new_locator, LOB_LOCATOR_STATE state)
char * or_unpack_oid_array(char *ptr, int n, OID **oids)
int qmgr_get_sql_id(THREAD_ENTRY *thread_p, char **sql_id_buf, char *query, size_t sql_len)
void xqmgr_dump_query_cache(THREAD_ENTRY *thread_p, FILE *outfp)
char * or_unpack_stream(char *ptr, char *stream, size_t len)
LC_OIDSET * locator_unpack_oid_set_to_new(THREAD_ENTRY *thread_p, char *buffer)
VOLID xboot_add_volume_extension(THREAD_ENTRY *thread_p, DBDEF_VOL_EXT_INFO *ext_info)
#define STATS_WITH_SAMPLING
#define ER_COMPACTDB_ALREADY_STARTED
enum ha_server_state HA_SERVER_STATE
void sqp_get_server_info(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sboot_compact_stop(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void ssession_drop_session_variables(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
static void sbtree_find_unique_internal(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define INIT_XASL_NODE_HEADER(X)
int server_ping_with_handshake(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sbtree_add_index(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
bool log_does_allow_replication(void)
STATIC_INLINE void stran_server_auto_commit_or_abort(THREAD_ENTRY *thread_p, unsigned int rid, QUERY_ID *p_end_queries, int n_query_ids, bool need_abort, bool has_updated, bool *end_query_allowed, TRAN_STATE *tran_state, bool *should_conn_reset) __attribute__((ALWAYS_INLINE))
QFILE_LIST_ID * xqmgr_prepare_and_execute_query(THREAD_ENTRY *thrd, char *xasl_stream, int xasl_stream_size, QUERY_ID *query_id, int dbval_cnt, void *data, QUERY_FLAG *flag, int query_timeout)
TRAN_STATE xtran_server_2pc_prepare(THREAD_ENTRY *thread_p)
char * css_add_client_version_string(THREAD_ENTRY *thread_p, const char *version_string)
int num_classes_of_reqobjs
#define CHECKDB_ALL_CHECK_EXCEPT_PREV_LINK
void netsr_spacedb(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define QFILE_GET_TUPLE_COUNT(ptr)
void sqmgr_drop_all_query_plans(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sboot_initialize_server(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
const char * program_name
void sboot_get_timezone_checksum(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define CUB_MAXHOSTNAMELEN
const char * rel_release_string(void)
unsigned int db_on_server
int num_reqobjs_processed
STATIC_INLINE TRAN_STATE stran_server_abort_internal(THREAD_ENTRY *thread_p, unsigned int rid, bool retain_lock, bool *should_conn_reset) __attribute__((ALWAYS_INLINE))
void sqst_update_all_statistics(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
TRAN_STATE return_error_to_client(THREAD_ENTRY *thread_p, unsigned int rid)
char * or_unpack_domain(char *ptr, struct tp_domain **domain_ptr, int *is_null)
int xlocator_check_fk_validity(THREAD_ENTRY *thread_p, OID *cls_oid, HFID *hfid, TP_DOMAIN *key_type, int n_attrs, int *attr_ids, OID *pk_cls_oid, BTID *pk_btid, char *fk_name)
int xlocator_demote_class_lock(THREAD_ENTRY *thread_p, const OID *class_oid, LOCK lock, LOCK *ex_lock)
#define ER_TDE_CIPHER_IS_NOT_LOADED
#define DB_MAX_USER_LENGTH
int xlocator_get_reserved_class_name_oid(THREAD_ENTRY *thread_p, const char *classname, OID *class_oid)
#define XASL_ID_SET_NULL(X)
int xtran_server_2pc_start(THREAD_ENTRY *thread_p)
int xheap_reclaim_addresses(THREAD_ENTRY *thread_p, const HFID *hfid)
static int er_log_slow_query(THREAD_ENTRY *thread_p, EXECUTION_INFO *info, int time, UINT64 *diff_stats, char *queryinfo_string)
void stde_get_mk_file_path(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
unsigned int css_send_error_to_client(CSS_CONN_ENTRY *conn, unsigned int eid, char *buffer, int buffer_size)
void slocator_repl_force(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
#define EXECUTE_QUERY_MAX_ARGUMENT_DATA_SIZE
void sqst_update_statistics(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void cfg_free_directory(DB_INFO *databases)
LOB_LOCATOR_STATE xtx_find_lob_locator(cubthread::entry *thread_p, const char *locator, char *real_locator)
void sqst_server_get_statistics(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void slogwr_get_log_pages(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xlocator_fetch_all_reference_lockset(THREAD_ENTRY *thread_p, OID *oid, int chn, OID *class_oid, int class_chn, LOCK lock, int quit_on_errors, int prune_level, LC_LOCKSET **lockset, LC_COPYAREA **fetch_area)
int xqmgr_drop_all_query_plans(THREAD_ENTRY *thread_p)
int xlocator_upgrade_instances_domain(THREAD_ENTRY *thread_p, OID *class_oid, int att_id)
int css_notify_ha_log_applier_state(THREAD_ENTRY *thread_p, HA_LOG_APPLIER_STATE state)
#define qmgr_free_old_page_and_init(thread_p, page_p, tfile_vfidp)
STATIC_INLINE int stran_can_end_after_query_execution(THREAD_ENTRY *thread_p, int query_flag, QFILE_LIST_ID *list_id, bool *can_end_transaction) __attribute__((ALWAYS_INLINE))
char * or_unpack_db_value(char *buffer, DB_VALUE *val)
int intl_identifier_upper(const char *src, char *dst)
int xtran_get_local_transaction_id(THREAD_ENTRY *thread_p, DB_VALUE *trid)
int locator_pack_lockset(LC_LOCKSET *lockset, bool pack_classes, bool pack_objects)
#define IS_QUERY_EXECUTE_WITH_COMMIT(flag)
int xlocator_get_class(THREAD_ENTRY *thread_p, OID *class_oid, int class_chn, const OID *oid, LOCK lock, int prefetching, LC_COPYAREA **fetch_area)
static int check_client_capabilities(THREAD_ENTRY *thread_p, int client_cap, int rel_compare, REL_COMPATIBILITY *compatibility, const char *client_host)
void sacl_reload(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
VOLID xboot_find_last_temp(THREAD_ENTRY *thread_p)
#define QFILE_GET_OVERFLOW_PAGE_ID(ptr)
#define MAX_NUM_EXEC_QUERY_HISTORY
void slocator_does_exist(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sboot_backup(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
void sloaddb_install_class(THREAD_ENTRY *thread_p, unsigned int rid, char *request, int reqlen)
int xtran_server_2pc_recovery_prepared(THREAD_ENTRY *thread_p, int gtrids[], int size)
#define OR_PACK_XASL_ID(PTR, X)
int locator_send_copy_area(LC_COPYAREA *copyarea, char **contents_ptr, int *contents_length, char **desc_ptr, int *desc_length)
void session_stop_attached_threads(void *session_arg)