{"id":1326,"date":"2008-12-23T14:18:23","date_gmt":"2008-12-23T04:18:23","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=1326"},"modified":"2009-02-21T13:29:54","modified_gmt":"2009-02-21T03:29:54","slug":"drizzle-progress-testing-can-be-good","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2008\/12\/23\/drizzle-progress-testing-can-be-good\/","title":{"rendered":"Drizzle progress&#8230; (testing can be good)"},"content":{"rendered":"<p>We&#8217;ve been working on fixing up the remaining test cases so that they run with Drizzle. We&#8217;ve found: bugs in Drizzle, bugs in MySQL (one that seems to have been there for at least 10 years), bugs in the tests, tests that no longer apply and occationally, something like this:<\/p>\n<p style=\"text-align: left;\"><code><br \/>\n\/* Please god, will someone rewrite this to be readable :( *\/<br \/>\nif (to-&gt;pack_length() == from-&gt;pack_length() &amp;&amp;<br \/>\n!(to-&gt;flags &amp; UNSIGNED_FLAG &amp;&amp; !(from-&gt;flags &amp; UNSIGNED_FLAG)) &amp;&amp;<br \/>\nto-&gt;real_type() != DRIZZLE_TYPE_ENUM &amp;&amp;<br \/>\n(to-&gt;real_type() != DRIZZLE_TYPE_NEWDECIMAL || (to-&gt;field_length == from-&gt;field_length &amp;&amp; (((Field_num*)to)-&gt;dec == ((Field_num*)from)-&gt;dec))) &amp;&amp;<br \/>\nfrom-&gt;charset() == to-&gt;charset() &amp;&amp;<br \/>\nto-&gt;table-&gt;s-&gt;db_low_byte_first == from-&gt;table-&gt;s-&gt;db_low_byte_first &amp;&amp;<br \/>\n(!(to-&gt;table-&gt;in_use-&gt;variables.sql_mode &amp; (MODE_NO_ZERO_DATE | MODE_INVALID_DATES)) || (to-&gt;type() != DRIZZLE_TYPE_DATE &amp;&amp; to-&gt;type() != DRIZZLE_TYPE_DATETIME)) &amp;&amp;<br \/>\n(from-&gt;real_type() != DRIZZLE_TYPE_VARCHAR || ((Field_varstring*)from)-&gt;length_bytes == ((Field_varstring*)to)-&gt;length_bytes))<br \/>\n{\t\t\t\t\t\t\/\/ Identical fields<br \/>\n\/* This may happen if one does 'UPDATE ... SET x=x' *\/<br \/>\nif (to-&gt;ptr != from-&gt;ptr)<br \/>\nmemcpy(to-&gt;ptr,from-&gt;ptr,to-&gt;pack_length());<br \/>\nreturn 0;<br \/>\n}<\/code><\/p>\n<p>and no, I haven&#8217;t really changed the formatting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve been working on fixing up the remaining test cases so that they run with Drizzle. We&#8217;ve found: bugs in Drizzle, bugs in MySQL (one that seems to have been there for at least 10 years), bugs in the tests, &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2008\/12\/23\/drizzle-progress-testing-can-be-good\/\">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],"tags":[633,70,48,628],"class_list":["post-1326","post","type-post","status-publish","format-standard","hentry","category-drizzle-work-et-al","tag-code","tag-drizzle","tag-fail","tag-mysql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-lo","jetpack-related-posts":[{"id":1576,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/02\/25\/no-implicit-defaults\/","url_meta":{"origin":1326,"position":0},"title":"No implicit defaults","author":"Stewart Smith","date":"2009-02-25","format":false,"excerpt":"See also: MySQL Bug 43151 The MySQL Manual proudly states that you don't get implicit default values if strict mode. mysql> set sql_mode='STRICT_ALL_TABLES'; Query OK, 0 rows affected (0.00 sec) mysql> create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i\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":2041,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/06\/29\/enum-now-works-properly-in-drizzle\/","url_meta":{"origin":1326,"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":2168,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/10\/25\/storage-engine-api-state-graph\/","url_meta":{"origin":1326,"position":2},"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":1378,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/01\/30\/progress-in-nofrm-branch\/","url_meta":{"origin":1326,"position":3},"title":"Progress in nofrm branch","author":"Stewart Smith","date":"2009-01-30","format":false,"excerpt":"\u00e2\u20ac\u0153Ban FRM Now!\u00e2\u20ac\u009d branch in Launchpad Now we're reading part of the table information out of the proto file on disk instead of the frm. Not everything (yet) but a bit. Good first steps. Had to fix bugs along the way as well (and find weirdness in FRM file format...).\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":1326,"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":1383,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/02\/02\/row-id-in-mysql-and-drizzle-and-the-engines\/","url_meta":{"origin":1326,"position":5},"title":"row id in MySQL and Drizzle (and the engines)","author":"Stewart Smith","date":"2009-02-02","format":false,"excerpt":"Some database engines have a fundamental concept of a row id. The row id is everything you need to know to locate a row. Common uses include secondary indexes (key is what's indexed, value is rowid which you then use to lookup the row). One design is the InnoDB method\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\/1326","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=1326"}],"version-history":[{"count":4,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1326\/revisions"}],"predecessor-version":[{"id":1434,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1326\/revisions\/1434"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=1326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=1326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=1326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}