List:Internals« Previous MessageNext Message »
From:Marko Mäkelä Date:February 15 2007 10:22am
Subject:Re: Accessing strconvert and thd->charset() in plugins
View as plain text  
On Thu, Feb 15, 2007 at 09:11:40PM +1100, Stewart Smith wrote:
> On Wed, 2007-02-14 at 22:56 +0200, Marko Mäkelä wrote:
> > However, strconvert() and THD::charset() appear to be unavailable to
> > storage engine plugins.
> 
> Maybe just make them available?

I believe that THD needs to be opaque, but there could be a wrapper
thd_charset(THD*).

> or there's that magic flag thing that makes a file be able to access
> anything in the mysql server (internals something IIRC)....

I aped the Makefile.am and plug.in from storage/archive (the only
storage engine plugin that consists of multiple compilation units),
and my plug.in contains this line:

MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(innobase, [handler/ha_innodb.cc])

I guess that the definitions are hidden behind some #ifdef MYSQL_SERVER.
I replaced -DMYSQL_SERVER with -DMYSQL_DYNAMIC_PLUGIN in the plugin build.

> hope this helps, or at least gives an idea,
> stewart "wishing that pluggable ndb was as easy as pluggable $ENGINE"

I'm glad to read that you intend to make ndb pluggable.  More pressure
to open up enough interfaces. :-)

	Marko
Thread
Accessing strconvert and thd->charset() in pluginsMarko Mäkelä14 Feb
  • Re: Accessing strconvert and thd->charset() in pluginsStewart Smith15 Feb
    • Re: Accessing strconvert and thd->charset() in pluginsMarko Mäkelä15 Feb