| 315 | |
| 316 | |
| 317 | static void del_udf(udf_func *udf) |
| 318 | { |
| 319 | DBUG_ENTER("del_udf"); |
| 320 | if (!--udf->usage_count) |
| 321 | { |
| 322 | my_hash_delete(&udf_hash,(uchar*) udf); |
| 323 | using_udf_functions=udf_hash.records != 0; |
| 324 | } |
| 325 | else |
| 326 | { |
| 327 | /* |
| 328 | The functions is in use ; Rename the functions instead of removing it. |
| 329 | The functions will be automaticly removed when the least threads |
| 330 | doesn't use it anymore |
| 331 | */ |
| 332 | const char *name= udf->name.str; |
| 333 | size_t name_length=udf->name.length; |
| 334 | udf->name.str= "*"; |
| 335 | udf->name.length=1; |
| 336 | my_hash_update(&udf_hash,(uchar*) udf,(uchar*) name,name_length); |
| 337 | } |
| 338 | DBUG_VOID_RETURN; |
| 339 | } |
| 340 | |
| 341 | |
| 342 | void free_udf(udf_func *udf) |
no test coverage detected