List:Internals« Previous MessageNext Message »
From:Paul McCullagh Date:August 15 2006 10:08am
Subject:Re: How to compile an storage engine as an dll or so?
View as plain text  
On Aug 15, 2006, at 10:49 AM, xiao.feng wrote:

> Thank you very much!
>
> when you finished build , can you  found libha_pbxt.so in $MYSQL/lib/?

In the directory ./storage/pbxt/.libs/ (besides a number of other 
files):

    8 lrwxr-xr-x    1 build  build       13 14 Aug 16:27 ha_pbxt -> 
ha_pbxt.0.0.0
    8 lrwxr-xr-x    1 build  build       13 14 Aug 16:27 ha_pbxt.0 -> 
ha_pbxt.0.0.0
3848 -rw-r--r--    1 build  build  1969696 14 Aug 16:27 ha_pbxt.0.0.0
4232 -rw-r--r--    1 build  build  2163464 14 Aug 16:27 ha_pbxt.a

Although the .so is missing, the name is not critical, this is the 
shared library and it works correctly.

Right now I am not sure why .so is missing (any hints would be 
welcome), this only happened after I ran automake, so I think the 
problem lies with my version of automake (1.8.3) or libtool (1.5.2). As 
far as I know, MySQL uses automake 1.9.6 (i.e. the latest). Maybe this 
will give better results.

> You have modified  ./libmysqld/sql_builtin.cc, you build you own 
> mysqld? Can libha_pbxt.so works well on official mysql binary?

Yes. It will work with the official mysql binary. The changes made to 
sql_builtin.cc are not required for it to work.

> libha_pbxt.so must depend on some mysql symbols which defined in 
> handler.cc or some other cpp files, these symbols was built in mysqld, 
> so work well.

Exactly, so the big question is, with which versions of the official 
mysql binary will it work? If the plug-in was built with 5.1.11, will 
it run with a 5.1.12 server?

In general, it should work as long as none of the mysqld classes or 
structures referenced by the plug-in are changed. In my case this 
includes, TABLE, Field, THD and a number of others besides the actual 
plug-in API in handler.h.

If any of these are changed, the plug-in could crash, and bring down 
the server with it. So I am wondering if the plan is to increment the 
MYSQL_HANDLERTON_INTERFACE_VERSION, even when any of these classes 
change to make sure the server does not load an incompatible plug-in.

> I can complie my own storage engine on windows, it works well.
> I want to write mty storage engine as dynamic linked .dll or .so, in 
> order to work with MySQL official binary mysqld.

That's the great thing about the plugins. They will work with the 
official binary. This means people don't have to build the additions to 
MySQL themselves.

Regards,

Paul


Thread
How to compile an storage engine as an dll or so?xiao.feng15 Aug
  • Re: How to compile an storage engine as an dll or so?Paul McCullagh15 Aug
    • Re: How to compile an storage engine as an dll or so?Sergei Golubchik16 Aug
      • Re: How to compile an storage engine as an dll or so?Paul McCullagh16 Aug
        • Re: How to compile an storage engine as an dll or so?Sergei Golubchik16 Aug
          • Version number in SHOW ENGINES (was Re: How to compile an storage engine as an dll or so?)Paul McCullagh16 Aug
            • Re: Version number in SHOW ENGINES (was Re: How to compile anstorage engine as an dll or so?)Stewart Smith19 Aug
              • Re: Version number in SHOW ENGINES (was Re: How to compile an storage engine as an dll or so?)Sergei Golubchik19 Aug
  • Re: How to compile an storage engine as an dll or so?xiao.feng15 Aug
    • Re: How to compile an storage engine as an dll or so?Paul McCullagh15 Aug
      • Re: How to compile an storage engine as an dll or so?Brian Aker15 Aug
        • Re: How to compile an storage engine as an dll or so?Paul McCullagh16 Aug
          • Re: How to compile an storage engine as an dll or so?Brian Aker16 Aug
  • Re: How to compile an storage engine as an dll or so?xiao.feng16 Aug
    • Re: How to compile an storage engine as an dll or so?Brian Aker16 Aug
    • Re: How to compile an storage engine as an dll or so?Stewart Smith16 Aug
  • Re: How to compile an storage engine as an dll or so?xiao.feng16 Aug
  • Re: How to compile an storage engine as an dll or so?xiao.feng16 Aug
  • How to detect SQL needed Columns in Storage Engine,not all columns?xiao.feng7 Sep
    • Re: How to detect SQL needed Columns in Storage Engine,not all columns?Sergei Golubchik7 Sep
    • Re: How to detect SQL needed Columns in Storage Engine,not all columns?xiao.feng7 Sep
    • How to create hidden Field in Storage Engine?xiao.feng11 Sep
      • Re: How to create hidden Field in Storage Engine?Sergei Golubchik11 Sep
      • Re: How to create hidden Field in Storage Engine?Brian Aker11 Sep
    • Re: How to create hidden Field in Storage Engine?xiao.feng12 Sep
      • Re: How to create hidden Field in Storage Engine?Brian Aker12 Sep
  • Re: How to compile an storage engine as an dll or so?xiao.feng9 Sep
Re: How to detect SQL needed Columns in Storage Engine,not all columns?xiao.feng8 Sep