The first method call your storage engine needs to support is the call for a new handler instance.
Before the handlerton is defined in the storage engine source file, a method header for the instantiation method must be defined. Here is an example from the CSV engine:
static handler* tina_create_handler(TABLE *table);
As you can see, the method accepts a pointer to the table the handler is intended to manage, and returns a handler object.
After the method header is defined, the method is named with a method pointer in the create() handlerton element, identifying the method as being responsible for generating new handler in-stances.
Here is an example of the MyISAM storage engine's instantiation method:
This call then works in conjunction with the storage engine's constructor. Here is an example from the FEDERATED storage engine:And here's one more example from the EXAMPLE storage engine:
The additional elements in the FEDERATED example are extra initializations for the handler. The minimum implementation required is the handler()initialization shown in the EXAMPLE version.
MySQL Related Interview Questions
|PHP Interview Questions||MySQL Interview Questions|
|PHP+MySQL Interview Questions||Drupal Interview Questions|
|MYSQL DBA Interview Questions||PHP5 Interview Questions|
|WordPress Interview Questions||Joomla Interview Questions|
|CakePHP Interview Questions||CodeIgniter Interview Questions|
|PHP7 Interview Questions|
A Guided Tour Of The Mysql Source Code
Important Algorithms And Structures
How Mysql Performs Different Selects
How Mysql Transforms Subqueries
Mysql Client/server Protocol
Prepared Statements And Stored Routines
Myisam Storage Engine
Innodb Storage Engine
Writing A Custom Storage Engine
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.