← Back to team overview

pbxt-discuss team mailing list archive

Re: free_table_share() != drizzle

 

Hi Stewart,

On May 12, 2010, at 3:03 PM, Stewart Smith wrote:

On Mon, 10 May 2010 10:20:15 +0200, Paul McCullagh <paul.mccullagh@xxxxxxxxxxxxx > wrote:
PBXT requires a reference (or a copy of) the internal MySQL/Drizzle
data dictionary (i.e. the structure that is created when a .frm file
is loaded).

This is required for 2 purposes:

1. To determine the internal MySQL row and key structures.
2. PBXT uses reference to MySQL collation sequence based comparison
routines.

MySQL/Drizzle supply this reference when opening a table handler.
However, for PBXT this is not good enough, because there are
background threads (like the recovery thread) that need the
information as well.

You should be able to open tables from these threads (maybe with a bit
of setup). Of course, this could get interesting around drop/alter :)

I guess this is basically what I am doing in my_open_table() (in myxt_xt.cc) which creates a "class Table".

But the code is a bit of a hack, so I would like to know of there is an easier way.

The other problem is my_close_table() (in myxt_xt.cc) which is supposed to free the class Table object.

The code looks like this:

	TABLE_SHARE	*share;

	share = (TABLE_SHARE *) ((char *) table + sizeof(TABLE));
	share->free_table_share();

I guess the code assumes that Table (class Table) is a structure, which may be the reason why the code is broken is Brian says.

So to change this, I will have to change how I build a Table object in my_open_table().

Any idea how to do this better would be welcome.


--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com






Follow ups

References