Re: pointers on implementing foreign keys for a storage engine

Paul McCullagh <[email protected]> Thu, 10 May 2012 15:08:54 +0200
Newsgroups gmane.comp.db.mysql.devel
Message-ID <[email protected]>
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
> 


-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals