• Nikita Malyavin's avatar
    Architecture + extract function ptr from vtable · 1858ad16
    Nikita Malyavin authored
    This patch fixes the architectural problem that was in the previous one:
    * class handler is not anymore abused with extra methods that are needed only
    locally during update, and belong to sql layer.
    
    * stack is not abused with extra thread_local variables.
    
    The prototype the function must follow now is:
    int (*)(T*, const uchar*, const uchar*);
    
    A pointer to member is converted into a function pointer. For that we need to
    extract the correct one from vtable. See rtti.h. vtable and pointer to member
    formats are implementation-defined, so RTTI::Method_intrn will have to be
    implemented for every abi.
    
    The two const uchar* arguments are still excessive for some cases. This only can
    be improved with true JIT code generation.
    
    class Exec_plan (exec_plan.h) handles storing, modifying and executing the plan.
    class Update_execution_plan hold all the members to call and all the parameters
    needed.
    
    Update_execution_plan replaces some variables in update_single_table. It lies on
    stack so the performance will be the same.
    1858ad16
rtti.h 1.77 KB