← Back to team overview

pbxt-discuss team mailing list archive

free_table_share() != drizzle

 

Hi!

This code:

static void my_close_table(TABLE *table)
{
#ifdef DRIZZLED
        TABLE_SHARE     *share;

        share = (TABLE_SHARE *) ((char *) table + sizeof(TABLE));
        share->free_table_share();
#else  
        delete_table(table, true);  // TODO: Q, why did Stewart remove this?
#endif 
        xt_free_ns(table);
}


This is not going to go well in Drizzle, since we the assumption that the memory allocation will be aligned this way is wrong. In my local tree I am going to drop the free_table_share().

I'm not really sure what to do though. I believe what you will be wanting to do is call delete on table->s, though if what you are using is an TableInstance then it should clean up just fine on its own.

Is there something I can do to make this code a bit more straightforward for you?

Cheers,
	-Brian








Follow ups