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

Method create_native

sql/item_create.cc:3044–3076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3042Create_func_atan Create_func_atan::s_singleton;
3043
3044Item*
3045Create_func_atan::create_native(THD *thd, LEX_STRING name,
3046 List<Item> *item_list)
3047{
3048 Item* func= NULL;
3049 int arg_count= 0;
3050
3051 if (item_list != NULL)
3052 arg_count= item_list->elements;
3053
3054 switch (arg_count) {
3055 case 1:
3056 {
3057 Item *param_1= item_list->pop();
3058 func= new (thd->mem_root) Item_func_atan(param_1);
3059 break;
3060 }
3061 case 2:
3062 {
3063 Item *param_1= item_list->pop();
3064 Item *param_2= item_list->pop();
3065 func= new (thd->mem_root) Item_func_atan(param_1, param_2);
3066 break;
3067 }
3068 default:
3069 {
3070 my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str);
3071 break;
3072 }
3073 }
3074
3075 return func;
3076}
3077
3078
3079Create_func_benchmark Create_func_benchmark::s_singleton;

Callers

nothing calls this directly

Calls 4

my_errorFunction · 0.85
uncacheableMethod · 0.80
set_stmt_unsafeMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected