diff options
author | unknown <pem@mysql.com> | 2003-07-01 18:14:24 +0200 |
---|---|---|
committer | unknown <pem@mysql.com> | 2003-07-01 18:14:24 +0200 |
commit | 8070c06ae009e6dea64992419899d8a769458ddb (patch) | |
tree | f32432e07d69f450917cee2ac73414933049434b /sql/sql_parse.cc | |
parent | 31a58c4068e28405a8b23722b39033eb175b5dcf (diff) | |
download | mariadb-git-8070c06ae009e6dea64992419899d8a769458ddb.tar.gz |
SP cache (WL#730). (Mostly by vva, additions by pem.)
sql/sp.cc:
In-memory cache added.
sp_clear_function_cache() no longer needed.
sql/sp.h:
In-memory cache added.
sp_clear_function_cache() no longer needed.
sql/sql_class.cc:
In-memory cache added.
sql/sql_class.h:
In-memory cache added.
sql/sql_parse.cc:
In-memory cache added.
sp_clear_function_cache() no longer needed.
Don't delete sp_heads after each use.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b29e1734302..6a02383e984 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1527,13 +1527,6 @@ restore_user: VOID(pthread_mutex_unlock(&LOCK_thread_count)); thd->packet.shrink(thd->variables.net_buffer_length); // Reclaim some memory - /* - Clear the SP function cache after each statement (QQ this is a temporary - solution; caching will be rehacked later). - Note: Must do this before we free_root. - */ - sp_clear_function_cache(thd); - free_root(&thd->mem_root,MYF(MY_KEEP_PREALLOC)); DBUG_RETURN(error); } @@ -2829,7 +2822,6 @@ mysql_execute_command(THD *thd) sp_head *sph= sp_find_function(thd, &lex->udf.name); if (sph) { - delete sph; // QQ Free memory. Remove this when caching!!! net_printf(thd, ER_UDF_EXISTS, lex->udf.name.str); goto error; } @@ -3033,18 +3025,12 @@ mysql_execute_command(THD *thd) { case SP_OK: send_ok(thd); - delete lex->sphead; // QQ Free memory. Remove this when caching!!! - lex->sphead= NULL; break; case SP_WRITE_ROW_FAILED: net_printf(thd, ER_SP_ALREADY_EXISTS, SP_TYPE_STRING(lex), name); - delete lex->sphead; // QQ Free memory. Remove this when caching!!! - lex->sphead= NULL; goto error; default: net_printf(thd, ER_SP_STORE_FAILED, SP_TYPE_STRING(lex), name); - delete lex->sphead; // QQ Free memory. Remove this when caching!!! - lex->sphead= NULL; goto error; } break; @@ -3068,7 +3054,6 @@ mysql_execute_command(THD *thd) if (tables && ((res= check_table_access(thd, SELECT_ACL, tables)) || (res= open_and_lock_tables(thd, tables)))) { - delete sp; // Free memory. Remove this when caching!!! break; } fix_tables_pointers(lex->all_selects_list); @@ -3087,7 +3072,6 @@ mysql_execute_command(THD *thd) #ifndef EMBEDDED_LIBRARY thd->net.no_send_ok= nsok; #endif - delete sp; // QQ Free memory. Remove this when caching!!! goto error; } smrx= thd->server_status & SERVER_MORE_RESULTS_EXISTS; @@ -3105,8 +3089,6 @@ mysql_execute_command(THD *thd) thd->server_status &= ~SERVER_MORE_RESULTS_EXISTS; } - delete sp; // QQ Free memory. Remove this when caching!!! - if (res == 0) send_ok(thd); else @@ -3132,7 +3114,6 @@ mysql_execute_command(THD *thd) { /* QQ This is an no-op right now, since we haven't put the characteristics in yet. */ - delete sp; // QQ Free memory. Remove this when caching!!! send_ok(thd); } break; |