With some modifications you could use the PBXT code that parses the query, it's quite
simple: https://launchpad.net/pbxt
See datadic_xt.cc:
XTParseTable::parseCreateTable()
XTParseTable::parseAlterTable()
XTParseTable::parseCreateIndex()
XTParseTable::parseDropIndex()
On May 9, 2012, at 12:30 PM, tomas ulin wrote:
>
> There is no API for it. InnoDB parses the query itself for the foreign key part.
>
> BR,
>
> Tomas
>
> On 2012-05-08 17:23, Zardosht Kasheff wrote:
>> Hello all,
>>
>> Are there any pointers for how one would go about implementing foreign
>> keys in the storage engine? I cannot seem to figure it out from the
>> handler API.
>>
>> Thanks
>> -Zardosht
>>
>
> --
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe: http://lists.mysql.com/internals
>