* Kristofer Pettersson <kpettersson@stripped> [08/07/23 18:17]:
> +#define MAX_TDC_BLOB_SIZE 67108864
Please define this to 64k, put the definition to the constants
section (table.h has a place with a few other defines, could be
put there), add a description for the constant.
> +void free_field_buffers_larger_than(TABLE *table, uint32 size);
> int set_zone(int nr,int min_zone,int max_zone);
> ulong convert_period_to_month(ulong period);
> ulong convert_month_to_period(ulong month);
>
> === modified file 'sql/sql_base.cc'
> --- a/sql/sql_base.cc 2008-05-20 07:38:17 +0000
> +++ b/sql/sql_base.cc 2008-07-23 14:14:59 +0000
> @@ -1369,6 +1369,8 @@ bool close_thread_table(THD *thd, TABLE
> DBUG_ASSERT(!table->is_children_attached());
>
> /* Free memory and reset for next loop */
> + free_field_buffers_larger_than(table,MAX_TDC_BLOB_SIZE);
> +
Perhaps a method of struct st_table? It's a class now anyway.
The patch is OK to push.
--