Small cleanup in code handling stored routines/table prelocking.
Use lazy initialization for Query_tables_list::sroutines hash. This step should significantly decrease amount of memory consumed by stored routines as we no longer will allocate chunk of memory required for this HASH for each statement in routine. include/hash.h: Introduced auxillary hash_init_opt() macro which simplifies lazy initialization of HASH objects. sql/sp.cc: Use lazy initialization for Query_tables_list::sroutines hash. This step should significantly decrease amount of memory consumed by stored routines as we no longer will allocate chunk of memory required for this HASH for each statement in routine. sql/sql_lex.cc: Use lazy initialization for Query_tables_list::sroutines hash. This step should significantly decrease amount of memory consumed by stored routines as we no longer will allocate chunk of memory required for this HASH for each statement in routine. sql/sql_lex.h: Updated comment describing Query_tables_list::sroutines to reflect that now we are use lazy initialization for this hash. Added constant for initial size of this hash.
Showing
Please register or sign in to comment