Slashdot Mirror


A Tale of Two MySQL Bugs

New submitter Archie Cobbs writes "Last May I encountered a relatively obscure performance bug present in both MySQL 5.5.x and MariaDB 5.5.x (not surprising since they share the same codebase). This turned out to be a great opportunity to see whether Oracle or the MariaDB project is more responsive to bug reports. On May 31 Oracle got their bug report; within 24 hours they had confirmed the bug — pretty impressive. But since then, it's been radio silence for 3 months and counting. On July 25, MariaDB got their own copy. Within a week, a MariaDB developer had analyzed the bug and committed a patch. The resulting fix will be included in the next release, MariaDB 5.5.33."

124 of 191 comments (clear)

  1. who cares? by Anonymous Coward · · Score: 1, Insightful

    mysql is of historical curiosity. At best.

    1. Re:who cares? by Daniel+Dvorkin · · Score: 4, Interesting

      mysql is of historical curiosity. At best.

      I'd be willing to bet there are more deployments of MySQL than of all other standalone RDBMSs combined.

      --
      The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
    2. Re:who cares? by Anonymous Coward · · Score: 1

      Because we all know that's how you tell that something's better.

    3. Re:who cares? by MightyMartian · · Score: 4, Funny

      Because we all know that's how you tell that something's better.

      I'm taking my Betamax tapes and going home! And get off my lawn!

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    4. Re:who cares? by Score+Whore · · Score: 1

      I bet there are more sqlite and berkeleydb's out there than mysql.

    5. Re:who cares? by Anonymous Coward · · Score: 3, Insightful

      Read the post quoted above you fucklord. It had nothing to do with how good MySQL was and everything to do with how "irrelevant" it is even though it's used on every single fucking shared hosting box ever.

      And yes, it sucks.

    6. Re:who cares? by cold+fjord · · Score: 5, Funny

      Some people never learn until you throw a laser disc at them. It smarts enough that they normally don't want a repeat.

      --
      much of left-wing thought is a kind of playing with fire by people who don't even know that fire is hot - George Orwell
    7. Re:who cares? by Blaskowicz · · Score: 1

      That's why he said "standalone" databases, to exclude sqlite. I never knew about Berkeley DB though, lol. It has been seized by Oracle in 2006.

    8. Re:who cares? by Literaphile · · Score: 5, Insightful

      No, but it is how you tell whether something is "of historical curiosity", which obviously MySQL is not, since it's the most popular RDBMS by far.

    9. Re:who cares? by greg1104 · · Score: 3, Informative

      [Citation Needed]. Among industry watchers the two most popular RDBMS systems are considered to be Oracle and Microsoft's SQL Server. MySQL is in the same ballpark, but it certainly doesn't have a large lead. Here's one survey showing that via a few metrics they combine. You'll get the same sort of ranking if you dig into most market surveys.

    10. Re:who cares? by bill_mcgonigle · · Score: 2

      I never knew about Berkeley DB though, lol. It has been seized by Oracle in 2006.

      If you work on a FLOSS project that uses BDB, seriously consider if LMDB can work for you as well (or often better).

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    11. Re:who cares? by Literaphile · · Score: 3, Informative
      1. MSSQL is ahead by a whopping 8 points in that scale, 1313 to 1305. Next month, the scores could be reversed.
      2. All that "survey" really measures is how much people are talking about the systems, not their actual usage. I'll bet you'll find MySQL installed on more active servers than Oracle or MSSQL, especially since it's the go-to choice for shared hosting.
    12. Re:who cares? by nedlohs · · Score: 1

      Being better is irrelevant to whether something is "of historical curiosity" or is actually in widespread current use.

      Maybe you should learn to read?

    13. Re:who cares? by greg1104 · · Score: 3, Insightful

      You might not agree with their methodology, but I did provide a reference for my claim. You should try it some time. Betting on a hunch is not a path to successful argument.

    14. Re:who cares? by Literaphile · · Score: 1

      "The DB-Engines Ranking does not measure the number of installations of the systems, or their use within IT systems." ( http://db-engines.com/en/ranking_definition )

    15. Re:who cares? by znrt · · Score: 2

      [Citation Needed]. Among industry watchers the two most popular RDBMS systems are considered to be Oracle and Microsoft's SQL Server. MySQL is in the same ballpark, but it certainly doesn't have a large lead.

      well, in terms of price/performance ratio mysql/mariaDB simply cannot be beaten :D

      bytheway, as someone who grew up in engineering using db2, I can tell you oracle and sqlserver are two steaming piles of expensive crap. if you use them, you are doing it wrong, you should look for more value for your money.

    16. Re:who cares? by flimflammer · · Score: 1

      Who said anything about better? We're talking about irrelevance.

    17. Re:who cares? by smittyoneeach · · Score: 1

      Correct. Also correct: "lose".

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    18. Re:who cares? by marcello_dl · · Score: 5, Interesting

      The confusion arising from the fact that oracle mysql shares the same name with the former mysql, while mariadb which is philosophically the natural heir of the latter had to choose a different name.

      Apparently Oracle did the right thing by buying up the name, many fall for it and many others mod them up. Depressing, huh.
      And now you all proper slashdotters are thanking God that something named "postgresql" has basically no marketing value, aren't you.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    19. Re:who cares? by Anonymous Coward · · Score: 1

      [Citation Needed]. Among industry watchers the two most popular RDBMS systems are considered to be Oracle and Microsoft's SQL Server. MySQL is in the same ballpark, but it certainly doesn't have a large lead.

      well, in terms of price mysql/mariaDB simply cannot be beaten :D

      bytheway, as someone who grew up in engineering using db2, I can tell you oracle and sqlserver are two steaming piles of expensive crap. if you use them, you are doing it wrong, you should look for more value for your money.

      Fixed that for you. Not everyone uses one database instance with a single user/password for each application. (Not to mention that some weirdos think that's the right way to handle it and require full db access for their software.) If you need to have more than a 1 to 1 mysql to php setup you need a database with a workable user management.

    20. Re:who cares? by hairyfeet · · Score: 1

      Incorrect as SQLlite isn't a stand alone which was clearly a qualifier. A word of advice, best not to correct other's for spelling as you will often make a mistake as bad or worse.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    21. Re:who cares? by hairyfeet · · Score: 2

      Or maybe, just maybe, nobody trusts old "three card Monty" not to sell their work out from under them again? last I checked old Monty still made you sign rights over to him, how much you wanna bet if some corp comes flashing a big check that you'll be saying the same bullshit about mariadb?

      Fool you once, shame on me. Fool you twice? You are a moron and deserve what you get.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    22. Re: who cares? by JPeMu · · Score: 1

      Let me guess: Your advice here to "other's" (sic) was just your attempt at irony?

    23. Re:who cares? by viperidaenz · · Score: 1

      I don't know any rdbms that requires a single user/password for each application.

    24. Re: who cares? by Dr_Barnowl · · Score: 1

      He's using the possessive sense. Spelling is something that the other possesses. Seems correct to me.

    25. Re:who cares? by WaffleMonster · · Score: 3, Insightful

      I'd be willing to bet there are more deployments of MySQL than of all other standalone RDBMSs combined.

      I'd be willing to bet there are more deployments of SQLite than all other standalone RDBMSs combined.

    26. Re:who cares? by KiloByte · · Score: 1

      Especially as BDB got relicensed to a non-free license.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    27. Re:who cares? by WaffleMonster · · Score: 1

      Incorrect as SQLlite isn't a stand alone which was clearly a qualifier. A word of advice, best not to correct other's for spelling as you will often make a mistake as bad or worse.

      What specifically makes SQLlite not a "standalone" database?

    28. Re:who cares? by marcello_dl · · Score: 1

      when a behemoth like Oracle signs a contract, they know exactly what they buy. Monty can sell whatever he owns to whoever he likes, IMHO. It's nothing compared to violation of GPL terms, for example. It's a good idea to keep the source and license of every important piece of software you use, for exactly those reasons, and consider work signed over to someone else as LOST.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    29. Re:who cares? by RaceProUK · · Score: 3, Informative

      What specifically makes SQLlite not a "standalone" database?

      The 'server' is embedded in the application, which means one instance per app instance. A true standalone RDBMS runs (a minimum of) one instance that multiple (instances of) apps query.

      --
      No colour or religion ever stopped the bullet from a gun
    30. Re: who cares? by tao · · Score: 1

      Nope. If he was intending to use possessive sense then that "for" shouldn't be there.

      Either he meant "others' spelling" ("other people's spelling") or "someone else's spelling" or "others about spelling" (ok, I admit, "for" might possible correct too -- English is not my native tongue, nor am I a language scholar). "other's for spelling" doesn't make sense.

    31. Re:who cares? by Jaime2 · · Score: 1

      There are plenty of benchmarks that show MSSQL and Oracle with better price/performance ration than MySQL. Here is an example of a benchmark and here is a random person who did the math and found out that the licensing cost of MSSQL is more than balanced by the lower support cost in a large installation.

      I'm not saying that MySQL isn't a good choice, just that the licensing cost is only a small part of the cost of a DBMS installation, so MySQL being open source really isn't that big of a price advantage unless the installation is very small. And for small customers, both Microsoft and Oracle have a free option.

    32. Re:who cares? by RaceProUK · · Score: 1

      I can understand you missing the word 'standalone' - it's not like it's a long word at all.

      --
      No colour or religion ever stopped the bullet from a gun
    33. Re:who cares? by nabsltd · · Score: 1

      If you need to have more than a 1 to 1 mysql to php setup you need a database with a workable user management.

      I don't see how the MySQL user rights configuration is any more difficult to use than any other database. Admittedly, it's easy to get bitten if you forget that the login permissions are based on a combination of username and connection source (IP or hostname), which allows a "user" to have different passwords depending on where they are connecting from.

      After that, it's pretty much the same "GRANT" command used by every SQL-based database to give fine-grained access to objects.

    34. Re:who cares? by smittyoneeach · · Score: 1

      I have no idea what you mean by "stand alone". Is there another term which might be helpful?
      One could argue that SQLite doesn't run in a multi-user mode on its own. You'd have to put another process in front of it to serialize requests, if you wanted to serve web site data from it. Is that your point?

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    35. Re:who cares? by nabsltd · · Score: 1

      here is a random person who did the math and found out that the licensing cost of MSSQL is more than balanced by the lower support cost in a large installation.

      Part of the assumptions in the listed prices are that only Microsoft SQL Server won't have a support contract.

    36. Re:who cares? by lsllll · · Score: 1

      Obligatory Link for RDBMS deniers: mySQL vs. MongoDB

      --
      Is that a roll of dimes in your pocket or are you happy to see me?
    37. Re:who cares? by ixs · · Score: 2

      MySQL only for small places?

      That makes no sense. Software licensing costs are always prohibitive at scale.
      For a single machine it doesn't matter if you're adding 1k for the software or not. If you're doing that for 25 machines, it suddenly becomes a lot more important.

      There's a bunch of larger websites around which have somewhere between tens and thousands of database servers around. Usually in a replicated setting which is very heavy on reads and has basically no writes which means they shard their databases in such a way that they fit into available memory and reads never go to disk.

      In such a setting, your software being free is a very important point. Per server or per core licensing kills you there.

      The usual option then is to go with MySQL or PostgreSQL. The latter has only relatively recently gotten acceptable replication so if you've been around a while you nearly always default to MySQL.

      If you're at such a size, you either negotiate a very decent support contract or you forgo that anyway and hire the knowledge in house. I do have worked for a company which did both, I do know that at least Facebook has gone for the latter by hiring Domas. No clue what support contracts they do have. Same for Google.
      If you're at that size, Monty will gladly listen to your needs and Percona will make you a very good deal for support.

      Suddenly MySQL or MariaDB looks like a pretty great database with much better support options and costs than Pg or Oracle. Forget about MSSQL, you're not running anything on Windows at scale.

    38. Re:who cares? by Anonymous Coward · · Score: 1

      All I can think every time I hear about MariaDB is that they missed a golden opportunity to call it OurSQL.

    39. Re:who cares? by hobarrera · · Score: 1

      And that's why Window XP is the best OS around, right?

    40. Re:who cares? by WaffleMonster · · Score: 2

      The 'server' is embedded in the application, which means one instance per app instance. A true standalone RDBMS runs (a minimum of) one instance that multiple (instances of) apps query.

      If my application accesses SQLlite database via odbc is it "embedded" in my application? How is the database not logically a standalone component in this case?

      If my application accesses SQLite database via a socket API does that count?

      SQLite also facilitiates concurrent access via shared memory. The only limit I'm aware of is concurrency model where you basically get one open transaction (excluding temp table) per database but lots of concurrent readers are possible. I'm not so sure I buy what is being implicated that process isolation of data tier itself is the deciding factor. "Standalone database" needs to be evaluated in my view based on logical separation rather than strictly physical process boundaries.

    41. Re:who cares? by RaceProUK · · Score: 1

      ODBC can also load text files and Excel workbooks, neither of which are RDBMSs. A true standalone RDBMS runs as a service or daemon.

      --
      No colour or religion ever stopped the bullet from a gun
    42. Re:who cares? by znrt · · Score: 1

      i'd argue that the sample is too specific. you don't really need extra commited support at the database implementation level unless you have very strong mission critical requirements, and that's the exception, not the norm.

      oss enterprise solutions are that much mature already, most business routinely run oss databases, appservers, reporting and developement tools and even operating systems without incurring in extra support cost. if you really need id, it's there, and of course it will be expensive, because it implies commitment. (just with oss you don't have an agent calling you every other month to tell you how desperately you need it).

    43. Re:who cares? by suutar · · Score: 1

      the rdbms may not, but the dba ought to.

    44. Re:who cares? by Score+Whore · · Score: 1

      sqlite3 not standalone enough? j/k. kinda.

    45. Re:who cares? by hairyfeet · · Score: 1

      So you agree that MariaDB is a lost cause, as Monty makes you sign over ALL rights to him?

      If you trust me in good faith and I rip you off? Then I'm an asshole. If I rip you off and then say "no really,I promise that this time I won't screw you...BTW sign over all your rights to me" and you fall for it AGAIN? Then YOU are the idiot and you deserve what you get.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    46. Re:who cares? by marcello_dl · · Score: 1

      Those who signed over their work to monty do have the open source mariaDB in return, no? That one is as controllable as mysql code (which Oracle can't close down).

      If you don't want to feel cheated do not contribute anything under any license. As I said, GPL violations are way worse, so anything you put under GPL and gets stolen by the chinese manufacturer or the korean big corporation should make you way angrier.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    47. Re:who cares? by Jaime2 · · Score: 1

      Sure, at Facebook and Google scales, license costs are prohibitive. But at the scale of big companies (hundreds of servers), it's not. Another difference is that Facebook and Google mostly run one massively scaled application. That reduces support costs to almost nothing. Medium and large companies run tens or hundreds of applications and every server is a new adventure.

    48. Re:who cares? by ebvwfbw · · Score: 1

      And now you all proper slashdotters are thanking God that something named "postgresql" has basically no marketing value, aren't you.

      I used postgre and learned to love it, then they were bought out by CA I think. Lost them for years and picked them up when RedHat offered it. Then put some big data into it. Then they lost me when I upgraded and lost access to all my data. All of my fucking data! Live system. No idea that would happen. I had a bunch of names that went through my mind from grade school to describe them. I had to move the data to another big machine that hadn't been upgraded, run it and dump the data. Load it into the new system. I think that took me about 18 hours or so. Then I upgraded it to mysql where it still runs today. Hasn't missed a beat I bet in 10 years.

      Sadly some stuff still runs under postgress as it has the geospatial extensions that I need. If it weren't for that, I'd kick it to the side so fast. I feel almost as if it's time for them to screw me again. I know they'll wait until it is a really bad time.

    49. Re:who cares? by fisted · · Score: 1

      >don't have anything to be ashamed of.
      hah.

  2. Why fix it? by Anonymous Coward · · Score: 3, Interesting

    Why would Oracle fix a bug in something they're trying to kill off?

    1. Re:Why fix it? by Pieroxy · · Score: 2

      Apart from the copyright issues, pretty much. They'd better not do it though since they currently have all the copyright to MySQL code and incorporating a patch this way would kill all the advantages to this (namely, the option to close-source MySQL)

    2. Re:Why fix it? by X0563511 · · Score: 1

      Examining the patch would make it stupid-easy for them to go and fix it, without actually applying the patch.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
  3. We need more data by WWJohnBrowningDo · · Score: 4, Interesting

    A sample size of one is insufficient to make any meaningful conclusions.

    Anyone up for scraping the two bug trackers and finding more identical bug reports?

    1. Re:We need more data by Darinbob · · Score: 4, Insightful

      A sample size of one is insufficient to make any meaningful conclusions.

      That sort of thinking won't get you very far in politics.

    2. Re:We need more data by icebike · · Score: 2

      You also have to wonder about the two month delay in sending the bug to mariaDB. Did that allow them to take advantage of some over the beer mug discussion with Oracle employees about who was going to release it first?

      --
      Sig Battery depleted. Reverting to safe mode.
    3. Re:We need more data by zeptic · · Score: 1

      Why don't they do that themeselves?

    4. Re: We need more data by Anonymous Coward · · Score: 1

      If you are waiting for it to get to Red Hat, have you submitted a bug with Red Hat so that they can prioritise and back port the fix to the version of MySQL in RHEL?

    5. Re:We need more data by Ash+Vince · · Score: 1

      You also have to wonder about the two month delay in sending the bug to mariaDB. Did that allow them to take advantage of some over the beer mug discussion with Oracle employees about who was going to release it first?

      Doh. Because if you submitted to both teams at the same time then as soon as one fixed it then the other can just migrate the fix into their code. Of course this could have backfired on him if Oracle had fixed it super quick he would have no way to accurately test the responsiveness of the MariaDB team without finding a similar bug and next time submitting it to MariaDb first.

      As it is though the problem is that as I read the bug report filed with MariaDB it would not surprise me if they fixed this super quick just because they knew Oracle had been a little tardy so this would win them some brownie points and may even get posted to news sites like slashdot.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
  4. Re:A Post with an Agenda by NoNonAlphaCharsHere · · Score: 5, Funny

    Well, DONTGIVEAFUCK is one of the statuses on their Bugzilla. Just sayin'.

  5. This is surprising why? by PhrostyMcByte · · Score: 5, Insightful

    Small projects can be about purity. Making the best possible code base you can. Especially ones where people work on it for free -- they wouldn't be working on it if they didn't deeply believe in it.

    Large corporations have different goals. The success of a changeset is not measured in how many bugs you fix or even how many features you add, but how much positive impact your paying customers and shareholders perceive.

    1. Re:This is surprising why? by brit74 · · Score: 1

      Small projects can be about purity. Making the best possible code base you can. Especially ones where people work on it for free -- they wouldn't be working on it if they didn't deeply believe in it.

      That may be true, but if people are working for free, the project can suffer from an inadequate amount of labor and the existing workers might have trouble getting stuff done in addition to their day job.

    2. Re:This is surprising why? by sjames · · Score: 1

      That doesn't change the equation one iota. Do you want the one that promptly fixes bugs or the one that holds off until the stockholders vote?

    3. Re:This is surprising why? by znrt · · Score: 2

      That may be true, but if people are working for free, the project can suffer from an inadequate amount of labor and the existing workers might have trouble getting stuff done in addition to their day job.

      this does happen in medium-big software companies too. not because of lack of resources, but because of poor management or just because "existing workers might have trouble getting stuff done *right* because of 'other priorities' ".

    4. Re:This is surprising why? by Ash+Vince · · Score: 1

      Small projects can be about purity. Making the best possible code base you can. Especially ones where people work on it for free -- they wouldn't be working on it if they didn't deeply believe in it.

      That may be true, but if people are working for free, the project can suffer from an inadequate amount of labor and the existing workers might have trouble getting stuff done in addition to their day job.

      The bigger problem with when people are working for free is that they generally want to avoid the horrible can of worms bugs that need to be fixed by a shitload of horrible refactoring and concentrate on fixing silly little things instead. The other problem is where they have to do things that seem utterly wrong in principle to the developer like implement a broken and entirely wrong standard but that needs to be done for the sake of the project as a whole. (Disclaimer - I work with SCORM, the defacto broken standard for eLearning)

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
  6. Well... by Ramirozz · · Score: 5, Insightful

    If he would have the right intention to measure response time both bug reports should have been filed at the same time... filing a seocnd one with the text saying "hoping it gets more attention than the competition" is pretty biased and provocative to the actions.

    --
    http://www.quasarcr.com/
    1. Re:Well... by greg1104 · · Score: 1

      Shanking with a rusty spoon? No, now the correct way to describe unfairness on Oracle's side is that you're adding weight to a kingpost.

  7. Not really a fair test by greenreaper · · Score: 5, Insightful

    The poster made a comment in the second bug saying that they hoped to get a faster response than on the MySQL bug.

  8. Re:A Post with an Agenda by Anonymous Coward · · Score: 2, Informative

    The bug report link's in the summary, moron.

  9. fast, but wrong by Anonymous Coward · · Score: 1

    Ok, they fixed it. But did they actually fix it? MySQL is full of places where the developers didn't think about they were doing or cut corners.

    Example: Let's say you want a column that auto-populates with the current time. In most databases, you would write a before insert trigger or have a column default of getdate(). A little extra work, but more flexibility and control. In MYSQL, you just use a timestamp column. What if you want two of them (say, inserted and updated)? Well, fuck you, MySQL can't do that.

    1. Re:fast, but wrong by Anonymous Coward · · Score: 1

      Well, fuck you, MySQL can't do that.

      Then why don't you just write a fucking before insert trigger, just like most other databases? You expect MySQL to act like it's fucking magic and then complain when it's not the magic you want. Fucker.

    2. Re:fast, but wrong by ichthius · · Score: 1

      Well, fuck you, MySQL can't do that.

      Yes you can - since version 5.6.6 (2012-08-07)

      http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-6.html

    3. Re:fast, but wrong by NeverWorker1 · · Score: 1
      Let's not forget how it "enforces" constraints. For example, consider:

      CREATE TABLE emps (id INT(10) AUTO_INCREMENT,
      fname VARCHAR(50) NOT NULL,
      sname VARCHAR(50) NOT NULL);
      INSERT INTO emps (fname) VALUES ('John');

      In a proper RDBMS, that would fail for violating a constraint. MySQL/MariaDB just massage the missing sname into an empty string, which is about as valid as just sticking 'sldfjpsdj;ksdj;fsdljkfsd.'

  10. Worst part by aitikin · · Score: 1

    is it appears the person assigned the bug only has one to work on (or I don't understand how the bug-zilla handles that).

    --
    "Don't meddle in the affairs of a patent dragon, for thou art tasty and good with ketchup." ~ohcrapitssteve
    1. Re:Worst part by NatasRevol · · Score: 1

      More likely, the intern found a more interesting project to work on and is hoping that his/her boss doesn't notice they didn't fix that bug before they go back to school.

      --
      There are two types of people in the world: Those who crave closure
  11. Re:A Post with an Agenda by ShanghaiBill · · Score: 3, Funny

    Has anyone checked with Oracle on the status of this?

    I checked. They said they are waiting for the NSA to approve the code change.

  12. Oracle probably did testing.... by Proudrooster · · Score: 2

    Oracle, love'em or hate'em makes some rock solid databases. The reason for the delay in the patch release was most likely testing and validation of the patch. I am assuming Oracle does this for MySQL but, what do I know?

    1. Re:Oracle probably did testing.... by OhANameWhatName · · Score: 1

      but, what do I know?

      Clearly not a lot, yet still you infer to know a great deal.
      Ever considered getting into politics?

    2. Re:Oracle probably did testing.... by greg1104 · · Score: 1

      Not sure which is funnier; the idea that MySQL is a "rock solid databases" or that Oracle cares about validating its optimizer. I'll just point you at Top 10 Optimizer Regression Bugs in MySQL 5.6 and wander off now.

    3. Re:Oracle probably did testing.... by WaffleMonster · · Score: 1

      Oracle, love'em or hate'em makes some rock solid databases.

      I suppose if you ignore annoying database bugs and endless parade of critical security vulnerabilities I could see this being true.

    4. Re:Oracle probably did testing.... by mybecq · · Score: 1

      Oracle, love'em or hate'em makes some rock solid databases.

      Yes, their databases are so rock-solid it is like getting blood from a stone if you need anything less than a business-critical patch (including fixes that have already been made on another platform) . This has been my experience on at least two separate occasions. I gave up waiting for a fix for a TCP-connect issue because they don't know how to handle EINTR during a 'connect'.

  13. Re:Translation by Score+Whore · · Score: 2

    Indeed. This "bug" seems pretty stupid. I mean on the submitter's part. Why would any vendor spend much time solving this problem when it should be simple enough not to write such stupid SQL to begin with. Anyone who spent time working on this probably had nothing much better to do.

    I mean really, I get it, but what is the use case for 'if a constant is equal to a different constant'?

  14. What about 10 year old mysql bugs? by the_B0fh · · Score: 4, Interesting

    For example, #1341. 10 fucking years old.

    #68892 - best comment on the bug: 'Not quite sure how the severity scales are generally used, but shouldn't a trivial command that breaks the one feature that is being splatted all over the homepage as having significant improvements be a little higher than "non-critical" ?'

    What about stupid shit like this: http://www.darkreading.com/database/expect-a-surge-in-breaches-following-mys/240001958?cid=nl_DR_daily_2012-06-14_html&elq=7e0510c44883432fa8e79c2ebde2ecb8 "The vulnerability itself is in the way MySQL accepts passwords -- the bug makes it such that there's a one in 256 chance that the wrong password will still grant the user access to an account. So an endless loop of attempts will eventually grant an attacker access. It was a bug so unique that Moore says some MySQL developers ran into it, couldn't reproduce it ,and eventually chalked it up as a fluke."

    Is MySQL even ACID compliant yet, without addons?

    http://nosql.mypopescu.com/post/1085685966/mysql-is-not-acid-compliant

    1. Re:What about 10 year old mysql bugs? by OhANameWhatName · · Score: 2

      #1341. 10 fucking years old

      Pffft, give Oracle time .. they can best it.

    2. Re:What about 10 year old mysql bugs? by greg1104 · · Score: 4, Informative

      I don't think it's possible for MySQL to get the "C" part in ACID right without a total rewrite, which seems unlikely under Oracle's watch. There used to be all sorts of trivial ways you could insert garbage data into MySQL, things like February 31 being a valid date or numbers going into boolean fields. They added this strict mode as a way to add validation for most of that. But strict is a client setting. All it takes is one client that ignores this, and the engine will still let you put garbage into there--values that are not going to be valid if you later work on them using a strict setting client. If you can put data in one end of that's not correct when read by another client, that's the exact opposite of a "consistent" database. It boggles my mind that anyone finds this acceptable. I guess people who do all their validation on the client are fine with it maybe? I can't explain how people who don't understand databases at all make their decisions.

      I don't follow MySQL closely enough to know if they're still silently truncating data sometimes too, but that's been a nagging problem over the years too. Strong validation of data is like security: you don't just bolt it on later. It's something that needs to be enforced in as many places as possible in the code, if you want any hope of getting it right and bug free. If you actually want data to be validated in all situations, you need to use something like PostgreSQL instead. There even new types you add to the database can execute any check constraint function you want before that data is allowed in, period. That overhead contributes to why MySQL is faster on trivial things, but sometimes you get what you pay for.

    3. Re:What about 10 year old mysql bugs? by olau · · Score: 1

      The popular web frameworks these days have a little bit of wrapper code which maps DB values to native values. So for instance it's impossible to insert an incorrect date as it would not be possible to construct it with the API you have to go through. So in practice, it's not really an issue for new systems.

      Also, while it's lame if MySQL doesn't catch those and I've certainly seen enough legacy DB systems to appreciate the RDBMS-consistency-rules-as-last-iine-of-defence idea, I do think that these days, if you actually encounter such a date in a new system, you've got bigger issues than just data consistency.

    4. Re:What about 10 year old mysql bugs? by the_B0fh · · Score: 1

      Definitely a new way to look at security - yeah, our stuff's shitty, but has there been a huge increase in breakins huh? HUH?! HUH?!! Yeah! So shut the fuck up!

    5. Re:What about 10 year old mysql bugs? by NeverWorker1 · · Score: 1

      Don't forget MySQL's translation of NULLs in NOT NULL constrained fields to 0 or empty strings instead of rejecting the update as a proper RDBMS should. Somebody needs to explain to them that missing data is missing, not 0. I can't tell you how many problems I've seen this cause (ofc, whether and how NULLs should be used is another discussion entirely...).

    6. Re:What about 10 year old mysql bugs? by midom · · Score: 1

      if there'd be really a push for it, all you would need is server-side strict mode enforcement. any software engineering intern can add that feature :) but I guess not too many users really push their vendor for it, do they?

    7. Re:What about 10 year old mysql bugs? by the_B0fh · · Score: 1

      The other AC posted a very interesting article. You should read: http://grimoire.ca/mysql/choose-something-else

  15. Re:Translation by rudy_wayne · · Score: 1, Interesting

    Indeed. This "bug" seems pretty stupid. I mean on the submitter's part. Why would any vendor spend much time solving this problem when it should be simple enough not to write such stupid SQL to begin with. Anyone who spent time working on this probably had nothing much better to do.

    I mean really, I get it, but what is the use case for 'if a constant is equal to a different constant'?

    That's what I thought when the submitter said:

    But when I comment out the 'M002649397' IS NULL OR clause (which has no effect on the result),

    Yes, I guess technically this is a bug, but the obvious answer seems to be "Don't write stupid code in the first place". If you can take it out with no effect on the result, then why is it in there in the first place?

  16. Re:Translation by Anonymous Coward · · Score: 1

    There is no such thing as a stupid bug. As for stupid posts that one is still up in the air.

  17. Oracle "support" by Neo-Rio-101 · · Score: 1

    This is no surprise to anyone who makes Oracle support calls for a living.

    Unless you bump up the severity to the highest level, you can expect months of wait and all-around handsitting.

    --
    READY.
    PRINT ""+-0
  18. Re:Translation by Blaskowicz · · Score: 1

    Yea, I trust you on accurately reporting this.

  19. Re:Translation by squiggleslash · · Score: 1

    I'm guessing if the SQL is generated programatically, you might get a constant = constant clause, although I'm having difficultly thinking of any sane situation where that would occur.

    --
    You are not alone. This is not normal. None of this is normal.
  20. 'foo' is null is a user problem by Ice+Station+Zebra · · Score: 1

    The optimizer is correct in making it run poorly, it is poor sql to begin with. If anything it should throw an error instead of accepting garbage.
    If I saw you putting that in a project I would quickly fire you arse. Heck, I'd probably fire you for using mysql to begin with.

    1. Re:'foo' is null is a user problem by Anonymous Coward · · Score: 1

      I have a sneaking suspicious that the query is the result of a prepared statement, dealing with NULL and NON-NULL strings:

      WHERE ? IS NULL
            OR ? = column_name

    2. Re:'foo' is null is a user problem by KiloByte · · Score: 1

      The documentation explicitly says cases like this are optimized away. This also makes writing parametrized queries easier: you don't need to care about optional arguments, as the server will do this for you.

      I agree with you about using mysql, though.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    3. Re:'foo' is null is a user problem by Tridus · · Score: 1

      If the documentation says it does, then yes, it is in fact the optimizers job.

      If it's not actually going to do it, then they shouldn't say it will.

      --
      -- "So they told me that using the download page to download something was not something they anticipated." - Bill Gates
  21. Oracle will have the patch when they buy MariaDB by Macchendra · · Score: 2

    Do all the dedicated volunteers think their work won't be sold to Oracle? Also, they wouldn't want to break compatibility with this: http://www.oracle.com/technetwork/database/migration/mysql-093223.html

  22. Re:Translation by ultranova · · Score: 3, Insightful

    If you can take it out with no effect on the result, then why is it in there in the first place?

    Dynamic query generation? The literal might actually be a variable on the client side - say, the contents of some optional string.

    --

    Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  23. Re:Translation by Derek+Pomery · · Score: 2

    Yep.
    select 1 from
    table where
    (? IS NULL OR foo = ?) and
    (? IS NULL OR bar = ?) and
    (? IS NULL OR baz = ?)

    where foo, bar and baz are all optional.

    --
    -- perl -e'print pack"H*","6e656d6f406d38792e6f7267"' /. ate my old sig. Bastards.
  24. Re:Oracle will have the patch when they buy MariaD by greg1104 · · Score: 3, Insightful

    Yup, MariaDB is playing the same copyright assignment tricks that Monty used before, so that he could leverage community work yet still sell MySQL as a business. No reason to believe he's doing anything different this time. When the FSF asks for copyright assignment, that's acceptable because they have never breached the trust of their contributors. But when Monty does it, you have to assume he's setting things up so he can cash out again.

  25. coalesce by tepples · · Score: 1

    -- coalesce returns the first argument that is not null
    select 1 from
    table where
    (coalesce(?, foo) = foo) and
    (coalesce(?, bar) = bar) and
    (coalesce(?, baz) = baz)

    1. Re:coalesce by Derek+Pomery · · Score: 1

      That doesn't seem to be a big improvement on readability to me, but sure, why not :)

      --
      -- perl -e'print pack"H*","6e656d6f406d38792e6f7267"' /. ate my old sig. Bastards.
    2. Re:coalesce by tepples · · Score: 1

      The big advantage of COALESCE is that you don't have to specify each optional element twice.

    3. Re:coalesce by Derek+Pomery · · Score: 1

      Ah. Good point. Avoids a bit of spam in the binds. Fair 'nuff.

      --
      -- perl -e'print pack"H*","6e656d6f406d38792e6f7267"' /. ate my old sig. Bastards.
    4. Re:coalesce by Derek+Pomery · · Score: 1

      But, eh... Only works for the simple case I guess...
      (? IS NULL OR foo LIKE '%'||?||'%') AND
      (? IS NULL OR bar = ?) AND
      (? IS NULL OR (A = ? OR B = ? OR C = ?)) AND
      (? IS NULL OR baz = to_date(?||'-'||?,'YYYY-MM'))

      --
      -- perl -e'print pack"H*","6e656d6f406d38792e6f7267"' /. ate my old sig. Bastards.
  26. Re:Its not really a bug by viperidaenz · · Score: 1

    Not really. It's a failure to calculate an optimal execution plan.
    When the "'foo' IS NULL OR" clause is added, that has no effect on the result is added, the execution plan changes to a sub-optimal one.

  27. Re:Its not really a bug by dotancohen · · Score: 2

    Actually, since many queries are the result of parsing a user's input in some scripting language, such a query is actually feasible.

    --
    It is dangerous to be right when the government is wrong.
  28. Time to RTFBugReport by viperidaenz · · Score: 2

    MySQL bug is lodged with a priority of "S5" - pretty low.
    MariaDB bug is "Major".
    No shit one was fixed before the other.

  29. Re:Its not really a bug by Ottibus · · Score: 1

    Like saying a compiler has a bug if it can't optimise away "if (1 != 2)".

    A compiler does have a bug if it can't optimise away "if (1 != 2)". The following code contains exactly that expression and any decent compiler will optimise away the test and the code in the conditional block.

    #define DEBUG_SUMMARY 1
    #define DEBUG_VERBOSE 2
    .
    .
    #define DEBUG_MODE DEBUG_SUMMARY
    .
    .
    if (DEBUG_MODE != DEBUG_VERBOSE) {
    }

  30. Small project? by dutchwhizzman · · Score: 2

    How is MariaDB a small project and MySQL not? They both share roughly the same codebase and history. MariaDB has paid developers working on it, maybe even more than Oracle has on MySQL. For MariaDB, paying customers are probably more important than for Oracle, since Oracle can afford to lose money on this for a much longer time before they go bankrupt than MariaDB. If anything, the argument about "spending money on something only if it gives an immediate profit" applies way more to MariaDB than to Oracle.

    --
    I was promised a flying car. Where is my flying car?
    1. Re:Small project? by Ash+Vince · · Score: 1

      I was promised a flying car. Where is my flying car?

      Since religious nutjobs started crashing planes into buildings flying cars have been put on the back burner for a while. Sorry.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
  31. Oracle's testing suite is secret. by dutchwhizzman · · Score: 2

    Oracle has kept their testing suite and results closed source and secret. This is one of the reasons why MariaDB decided to do a cold hard fork and not look back. They can't possibly promise compatibility with Oracle since the specs are closed, effectively making the project closed. Assuming that Oracle tests things at all is purely speculation. If anything, regressions mentioned in other comments here suggest they don't do a very thorough job at all and their test suites only include new features and "old" tests, no regressions of bugs that got solved since they closed the testing specs.

    --
    I was promised a flying car. Where is my flying car?
  32. Then what are computers for? by dutchwhizzman · · Score: 1

    The reason we have computers is to help us do complicated stuff. If you want the user to solve all the hard work, you're going to be searching hard to find the users that have the skills to use something. I believe it's the task of the computer (programmer) to make the most stupid users still get their results without breaking anything. It takes away "natural selection", sure, but that's what we humans have been doing since we exist as a species.

    --
    I was promised a flying car. Where is my flying car?
  33. Monty probably won't by dutchwhizzman · · Score: 1

    Why would Monty do it again? He's spending years of his life and a lot of his money to get MariaDB up and going. The risk he will be out of more money, not even counting his time than he'll ever get back is pretty high. For Oracle, MariaDB wouldn't be much of a purchase. They will have to painfully merge the difference in codebase, the developers and customers will all run away instantly and all they'll have left is the diffs. Any other company that wants an RDBMS will gain more from purchasing MariaDB than Oracle. So even if MariaDB gets sold, the most unlikely new owner would be Oracle.

    --
    I was promised a flying car. Where is my flying car?
  34. Users are stupid by dutchwhizzman · · Score: 1

    Users are stupid, automated generators even more. You can't expect people to optimize queries themselves, which is why there is an optimizer in the code. If it brutally fails on something it is supposed to optimize, it's a bug.

    --
    I was promised a flying car. Where is my flying car?
  35. Obscure + Performance - Low Priority by drstevep · · Score: 1

    This demonstrates the difference between commercial/professionally run products and what can be a very ad hoc management style for open products.

    A commercial organization receives a DR and reviews it. The DR is assigned a priority and a severity. Being obscure and performance related, I'd guess that it scored low on both. It doesn't impact security, it doesn't rear its ugly head often. So it won't impact many users, and presumably, the impact won't be that great. As such, and assuming that you have limited resources devoted to a product, it doesn't exactly float to the top of the heap.

    But from the standpoint of code, the defect *might* be interesting! And in a looser environment, interesting trumps utility. Also, the impacted source might be more isolated... meaning to the volunteer "dive right in" developer, it is a more attractive problem to handle.

    I'm not trying to defend Oracle or condemn the MariaDB team. I'm using this as an example of how different development processes and practices (highly managed/cathedral vs. open-uncommitted/bazaar) might yield different results. And how different group goals (further integration of MySQL into the Oracle family vs. ??? for MariaDB) might impact where efforts are place.

  36. Let's be fair to Oracle... by Assmasher · · Score: 1

    ...it takes time to derive a method of generating revenue from a bug...

    --
    Loading...
  37. one bug, why flame? by midom · · Score: 1

    Well, look at it properly, the bug is about optimization of a query that does not make much sense. Sure, it could be done better, but why would you issue such query at all.

    If you look at problems that Oracle/MySQL engineering tackled, they are somewhat different - data compression, online DDL, parallel replication, GTIDs, InnoDB scalability, etc - these were huge efforts and get reasonable focus. Think of all the bugs that were not filed against MariaDB... :)

    Count InnoDB engineers working for Oracle and for Maria, unfortunately that will not be balanced. Even Percona's InnoDB expert Yasufumi Kinoshita ended up working for Oracle lately.

    Sure, Maria can do all sorts of tricks in SQL-land, but it is not the full picture. Oracle has much more engineering power dedicated to supporting MySQL, and they also have customers who are doing bug escalations as well.

    Disclaimer: I used to work at MySQL AB and currently am working on a deployment that builds upon Oracle's MySQL tree, see https://www.facebook.com/MySQLatFacebook

  38. This is a complete troll! by FlyingGuy · · Score: 1

    Calling out a bug for comparing a quoted string to null, eg: '1234mhgt' = null tripping up the optimizer?

    No wonder Oracle is ignoring their asses. I would too!

    --
    Hey KID! Yeah you, get the fuck off my lawn!
  39. Re:Translation by Score+Whore · · Score: 1

    I'm not even sure this is a bug. It's kind of like complaining that my C compiler didn't optimize out my infinite loop:

    int main(int argc, char **argv) {

        printf ("Die bastards\n");
        while (1) ;
        printf("Please die bastards\n");
        exit (-1);
    }

    Whose problem is it?

  40. Why am I not surprised? by whitroth · · Score: 1

    A couple of years ago, I had a tech support call into Oracle for a Sun server. It took them almost a *month* to send out an FE, and that time included two weeks of emailing an engineer on another continent (S. America), and an "in country" engineer... who only worked third shift.

    Oh, and after escalating it, three managers in three days "taking ownership".

    I expect *everything* that Larry buys to be supported that way.

                    mark "wouldn't want to waste money that could be spent on his fighter jet or Hawaian Island...."