Forgot your password?
typodupeerror
Databases Programming Software Businesses Google The Internet IT

MySQL to Get Injection of Google Code 195

Posted by ScuttleMonkey
from the who-to-trust-on-replication dept.
inkslinger77 writes to mention that MySQL has published their software roadmap out through 2009 and it includes an injection of code from Google. Google remains relatively secretive about how their systems work but they are one of the largest users of MySQL. Earlier this year Google signed a Contributor License Agreement which provides a framework for them to contribute code to MySQL. "The search company has done a lot of work customizing MySQL to meet its special needs, which include better database replication, and tools to monitor a high volume of database instances, Axmark said in an interview at MySQL's user conference in Paris. MySQL will include some of those capabilities in future versions of its database, probably in point upgrades to MySQL 6.0, which is scheduled for general availability in late 2008, Axmark said."
This discussion has been archived. No new comments can be posted.

MySQL to Get Injection of Google Code

Comments Filter:
  • Injection? (Score:5, Funny)

    by Tetsujin (103070) on Wednesday October 24, 2007 @12:48PM (#21101589) Homepage Journal
    Somehow when I put "SQL" and "injection" together, I don't like the result...

    Well, except for when it involves Little Bobby Tables [xkcd.com]...
    • please enter your email: lpage@google.com' OR 1=1
    • Re: (Score:3, Insightful)

      by Phroggy (441)
      Yeah, I was about to post the same thing. Can we use some different terminology when talking about helpfully contributing code to a database project?
      • by SnowZero (92219)

        Can we use some different terminology when talking about helpfully contributing code to a database project?
        MySQL to get ejaculation of code?

        * ducks *
    • Re:Injection? (Score:5, Insightful)

      by necro2607 (771790) on Wednesday October 24, 2007 @01:52PM (#21102579)
      Yeah, who writes these headlines? It's like, let's throw together the most fucking sensationalist possible combination of words to evoke certain responses in peoples' minds when they read this headline. Instead of just writing something constructive like "MySQL adds code from Google", it has to be some sensationalistic crap so as to make people go "OMG SQL injection?!? Sum1 haxed MySQL??" and immediately read the article. What is this, FOX News or something? :P
      • It's called a pun.
      • My first reading was worse. I read it as something along the lines of "SQL Injection Gets Google's Code." I thought it might have to deal with some weird Google bug that let some hacker view all of their code via a SQL Injection attack.
      • by Ash Vince (602485)
        Or alternatively, you could learn to read properly and not just glance at a few key words and jump to the wrong conclusion. I read the title and instantly understood what it meant. I have not bothered to RTFA in this instance because I am off to sleep and don't have time.

        The fact is that the title is fairly clear. Your suggested title ("MySQL adds code from Google") would be factually wrong since the code is due to be given to MySQL, but it has not happened yet. So the articles title is far better than your
        • by necro2607 (771790)
          Actually, your argument isn't logically sound - I am not required to give a fully-valid alternative in order to point out the sensationalist and reasonably-misrepresenting implications of the article's existing title. It's pretty easy to spot something "wrong" even if you can't provide a better alternative yourself (or don't feel like it). There's not some philosophical/moral obligation to provide an improved alternative (as much as people might like to think so). Of course, if that were the case, we'd b
  • Hells yeah (Score:5, Insightful)

    by rsborg (111459) on Wednesday October 24, 2007 @12:49PM (#21101597) Homepage
    Eat that, Oracle.
    Seriously the database layer is being commoditized, and MySQL and PostgreSQL are leading the way.

    My only question, was Google required to disclose these changes, or are they just doing the right thing (again)?
    • Re:Hells yeah (Score:5, Informative)

      by Dan Berlin (682091) on Wednesday October 24, 2007 @12:58PM (#21101749)
      We don't distribute it, so we aren't required to submit the changes back.
      We of course, try to contribute back all the changes we possibly can.

      If you look around, you'll see we just don't publicize all the changes we contribute back (and we in fact, didn't publicize this one ourselves).
      • Re: (Score:2, Interesting)

        by RobBebop (947356)

        We don't distribute it, so we aren't required to submit the changes back. We of course, try to contribute back all the changes we possibly can.

        Ahh, the Google workaround for the GPL. Selling web-services that RUN Free Open Source Software and NOT selling software. You get to keep the really good changes to yourself. =P

        Personally, I'd like to see Google put there code out there as GPL and risk having a meaningful competitor. The benefit of having some really useful software available for high school and college aged kids to learn from would be immeasurable. Also, the transparency and openness of this would be reminiscent of some of the adva

    • by Bodrius (191265)
      Maybe they're doing the selfish for-profit thing, which can very well be 'the right thing' for everyone else.

      By putting their code back into the main branch, they do not have to carry the perpetual maintenance cost of the fork and get to distribute the development cost across the rest of the mysql devs/users.

    • by Chapter80 (926879)
      MySQL leading the way? I don't think so. Take a close look at their client licensing.

      The one who led the way toward a free database was HP, with their Image product, and later, their SQL version. Image had been free (as in beer) as early as 1975, which is one of the reasons HP gained so much mini-computer market share: Cheap Value-Added-Resellers and Software shops could package their custom software with a database for a reasonable price.

      Win over the developers with cheap price and good tools (ahem

    • Seriously the database layer is being commoditized

      It has been commoditized for some time now, the concept of database was simply too valuable and generic to remain a franchise. Oracle especially and Microsoft more recently have realized this and are now offering their basic packages free of charge. The remaining franchises are in high end clustering and other advanced large scale data performance enhancements which only come into play in very large data centers with large and complex databases. The vast
      • by lilomar (1072448)

        However, the modified program can never be sold or even given away to any external party without triggering the requirement to distribute the source code to all modifications along with it to the external party.
        There, fixed that for you. You only have to distribute the code to the people to whom you are supplying the binary.
  • by y86 (111726)
    It's nice to see them giving back.

    If only Microsoft would give back on all the mods it has made to the Unix tools. Example: http://technet.microsoft.com/en-us/interopmigration/bb380242.aspx [microsoft.com]
    • Re: (Score:3, Informative)

      by Machtyn (759119)
      Do we really *want* Microsoft to give back the code they've made to *nix tools?
      • Anything Microsoft has tried to give to the FLOSS community has had strings attached.
      • Just take a look at any of their OS's, particularly ME and Vista.
      • Take a look at OOXML.
      • Take a look at their "open" license and note that it isn't very open.
      • Even Solitaire has a EULA!

      Okay, so I made that last one up. I'd provide links, but I'm lazy. I'd also try and look up a eula for solitaire, but I should be doing the work I'm actua

  • by Doc Ruby (173196) on Wednesday October 24, 2007 @01:02PM (#21101803) Homepage Journal
    I prefer Postgres to MySQL. I wonder whether these MySQL revisions will be generic enough to use to improve Postgres.

    I also wish these two databases interoperated more. I'd like to use a MySQL proxy to my Postgres server, so apps depending on MySQL could still work, but use Postgres to actually process the data (or just serve as a master DB for replication). Porting apps between DBs, and huge projects to join across different apps' tables in different types of DB servers should be ancient history. Mixed DB-type clusters might not be high performance, but they'd get the iterative development started, after which performance could be just an optimization, which is the right way to do it anyway.
    • Re: (Score:3, Informative)

      by Abcd1234 (188840)
      I prefer Postgres to MySQL.

      Good for you. Of course, your applications may very well be of a different class, and so perhaps Postgres is a better solution. But remember, if you're doing mostly reads, and not a ton of writes, mysql will blow the socks off virtually any other solution. And, coincidentally, that pretty well describes most web applications in general, and probably Google in particular.
      • by Doc Ruby (173196)
        They are different. My apps mostly replace the filesystem with DB records, and do a lot of logging for analysis/reporting.

        Of course, the different scenarios we're discussing mean that MySQL would be best as a datamart frontend to Postgres. I'd love to write everything to a Postgres API, then deploy it with a script that ports the Postgres schema to a MySQL, which MySQL just replicates to the Postgres, and presents the MySQL interface to web apps. While the Postgres retains the master data, and presents an i
        • It allows you to access MySQL from within PostgreSQL. You can also access anything else you can reach via Perl's DBI interface.
      • Re: (Score:3, Informative)

        by shish (588640)

        if you're doing mostly reads, and not a ton of writes, mysql will blow the socks off virtually any other solution.

        I have a site with 3GB of database, updated once daily, in bulk; the rest of the day it's doing several reads per second over the whole thing (indexed so that it can jump to the right parts for each query; but each query tends to hit a different 5-10% of the rows, so all the data is "active"). I found switching from mysql to postgres gave quite a noticable performance increase -- the whole server was no longer crying in pain and grinding to a halt under heavy load~

        Note that the DB server only has 512MB

        • by Mex (191941)
          What the hell is that last emoticon? ":3"

          Is it the elephant man? Is it two eyes and two testicles right below it? Is it the emoticon for "Teabag"?

          I just can't keep up with the internet these days.
      • by LurkerXXX (667952)
        Only if you are using MyISAM tables, which can't enforce foreign key constraints. (meaning you can have junk data and the database won't tell let you input garbage rather than require valid data).

        Personally I prefer the right answer a tenth of a second slower, rather than a wrong answer fast.

        If you use Innodb tables, you have no speed gain over postgresql, and you can't handle the number of concurrent users you could with postgresql.
        • by Abcd1234 (188840)
          Personally I prefer the right answer a tenth of a second slower, rather than a wrong answer fast.

          No, you prefer that the DB give you more guarantees about consistency (yes, you can get by without FK constraints), at the expense of performance. And a tenth of a second would be a *significant* performance improvement for extremely large volume sites.

          Again, it very much depends on the application involved. Pick the right tool for the right job. Sometimes, that's mysql.
    • by jimicus (737525)
      Postgres is completely different under the hood, so I don't think that's terribly likely.

      Bit of a shame in many ways, because while there are commercial addons to Postgres which give decent clustering support - either for HA or performance - AFAICT the free Postgres server can offer very little in the way of clustering.
      • by einhverfr (238914)
        Slony, Pg-pool, and a number of other Free addons provide different approaches to this issue.
    • by laffer1 (701823)
      Isn't there a licensing issue by transplanting to postgres. I was under the impression it was BSDL and MySQL is GPL. Obviously one could use general ideas and implement them again for postgres.

      I'm hoping that MySQL 6 is faster on other operating systems than previous versions. The current design makes many assumptions based on Linux. MySQL is running on many operating systems now and shouldn't be so OS centric. You can get binaries for Windows, Mac OS, Solaris, and many of the BSDs. Some of the FreeBS
      • by Doc Ruby (173196)
        Postgres is under the BSD license [freshmeat.net]. I wonder whether a developer could port the MySQL GPL code directly to Postgres, and release the Postgres diff as patch, under the GPL. Does the GPL prohibit using a GPL patch on a BSD app?
    • by CastrTroy (595695)
      Applications requiring one database or another should be ancient history. However, whenever you look up a how to access MySQL from PHP, you'll find stuff that recommends using all the mysql_* functions. This is the quick way to creating an app that absolutely depends on MySQL. Really people should be using PDO [php.net], instead of mysql_ or pgsql_. Of course the real solution is to use a database abstraction layer, but I've never found a good way to create an n-tier web appliction in PHP.
      • Really people should be using PDO, instead of mysql_ or pgsql_. Of course the real solution is to use a database abstraction layer, but I've never found a good way to create an n-tier web appliction in PHP.

        Well not strictly n-tier [wikipedia.org], you can get pretty darn close with Zend_Db [zend.com] (which contains adapters to PDO), Zend_View [zend.com], and Zend_Controller [zend.com].

        • Man, are you on glue?

          If it has a browser on one end, a database on the other and a web server in the middle, it's an n-tier application. It doesn't even matter if the database is on the same physical server, it's still an n-tier application because the browser isn't directly connecting to the database.

          What you're describing is an application with an MVC architecture running as an n-tier application.

          Hell, if you'd read the link you posted, you'd know that.
          • Is rudeness a badge of honor on slashdot (queue the you must be new here jokes)?

            If it has a browser on one end, a database on the other and a web server in the middle, it's an n-tier application. It doesn't even matter if the database is on the same physical server, it's still an n-tier application because the browser isn't directly connecting to the database.

            You've zoomed the focus out a level - we were talking about the application architecture and database abstraction layers. Yes, of course the web its

            • by flooey (695860)
              Is rudeness a badge of honor on slashdot (queue the you must be new here jokes)?

              I'm not really sure, I'm new here.
      • Re: (Score:3, Informative)

        by ShieldW0lf (601553)
        Here's a simple DB Abstraction layer for Postgres. Just stored procedures, so there's zero possibility for SQL Injection.

        <?php
        class Biz
        {
        // Internal Database Functions
        static private $cs;

        static function SetConnString($connstring)
        {
        Biz::$cs = $connstring;
        }

        static private function SendQuery($q)
        {
        $db = pg_connect(Biz::$cs);
        $r = pg_send_query
        • Re: (Score:3, Insightful)

          by CastrTroy (595695)
          See, that model falls apart once you have a database with 50 tables. Because you have to load and parse a lot of script for every page load. I'm not sure how much (if anything) is cached by PHP, and how much recompiling has to be done on each load. Also, if you want to break you stuff up into a lot of different classes, with each class in a different file, then it quickly becomes a large mess of stuff to include in each page. I find that this is one of the major advantages of having a compiled language.
          • Also, if you want to break you stuff up into a lot of different classes, with each class in a different file, then it quickly becomes a large mess of stuff to include in each page. I find that this is one of the major advantages of having a compiled language.

            Hey, now, as much as I dislike PHP I don't see that "include_once 'foo';" is that much more complicated than "#include ". Also, the "compiled language" concept is a wholly different animal. Having to run a compiler on a piece of code doesn't automatically make it more manageable. Also, I don't know of many purely interpreted languages commonly used anymore. Python compiles to bytecode upon execution (and caches that bytecode for quick startup the next time), as does PHP if you're using any of the free

          • Re: (Score:3, Interesting)

            by ShieldW0lf (601553)
            I've got 86 tables at the moment in my latest project, and 231 stored procedures. It's very easy to manage, very secure, and it's easy to reuse the functionality.

            I don't bother using classes to represent the business objects, I just use database views to control the shape of the data that comes back across the stored procedures and pass the properly formatted arrays to another set of functions that generate the appropriate HTML/XHTML/XML as needed.

            When it comes time to do caching, I'll have the ability to
            • by CastrTroy (595695)
              Got any open source code? I'd like to see an example of how this works.
              • No, but I'm hoping I'll be ready to slashdot my new service by the end of the year if all goes well. Maybe I'll publish parts of it then.
      • by dfetter (2035)

        Applications requiring one database or another should be ancient history.

        Why on earth would that be? Modern DBMSs aren't just data buckets. They're full-on application servers that happen to have a really killer storage subsystem. In the Free Software space, there's only one that's really modern in that sense, and it's not MySQL ;)

        However, whenever you look up a how to access MySQL from PHP, you'll find stuff that recommends using all the mysql_* functions. This is the quick way to creating an app that absolutely depends on MySQL.

        That's only a problem because of MySQL's limitations, not because it maxes out MySQL's capabilities.

        Really people should be using PDO, instead of mysql_ or pgsql_. Of course the real solution is to use a database abstraction layer, but I've never found a good way to create an n-tier web appliction in PHP.

        I've never seen an automatic database abstraction layer that was worth a plugged nickel over the long haul. Other kinds--the kind where you creat

        • Why on earth would that be? Modern DBMSs aren't just data buckets. They're full-on application servers that happen to have a really killer storage subsystem.

          I'd rather have my application live in my application code, not in my database server, and treat the database as a "data bucket". Give me a good database abstraction layer that provides me with the least common denominator so that my application can run on any of the databases supported by the database abstraction layer. For me, the database choice is

          • by einhverfr (238914)
            Ok (I used to think the same way), but you are losing a number of things:

            1) The ability to mathematically define valid data in the RDBMS so your code only has to worry about security implications of data validation
            2) The ability to separate out the SQL from your code so it is not generally included inline in every one of your object classes.

            Pretty much every bug in software can be reduced to a data state bug or a data flow bug. Using the RDBMS properly can eliminate most or all of the former.
      • by einhverfr (238914)
        I will tell you why we selected PostgreSQL to be the only RDBMS supported by LedgerSMB.

        The basic issue is that RDBMS's are often used as light-weight information stores, but they are designed to be powerful math engines which can simplify application development immensely if properly used. You can do some of this using just ANSI SQL, but often you run into limitations which are best solved by using stored procedures basically as named queries.

        The math engine aspects allow us to look at valid data states as
    • Personally, I don't trust MySQL to anything more significant than forum software. Referential integrity is important, strong typing is important, enforcement of declared constraints is important. MySQL can't be trusted with any of these things.

      For a long time, the MySQL team put forth that good design practices were not important. They never did accomplish the task of designing a good table manager. They hobbled along into enterprise space after InnoDB was written by someone else. Now it belongs to Ora
      • by Doc Ruby (173196)
        Me too.

        Do you have a way to make Postgres clustering work as well/easily as MySQL clustering?
        • I couldn't comment about making it work as well as MySQL clustering, but I haven't had any problems with using Slony-I. It can be kind of complicated though. I'm expecting that my latest project is going to need some horizontally partitioned materialized views on the slaves to allow it to scale up effectively.
          • by kv9 (697238)

            I'm expecting that my latest project is going to need some horizontally partitioned materialized views on the slaves to allow it to scale up effectively.
            what, no orthogonal e-enabled sinergies?
            • Those go in Version 2. I'm also adding some pseudo-morphic transformative marketing algorithms that will blow your socks off. You just wait and see.
    • by MobyDisk (75490)
      I think that is nearly impossible. If you want an app to work with multiple databases, then it needs to go against a standard like ODBC and be as close to the ANSI SQL standard as possible.
    • I also wish these two databases interoperated more.

      This can be a sticky issue in software design (i.e. how much support for external systems to include directly in the system). However, it has been my experience that it is better, from a design perspective, to create a standard interface for communications, or use one that has already been defined (W3C Web Services [w3.org] come to mind, but other types are possible) whereby adapters [wikipedia.org] can be built to mediate and facilitate communications between pairs of systems.
    • PostgreSQL is BSD licensed, MySQL is GPL licensed.

      But aside from that, it is unlikely that Google's code contributions go beyond general performance benefits, management of large numbers of systems, and maybe full text search.

      PostgreSQL 8.3 already will have a great, mature full text search capability, is far easier to manage in large environments, and can handle more complex loads than MySQL can. So I don;t think that there is likely to be a lot of useful ideas which could be transplanted.

      Finally, the arc
  • 6.0 in 2008? (Score:4, Insightful)

    by JumboMessiah (316083) on Wednesday October 24, 2007 @01:16PM (#21101977)
    Mysql 5.1 has been in preproduction since November 2005 and still isn't available as a GA release (aka don't use it in production). Are they sure they can get a 6.0 GA release out by next fall?

    This is really good of Google to contribute this back, I'm just wondering how long it will be before we all can utilize their changes. I hate to see the code stay stuck in the devel cycle for three years when Goggle is using it to their advantage right now at this very moment.
    • From what I've heard, the problem is that google's using a MySQL 4.x (pre 4.3 iirc) code base, so they have to rework a lot of code to the current base.
  • by LiquidCoooled (634315) on Wednesday October 24, 2007 @01:44PM (#21102447) Homepage Journal
    They need to add a GOOGLE function to allow queries to be searched nicer.

    SELECT * FROM articles WHERE GOOGLE('boobies');

    something similar might be available but it is a PITA to list the fields to search and specify the operators etc
    • I know your just trying to be funny, but what you are describing already exists in MySQL. It's called FULLTEXT [mysql.com].
    • Re: (Score:3, Funny)

      "They need to add a GOOGLE function to allow queries to be searched nicer.

      SELECT * FROM articles WHERE GOOGLE('boobies');"


      I don't know about MySQL, but you can pretty trivially write extensions to PostgreSQL that do exactly this kind of thing. In fact, I've written a number of such extensions to PostgreSQL that make Google resources seem like local resources in a PostgreSQL database. (This kind of deep and easy customizability is one of the things I find to be a killer feature of PostgreSQL relative
  • by shmert (258705) on Wednesday October 24, 2007 @04:30PM (#21104763) Homepage
    For the Java coders out there, Google is also releasing google collections [google.com], which looks quite nice. There's a new interview here [javalobby.org] with the authors. It's fun stuff to poke around in, and appears to be extremely well-written code.

    Once this stabilizes, I'll probably be using it. It's nice to see such a direct impact on my work from their contributions. Thanks guys!

The best way to avoid responsibility is to say, "I've got responsibilities."

Working...