{"id":1223,"date":"2008-10-08T17:01:43","date_gmt":"2008-10-08T07:01:43","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=1223"},"modified":"2008-10-08T17:01:43","modified_gmt":"2008-10-08T07:01:43","slug":"getarg-calls-srand","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2008\/10\/08\/getarg-calls-srand\/","title":{"rendered":"getarg calls srand() ???"},"content":{"rendered":"<p>storage\/ndb\/test\/src\/getarg.c<\/p>\n<p>Guess what? It calls srand(time(NULL)) in getarg(). Why you ask? well.. what you want to be able to when specifying a flag is have it be true, false or it could &#8220;maybe&#8221; be set.<\/p>\n<p>That&#8217;s right kids&#8230; maybe.<\/p>\n<p>I&#8217;m sure it&#8217;s used somewhere in our test suite to get coverage on different things.. but umm.. yeah, interesting discovery for today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>storage\/ndb\/test\/src\/getarg.c Guess what? It calls srand(time(NULL)) in getarg(). Why you ask? well.. what you want to be able to when specifying a flag is have it be true, false or it could &#8220;maybe&#8221; be set. That&#8217;s right kids&#8230; maybe. I&#8217;m &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2008\/10\/08\/getarg-calls-srand\/\">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_post_was_ever_published":false,"_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}},"categories":[14],"tags":[54],"class_list":["post-1223","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-ndb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-jJ","jetpack-related-posts":[{"id":813,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/04\/02\/record-autotest-numbers-for-ndb\/","url_meta":{"origin":1223,"position":0},"title":"Record autotest numbers for NDB","author":"Stewart Smith","date":"2007-04-02","format":false,"excerpt":"So, with a bunch of recent tests I added (and some bugs that have been fixed) we're now consistently getting 203 or 204 passing tests. We've got typically around 8 or 9 that often fail - often because the test may be broken or not quite deterministic. Or there's a\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":694,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/05\/10\/how-auto_increment-is-implemented-in-ndb\/","url_meta":{"origin":1223,"position":1},"title":"How auto_increment is implemented in NDB","author":"Stewart Smith","date":"2006-05-10","format":false,"excerpt":"I was writing this in an email to a co-worker today, could possibly interest people in the outside world as well. It's a good idea to look at the source at the same time as reading this :) In ha_ndbcluster::write_row(byte*), if (table_share->primary_key != MAX_KEY) { \/* * Increase any auto_incremented\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":578,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/02\/15\/information_schemafiles-querying-disk-usage-from-sql\/","url_meta":{"origin":1223,"position":2},"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":800,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/03\/10\/code-size-of-an-engine-versus-test-suite\/","url_meta":{"origin":1223,"position":3},"title":"Code size of an engine versus test suite","author":"Stewart Smith","date":"2007-03-10","format":false,"excerpt":"If you count the lines of code in the MySQL Cluster (NDB) test suite (mysql-5.1\/storage\/ndb\/test - and exclude the old ODBC stuff) you come up with about 104000 lines of code. This is in contrast to the approximate other 350,000 lines of code for the NDB engine (excluding the handler,\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":1229,"url":"https:\/\/www.flamingspork.com\/blog\/2008\/10\/14\/mysql-cluster-ndb-on-win32-progress\/","url_meta":{"origin":1223,"position":4},"title":"MySQL Cluster (NDB) on Win32 progress","author":"Stewart Smith","date":"2008-10-14","format":false,"excerpt":"Many things have been happenning in the land of NDB on Win32 as of late. I've fixed about 700 compiler warnings (some of which were real bugs) leaving about 161 to go on Win32 (VS2003). We're getting a few more warnings on Win64 (some of which look merely semantic, while\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":904,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/10\/16\/mysql-5122ish-stew1\/","url_meta":{"origin":1223,"position":5},"title":"MySQL 5.1.22(ish)-stew1","author":"Stewart Smith","date":"2007-10-16","format":false,"excerpt":"I've decided to publish my patch series. The goal of the -stew patches is to collect things I find interesting and that at some point could (should) make it into the main MySQL tree (even if others don't think so). It's not designed for use in production.. I don't really\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\/1223","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=1223"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1223\/revisions"}],"predecessor-version":[{"id":1224,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1223\/revisions\/1224"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=1223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=1223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=1223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}