{"id":2118,"date":"2010-08-18T11:57:16","date_gmt":"2010-08-18T01:57:16","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=2118"},"modified":"2010-08-18T11:57:16","modified_gmt":"2010-08-18T01:57:16","slug":"storage-engine-independent-test-suite","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2010\/08\/18\/storage-engine-independent-test-suite\/","title":{"rendered":"Storage Engine independent test suite"},"content":{"rendered":"<p>This is something that has never existed in the MySQL world. Nothing to help you start developing your engine.<\/p>\n<p>Sure, you could start running the whole test suite against your engine&#8230;. but where it wasn&#8217;t specifically MyISAM, you&#8217;d certainly hit things that were.. well&#8230; as simple as having to change the result file so that SHOW CREATE TABLE masked out the ENGINE= part.<\/p>\n<p>Also, if you were just starting out and were trying to incrementally write your engine, instead of just hacking away for 6 months on &#8220;everything&#8221; and then testing &#8220;everything&#8221; and hoping that <strong>anything<\/strong> at all worked &#8211; you were out of luck.<\/p>\n<p>So when working on the embedded_innodb engine for Drizzle I wanted to finally fix this problem. I was not going to fix it perfectly, or completely. What I wanted was a set of simple tests, that were very short and that tested distinct bits of the engine.<\/p>\n<p>So&#8230; if you look in the Drizzle tree, in plugin\/embedded_innodb\/tests\/ you&#8217;ll find a bunch of test cases beginning with basic_ (they&#8217;re also now in plugin\/pbxt\/tests). These check very basic functionality and should be useful when starting to write your own storage engine.<\/p>\n<p>They should also port easily to MySQL too (possibly without changes), but I haven&#8217;t tried it. Porting to PBXT was simple.. a regex to replace InnoDB with PBXT.<\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is something that has never existed in the MySQL world. Nothing to help you start developing your engine. Sure, you could start running the whole test suite against your engine&#8230;. but where it wasn&#8217;t specifically MyISAM, you&#8217;d certainly hit &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2010\/08\/18\/storage-engine-independent-test-suite\/\">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":[75,14],"tags":[],"class_list":["post-2118","post","type-post","status-publish","format-standard","hentry","category-drizzle-work-et-al","category-mysql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-ya","jetpack-related-posts":[{"id":2168,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/10\/25\/storage-engine-api-state-graph\/","url_meta":{"origin":2118,"position":0},"title":"Storage Engine API state graph","author":"Stewart Smith","date":"2010-10-25","format":false,"excerpt":"Drizzle still has a number of quirks inherited from the MySQL Storage Engine API (e.g. BLOBs, row buffer, CREATE SELECT and lack of DDL transaction boundaries, key tuple format). One of the things we fixed a long time ago was to have proper methods for StorageEngines to be called for:\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"State transitions for a transaction. Transaction can be empty OR have one or more statements","src":"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2010\/10\/edge30-300x163.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2041,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/06\/29\/enum-now-works-properly-in-drizzle\/","url_meta":{"origin":2118,"position":1},"title":"ENUM now works properly (in Drizzle)","author":"Stewart Smith","date":"2010-06-29","format":false,"excerpt":"Over at the Drizzle blog, the recent 2010-06-07 tarball was announced. This tarball release has my fixes for the ENUM type, so that it now works as it should. I was quite amazed that such a small block of code could have so many bugs! One of the most interesting\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":[]},{"id":1811,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/01\/writing-a-storage-engine-for-drizzle-part-1-plugin-basics\/","url_meta":{"origin":2118,"position":2},"title":"Writing A Storage Engine for Drizzle, Part 1: Plugin basics","author":"Stewart Smith","date":"2010-03-01","format":false,"excerpt":"So, you've decided to write a Storage Engine for Drizzle. This is excellent news! The API is continually being improved and if you've worked on a Storage Engine for MySQL, you'll notice quite a few differences in some areas. The first step is to create a skeleton StorageEngine plugin. You\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1738,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/10\/14\/return-of-the-top-5-mysql-wishlist-and-looking-at-drizzle\/","url_meta":{"origin":2118,"position":3},"title":"Return of the &#8220;Top 5 MySQL Wishlist&#8221; and looking at Drizzle","author":"Stewart Smith","date":"2009-10-14","format":false,"excerpt":"It's coming up on a year since I started working full time on Drizzle. So, I got a bit reflective... Have we done things that I (and others) really wanted done? Back in 2007, I wrote my top 5 wishlist for the MySQL Server. I am not going to pretend\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":[]},{"id":2253,"url":"https:\/\/www.flamingspork.com\/blog\/2011\/01\/05\/is-your-storage-engine-buggy-or-the-database-server\/","url_meta":{"origin":2118,"position":4},"title":"Is your Storage Engine buggy or the database server?","author":"Stewart Smith","date":"2011-01-05","format":false,"excerpt":"If your storage engine returns an error from rnd_init (or doStartTableScan as it's named in Drizzle) and does not save this error and return it in any subsequent calls to rnd_next, your engine is buggy. Namely it is buggy in that a) an error may not be reported back to\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":2182,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/10\/26\/cursor-states\/","url_meta":{"origin":2118,"position":5},"title":"Cursor states","author":"Stewart Smith","date":"2010-10-26","format":false,"excerpt":"Following on from my post yesterday on the various states of a Storage Engine, I said I'd have a go with the Cursor object too. A Cursor is used by the Drizzle kernel to get and set data in a table. There can be more than one cursor open at\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2010\/10\/graph1-284x300.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2118","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=2118"}],"version-history":[{"count":2,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2118\/revisions"}],"predecessor-version":[{"id":2120,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2118\/revisions\/2120"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=2118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=2118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=2118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}