| 1 | /* |
| 2 | Copyright (C) 2019-2025 Sutou Kouhei <[email protected]> |
| 3 | |
| 4 | This library is free software; you can redistribute it and/or |
| 5 | modify it under the terms of the GNU Lesser General Public |
| 6 | License as published by the Free Software Foundation; either |
| 7 | version 2.1 of the License, or (at your option) any later version. |
| 8 | |
| 9 | This library is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | Lesser General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public |
| 15 | License along with this library; if not, write to the Free Software |
| 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | */ |
| 18 | |
| 19 | #include "../grn_proc.h"cxx . . $ `<file>/lib/grn_proc.h`/ |
| 20 | |
| 21 | #include "../grn_ctx.h"cxx . . $ `<file>/lib/grn_ctx.h`/ |
| 22 | #include "../grn_db.h"cxx . . $ `<file>/lib/grn_db.h`/ |
| 23 | #include "../grn_index_column.h"cxx . . $ `<file>/lib/grn_index_column.h`/ |
| 24 | #include "../grn_str.h"cxx . . $ `<file>/lib/grn_str.h`/ |
| 25 | |
| 26 | #include <groonga/plugin.h>cxx . . $ `<file>/include/groonga/plugin.h`/ |
| 27 | |
| 28 | static const char *remains_column_namecxx . . $ remains_column_name. = "remains"; |
| 29 | static const char *missings_column_namecxx . . $ missings_column_name. = "missings"; |
| 30 | |
| 31 | typedef structcxx . . $ $anonymous_type_6c1926a79e92834b_0# { |
| 32 | const char *tagcxx . . $ $anonymous_type_6c1926a79e92834b_0#tag.; |
| 33 | int n_argscxx . . $ $anonymous_type_6c1926a79e92834b_0#n_args.; |
| 34 | grn_objcxx . . $ grn_obj# **argscxx . . $ $anonymous_type_6c1926a79e92834b_0#args.; |
| 35 | grn_user_datacxx . . $ grn_user_data# *user_datacxx . . $ $anonymous_type_6c1926a79e92834b_0#user_data.; |
| 36 | grn_raw_stringcxx . . $ grn_raw_string# table_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#table_name.; |
| 37 | grn_objcxx . . $ grn_obj# *tablecxx . . $ $anonymous_type_6c1926a79e92834b_0#table.; |
| 38 | grn_raw_stringcxx . . $ grn_raw_string# column_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#column_name.; |
| 39 | grn_objcxx . . $ grn_obj# *columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column.; |
| 40 | grn_index_column_diff_optionscxx . . $ grn_index_column_diff_options# optionscxx . . $ $anonymous_type_6c1926a79e92834b_0#options.; |
| 41 | } index_column_datacxx . . $ index_column_data#; |
| 42 | |
| 43 | static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! |
| 44 | index_column_data_initcxx . . $ index_column_data_init(e15f6f3401a43142).(grn_ctxcxx . . $ grn_ctx# *ctx, index_column_datacxx . . $ index_column_data# *data) |
| 45 | { |
| 46 | grn_index_column_diff_options_initcxx . . $ grn_index_column_diff_options_init(1fa4575cf38d9e7f).(ctx, &(data->optionscxx . . $ $anonymous_type_6c1926a79e92834b_0#options.)); |
| 47 | |
| 48 | data->table_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#table_name..valuecxx . . $ $anonymous_type_7f733dd816802915_0#value. = |
| 49 | grn_plugin_proc_get_var_stringcxx . . $ grn_plugin_proc_get_var_string(b6763965d55cfbc).(ctx, |
| 50 | data->user_datacxx . . $ $anonymous_type_6c1926a79e92834b_0#user_data., |
| 51 | "table", |
| 52 | -1, |
| 53 | &(data->table_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#table_name..lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length.)); |
| 54 | data->column_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#column_name..valuecxx . . $ $anonymous_type_7f733dd816802915_0#value. = |
| 55 | grn_plugin_proc_get_var_stringcxx . . $ grn_plugin_proc_get_var_string(b6763965d55cfbc).(ctx, |
| 56 | data->user_datacxx . . $ $anonymous_type_6c1926a79e92834b_0#user_data., |
| 57 | "name", |
| 58 | -1, |
| 59 | &(data->column_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#column_name..lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length.)); |
| 60 | |
| 61 | data->tablecxx . . $ $anonymous_type_6c1926a79e92834b_0#table. = |
| 62 | grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, data->table_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#table_name..valuecxx . . $ $anonymous_type_7f733dd816802915_0#value., (int)(data->table_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#table_name..lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length.)); |
| 63 | if (!data->tablecxx . . $ $anonymous_type_6c1926a79e92834b_0#table.) { |
| 64 | GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx, |
| 65 | GRN_INVALID_ARGUMENT, |
| 66 | "[index-column]%s table doesn't exist: <%.*s>", |
| 67 | data->tag, |
| 68 | (int)(data->table_name.length), |
| 69 | data->table_name.value); |
| 70 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 71 | } |
| 72 | if (!grn_obj_is_table_with_keycxx . . $ grn_obj_is_table_with_key(a5760e5c319a06ee).(ctx, data->tablecxx . . $ $anonymous_type_6c1926a79e92834b_0#table.)) { |
| 73 | GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx, |
| 74 | GRN_INVALID_ARGUMENT, |
| 75 | "[index-column]%s table must be lexicon: <%.*s>: %s", |
| 76 | data->tag, |
| 77 | (int)(data->table_name.length), |
| 78 | data->table_name.value, |
| 79 | grn_obj_type_to_string(data->table->header.type)); |
| 80 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 81 | } |
| 82 | |
| 83 | data->columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column. = grn_obj_columncxx . . $ grn_obj_column(c00e49795c44129a).(ctx, |
| 84 | data->tablecxx . . $ $anonymous_type_6c1926a79e92834b_0#table., |
| 85 | data->column_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#column_name..valuecxx . . $ $anonymous_type_7f733dd816802915_0#value., |
| 86 | (uint32_tcxx . . $ uint32_t#)(data->column_namecxx . . $ $anonymous_type_6c1926a79e92834b_0#column_name..lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length.)); |
| 87 | if (!data->columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column.) { |
| 88 | GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx, |
| 89 | GRN_INVALID_ARGUMENT, |
| 90 | "[index-column]%s column doesn't exist: <%.*s>: <%.*s>", |
| 91 | data->tag, |
| 92 | (int)(data->table_name.length), |
| 93 | data->table_name.value, |
| 94 | (int)(data->column_name.length), |
| 95 | data->column_name.value); |
| 96 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 97 | } |
| 98 | if (!grn_obj_is_index_columncxx . . $ grn_obj_is_index_column(a5760e5c319a06ee).(ctx, data->columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column.)) { |
| 99 | GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx, |
| 100 | GRN_INVALID_ARGUMENT, |
| 101 | "[index-column]%s column must be index column: " |
| 102 | "<%.*s>: <%.*s>: %s", |
| 103 | data->tag, |
| 104 | (int)(data->table_name.length), |
| 105 | data->table_name.value, |
| 106 | (int)(data->column_name.length), |
| 107 | data->column_name.value, |
| 108 | grn_obj_type_to_string(data->column->header.type)); |
| 109 | return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!; |
| 110 | } |
| 111 | |
| 112 | { |
| 113 | grn_log_levelcxx . . $ grn_log_level# default_value = |
| 114 | grn_index_column_diff_options_get_progress_log_levelcxx . . $ grn_index_column_diff_options_get_progress_log_level(4272edcfb765fb9).(ctx, |
| 115 | &(data->optionscxx . . $ $anonymous_type_6c1926a79e92834b_0#options.)); |
| 116 | grn_index_column_diff_options_set_progress_log_levelcxx . . $ grn_index_column_diff_options_set_progress_log_level(f3ade1471de4f334).( |
| 117 | ctx, |
| 118 | &(data->optionscxx . . $ $anonymous_type_6c1926a79e92834b_0#options.), |
| 119 | grn_plugin_proc_get_var_log_levelcxx . . $ grn_plugin_proc_get_var_log_level(474ecd79a1bdcbd4).(ctx, |
| 120 | data->user_datacxx . . $ $anonymous_type_6c1926a79e92834b_0#user_data., |
| 121 | "progress_log_level", |
| 122 | -1, |
| 123 | default_value)); |
| 124 | } |
| 125 | |
| 126 | return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 127 | } |
| 128 | |
| 129 | static void |
| 130 | index_column_data_fincxx . . $ index_column_data_fin(86f4baec48c46f8c).(grn_ctxcxx . . $ grn_ctx# *ctx, index_column_datacxx . . $ index_column_data# *data) |
| 131 | { |
| 132 | if (grn_obj_is_accessorcxx . . $ grn_obj_is_accessor(a5760e5c319a06ee).(ctx, data->columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column.)) { |
| 133 | grn_obj_closecxx . . $ grn_obj_close(4865d068a46d0f83).(ctx, data->columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column.); |
| 134 | } |
| 135 | grn_index_column_diff_options_fincxx . . $ grn_index_column_diff_options_fin(1fa4575cf38d9e7f).(ctx, &(data->optionscxx . . $ $anonymous_type_6c1926a79e92834b_0#options.)); |
| 136 | } |
| 137 | |
| 138 | static void |
| 139 | index_column_diff_output_postingscxx . . $ index_column_diff_output_postings(ddcae746b2caa4f2).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 140 | grn_column_flagscxx . . $ grn_column_flags# index_column_flags, |
| 141 | grn_objcxx . . $ grn_obj# *postings, |
| 142 | const char *name) |
| 143 | { |
| 144 | size_t i; |
| 145 | size_t n_elements = 1; |
| 146 | if (index_column_flags & GRN_OBJ_WITH_SECTIONcxx . . $ `include/groonga/groonga.h:777:9`!) { |
| 147 | n_elements++; |
| 148 | } |
| 149 | if (index_column_flags & GRN_OBJ_WITH_POSITIONcxx . . $ `include/groonga/groonga.h:794:9`!) { |
| 150 | n_elements++; |
| 151 | } |
| 152 | size_t n = GRN_UINT32_VECTOR_SIZEcxx . . $ `include/groonga/groonga.h:3257:9`!(postings); |
| 153 | grn_ctx_output_array_opencxx . . $ grn_ctx_output_array_open(f0f392d632556531).(ctx, name, (int)(n / n_elements)); |
| 154 | for (i = 0; i < n; i += n_elements) { |
| 155 | grn_ctx_output_map_opencxx . . $ grn_ctx_output_map_open(f0f392d632556531).(ctx, "posting", (int)n_elements); |
| 156 | { |
| 157 | size_t j = i; |
| 158 | grn_ctx_output_cstrcxx . . $ grn_ctx_output_cstr(777524e3d10dd7b4).(ctx, "record_id"); |
| 159 | grn_idcxx . . $ grn_id# record_id = GRN_UINT32_VALUE_ATcxx . . $ `include/groonga/groonga.h:3136:9`!(postings, j); |
| 160 | grn_ctx_output_uint32cxx . . $ grn_ctx_output_uint32(969b9cdb234920c4).(ctx, record_id); |
| 161 | if (index_column_flags & GRN_OBJ_WITH_SECTIONcxx . . $ `include/groonga/groonga.h:777:9`!) { |
| 162 | j++; |
| 163 | grn_ctx_output_cstrcxx . . $ grn_ctx_output_cstr(777524e3d10dd7b4).(ctx, "section_id"); |
| 164 | grn_idcxx . . $ grn_id# section_id = GRN_UINT32_VALUE_ATcxx . . $ `include/groonga/groonga.h:3136:9`!(postings, j); |
| 165 | grn_ctx_output_uint32cxx . . $ grn_ctx_output_uint32(969b9cdb234920c4).(ctx, section_id); |
| 166 | } |
| 167 | if (index_column_flags & GRN_OBJ_WITH_POSITIONcxx . . $ `include/groonga/groonga.h:794:9`!) { |
| 168 | j++; |
| 169 | grn_ctx_output_cstrcxx . . $ grn_ctx_output_cstr(777524e3d10dd7b4).(ctx, "position"); |
| 170 | uint32_tcxx . . $ uint32_t# position = GRN_UINT32_VALUE_ATcxx . . $ `include/groonga/groonga.h:3136:9`!(postings, j); |
| 171 | grn_ctx_output_uint32cxx . . $ grn_ctx_output_uint32(969b9cdb234920c4).(ctx, position); |
| 172 | } |
| 173 | } |
| 174 | grn_ctx_output_map_closecxx . . $ grn_ctx_output_map_close(b578cd6e53d5fe91).(ctx); |
| 175 | } |
| 176 | grn_ctx_output_array_closecxx . . $ grn_ctx_output_array_close(b578cd6e53d5fe91).(ctx); |
| 177 | } |
| 178 | |
| 179 | static void |
| 180 | index_column_diff_outputcxx . . $ index_column_diff_output(d7e845e76ba38b73).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 181 | grn_objcxx . . $ grn_obj# *diff, |
| 182 | grn_objcxx . . $ grn_obj# *lexicon, |
| 183 | grn_column_flagscxx . . $ grn_column_flags# index_column_flags) |
| 184 | { |
| 185 | grn_objcxx . . $ grn_obj# *remains_column = |
| 186 | grn_obj_columncxx . . $ grn_obj_column(c00e49795c44129a).(ctx, |
| 187 | diff, |
| 188 | remains_column_namecxx . . $ remains_column_name., |
| 189 | (uint32_tcxx . . $ uint32_t#)strlencxx . . $ strlen(751346f8406fd082).(remains_column_namecxx . . $ remains_column_name.)); |
| 190 | grn_objcxx . . $ grn_obj# *missings_column = |
| 191 | grn_obj_columncxx . . $ grn_obj_column(c00e49795c44129a).(ctx, |
| 192 | diff, |
| 193 | missings_column_namecxx . . $ missings_column_name., |
| 194 | (uint32_tcxx . . $ uint32_t#)strlencxx . . $ strlen(751346f8406fd082).(missings_column_namecxx . . $ missings_column_name.)); |
| 195 | grn_objcxx . . $ grn_obj# key; |
| 196 | GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(&key, GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!, GRN_OBJ_DO_SHALLOW_COPYcxx . . $ `include/groonga/groonga.h:2732:9`!, lexicon->header.domain); |
| 197 | grn_objcxx . . $ grn_obj# remains; |
| 198 | GRN_UINT32_INITcxx . . $ `include/groonga/groonga.h:2854:9`!(&remains, GRN_OBJ_VECTORcxx . . $ `include/groonga/groonga.h:2734:9`!); |
| 199 | grn_objcxx . . $ grn_obj# missings; |
| 200 | GRN_UINT32_INITcxx . . $ `include/groonga/groonga.h:2854:9`!(&missings, GRN_OBJ_VECTORcxx . . $ `include/groonga/groonga.h:2734:9`!); |
| 201 | grn_ctx_output_array_opencxx . . $ grn_ctx_output_array_open(f0f392d632556531).(ctx, "diffs", (int)grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, diff)); |
| 202 | { |
| 203 | GRN_TABLE_EACH_BEGINcxx . . $ `include/groonga/table.h:614:9`!(ctx, diff, cursor, id) |
| 204 | { |
| 205 | grn_ctx_output_map_opencxx . . $ grn_ctx_output_map_open(f0f392d632556531).(ctx, "diff", 3); |
| 206 | { |
| 207 | grn_ctx_output_cstrcxx . . $ grn_ctx_output_cstr(777524e3d10dd7b4).(ctx, "token"); |
| 208 | grn_ctx_output_map_opencxx . . $ grn_ctx_output_map_open(f0f392d632556531).(ctx, "token", 2); |
| 209 | { |
| 210 | grn_ctx_output_cstrcxx . . $ grn_ctx_output_cstr(777524e3d10dd7b4).(ctx, "id"); |
| 211 | void *token_id_buffer; |
| 212 | grn_table_cursor_get_keycxx . . $ grn_table_cursor_get_key(7d620ebe94cee13a).(ctx, cursor, &token_id_buffer); |
| 213 | grn_idcxx . . $ grn_id# token_id = *((grn_idcxx . . $ grn_id# *)token_id_buffer); |
| 214 | grn_ctx_output_uint32cxx . . $ grn_ctx_output_uint32(969b9cdb234920c4).(ctx, token_id); |
| 215 | |
| 216 | grn_ctx_output_cstrcxx . . $ grn_ctx_output_cstr(777524e3d10dd7b4).(ctx, "value"); |
| 217 | char key_buffer[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!]; |
| 218 | int key_size = grn_table_get_keycxx . . $ grn_table_get_key(2c24f49dad267d35).(ctx, |
| 219 | lexicon, |
| 220 | token_id, |
| 221 | key_buffer, |
| 222 | sizeof(key_buffer)); |
| 223 | GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx, &key, key_buffer, key_size); |
| 224 | grn_ctx_output_objcxx . . $ grn_ctx_output_obj(eded88d24d5f23db).(ctx, &key, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!); |
| 225 | } |
| 226 | grn_ctx_output_map_closecxx . . $ grn_ctx_output_map_close(b578cd6e53d5fe91).(ctx); |
| 227 | |
| 228 | grn_ctx_output_cstrcxx . . $ grn_ctx_output_cstr(777524e3d10dd7b4).(ctx, "remains"); |
| 229 | GRN_BULK_REWINDcxx . . $ `include/groonga/groonga.h:2599:9`!(&remains); |
| 230 | grn_obj_get_valuecxx . . $ grn_obj_get_value(6e06fec66698a6a).(ctx, remains_column, id, &remains); |
| 231 | index_column_diff_output_postingscxx . . $ index_column_diff_output_postings(ddcae746b2caa4f2).(ctx, |
| 232 | index_column_flags, |
| 233 | &remains, |
| 234 | "remains"); |
| 235 | |
| 236 | grn_ctx_output_cstrcxx . . $ grn_ctx_output_cstr(777524e3d10dd7b4).(ctx, "missings"); |
| 237 | GRN_BULK_REWINDcxx . . $ `include/groonga/groonga.h:2599:9`!(&missings); |
| 238 | grn_obj_get_valuecxx . . $ grn_obj_get_value(6e06fec66698a6a).(ctx, missings_column, id, &missings); |
| 239 | index_column_diff_output_postingscxx . . $ index_column_diff_output_postings(ddcae746b2caa4f2).(ctx, |
| 240 | index_column_flags, |
| 241 | &missings, |
| 242 | "missings"); |
| 243 | } |
| 244 | grn_ctx_output_map_closecxx . . $ grn_ctx_output_map_close(b578cd6e53d5fe91).(ctx); |
| 245 | } |
| 246 | GRN_TABLE_EACH_ENDcxx . . $ `include/groonga/table.h:665:9`!(ctx, cursor); |
| 247 | } |
| 248 | grn_ctx_output_array_closecxx . . $ grn_ctx_output_array_close(b578cd6e53d5fe91).(ctx); |
| 249 | GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &missings); |
| 250 | GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &remains); |
| 251 | GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &key); |
| 252 | } |
| 253 | |
| 254 | static grn_objcxx . . $ grn_obj# * |
| 255 | command_index_column_diffcxx . . $ command_index_column_diff(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 256 | int n_args, |
| 257 | grn_objcxx . . $ grn_obj# **args, |
| 258 | grn_user_datacxx . . $ grn_user_data# *user_data) |
| 259 | { |
| 260 | index_column_datacxx . . $ index_column_data# data; |
| 261 | grn_objcxx . . $ grn_obj# *diff = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 262 | |
| 263 | data.tagcxx . . $ $anonymous_type_6c1926a79e92834b_0#tag. = "[diff]"; |
| 264 | data.n_argscxx . . $ $anonymous_type_6c1926a79e92834b_0#n_args. = n_args; |
| 265 | data.argscxx . . $ $anonymous_type_6c1926a79e92834b_0#args. = args; |
| 266 | data.user_datacxx . . $ $anonymous_type_6c1926a79e92834b_0#user_data. = user_data; |
| 267 | data.tablecxx . . $ $anonymous_type_6c1926a79e92834b_0#table. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 268 | data.columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 269 | if (!index_column_data_initcxx . . $ index_column_data_init(e15f6f3401a43142).(ctx, &data)) { |
| 270 | goto exit; |
| 271 | } |
| 272 | |
| 273 | grn_index_column_diff_fullcxx . . $ grn_index_column_diff_full(538810a42b48bfbe).(ctx, data.columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column., &(data.optionscxx . . $ $anonymous_type_6c1926a79e92834b_0#options.), &diff); |
| 274 | if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) { |
| 275 | GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx, |
| 276 | ctx->rc, |
| 277 | "[index-column]%s failed to diff: " |
| 278 | "<%.*s>: <%.*s>: %s", |
| 279 | data.tag, |
| 280 | (int)(data.table_name.length), |
| 281 | data.table_name.value, |
| 282 | (int)(data.column_name.length), |
| 283 | data.column_name.value, |
| 284 | ctx->errbuf); |
| 285 | goto exit; |
| 286 | } |
| 287 | |
| 288 | index_column_diff_outputcxx . . $ index_column_diff_output(d7e845e76ba38b73).(ctx, |
| 289 | diff, |
| 290 | data.tablecxx . . $ $anonymous_type_6c1926a79e92834b_0#table., |
| 291 | grn_column_get_flagscxx . . $ grn_column_get_flags(8dd58acc9865e889).(ctx, data.columncxx . . $ $anonymous_type_6c1926a79e92834b_0#column.)); |
| 292 | |
| 293 | exit: |
| 294 | index_column_data_fincxx . . $ index_column_data_fin(86f4baec48c46f8c).(ctx, &data); |
| 295 | |
| 296 | if (diff) { |
| 297 | grn_obj_closecxx . . $ grn_obj_close(4865d068a46d0f83).(ctx, diff); |
| 298 | } |
| 299 | |
| 300 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 301 | } |
| 302 | |
| 303 | void |
| 304 | grn_proc_init_index_column_diffcxx . . $ grn_proc_init_index_column_diff(b578cd6e53d5fe91).(grn_ctxcxx . . $ grn_ctx# *ctx) |
| 305 | { |
| 306 | grn_expr_varcxx . . $ grn_expr_var# vars[3]; |
| 307 | unsigned int n_vars = 0; |
| 308 | |
| 309 | grn_plugin_expr_var_initcxx . . $ grn_plugin_expr_var_init(680ef4125f11597f).(ctx, &(vars[n_vars++]), "table", -1); |
| 310 | grn_plugin_expr_var_initcxx . . $ grn_plugin_expr_var_init(680ef4125f11597f).(ctx, &(vars[n_vars++]), "name", -1); |
| 311 | grn_plugin_expr_var_initcxx . . $ grn_plugin_expr_var_init(680ef4125f11597f).(ctx, &(vars[n_vars++]), "progress_log_level", -1); |
| 312 | grn_plugin_command_createcxx . . $ grn_plugin_command_create(2dfd920bb40f3149).(ctx, |
| 313 | "index_column_diff", |
| 314 | -1, |
| 315 | command_index_column_diffcxx . . $ command_index_column_diff(fd082858389c8bb0)., |
| 316 | n_vars, |
| 317 | vars); |
| 318 | } |