{"id":1104,"date":"2015-08-29T09:58:03","date_gmt":"2015-08-29T09:58:03","guid":{"rendered":"http:\/\/10sa.com\/sql_stories\/?p=1104"},"modified":"2015-09-23T09:58:03","modified_gmt":"2015-09-23T09:58:03","slug":"unusual-mysql-extremely-annoying-bug","status":"publish","type":"post","link":"http:\/\/10sa.com\/sql_stories\/?p=1104","title":{"rendered":"Unusual: MySQL, extremely annoying bug"},"content":{"rendered":"<p>If your architecture uses MySQL replication and you make some ETL transformations and you observed some incredible values in autoincrement columns (i.e. the value dramatically increases &#8211; by hundred of thousands or event millions) &#8211; it means you have just experienced a bug.<\/p>\n<p>Very clear description is presented on site <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=54201\">http:\/\/bugs.mysql.com\/<\/a>.<\/p>\n<p>However, in my case it wasn&#8217;t observed in test environment &#8211; only production.<\/p>\n<p>How to call this event? Autoincrement is leaping, enormous gaps in autoincrement&#8230;<\/p>\n<p>Solution:<\/p>\n<p>Fixed in 5.1+. Documented as follows in the 5.1.64, 5.5.25, and 5.6.6 changelogs:<\/p>\n<p>        Statements using AUTO_INCREMENT, LAST_INSERT_ID(), RAND(), or<br \/>\n        user variables could be applied in the wrong context on the<br \/>\n        slave when using statement-based replication and replication<br \/>\n        filtering server options (see<br \/>\n        <xref linkend=\"replication-rules\"\/>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If your architecture uses MySQL replication and you make some ETL transformations and you observed some incredible values in autoincrement columns (i.e. the value dramatically increases &#8211; by hundred of thousands or event millions) &#8211; it means you have just experienced a bug. Very clear description is presented on site http:\/\/bugs.mysql.com\/. However, in my case [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/posts\/1104"}],"collection":[{"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1104"}],"version-history":[{"count":4,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/posts\/1104\/revisions"}],"predecessor-version":[{"id":1108,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=\/wp\/v2\/posts\/1104\/revisions\/1108"}],"wp:attachment":[{"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1104"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/10sa.com\/sql_stories\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}