diff options
author | konstantin@mysql.com <> | 2003-12-21 22:37:28 +0300 |
---|---|---|
committer | konstantin@mysql.com <> | 2003-12-21 22:37:28 +0300 |
commit | e7a4e45cce54b0a5ff63f223de719af6d575bf39 (patch) | |
tree | c2a5da1e4071076d0e7bfc59b0565b15406aaae9 /sql/sql_class.h | |
parent | 5eb92715d1bcbf5fd91074640a8839aacee1b2f7 (diff) | |
parent | 9de694e5eb5a0904ade062d2e54da41aff2ff025 (diff) | |
download | mariadb-git-e7a4e45cce54b0a5ff63f223de719af6d575bf39.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-root
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 546a90d2be3..c1cd65edf76 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -405,7 +405,6 @@ struct system_variables void free_tmp_table(THD *thd, TABLE *entry); -class Prepared_statement; /* State of a single command executed against this connection. @@ -760,6 +759,16 @@ public: ~THD(); void init(void); + /* + Initialize memory roots necessary for query processing and (!) + pre-allocate memory for it. We can't do that in THD constructor because + there are use cases (acl_init, delayed inserts, watcher threads, + killing mysqld) where it's vital to not allocate excessive and not used + memory. Note, that we still don't return error from init_for_queries(): + if preallocation fails, we should notice that at the first call to + alloc_root. + */ + void init_for_queries(); void change_user(void); void cleanup(void); bool store_globals(); |