diff options
author | unknown <bell@sanja.is.com.ua> | 2004-02-20 16:24:03 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-02-20 16:24:03 +0200 |
commit | 9977ce0c718de3ffc9eeb2445d3eb5fc2ef899cc (patch) | |
tree | 4b5ce64cf1b69cb39fc018131a30323c3cca686a /sql/sql_prepare.cc | |
parent | 7dd164f7305ab2ac1bfc95c214935e61be6e6510 (diff) | |
download | mariadb-git-9977ce0c718de3ffc9eeb2445d3eb5fc2ef899cc.tar.gz |
after review changes
sql/sql_class.h:
changed methods names
sql/sql_prepare.cc:
changed methods names
removed incorrect comments
added error handler
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 0334b390986..7c2913bc495 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -626,10 +626,10 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt, open temporary memory pool for temporary data allocated by derived tables & preparation procedure */ - thd->ps_setup_prepare_memory(); + thd->allocate_temporary_memory_pool_for_ps_preparing(); if (open_and_lock_tables(thd, table_list)) { - thd->ps_setup_free_memory(); + thd->free_temporary_memory_pool_for_ps_preparing(); DBUG_RETURN(1); } @@ -642,11 +642,10 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt, if (check_insert_fields(thd,table,fields,*values,1)) { - thd->ps_setup_free_memory(); + thd->free_temporary_memory_pool_for_ps_preparing(); DBUG_RETURN(1); } - // this memory pool was opened in open_and_lock_tables - thd->ps_setup_free_memory(); + thd->free_temporary_memory_pool_for_ps_preparing(); value_count= values->elements; its.rewind(); @@ -665,8 +664,7 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt, } else { - // this memory pool was opened in open_and_lock_tables - thd->ps_setup_free_memory(); + thd->free_temporary_memory_pool_for_ps_preparing(); } if (send_prep_stmt(stmt, 0)) DBUG_RETURN(1); @@ -702,24 +700,16 @@ static bool mysql_test_upd_fields(Prepared_statement *stmt, open temporary memory pool for temporary data allocated by derived tables & preparation procedure */ - thd->ps_setup_prepare_memory(); - if (open_and_lock_tables(thd, table_list)) - { - // this memory pool was opened in open_and_lock_tables - thd->ps_setup_free_memory(); - DBUG_RETURN(1); - } + thd->allocate_temporary_memory_pool_for_ps_preparing(); + if (open_and_lock_tables(thd, table_list)) + goto err; if (setup_tables(table_list) || setup_fields(thd, 0, table_list, fields, 1, 0, 0) || setup_conds(thd, table_list, &conds) || thd->net.report_error) - { - // this memory pool was opened in open_and_lock_tables - thd->ps_setup_free_memory(); - DBUG_RETURN(1); - } - // this memory pool was opened in open_and_lock_tables - thd->ps_setup_free_memory(); + goto err; + + thd->free_temporary_memory_pool_for_ps_preparing(); /* Currently return only column list info only, and we are not @@ -728,6 +718,9 @@ static bool mysql_test_upd_fields(Prepared_statement *stmt, if (send_prep_stmt(stmt, 0)) DBUG_RETURN(1); DBUG_RETURN(0); +err: + thd->free_temporary_memory_pool_for_ps_preparing(); + DBUG_RETURN(1); } /* @@ -777,7 +770,7 @@ static bool mysql_test_select_fields(Prepared_statement *stmt, open temporary memory pool for temporary data allocated by derived tables & preparation procedure */ - thd->ps_setup_prepare_memory(); + thd->allocate_temporary_memory_pool_for_ps_preparing(); if (open_and_lock_tables(thd, tables)) goto err; @@ -809,15 +802,13 @@ static bool mysql_test_select_fields(Prepared_statement *stmt, unit->cleanup(); } - // this memory pool was opened in open_and_lock_tables - thd->ps_setup_free_memory(); + thd->free_temporary_memory_pool_for_ps_preparing(); DBUG_RETURN(0); err_prep: unit->cleanup(); err: - // this memory pool was opened in open_and_lock_tables - thd->ps_setup_free_memory(); + thd->free_temporary_memory_pool_for_ps_preparing(); DBUG_RETURN(1); } |