Commit | Line | Data |
---|---|---|
04c0ba87 JG |
1 | /* |
2 | * query.c | |
3 | * | |
4 | * Babeltrace CTF file system Reader Component queries | |
5 | * | |
6 | * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
7 | * | |
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
9 | * of this software and associated documentation files (the "Software"), to deal | |
10 | * in the Software without restriction, including without limitation the rights | |
11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
12 | * copies of the Software, and to permit persons to whom the Software is | |
13 | * furnished to do so, subject to the following conditions: | |
14 | * | |
15 | * The above copyright notice and this permission notice shall be included in | |
16 | * all copies or substantial portions of the Software. | |
17 | * | |
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
24 | * SOFTWARE. | |
25 | */ | |
26 | ||
27 | #include "query.h" | |
28 | #include <stdbool.h> | |
f6ccaed9 | 29 | #include <babeltrace/assert-internal.h> |
04c0ba87 JG |
30 | #include "metadata.h" |
31 | #include "../common/metadata/decoder.h" | |
55314f2a | 32 | #include <babeltrace/common-internal.h> |
97ade20b | 33 | #include <babeltrace/babeltrace-internal.h> |
9d408fca | 34 | #include <babeltrace/babeltrace.h> |
97ade20b | 35 | #include "fs.h" |
55314f2a JG |
36 | |
37 | #define BT_LOG_TAG "PLUGIN-CTF-FS-QUERY-SRC" | |
38 | #include "logging.h" | |
04c0ba87 JG |
39 | |
40 | #define METADATA_TEXT_SIG "/* CTF 1.8" | |
41 | ||
97ade20b JG |
42 | struct range { |
43 | int64_t begin_ns; | |
44 | int64_t end_ns; | |
45 | bool set; | |
46 | }; | |
47 | ||
04c0ba87 | 48 | BT_HIDDEN |
90157d89 | 49 | struct bt_component_class_query_method_return metadata_info_query( |
c7eee084 | 50 | struct bt_component_class *comp_class, |
04c0ba87 JG |
51 | struct bt_value *params) |
52 | { | |
90157d89 | 53 | struct bt_component_class_query_method_return query_ret = { |
c7eee084 PP |
54 | .result = NULL, |
55 | .status = BT_QUERY_STATUS_OK, | |
56 | }; | |
57 | ||
04c0ba87 JG |
58 | struct bt_value *path_value = NULL; |
59 | char *metadata_text = NULL; | |
60 | FILE *metadata_fp = NULL; | |
61 | GString *g_metadata_text = NULL; | |
62 | int ret; | |
63 | int bo; | |
64 | const char *path; | |
65 | bool is_packetized; | |
66 | ||
c7eee084 PP |
67 | query_ret.result = bt_value_map_create(); |
68 | if (!query_ret.result) { | |
69 | query_ret.status = BT_QUERY_STATUS_NOMEM; | |
04c0ba87 JG |
70 | goto error; |
71 | } | |
72 | ||
f6ccaed9 PP |
73 | BT_ASSERT(params); |
74 | ||
04c0ba87 | 75 | if (!bt_value_is_map(params)) { |
f7d0e29c | 76 | BT_LOGE_STR("Query parameters is not a map value object."); |
c7eee084 | 77 | query_ret.status = BT_QUERY_STATUS_INVALID_PARAMS; |
04c0ba87 JG |
78 | goto error; |
79 | } | |
80 | ||
81 | path_value = bt_value_map_get(params, "path"); | |
82 | ret = bt_value_string_get(path_value, &path); | |
83 | if (ret) { | |
f7d0e29c | 84 | BT_LOGE_STR("Cannot get `path` string parameter."); |
c7eee084 | 85 | query_ret.status = BT_QUERY_STATUS_INVALID_PARAMS; |
04c0ba87 JG |
86 | goto error; |
87 | } | |
88 | ||
f6ccaed9 | 89 | BT_ASSERT(path); |
04c0ba87 JG |
90 | metadata_fp = ctf_fs_metadata_open_file(path); |
91 | if (!metadata_fp) { | |
f7d0e29c | 92 | BT_LOGE("Cannot open trace metadata: path=\"%s\".", path); |
04c0ba87 JG |
93 | goto error; |
94 | } | |
95 | ||
96 | is_packetized = ctf_metadata_decoder_is_packetized(metadata_fp, | |
97 | &bo); | |
98 | ||
99 | if (is_packetized) { | |
100 | ret = ctf_metadata_decoder_packetized_file_stream_to_buf( | |
101 | metadata_fp, &metadata_text, bo); | |
102 | if (ret) { | |
f7d0e29c JG |
103 | BT_LOGE("Cannot decode packetized metadata file: path=\"%s\"", |
104 | path); | |
04c0ba87 JG |
105 | goto error; |
106 | } | |
107 | } else { | |
108 | long filesize; | |
109 | ||
677e1a21 MD |
110 | ret = fseek(metadata_fp, 0, SEEK_END); |
111 | if (ret) { | |
f7d0e29c JG |
112 | BT_LOGE_ERRNO("Failed to seek to the end of the metadata file", |
113 | ": path=\"%s\"", path); | |
677e1a21 MD |
114 | goto error; |
115 | } | |
04c0ba87 | 116 | filesize = ftell(metadata_fp); |
677e1a21 | 117 | if (filesize < 0) { |
f7d0e29c JG |
118 | BT_LOGE_ERRNO("Failed to get the current position in the metadata file", |
119 | ": path=\"%s\"", path); | |
677e1a21 MD |
120 | goto error; |
121 | } | |
04c0ba87 JG |
122 | rewind(metadata_fp); |
123 | metadata_text = malloc(filesize + 1); | |
124 | if (!metadata_text) { | |
f7d0e29c | 125 | BT_LOGE_STR("Cannot allocate buffer for metadata text."); |
04c0ba87 JG |
126 | goto error; |
127 | } | |
128 | ||
129 | if (fread(metadata_text, filesize, 1, metadata_fp) != 1) { | |
f7d0e29c JG |
130 | BT_LOGE_ERRNO("Cannot read metadata file", ": path=\"%s\"", |
131 | path); | |
04c0ba87 JG |
132 | goto error; |
133 | } | |
134 | ||
135 | metadata_text[filesize] = '\0'; | |
136 | } | |
137 | ||
138 | g_metadata_text = g_string_new(NULL); | |
139 | if (!g_metadata_text) { | |
140 | goto error; | |
141 | } | |
142 | ||
143 | if (strncmp(metadata_text, METADATA_TEXT_SIG, | |
144 | sizeof(METADATA_TEXT_SIG) - 1) != 0) { | |
145 | g_string_assign(g_metadata_text, METADATA_TEXT_SIG); | |
146 | g_string_append(g_metadata_text, " */\n\n"); | |
147 | } | |
148 | ||
149 | g_string_append(g_metadata_text, metadata_text); | |
150 | ||
c7eee084 | 151 | ret = bt_value_map_insert_string(query_ret.result, "text", |
04c0ba87 JG |
152 | g_metadata_text->str); |
153 | if (ret) { | |
f7d0e29c | 154 | BT_LOGE_STR("Cannot insert metadata text into query result."); |
04c0ba87 JG |
155 | goto error; |
156 | } | |
157 | ||
c7eee084 | 158 | ret = bt_value_map_insert_bool(query_ret.result, "is-packetized", |
04c0ba87 JG |
159 | is_packetized); |
160 | if (ret) { | |
f7d0e29c | 161 | BT_LOGE_STR("Cannot insert \"is-packetized\" attribute into query result."); |
04c0ba87 JG |
162 | goto error; |
163 | } | |
164 | ||
165 | goto end; | |
166 | ||
167 | error: | |
c7eee084 PP |
168 | BT_PUT(query_ret.result); |
169 | ||
170 | if (query_ret.status >= 0) { | |
171 | query_ret.status = BT_QUERY_STATUS_ERROR; | |
172 | } | |
04c0ba87 JG |
173 | |
174 | end: | |
175 | bt_put(path_value); | |
176 | free(metadata_text); | |
177 | ||
178 | if (g_metadata_text) { | |
179 | g_string_free(g_metadata_text, TRUE); | |
180 | } | |
181 | ||
182 | if (metadata_fp) { | |
183 | fclose(metadata_fp); | |
184 | } | |
c7eee084 PP |
185 | |
186 | return query_ret; | |
97ade20b | 187 | } |
9ec238a8 | 188 | |
97ade20b JG |
189 | static |
190 | int add_range(struct bt_value *info, struct range *range, | |
191 | const char *range_name) | |
192 | { | |
193 | int ret = 0; | |
194 | enum bt_value_status status; | |
195 | struct bt_value *range_map = NULL; | |
196 | ||
197 | if (!range->set) { | |
198 | /* Not an error. */ | |
199 | goto end; | |
200 | } | |
201 | ||
202 | range_map = bt_value_map_create(); | |
203 | if (!range_map) { | |
204 | ret = -1; | |
205 | goto end; | |
206 | } | |
207 | ||
208 | status = bt_value_map_insert_integer(range_map, "begin", | |
209 | range->begin_ns); | |
210 | if (status != BT_VALUE_STATUS_OK) { | |
211 | ret = -1; | |
212 | goto end; | |
213 | } | |
214 | ||
215 | status = bt_value_map_insert_integer(range_map, "end", | |
216 | range->end_ns); | |
217 | if (status != BT_VALUE_STATUS_OK) { | |
218 | ret = -1; | |
219 | goto end; | |
220 | } | |
221 | ||
222 | status = bt_value_map_insert(info, range_name, range_map); | |
223 | if (status != BT_VALUE_STATUS_OK) { | |
224 | ret = -1; | |
225 | goto end; | |
226 | } | |
227 | end: | |
228 | bt_put(range_map); | |
229 | return ret; | |
230 | } | |
231 | ||
232 | static | |
50842bdc | 233 | int add_stream_ids(struct bt_value *info, struct bt_stream *stream) |
97ade20b JG |
234 | { |
235 | int ret = 0; | |
236 | int64_t stream_class_id, stream_instance_id; | |
237 | enum bt_value_status status; | |
50842bdc | 238 | struct bt_stream_class *stream_class = NULL; |
97ade20b | 239 | |
50842bdc | 240 | stream_instance_id = bt_stream_get_id(stream); |
97ade20b JG |
241 | if (stream_instance_id != -1) { |
242 | status = bt_value_map_insert_integer(info, "id", | |
243 | stream_instance_id); | |
244 | if (status != BT_VALUE_STATUS_OK) { | |
245 | ret = -1; | |
246 | goto end; | |
247 | } | |
248 | } | |
249 | ||
50842bdc | 250 | stream_class = bt_stream_get_class(stream); |
97ade20b JG |
251 | if (!stream_class) { |
252 | ret = -1; | |
253 | goto end; | |
254 | } | |
255 | ||
50842bdc | 256 | stream_class_id = bt_stream_class_get_id(stream_class); |
97ade20b JG |
257 | if (stream_class_id == -1) { |
258 | ret = -1; | |
259 | goto end; | |
260 | } | |
261 | ||
262 | status = bt_value_map_insert_integer(info, "class-id", stream_class_id); | |
263 | if (status != BT_VALUE_STATUS_OK) { | |
264 | ret = -1; | |
265 | goto end; | |
266 | } | |
267 | end: | |
268 | bt_put(stream_class); | |
269 | return ret; | |
270 | } | |
271 | ||
272 | static | |
273 | int populate_stream_info(struct ctf_fs_ds_file_group *group, | |
274 | struct bt_value *group_info, | |
275 | struct range *stream_range) | |
276 | { | |
277 | int ret = 0; | |
278 | size_t file_idx; | |
279 | enum bt_value_status status; | |
280 | struct bt_value *file_paths; | |
281 | ||
282 | stream_range->begin_ns = INT64_MAX; | |
283 | stream_range->end_ns = 0; | |
284 | ||
285 | file_paths = bt_value_array_create(); | |
286 | if (!file_paths) { | |
287 | ret = -1; | |
288 | goto end; | |
289 | } | |
290 | ||
291 | for (file_idx = 0; file_idx < group->ds_file_infos->len; file_idx++) { | |
292 | int64_t file_begin_epoch, file_end_epoch; | |
293 | struct ctf_fs_ds_file_info *info = | |
294 | g_ptr_array_index(group->ds_file_infos, | |
295 | file_idx); | |
296 | ||
297 | if (!info->index || info->index->entries->len == 0) { | |
298 | BT_LOGW("Cannot determine range of unindexed stream file \'%s\'", | |
299 | info->path->str); | |
300 | ret = -1; | |
301 | goto end; | |
302 | } | |
303 | ||
304 | status = bt_value_array_append_string(file_paths, | |
305 | info->path->str); | |
306 | if (status != BT_VALUE_STATUS_OK) { | |
307 | ret = -1; | |
308 | goto end; | |
309 | } | |
310 | ||
311 | /* | |
312 | * file range is from timestamp_begin of the first entry to the | |
313 | * timestamp_end of the last entry. | |
314 | */ | |
315 | file_begin_epoch = ((struct ctf_fs_ds_index_entry *) &g_array_index(info->index->entries, | |
316 | struct ctf_fs_ds_index_entry, 0))->timestamp_begin_ns; | |
317 | file_end_epoch = ((struct ctf_fs_ds_index_entry *) &g_array_index(info->index->entries, | |
318 | struct ctf_fs_ds_index_entry, info->index->entries->len - 1))->timestamp_end_ns; | |
319 | ||
320 | stream_range->begin_ns = min(stream_range->begin_ns, file_begin_epoch); | |
321 | stream_range->end_ns = max(stream_range->end_ns, file_end_epoch); | |
322 | stream_range->set = true; | |
323 | } | |
324 | ||
325 | if (stream_range->set) { | |
326 | ret = add_range(group_info, stream_range, "range-ns"); | |
327 | if (ret) { | |
328 | goto end; | |
329 | } | |
330 | } | |
331 | ||
332 | status = bt_value_map_insert(group_info, "paths", file_paths); | |
333 | if (status != BT_VALUE_STATUS_OK) { | |
334 | ret = -1; | |
335 | goto end; | |
336 | } | |
337 | ||
338 | ret = add_stream_ids(group_info, group->stream); | |
339 | if (ret) { | |
340 | goto end; | |
341 | } | |
342 | end: | |
343 | bt_put(file_paths); | |
344 | return ret; | |
345 | } | |
346 | ||
347 | static | |
348 | int populate_trace_info(const char *trace_path, const char *trace_name, | |
349 | struct bt_value *trace_info) | |
350 | { | |
351 | int ret = 0; | |
352 | size_t group_idx; | |
353 | struct ctf_fs_trace *trace = NULL; | |
354 | enum bt_value_status status; | |
355 | struct bt_value *file_groups; | |
356 | struct range trace_range = { | |
357 | .begin_ns = INT64_MAX, | |
358 | .end_ns = 0, | |
359 | .set = false, | |
360 | }; | |
361 | struct range trace_intersection = { | |
362 | .begin_ns = 0, | |
363 | .end_ns = INT64_MAX, | |
364 | .set = false, | |
365 | }; | |
366 | ||
367 | file_groups = bt_value_array_create(); | |
368 | if (!file_groups) { | |
369 | goto end; | |
370 | } | |
371 | ||
372 | status = bt_value_map_insert_string(trace_info, "name", | |
373 | trace_name); | |
374 | if (status != BT_VALUE_STATUS_OK) { | |
375 | ret = -1; | |
376 | goto end; | |
377 | } | |
378 | status = bt_value_map_insert_string(trace_info, "path", | |
379 | trace_path); | |
380 | if (status != BT_VALUE_STATUS_OK) { | |
381 | ret = -1; | |
382 | goto end; | |
383 | } | |
384 | ||
385 | trace = ctf_fs_trace_create(trace_path, trace_name, NULL); | |
386 | if (!trace) { | |
387 | BT_LOGE("Failed to create fs trace at \'%s\'", trace_path); | |
388 | ret = -1; | |
389 | goto end; | |
390 | } | |
391 | ||
f6ccaed9 | 392 | BT_ASSERT(trace->ds_file_groups); |
97ade20b JG |
393 | /* Add trace range info only if it contains streams. */ |
394 | if (trace->ds_file_groups->len == 0) { | |
395 | ret = -1; | |
396 | goto end; | |
397 | } | |
398 | ||
399 | /* Find range of all stream groups, and of the trace. */ | |
400 | for (group_idx = 0; group_idx < trace->ds_file_groups->len; | |
401 | group_idx++) { | |
402 | struct bt_value *group_info; | |
403 | struct range group_range = { .set = false }; | |
404 | struct ctf_fs_ds_file_group *group = g_ptr_array_index( | |
405 | trace->ds_file_groups, group_idx); | |
406 | ||
407 | group_info = bt_value_map_create(); | |
408 | if (!group_info) { | |
409 | ret = -1; | |
410 | goto end; | |
411 | } | |
412 | ||
413 | ret = populate_stream_info(group, group_info, &group_range); | |
414 | if (ret) { | |
415 | bt_put(group_info); | |
416 | goto end; | |
417 | } | |
418 | ||
419 | if (group_range.set) { | |
420 | trace_range.begin_ns = min(trace_range.begin_ns, | |
421 | group_range.begin_ns); | |
422 | trace_range.end_ns = max(trace_range.end_ns, | |
423 | group_range.end_ns); | |
424 | trace_range.set = true; | |
425 | ||
426 | trace_intersection.begin_ns = max(trace_intersection.begin_ns, | |
427 | group_range.begin_ns); | |
428 | trace_intersection.end_ns = min(trace_intersection.end_ns, | |
429 | group_range.end_ns); | |
430 | trace_intersection.set = true; | |
431 | status = bt_value_array_append(file_groups, group_info); | |
432 | bt_put(group_info); | |
433 | if (status != BT_VALUE_STATUS_OK) { | |
434 | goto end; | |
435 | } | |
436 | } | |
437 | } | |
438 | ||
439 | ret = add_range(trace_info, &trace_range, "range-ns"); | |
440 | if (ret) { | |
441 | goto end; | |
442 | } | |
c6daf8b2 PP |
443 | |
444 | if (trace_intersection.begin_ns < trace_intersection.end_ns) { | |
445 | ret = add_range(trace_info, &trace_intersection, | |
446 | "intersection-range-ns"); | |
447 | if (ret) { | |
448 | goto end; | |
449 | } | |
97ade20b JG |
450 | } |
451 | ||
452 | status = bt_value_map_insert(trace_info, "streams", file_groups); | |
453 | BT_PUT(file_groups); | |
454 | if (status != BT_VALUE_STATUS_OK) { | |
455 | ret = -1; | |
456 | goto end; | |
457 | } | |
458 | ||
459 | end: | |
460 | bt_put(file_groups); | |
461 | ctf_fs_trace_destroy(trace); | |
462 | return ret; | |
463 | } | |
464 | ||
465 | BT_HIDDEN | |
90157d89 | 466 | struct bt_component_class_query_method_return trace_info_query( |
c7eee084 | 467 | struct bt_component_class *comp_class, |
97ade20b JG |
468 | struct bt_value *params) |
469 | { | |
90157d89 | 470 | struct bt_component_class_query_method_return query_ret = { |
c7eee084 PP |
471 | .result = NULL, |
472 | .status = BT_QUERY_STATUS_OK, | |
473 | }; | |
474 | ||
97ade20b JG |
475 | struct bt_value *path_value = NULL; |
476 | int ret = 0; | |
477 | const char *path = NULL; | |
478 | GList *trace_paths = NULL; | |
479 | GList *trace_names = NULL; | |
480 | GList *tp_node = NULL; | |
481 | GList *tn_node = NULL; | |
482 | GString *normalized_path = NULL; | |
483 | ||
f6ccaed9 PP |
484 | BT_ASSERT(params); |
485 | ||
97ade20b JG |
486 | if (!bt_value_is_map(params)) { |
487 | BT_LOGE("Query parameters is not a map value object."); | |
c7eee084 | 488 | query_ret.status = BT_QUERY_STATUS_INVALID_PARAMS; |
97ade20b JG |
489 | goto error; |
490 | } | |
491 | ||
492 | path_value = bt_value_map_get(params, "path"); | |
493 | ret = bt_value_string_get(path_value, &path); | |
494 | if (ret) { | |
495 | BT_LOGE("Cannot get `path` string parameter."); | |
c7eee084 | 496 | query_ret.status = BT_QUERY_STATUS_INVALID_PARAMS; |
97ade20b JG |
497 | goto error; |
498 | } | |
499 | ||
500 | normalized_path = bt_common_normalize_path(path, NULL); | |
501 | if (!normalized_path) { | |
502 | BT_LOGE("Failed to normalize path: `%s`.", path); | |
503 | goto error; | |
504 | } | |
f6ccaed9 | 505 | BT_ASSERT(path); |
97ade20b JG |
506 | |
507 | ret = ctf_fs_find_traces(&trace_paths, normalized_path->str); | |
508 | if (ret) { | |
509 | goto error; | |
510 | } | |
511 | ||
512 | trace_names = ctf_fs_create_trace_names(trace_paths, | |
513 | normalized_path->str); | |
514 | if (!trace_names) { | |
515 | BT_LOGE("Cannot create trace names from trace paths."); | |
516 | goto error; | |
517 | } | |
518 | ||
c7eee084 PP |
519 | query_ret.result = bt_value_array_create(); |
520 | if (!query_ret.result) { | |
521 | query_ret.status = BT_QUERY_STATUS_NOMEM; | |
97ade20b JG |
522 | goto error; |
523 | } | |
524 | ||
525 | /* Iterates over both trace paths and names simultaneously. */ | |
526 | for (tp_node = trace_paths, tn_node = trace_names; tp_node; | |
527 | tp_node = g_list_next(tp_node), | |
528 | tn_node = g_list_next(tn_node)) { | |
529 | GString *trace_path = tp_node->data; | |
530 | GString *trace_name = tn_node->data; | |
531 | enum bt_value_status status; | |
532 | struct bt_value *trace_info; | |
533 | ||
534 | trace_info = bt_value_map_create(); | |
535 | if (!trace_info) { | |
536 | BT_LOGE("Failed to create trace info map."); | |
537 | goto error; | |
538 | } | |
539 | ||
540 | ret = populate_trace_info(trace_path->str, trace_name->str, | |
541 | trace_info); | |
542 | if (ret) { | |
543 | bt_put(trace_info); | |
544 | goto error; | |
545 | } | |
546 | ||
c7eee084 | 547 | status = bt_value_array_append(query_ret.result, trace_info); |
97ade20b JG |
548 | bt_put(trace_info); |
549 | if (status != BT_VALUE_STATUS_OK) { | |
550 | goto error; | |
551 | } | |
552 | } | |
553 | ||
554 | goto end; | |
555 | ||
556 | error: | |
c7eee084 PP |
557 | BT_PUT(query_ret.result); |
558 | ||
559 | if (query_ret.status >= 0) { | |
560 | query_ret.status = BT_QUERY_STATUS_ERROR; | |
561 | } | |
562 | ||
97ade20b JG |
563 | end: |
564 | if (normalized_path) { | |
565 | g_string_free(normalized_path, TRUE); | |
566 | } | |
567 | if (trace_paths) { | |
568 | for (tp_node = trace_paths; tp_node; tp_node = g_list_next(tp_node)) { | |
569 | if (tp_node->data) { | |
570 | g_string_free(tp_node->data, TRUE); | |
571 | } | |
572 | } | |
573 | g_list_free(trace_paths); | |
574 | } | |
575 | if (trace_names) { | |
576 | for (tn_node = trace_names; tn_node; tn_node = g_list_next(tn_node)) { | |
577 | if (tn_node->data) { | |
578 | g_string_free(tn_node->data, TRUE); | |
579 | } | |
580 | } | |
581 | g_list_free(trace_names); | |
582 | } | |
583 | /* "path" becomes invalid with the release of path_value. */ | |
584 | bt_put(path_value); | |
c7eee084 | 585 | return query_ret; |
04c0ba87 | 586 | } |