{"id":3347,"date":"2013-05-24T10:00:59","date_gmt":"2013-05-24T00:00:59","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=3347"},"modified":"2013-05-22T14:25:28","modified_gmt":"2013-05-22T04:25:28","slug":"an-old-note-on-the-storage-engine-api","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2013\/05\/24\/an-old-note-on-the-storage-engine-api\/","title":{"rendered":"An old note on the Storage Engine API"},"content":{"rendered":"<p>Whenever I stick my head into the MySQL storage engine API, I&#8217;m reminded of a MySQL User Conference from several years ago now.<\/p>\n<p>Specifically, I&#8217;m reminded of a slide from an early talk at the MySQL User Conference by\u00c2\u00a0Paul McCullagh describing developing PBXT. For &#8220;How to write a Storage Engine for MySQL&#8221;, it went something like this:<\/p>\n<ol>\n<li>Develop basic INSERT (write_row) support &#8211; INSERT INTO t1 VALUES (42)<\/li>\n<li>Develop full table scan (rnd_init, rnd_next, rnd_end) \u00c2\u00a0&#8211; SELECT * from t1<\/li>\n<li>If you&#8217;re sane, stop here.<\/li>\n<\/ol>\n<p>A lot of people stop at step 3. It&#8217;s a\u00c2\u00a0<strong>really<\/strong>\u00c2\u00a0good place to stop too. It avoids most of the tricky parts that are unexpected, undocumented and unlogical (yes, I&#8217;m inventing words here).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whenever I stick my head into the MySQL storage engine API, I&#8217;m reminded of a MySQL User Conference from several years ago now. Specifically, I&#8217;m reminded of a slide from an early talk at the MySQL User Conference by\u00c2\u00a0Paul McCullagh &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2013\/05\/24\/an-old-note-on-the-storage-engine-api\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[76,14],"tags":[628,80],"class_list":["post-3347","post","type-post","status-publish","format-standard","hentry","category-code","category-mysql","tag-mysql","tag-storage-engine-api"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-RZ","jetpack-related-posts":[{"id":1409,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/02\/20\/improving-the-storage-engine-api\/","url_meta":{"origin":3347,"position":0},"title":"Improving the Storage Engine &#8220;API&#8221;","author":"Stewart Smith","date":"2009-02-20","format":false,"excerpt":"I increasingly enclose the API part of \"Storage Engine API\" in quotes as it does score a rather large number on the API Design Rusty levels (Coined by Rusty Russell). I give it a 15 (out of 18. lower is better) in this case \"The obvious use is wrong\". The\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":710,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/06\/06\/call-for-comments-on-mysql-online-backup-api-jay-pipes\/","url_meta":{"origin":3347,"position":1},"title":"Call for Comments on MySQL Online Backup API &#8211; Jay Pipes","author":"Stewart Smith","date":"2006-06-06","format":false,"excerpt":"Call for Comments on MySQL Online Backup API - Jay Pipes It's been interesting watching the ideas develop for online, consistent Backup for MySQL. I should expand that... consistent across storage engines. Other RDBMS vendors get it easy - they just have one storage engine to back up. We have\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":865,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/07\/16\/mysql-storage-engine-api-gotcha-42\/","url_meta":{"origin":3347,"position":2},"title":"MySQL Storage Engine API Gotcha #42","author":"Stewart Smith","date":"2007-07-16","format":false,"excerpt":"(Filling 1 through 41 is an exercise left to the reader... I just like the number 42) handler::info can be called on a handler that has never had ::exeternal_lock called. So if you rely on a call to handler::external_lock to set up something (e.g. a pointer to a transaction object),\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3345,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/05\/23\/mysql-vs-drizzle-plugin-api\/","url_meta":{"origin":3347,"position":3},"title":"MySQL vs Drizzle plugin APIs","author":"Stewart Smith","date":"2013-05-23","format":false,"excerpt":"There's a big difference in how plugins are treated in MySQL and how they are treated in Drizzle. The MySQL way has been to create a C API in front of the C++-like (I call it C- as it manages to take the worst of both worlds) internal \"API\". The\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":578,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/02\/15\/information_schemafiles-querying-disk-usage-from-sql\/","url_meta":{"origin":3347,"position":4},"title":"INFORMATION_SCHEMA.FILES (querying disk usage from SQL)","author":"Stewart Smith","date":"2006-02-15","format":false,"excerpt":"In MySQL 5.1.6 there's a new INFORMATION_SCHEMA table. Currently, it only has information on files for NDB but we're hoping to change that in a future release (read: I think it would be neat). This table is a table generated by the MySQL server listing all the different files that\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3295,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/04\/19\/the-merge-storage-engine-not-dead-just-resting-or-forgotten\/","url_meta":{"origin":3347,"position":5},"title":"The MERGE storage engine: not dead, just resting&#8230;. or forgotten.","author":"Stewart Smith","date":"2013-04-19","format":false,"excerpt":"Following on from my fun post on Where are they now: MySQL Storage Engines, I thought I'd cover the few storage engines that are really just interfaces to a collection of things. In this post, I'm talking about MERGE. The MERGE engine was basically a multiplexer down to a number\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=3347"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3347\/revisions"}],"predecessor-version":[{"id":3348,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3347\/revisions\/3348"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=3347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=3347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=3347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}