{"id":1648,"date":"2009-05-19T09:31:47","date_gmt":"2009-05-18T23:31:47","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=1648"},"modified":"2009-05-19T09:31:47","modified_gmt":"2009-05-18T23:31:47","slug":"is-bit_length-useful","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2009\/05\/19\/is-bit_length-useful\/","title":{"rendered":"Is BIT_LENGTH() useful?"},"content":{"rendered":"<pre>mysql [localhost] {msandbox} ((none)) &gt; select length(crc32(3)) * 8, bit_length(crc32(3));\r\n+----------------------+----------------------+\r\n| length(crc32(3)) * 8 | bit_length(crc32(3)) |\r\n+----------------------+----------------------+\r\n|                   80 |                   80 | \r\n+----------------------+----------------------+\r\n1 row in set (0.00 sec)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>mysql [localhost] {msandbox} ((none)) &gt; select length(crc32(3)) * 8, bit_length(crc32(3)); +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+ | length(crc32(3)) * 8 | bit_length(crc32(3)) | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+ | 80 | 80 | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+ 1 row in set (0.00 sec)<\/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-1648","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-qA","jetpack-related-posts":[{"id":3950,"url":"https:\/\/www.flamingspork.com\/blog\/2015\/02\/13\/preliminary-results-from-power8-optimized-crc32-for-mysql\/","url_meta":{"origin":1648,"position":0},"title":"Preliminary results from POWER8 optimized CRC32 for MySQL","author":"Stewart Smith","date":"2015-02-13","format":false,"excerpt":"So, Anton got some useful code working that I could patch into a MySQL server for testing purposes - a POWER8 optimized CRC32 implementation. I went with a pretty stock MySQL 5.6.22 (one patch) with sysbench preparing a single 2GB table (10,000,000 rows). I then hacked up innochecksum so that\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":4019,"url":"https:\/\/www.flamingspork.com\/blog\/2015\/12\/18\/power8-accelerated-crc32-merged-in-mariadb-10-1\/","url_meta":{"origin":1648,"position":1},"title":"POWER8 Accelerated CRC32 merged in MariaDB 10.1","author":"Stewart Smith","date":"2015-12-18","format":false,"excerpt":"Earlier on in benchmarking MySQL and MariaDB on POWER8, we noticed that on write workloads (or read workloads involving a lot of IO) we were spending a bunch of time computing InnoDB page checksums. This is a relatively well known MySQL problem and has existed for many years and Percona\u2026","rel":"","context":"In &quot;IBM&quot;","block_context":{"text":"IBM","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/ibm-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":101,"url":"https:\/\/www.flamingspork.com\/blog\/2003\/06\/04\/finally-fixed-it\/","url_meta":{"origin":1648,"position":2},"title":"finally! fixed it!","author":"Stewart Smith","date":"2003-06-04","format":false,"excerpt":"From: Stewart Smith Date: Wed Jun 4, 2003 3:56:09 PM Australia\/Melbourne To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, David Woodhouse , Stewart Smith Subject: [PATCH] fixed: CRC32=y && 8193TOO=m unresolved symbols Linus, please apply - this fixes unresolved symbols when CONFIG_CRC32=y and CONFIG_8139TOO=m (it also appeared on some other ethernet device drivers).\u2026","rel":"","context":"In &quot;linux-kernel&quot;","block_context":{"text":"linux-kernel","link":"https:\/\/www.flamingspork.com\/blog\/category\/linux-kernel\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4035,"url":"https:\/\/www.flamingspork.com\/blog\/2016\/02\/26\/mysql-contributions-status\/","url_meta":{"origin":1648,"position":3},"title":"MySQL Contributions status","author":"Stewart Smith","date":"2016-02-26","format":false,"excerpt":"This post is an update to the status of various MySQL bugs (some with patches) that I've filed over the past couple of years (or that people around me have). I'm not looking at POWER specific ones, as there are these too, but each of these bugs here deal with\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":3801,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/09\/19\/mysql-architecture\/","url_meta":{"origin":1648,"position":4},"title":"Some current MySQL Architecture writings","author":"Stewart Smith","date":"2014-09-19","format":false,"excerpt":"So, I've been looking around for a while (and a few times now) for any good resources that cover a bunch of MySQL architecture and technical details aimed towards the technically proficient but not MySQL literate audience. I haven't really found anything. I mean, there's the (huge and very detailed)\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":1876,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/04\/02\/the-drizzle-and-mysql-key-tuple-format\/","url_meta":{"origin":1648,"position":5},"title":"The Drizzle (and MySQL) Key tuple format","author":"Stewart Smith","date":"2010-04-02","format":false,"excerpt":"Here's something that's not really documented anywhere (unless you count ha_innodb.cc as a source of server documentation). You may have some idea about the MySQL\/Drizzle row buffer format. This is passed around the storage engine interface: in for write_row and update_row and out for the various scan and index read\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\/1648","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=1648"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1648\/revisions"}],"predecessor-version":[{"id":1649,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1648\/revisions\/1649"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=1648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=1648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=1648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}