From fab06ac587b5a0714fe962e687ae28f68c205bfd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 15 Oct 2002 01:52:41 +0300 Subject: [PATCH] Fix error handling in last patch (BLOB's in temporary tables) if create_tmp_table fails. --- sql/sql_select.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 8cf51e13759..49502a7a116 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3749,6 +3749,11 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, DBUG_RETURN(table); err: + /* + Hack to ensure that free_blobs() doesn't fail if blob_field is not yet + complete + */ + *table->blob_field= 0; free_tmp_table(thd,table); /* purecov: inspected */ bitmap_clear_bit(&temp_pool, temp_pool_slot); DBUG_RETURN(NULL); /* purecov: inspected */