{"id":3231,"date":"2013-03-03T09:38:09","date_gmt":"2013-03-02T23:38:09","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=3231"},"modified":"2013-03-03T05:39:28","modified_gmt":"2013-03-02T19:39:28","slug":"unireg-h-is-gone","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/03\/unireg-h-is-gone\/","title":{"rendered":"unireg.h is finally gone"},"content":{"rendered":"<p>I got rid of unireg.cc way back in 2009 as I rewrote all the FRM related code inside Drizzle to instead use a nice protobuf based structure. If you&#8217;re wondering what was there, I just quote this part of pack_screens() from unireg.cc in MySQL 5.6:<\/p>\n<blockquote>\n<pre>start_row=4; end_row=22; cols=80; fields_on_screen=end_row+1-start_row;<\/pre>\n<\/blockquote>\n<p>We have gradually pulled things out of unireg.h over the years too. But, let&#8217;s go back to ask the question &#8220;What is UNIREG?&#8221;. To answer that, I&#8217;m going to quote from <a href=\"http:\/\/docstore.mik.ua\/orelly\/linux\/sql\/ch01_04.htm\">something that was current back when MySQL 3.22 was the latest and greatest<\/a>:<\/p>\n<blockquote><p>In 1979, he developed an in-house database tool called UNIREG for managing databases. Since 1979, UNIREG has been rewritten in several different languages and extended to handle big databases.<\/p><\/blockquote>\n<p>No doubt the definition of big has changed for most people since then. If we take what the <a href=\"http:\/\/twpug.net\/docs\/mysql323\/manual_Unireg.html\">MySQL 3.23 manual<\/a> said:<\/p>\n<blockquote><p>Unireg is our tty interface builder, but it uses a low level connection to our ISAM (which is used by MySQL) and because of this it is very quick. It has existed since 1979 (on Unix in C since ~1986).<\/p><\/blockquote>\n<p>This is where the FRM file comes from, and likely where unireg.cc and unireg.h in MySQL \u00c2\u00a0originated from. Since we didn&#8217;t want to have the limitations of FRM files in Drizzle, and since all code that mentioned UNIREG was generally not modern, we&#8217;ve been gradually removing bits or refactoring it since.<\/p>\n<p>So, what was in unireg.h to begin with? I peeked into the MySQl 5.6 unireg.h to remind myself:<\/p>\n<ul>\n<li><span style=\"line-height: 15px;\">defines for libc5<\/span><\/li>\n<li>defines for the MySQL thing that isn&#8217;t gettext<\/li>\n<li>the PLUGINDIR define<\/li>\n<li>some macros for errors<\/li>\n<li>a bunch of SPECIAL_ prefixed defines for a bitfield which is a truly odd thing.<\/li>\n<li>store_record(), restore_record(), cmp_record(), empty_record() macros<\/li>\n<li>defines for flags to openfrm(), openprt() and openfrd() (the latter two not being present in MySQL)<\/li>\n<li>defines used in relation to INFORMATION_SCHEMA tables and triggers<\/li>\n<li>the BIN_LOG_HEADER_SIZE define<\/li>\n<li>the DEFAULT_KEY_CACHE_NAME define<\/li>\n<\/ul>\n<p>Soo&#8230; really a whole bunch of stuff that should never have been put there in the first place as most of that has clearly come in after it was MySQL.<\/p>\n<p>But I&#8217;m getting sidetracked, the main point was that I looked at what was remaining in unireg.h inside Drizzle and it was just one thing:\u00c2\u00a0<span style=\"line-height: 15px;\">Code to abort the server in certain odd situations (that we&#8217;d completely rewritten so had no relation to unireg). So, I renamed it.<\/span><\/p>\n<p>Renaming a file is a pretty minor change, but that hides all the work leading up to that point so that now I can go and explain Drizzle internals while making one less reference to UNIREG.<\/p>\n<p>Now to go and remove the last tiny bit of unireg_check&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got rid of unireg.cc way back in 2009 as I rewrote all the FRM related code inside Drizzle to instead use a nice protobuf based structure. If you&#8217;re wondering what was there, I just quote this part of pack_screens() &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2013\/03\/03\/unireg-h-is-gone\/\">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-3231","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-Q7","jetpack-related-posts":[{"id":2145,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/09\/29\/lca-miniconf-call-for-papers-data-storage-databases-filesystems-cloud-storage-sql-and-nosql\/","url_meta":{"origin":3231,"position":0},"title":"LCA Miniconf Call for Papers: Data Storage: Databases, Filesystems, Cloud Storage, SQL and NoSQL","author":"Stewart Smith","date":"2010-09-29","format":false,"excerpt":"This miniconf aims to cover many of the current methods of data storage and retrieval and attempt to bring order to the universe. We're aiming to cover what various systems do, what the latest developments are and what you should use for various applications. We aim for talks from developers\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":1711,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/04\/08\/alsosql\/","url_meta":{"origin":3231,"position":1},"title":"AlsoSQL","author":"Stewart Smith","date":"2010-04-08","format":false,"excerpt":"So there's a bit of a swelling around the idea of NoSQL. That is, databases that don't have an SQL interface in front of them - with the promise of better performance. With a well designed backend, this is no doubt the case. A flexible query language is rather useful\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":2447,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/01\/23\/mysql-and-postgresql-cloud-offerings-linux-conf-au-2012-miniconf-talk-by-myself-and-selena\/","url_meta":{"origin":3231,"position":2},"title":"MySQL and PostgreSQL Cloud Offerings &#8211; linux.conf.au 2012 miniconf talk by myself and Selena","author":"Stewart Smith","date":"2012-01-23","format":false,"excerpt":"Selena and I gave a talk on the various issues of running databases \"in the cloud\" at the recent linux.conf.au in Ballarat. Video is up, embedded below:","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":1609,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/04\/16\/drizzle-developer-day-reminder\/","url_meta":{"origin":3231,"position":3},"title":"Drizzle Developer Day reminder","author":"Stewart Smith","date":"2009-04-16","format":false,"excerpt":"We're having a Drizzle Developer Day just after the MySQL Conference and Expo next week. You don't have to be attending the conference to come to the Drizzle Developer Day. Just bring your enthusiasm for free databases, Drizzle and good software. Spaces are limited, so head on over to the\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":2303,"url":"https:\/\/www.flamingspork.com\/blog\/2011\/03\/16\/fixed-in-drizzle-no-more-gotchas\/","url_meta":{"origin":3231,"position":4},"title":"Fixed in Drizzle: No more &#8220;GOTCHA&#8217;s&#8221;","author":"Stewart Smith","date":"2011-03-16","format":false,"excerpt":"\u00a0 At the upcoming MySQL Conference and Expo, I'm going to give a Thursday afternoon (2pm) session entitled Fixed in Drizzle: No more \"GOTCHA's\". I plan to have a lot of fun with this session.. If you go back to the very start of when I started submitting code to\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":2468,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/03\/09\/sessions-at-the-percona-live-mysql-conference-that-interest-me\/","url_meta":{"origin":3231,"position":5},"title":"Sessions at the Percona Live MySQL Conference that interest me","author":"Stewart Smith","date":"2012-03-09","format":false,"excerpt":"For the past many years, there's been a conference in April, at the Santa Clara Convention Centre where the topic has been MySQL and the surrounding ecosystem. The first year I went, I gave a talk on the new features in MySQL Cluster 5.1 to a overflowing room of attendees.\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":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3231","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=3231"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3231\/revisions"}],"predecessor-version":[{"id":3232,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3231\/revisions\/3232"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=3231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=3231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=3231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}