MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / init_col_val

Method init_col_val

sql/partition_info.cc:167–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165*/
166
167void partition_info::init_col_val(part_column_list_val *col_val, Item *item)
168{
169 DBUG_ENTER("partition_info::init_col_val");
170
171 col_val->item_expression= item;
172 col_val->null_value= item->null_value;
173 if (item->result_type() == INT_RESULT)
174 {
175 /*
176 This could be both column_list partitioning and function
177 partitioning, but it doesn't hurt to set the function
178 partitioning flags about unsignedness.
179 */
180 curr_list_val->value= item->val_int();
181 curr_list_val->unsigned_flag= TRUE;
182 if (!item->unsigned_flag &&
183 curr_list_val->value < 0)
184 curr_list_val->unsigned_flag= FALSE;
185 if (!curr_list_val->unsigned_flag)
186 curr_part_elem->signed_flag= TRUE;
187 }
188 col_val->part_info= NULL;
189 DBUG_VOID_RETURN;
190}
191
192
193/**

Callers

nothing calls this directly

Calls 2

result_typeMethod · 0.45
val_intMethod · 0.45

Tested by

no test coverage detected