box: add pin/unping infrastructure for func cache
There are cases when we need to be sure that a function is not deleted and/or removed from func cache. For example constraints: they must hold a pointer to struct func while it's very hard to determine whether there'a constraint that points to given func. Implement func pin/unpin for this purpose. You can pin a func to declare that the func must not be deleted. To have to unpin it when the func is not needed anymore. NO_DOC=refactoring NO_CHANGELOG=refactoring
Showing
- src/box/alter.cc 11 additions, 0 deletionssrc/box/alter.cc
- src/box/func.c 2 additions, 0 deletionssrc/box/func.c
- src/box/func.h 2 additions, 0 deletionssrc/box/func.h
- src/box/func_cache.c 45 additions, 2 deletionssrc/box/func_cache.c
- src/box/func_cache.h 60 additions, 0 deletionssrc/box/func_cache.h
- src/box/sql/func.c 1 addition, 0 deletionssrc/box/sql/func.c
- test/unit/CMakeLists.txt 2 additions, 0 deletionstest/unit/CMakeLists.txt
- test/unit/func_cache.c 203 additions, 0 deletionstest/unit/func_cache.c
- test/unit/func_cache.result 53 additions, 0 deletionstest/unit/func_cache.result
Loading
Please register or sign in to comment