@@ -107,9 +107,14 @@ int ask_from_videx_http(VidexJsonItem &request, VidexStringMap &res_json, THD* t
107107 curl_easy_setopt (curl, CURLOPT_FORBID_REUSE, 1L );
108108
109109 trace_http.add_utf8 (" request" , request_str.c_str ());
110+ auto start_time = std::chrono::high_resolution_clock::now ();
110111 res_code = curl_easy_perform (curl);
112+ auto end_time = std::chrono::high_resolution_clock::now ();
113+ ulong duration = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time).count ();
114+
111115 if (res_code != CURLE_OK) {
112116 trace_http.add (" success" , false )
117+ .add (" elapsed_time" , duration)
113118 .add_utf8 (" reason" , " res_code != CURLE_OK" )
114119 .add_utf8 (" detail" , curl_easy_strerror (res_code));
115120 trace_http.end ();
@@ -123,18 +128,20 @@ int ask_from_videx_http(VidexJsonItem &request, VidexStringMap &res_json, THD* t
123128 if (error) {
124129 std::cout << " !__!__!__!__!__! JSON parse error: " << message << ' \n ' ;
125130 trace_http.add (" success" , false )
131+ .add (" elapsed_time" , duration)
126132 .add_utf8 (" reason" , " res_json.HasParseError" )
127133 .add_utf8 (" detail" , readBuffer.c_str ());
128134 trace_http.end ();
129135 return 1 ;
130136 } else {
131137 if (message == " OK" ) {
132- trace_http.add (" success" , true ).add_utf8 (" detail" , readBuffer.c_str ());
138+ trace_http.add (" success" , true ).add ( " elapsed_time " , duration). add_utf8 (" detail" , readBuffer.c_str ());
133139 trace_http.end ();
134140 std::cout << " access videx_server success: " << host_ip << std::endl;
135141 return 0 ;
136142 } else {
137143 trace_http.add (" success" , false )
144+ .add (" elapsed_time" , duration)
138145 .add_utf8 (" reason" , " msg != OK" )
139146 .add_utf8 (" detail" , readBuffer.c_str ());
140147 trace_http.end ();
@@ -145,6 +152,7 @@ int ask_from_videx_http(VidexJsonItem &request, VidexStringMap &res_json, THD* t
145152 }
146153 }
147154 trace_http.add (" success" , false )
155+ .add (" elapsed_time" , -1 )
148156 .add_utf8 (" reason" , " curl = false" );
149157 trace_http.end ();
150158 std::cout << " access videx_server failed curl = false: " << host_ip << std::endl;
@@ -266,7 +274,7 @@ static int videx_init_func(void *p) {
266274 HTON_SUPPORTS_SECONDARY_ENGINE | // Supports secondary storage engine
267275 // HTON_SUPPORTS_TABLE_ENCRYPTION | // Supports table encryption (commented out)
268276 // HTON_SUPPORTS_ONLINE_BACKUPS | // Supports online backups (commented out)
269- HTON_SUPPORTS_COMPRESSED_COLUMNS | // Supports compressed columns
277+ // HTON_SUPPORTS_COMPRESSED_COLUMNS | // Supports compressed columns
270278 HTON_SUPPORTS_GENERATED_INVISIBLE_PK; // Supports generated invisible primary keys
271279
272280 // Set the is_supported_system_table function pointer to videx_is_supported_system_table.
@@ -1109,11 +1117,14 @@ int ha_videx::multi_range_read_next(char **range_info) {
11091117 return (m_ds_mrr.dsmrr_next (range_info));
11101118}
11111119
1112- ha_rows ha_videx::multi_range_read_info_const (uint keyno, RANGE_SEQ_IF *seq,
1113- void *seq_init_param,
1114- uint n_ranges, uint *bufsz,
1115- uint *flags,
1116- Cost_estimate *cost) {
1120+ // ha_rows ha_videx::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
1121+ // void *seq_init_param,
1122+ // uint n_ranges, uint *bufsz,
1123+ // uint *flags,
1124+ // Cost_estimate *cost) {
1125+ ha_rows ha_videx::multi_range_read_info_const (
1126+ uint keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges,
1127+ uint *bufsz, uint *flags, bool *force_default_mrr, Cost_estimate *cost){
11171128 videx_log_ins.markHaFuncPassby (FUNC_FILE_LINE);
11181129 /* See comments in ha_myisam::multi_range_read_info_const */
11191130 m_ds_mrr.init (table);
0 commit comments