| 265 | { |
| 266 | public: |
| 267 | virtual Item *create_native(THD *thd, LEX_STRING name, List<Item> *item_list) |
| 268 | { |
| 269 | Item *func= NULL, *p1, *p2, *p3; |
| 270 | int arg_count= 0; |
| 271 | |
| 272 | /* Unsafe for SBR since result depends on a session variable */ |
| 273 | thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION); |
| 274 | |
| 275 | if (item_list != NULL) |
| 276 | arg_count= item_list->elements; |
| 277 | |
| 278 | switch (arg_count) |
| 279 | { |
| 280 | case 2: |
| 281 | { |
| 282 | p1= item_list->pop(); |
| 283 | p2= item_list->pop(); |
| 284 | func= create_aes(thd, p1, p2); |
| 285 | break; |
| 286 | } |
| 287 | case 3: |
| 288 | { |
| 289 | p1= item_list->pop(); |
| 290 | p2= item_list->pop(); |
| 291 | p3= item_list->pop(); |
| 292 | func= create_aes(thd, p1, p2, p3); |
| 293 | break; |
| 294 | } |
| 295 | default: |
| 296 | { |
| 297 | my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); |
| 298 | break; |
| 299 | } |
| 300 | } |
| 301 | return func; |
| 302 | |
| 303 | } |
| 304 | virtual Item *create_aes(THD *thd, Item *arg1, Item *arg2)= 0; |
| 305 | virtual Item *create_aes(THD *thd, Item *arg1, Item *arg2, Item *arg3)= 0; |
| 306 | protected: |
nothing calls this directly
no test coverage detected