diff options
author | unknown <dlenev@mockturtle.local> | 2006-11-01 15:41:48 +0300 |
---|---|---|
committer | unknown <dlenev@mockturtle.local> | 2006-11-01 15:41:48 +0300 |
commit | 57c2f22a54f33267e2f9cc7437f78f36b47a32fe (patch) | |
tree | 32608cc8af7279830719cc05da6c2b37553df5a2 /sql/sql_lex.h | |
parent | b372ebc5ef988bd08dfa86f491cd325bc83e4b7c (diff) | |
download | mariadb-git-57c2f22a54f33267e2f9cc7437f78f36b47a32fe.tar.gz |
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.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 378f968118e..bfe7d9518f3 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -742,7 +742,11 @@ public: 0 - indicates that this query does not need prelocking. */ TABLE_LIST **query_tables_own_last; - /* Set of stored routines called by statement. */ + /* + Set of stored routines called by statement. + (Note that we use lazy-initialization for this hash). + */ + enum { START_SROUTINES_HASH_SIZE= 16 }; HASH sroutines; /* List linking elements of 'sroutines' set. Allows you to add new elements |