Slashdot Mirror


MySQL & Open Source Code Quality

dozek writes "Perhaps another rung for the Open Source model of software development, eWeek reports that an independent study of the MySQL source code found it to be "in fact six times better than that of comparable commercial, proprietary code." You can read the eWeek write-up or the actual research paper (reg. required)."

11 of 446 comments (clear)

  1. Re:Duh! by pyite · · Score: 3, Informative

    MySQL is not touted as Enterprise because its not Enterprise. Sure, it's fine for running Slashdot, but I wouldn't want it storing mission critical data. Oracle may be slower, but I'd much rather trust it to make sure my data is properly stored than MySQL.

    --

    "Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman

  2. If you would RTFA... by Theatetus · · Score: 5, Informative

    ...they quantified it by dividing verified defects by lines of code. MySQL had 0.09 bugs/KLOC while the "commercial" defect density was 0.53 bugs/KLOC. (Their use of the term "commercial" confused me since MySQL is, after all, a "commercial" project, just an open-source one.)

    --
    All's true that is mistrusted
    1. Re:If you would RTFA... by scrytch · · Score: 4, Informative

      If only it were MySQL just lacking features that would, after much mudslinging at the ideas themselves, be grudgingly retrofitted into a new table type. MySQL's brokenness goes deeper than that.

      MySQL's attitude toward data integrity can be summed up as "if the constraint can't be satisfied, do it half-assed anyway". I find myself having to write application code to manage data integrity with MySQL, something I can take for granted with a real database.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    2. Re:If you would RTFA... by a_ghostwheel · · Score: 3, Informative

      Wrong. Insertion sort (linear or binary) will be efficient way to sort "almost-sorted" data. Plus, commenting phrase "efficient sorts are usually very inefficient" - you have to realize (if you dont know this) - sort algorithms are classified into stable ones (e.g. merge sort) and non-stable (e.g. quick sort).

      Stable algorithms have identical efficiency no matter what kind of order input data had. Non-stable algorithms have predefined best and worst cases.

      But, overall - you will not be able to come up with the data where bubble sort will be best way to sort - usually you will end up using merge or quick sort for large data sets and insertion sort for small data set (some quick-sort implementations use insertion sort during last stages of sorting - when data has been "almost" sorted).

    3. Re:If you would RTFA... by Tassach · · Score: 3, Informative
      Most theoretical work on sorting has assumed randomly-sorted input data
      Bullshit. Every textbook comparison of sort algorithm I've ever seen assumes three cases: nearly-sorted data, random data, and inverse-sorted data. Even if bubblesort were the fastest for nearly-sorted data (Working from memory, I'm pretty sure it would run in O(n) as it's best case), it's still O(n^2) for the other two cases. Quicksort, heapsort, and insertion sort all scale differently; but even assuming their best-case performance is worse than bubblesort's best-case, their worst-case performance is FAR better - typically O(n log(n)) or thereabouts. IIRC, The AWK Programming Language has some excellent sample code which graphs the performance of the major sorting algorithms for different kinds of input.

      I seem to recall that insertion sort is also O(n) on nearly-sorted input, so it would be a much safer choice than bubblesort for the situation you describe. You have to consider best- and worse- case scenerios as well as the nominal path. IMHO, bubble sort has no place outside of an instructional setting.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
  3. Don't generalize! by Junks+Jerzey · · Score: 3, Informative

    This "proves" that MySQL is better than commercial offerings. Good. A lot of people knew that. Hats off to the developers. But...

    1. This cannot be generalized into a property of all open source projects.
    2. It's more a tribute to the architecture and original core developers of MySQL than anything else.
    3. Realize that even though MySQL is an open source product, MySQL AB is the *company* that organizes and pays for MySQL development. So, again, you can't generalize this into something that covers late night hackers working on personal projects in their basements (the open source geek fantasy).

    MySQL is awesome! But let's be careful about this story, okay? It's the over-generalization that gives OSS/Linux advocates a bad name ("The Gimp is equivalent to Photoshop!").

  4. Re:Six times better? by man_of_mr_e · · Score: 3, Informative

    Sadly, this isn't what most people assume it means. Reasoning's software only finds "obvious" defects, such as null pointer assignments. It doesn't (and can't) determine if a bit of code does what it's supposed to do, only that it does whatever it does without any danger of crashing.

    Basically, it's no different from running your code through BoundsChecker or CodeWizard, or any number of other such tools that check for obvious errors (Null pointers, obvious buffer overflows, dangling references, etc..)

    While I have no doubt that MySQL's code is perhaps "cleaner" than your typical unpublished code, I have plenty of doubt that MySQL's code is "better" than unpublished code in terms of efficiency, logic errors, etc..

  5. Re:Duh! by James+Thompson · · Score: 5, Informative

    Need a particular reason? Take your pick. http://sql-info.de/mysql/gotchas.html

  6. Re:Duh! by pyite · · Score: 5, Informative

    Up until recently, MySQL had no transaction or atomic operation support. As such, you need to write application code to trap problems. Whereas with Oracle, when you run an atomic operation, you know without certainty whether the query failed in its entirety. I also believe stored procedure support is somewhat lacking in MySQL (however, there is that new Java function support). The MySQL 3 tree does not enforce constraints which is something most essential for data integrity. MySQL does not have subrow locking, whereas enterprise databases do. Once again, MySQL is great. I use it. However, it is not enterprise.

    --

    "Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman

  7. Re:Duh! by Frymaster · · Score: 3, Informative
    Take your pick. http://sql-info.de/mysql/gotchas.html

    those are just bugs! what about lack of features?

    • no subqueries
    • no stored procedures
    • no triggers
    • no foreign key constraints
    • no updates on joins

    at least there's row-level locking now... finally.

  8. MS SQL Sybase ASE by Anonymous Coward · · Score: 3, Informative

    MS SQL is basically a revamped Sybase. So, on UNIX & Linux you could use Sybase ASE.