Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Previous 30 Newer Entries Showing entries 31 to 60 of 234 Next 30 Older Entries

Displaying posts with tag: Development (reset)

Upcoming developer/sysadmin days about MySQL and Solaris
Employee +1 Vote Up -0Vote Down
The folks at OTN have been very busy — among many others (both virtual and in RL), there are two upcoming developer/sysadmin days about MySQL and Solaris. Both will take place in California next month:
  • On Tuesday, May 03, 2011, 8:00am to 4:00 pm, there will be the OTN Developer Day for MySQL in the Oracle Santa Clara Agnews Campus Auditorium. It will cover application development with MySQL, performance tuning tips and managing MySQL environments.
  • On Tuesday, May 17, 2011, 8:00 am to 4:00 pm, the OTN's first
  [Read more...]
Quickly testing MySQL builds without “make install”
Employee +3 Vote Up -0Vote Down

There is a lot happening in mysql-trunk nowadays, and it’s a pain to have to keep pulling from the tree, building, installing and configuring to some test location etc. (unless you have that scripted, which I used to in the past).

Marc Alff showed me a tip a while ago to not have to do the install/config stage, and I thought it was worth sharing – it’s how I keep up to date with trying out the new things that I see fly by in the commits list.

First, you of course need to be able to build the

  [Read more...]
A hidden options file trick
+7 Vote Up -0Vote Down
I was listening today to the OurSQL Episode 36: It's Not Our (De)fault! Part 1. As usual, Sheeri and Sarah are very informational and entertaining while explaining the innards of MySQL and their best practices.
Being a DBA oriented show, there was an omission in this podcast. There was no mention of custom groups that you can have for your my.cnf. This is mostly useful for developers. If your application requires some specific settings, instead of using a separated configuration file, you can use a different group, and then instruct your client applications to use that group.
By default, all client applications read the "[client]" group.
But you can tell your client to read a group that you can call whatever you like.
For example, with this



  [Read more...]
Example of a Basic ODBC (MSSQL Server) Query using PHP
+0 Vote Up -4Vote Down

An example of a basic ODBC (MSSQL Server/DSN-Less) query using PHP.

Example of Result Set Returning One Row

1
2
3
4
5
6
7
8
9
$szDBConn="DRIVER={SQL Server};SERVER=SQLServerNameHere;DATABASE=DatabaseNameHere";
$szDBUsername="UsernameHere";
$szDBPswd="PasswordHere";
$szDBQuery="SELECT FooBar, Foo_Bar, Foo_ID FROM FoobarSubscribers WHERE FooID=777";
$rDBConnect = odbc_connect($szDBConn, $szDBUsername, $szDBPswd);  
$rDBRes = odbc_exec($rDBConnect, $szDBQuery);
$szLastCheck = odbc_result($rDBRes, "LastCheck");
odbc_free_result($rDBRes);
odbc_close($rDBConnect);

Example of Result Set Returning Multiple Rows in an Object

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$szDBConn="DRIVER={SQL
  [Read more...]
A last look at 2010... and what's in sight?
+0 Vote Up -0Vote Down

For a few years, I've tried to recap here some events I've found notable over the past year and offering some guesses on what might be ahead of us. I'm somewhat late on these things this year, due to being busy with other stuff, but I didn't want to break the tradition, no matter how silly my wrong guesses might seem later. And again, others have covered generals, so I'll try to focus on specifics, in particular as they relate to what I do. For a look at what we achieved for Habbo, see my recap post on the Sulake blog.

This time last year Oracle still had not successfully completed the Sun acquisition due to some EC silliness, but that finally happened over the 2010. It seems to be

  [Read more...]
oak-hook-general-log: your poor man’s Query Analyzer
+0 Vote Up -0Vote Down

The latest release of openark kit introduces oak-hook-general-log, a handy tool which allows for some analysis of executing queries.

Initially I just intended for the tool to be able to dump the general log to standard output, from any machine capable to connect to MySQL. Quick enough, I realized the power it brings.

With this tool, one can dump to standard output all queries using temporary tables; or using a specific index; or doing a full index scan; or just follow up on connections; or… For example, the following execution will only log queries which make for filesort:

oak-hook-general-log --user=root --host=localhost --password=123456
  [Read more...]
openark-kit (rev. 170): new tools, new functionality
+3 Vote Up -0Vote Down

I’m pleased to announce a new release of the openark kit. There’s a lot of new functionality inside; following is a brief overview.

The openark kit is a set of utilities for MySQL. They solve everyday maintenance tasks, which may be complicated or time consuming to work by hand.

It’s been a while since the last announced release. Most of my attention was on mycheckpoint, building new features, writing documentation etc. However my own use of openark kit has only increased in the past few months, and there’s new useful solutions to common problems that have been developed.

I’ve used and improved many tools over this time, but doing the final cut, along with proper documentation, took

  [Read more...]
Call for Papers: "MySQL and Friends" Developer Room at FOSDEM 2011 (Feb. 5th, Brussels, BE)
Employee +3 Vote Up -0Vote Down

It's that time of the year again — the nice folks at FOSDEM have granted us a developer room at their upcoming conference (February 5+6 2011 in Brussels, Belgium)!

As usual there were more applications than they were able to accommodate, so we are very grateful for this opportunity for collaboration. Titled "MySQL and Friends", our room next year will be H.2213 with a capacity of 100 seats. It will be at our disposal on Saturday 5th, from 13:00 till 19:00. Like last year, we would like to set up a schedule of talks related to the MySQL server and the various

  [Read more...]
Book review: MySQL 5.1 plugin development
+8 Vote Up -0Vote Down
MySQL 5.1 Plugin Development,
by Sergei Golubchik and Andrew Hutchings.
Packt Publishing, 2010.
Executive summary: Highly recommended. If you want to develop MySQL extensions, buy this book. It's a must, written by two expert professionals who probably know more than anyone else on this matter. The book is full of practical examples explained with the theoretical information necessary to make it stick.

This book fills a gap in the world of MySQL documentation. Although the MySQL docs are extensive and thorough, to the point that sometimes you wished that the




  [Read more...]
Thoughts and ideas for Online Schema Change
+6 Vote Up -0Vote Down

Here’s a few thoughts on current status and further possibilities for Facebook’s Online Schema Change (OSC) tool. I’ve had these thoughts for months now, pondering over improving oak-online-alter-table but haven’t got around to implement them nor even write them down. Better late than never.

The tool has some limitations. Some cannot be lifted, some could. Quoting from the announcement and looking at the code, I add a few comments. I conclude with a general opinion on the tool’s abilities.

“The original table must have PK. Otherwise an error is returned.”

  [Read more...]
Scribd is Hiring (I’m Looking for an Operations Engineer to Join My Team)
+0 Vote Up -0Vote Down

Scribd is a top 100 site on the web and one of the largest sites built using Ruby on Rails. As one of the first rails sites to reach scale, we’ve built a lot of infrastructure and solved a lot of challenges to get Scribd to where it is today. We actively try to push the envelope and have contributed substantial work back to the open source community.

Scribd has an agile, startup culture and an unusually close working relationship between engineering and ops. You’ll regularly find cross-over work at Scribd, with ops people writing application-layer code and engineers figuring out operations-level problems. We think we’re able to make that work because of the uniquely talented people we have on the team.

To allow us to keep scaling, we’re now looking to add a

  [Read more...]
Oracle legal move evokes many questions
+9 Vote Up -3Vote Down

There are many questions that arise out of Oracle’s copyright and patent infringement complaint against Google regarding its use of Java in Android. There are several things that make the suit significant to the entire industry: it centers not just on software copyright, but also software patents (an increasingly and hotly debated issue), the quickly-expanding smartphone market and open source software. The first question is: what is Oracle doing?

Many are speculating that this is simply an effort to further and more effectively monetize Java, a storied program language that has move more toward openness and survived several supposed death sentences as newer languages arrived. Still, with all of the open source parts — GlassFish application server, MySQL database, OpenOffice.org suite — is Java the most significant to Oracle? It may be, but regardless of what

  [Read more...]
Table refactoring & application version upgrades, Part II
+0 Vote Up -1Vote Down

Continuing Table refactoring & application version upgrades, Part I, we now discuss code & database upgrades which require DROP operations. As before, we break apart the upgrade process into sequential steps, each involving either the application or the database, but not both.

As I’ll show, DROP operations are significantly simpler than creation operations. Interestingly, it’s the same as in life.

DROP COLUMN

A column turns to be redundant, unused. Before it is dropped from the database, we must ensure no one is using it anymore. The steps are:

  • App: V1 -> V2. Remove all references to column; make sure no queries use said column.
  • DB:
  •   [Read more...]
    Table refactoring & application version upgrades, Part I
    +2 Vote Up -0Vote Down

    A developer’s major concern is: How do I do application & database upgrades with minimal downtime? How do I synchronize between a DB’s version upgrade and an application’s version upgrade?

    I will break down the discussion into types of database refactoring operations, and I will limit to single table refactoring. The discussion will try to understand the need for refactoring and will dictate the steps towards a successful upgrade.

    Reader prerequisites

    I will assume MySQL to be the underlying database. To take a major component out of the equation: we may need to deal with very large tables, for which an ALTER command may take long hours. I will assume familiarity with Master-Master (Active-Passive) replication, with possible use of MMM for MySQL.


      [Read more...]
    Nginx-Fu: X-Accel-Redirect From Remote Servers
    +0 Vote Up -0Vote Down

    We use nginx and its features a lot in Scribd. Many times in the last year we needed some pretty interesting, but not supported feature – we wanted nginx X-Accel-Redirect functionality to work with remote URLs. Out of the box nginx supports this functionality for local URIs only. In this short post I want to explain how did we make nginx serve remote content via X-Accel-Redirect.

    First of all, here is why you may need this feature. Let’s imagine you have a file storage on Amazon S3 where you store tons of content. And you have an application where you have some content downloading functionality that you want to be available for logged-in/paying/premium users and/or you want to keep track of downloads your

      [Read more...]
    Judgment day for open source at Oracle
    +3 Vote Up -0Vote Down

    There are signals of continued problems and dysfunction — namely lack of support, organization and communication — in the OpenSolaris community. This follows on a deterioration of the OS leadership and support since Oracle bought Sun Microsystems, including the elimination of OpenSolaris CDs, one of the things that made the open source version of Solaris more like Linux.

    We had speculated on the fate of Sun open source software under Oracle and while we acknowledged Oracle’s participation in, contribution and commitment to and opportunity from open source software, we

      [Read more...]
    Improving MySQL Productivity – From Design to Implementation
    +2 Vote Up -1Vote Down

    My closing presentation at the dedicated MySQL track at ODTUG Kaleidoscope 2010 discussed various techniques and best practices for improving the ROI of developer resources using MySQL. Included in the sections on Design, Security, Development, Testing, Implementation, Instrumentation and Support were also a number of horror stories of not what to do, combined with practical examples of improving productivity.

    Increasing MySQL Productivity View more presentations from Ronald Bradford.
    SQL: good comments conventions
    +1 Vote Up -0Vote Down

    I happened upon a customer who left me in awe and admiration. The reason: excellent comments for their SQL code.

    I list four major places where SQL comments are helpful. I’ll use the sakila database. It is originally scarcely commented; I’ll present it now enhanced with comments, to illustrate.

    Table definitions

    The CREATE TABLE statement allows for a comment, intended to describe the nature of the table:

    CREATE TABLE `film_text` (
     `film_id` smallint(6) NOT NULL,
     `title` varchar(255) NOT NULL,
     `description` text,
     PRIMARY KEY (`film_id`),
     FULLTEXT KEY `idx_title_description` (`title`,`description`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Reflection of `film`, used for FULLTEXT search.'
    

    It’s too

      [Read more...]
    Ever tried calling a win32ole (COM) object from Ruby’s DRb?
    +1 Vote Up -2Vote Down

    Before we get started here, let me state that I am using Ruby 1.9.1 (I refuse to look back!), and that I have not tested this solution on Ruby 1.8.6, but it should work there as well, though I may have some 1.9-isms in my code. Should be easy enough to spot.

    I am working on writing an application in Ruby that can talk to an Windows application that has an ActiveX COM Automation object exposed. Ruby is basically the wrapper so that I can access the application from the Linux side of the world. So, I am using Ruby’s DRb to bridge those worlds because, after all, I am the Linux Bloke!

    Well, as you may have guessed, I ran into problems with this approach. I simply could not call the COM objects from a call initiated with DRb, though I could call them directly just fine. After scratching my head a bit, I figured it out.

    The win32ole module that runs on the Windows side of the world


      [Read more...]
    Advanced Squid Caching in Scribd: Cache Invalidation Techniques
    +0 Vote Up -0Vote Down

    Having a reverse-proxy web cache as one of the major infrastructure elements brings many benefits for large web applications: it reduces your application servers load, reduces average response times on your site, etc. But there is one problem every developer experiences when works with such a cache – cached content invalidation.

    It is a complex problem that usually consists of two smaller ones: individual cache elements invalidation (you need to keep an eye on your data changes and invalidate cached pages when related data changes) and full cache purges (sometimes your site layout or page templates change and you need to purge all the cached pages to make sure users will get new visual elements of layout changes). In this post I’d like to look at

      [Read more...]
    The Linux Bloke chuckles that Linux runs some Windows software (including Windows itself!) better than Windows does!!!
    +0 Vote Up -0Vote Down

    Our Universe is full of ironies. But some ironies are just too hard to take.

    As you may have guessed (!!!), I am an avid Linux developer and user. Though once upon a time I did develop under Windows. Yes, believe it. And on one particular case, I got to be on a first-name basis with some of the Microsoft Software Engineers to resolve issues we were having with their OLE crap — what the Holy Gods of Microsoft decided to redub as “Active-X”.

    But I digress. For the past 10 years, I have been solid Linux and have defenestrated Windows for the most part. But as you know, you can never really completely eliminate Windows.  Despite your best efforts, it will always be (for now, at least) the 500 pound gorilla in any room you care to be in. The installed software base there is just staggering, and most have no Linux options.

    But then that’s why projects like Wine and the


      [Read more...]
    building MySQL 5.5 with cmake
    +6 Vote Up -0Vote Down
    Yesterday I was testing a branch of MySQL 5.5 to help a colleague, and I was set aback at discovering that, with the default build options, the server did not include the Archive engine.
    In other times, I would have to dig into the build scripts or to examine the output of ./configure --help, but that is no longer necessary. MySQL 5.5 is built using cmake, the cross platform make.
    Why does this change make me feel better? Because cmake configuration is more user friendly than the old autoconf/automake/libtools horror syntax. Not only that, but there is a GUI!
    I am a command line guy, as you probably know, but when the purpose of a GUI


      [Read more...]
    Database schema under version control
    +0 Vote Up -0Vote Down

    How many organization use version control for development? Probably almost every single one.

    How many store the database schema under version control? Alas, not as many.

    Coupling one’s application with table schema is essential. Organization who actively support multiple versions of the product understand that well. Smaller organizations not always have this realization.

    How is it done?

    Ideally

    Ideally one would have:

    • The schema, generated by hand
    • Essential data (INSERT INTO statements for those lookup tables without which you cannot have an application)
    • Sample data: sufficient real-life data on which to act. This would include customers data, logs, etc.

    If you can work this way, then creating a staging environment consists of re-creating the entire schema from out schema

      [Read more...]
    DbCharmer – Rails Can Scale!
    +0 Vote Up -1Vote Down

    Back in November 2009 I was working on a project to port Scribd.com code base to Rails 2.2 and noticed that some old plugins we were using in 2.1 were abandoned by their authors. Some of them were just removed from the code base, but one needed a replacement – that was an old plugin called acts_as_readonlyable that helped us to distribute our queries among a cluster of MySQL slaves. There were some alternatives but we didn’t like them for one or another reasons so we’ve decided to go with creating our own ActiveRecord plugin, that would help us scale our databases out. That’s the story behind the first release of DbCharmer.

    Today, six months after the first release of

      [Read more...]
    How to get your product bundled with Linux distributions
    Employee +2 Vote Up -0Vote Down

    I recently received a question from Robin Schumacher at Calpont, the makers of the InfiniDB analytics database engine for MySQL: "How would you recommend we try and get bundled in with the various Linux distros?"

    Since this question has come up several times before, I thought it might make sense to blog about my take on this.

    First of all, please note that there is a difference between "being part of the core distribution" and "being available from a distributor's package repository". The latter one is relatively easy, the former can be hard, as you need to convince the distributor that your application is worth devoting engineering resources to maintain and support your application as part of their product. It's also a space

      [Read more...]
    A comet over PHProjekt 6
    +0 Vote Up -1Vote Down
    So far PHProjekt 6 (P6, see http://phprojekt.com) is already enhanced with nice AJAX workflows and snappy user-experience. Nevertheless, we discussed a way to provide synchronous communication and direct information within the application.

    Everybody knows GoogleMail with its easy to use frontend. Maybe you use it for your daily work. In GoogleMail, there is no need to refresh the page to receive a new mail, Google informs you automatically whenever a new mail is available. But how is this possible? The answer to this question is really simple: The server triggers a signal informing that a new mail is available. This technology is called Comet and describes a way how the server communicates with the client [see http://en.wikipedia.org/wiki/Comet_(programming) ].

    Is



      [Read more...]
    A comet over PHProjekt 6
    +0 Vote Up -0Vote Down
    So far PHProjekt 6 (P6, see http://phprojekt.com) is already enhanced with nice AJAX workflows and snappy user-experience. Nevertheless, we discussed a way to provide synchronous communication and direct information within the application.

    Everybody knows GoogleMail with its easy to use frontend. Maybe you use it for your daily work. In GoogleMail, there is no need to refresh the page to receive a new mail, Google informs you automatically whenever a new mail is available. But how is this possible? The answer to this question is really simple: The server triggers a signal informing that a new mail is available. This technology is called Comet and describes a way how the server communicates with the client [see http://en.wikipedia.org/wiki/Comet_(programming) ].





      [Read more...]
    Building MySQL Server with CMake on Linux/Unix
    Employee +4 Vote Up -0Vote Down

    CMake is a cross-platform, open-source build system, maintained by Kitware, Inc.

    From the CMake.org home page:

    CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice.

    It has been used for building the MySQL Server on Windows since MySQL 5.0 – the initial CMake build support was added in August 2006.

    For

      [Read more...]
    More MySQL releases
    Employee +5 Vote Up -0Vote Down

    Shortly after I posted my last summary of MySQL releases, our son Mats was born and I went on a 2.5-week vacation. Our developers did not rest in the meanwhile and I'd like to give you a quick update of what's new since then:

    MySQL Connector/Net 6.3.0

    • Visual Studio 2010 RC support
    • Nested transaction scope support

    MySQL Workbench 5.2.16 Beta 6

    • Fixed 67 bugs
    • Saving your profile/connection passwords in OSX keychain, gnome-keyring or in an encrypted password-vault-file.
    • New rapid development features for generating complete SQL
      [Read more...]
    Finishing touches
    +0 Vote Up -0Vote Down

    The book is in its final stages. Right now I am putting the finishing touches to the illustrations and going through the editors’ most recent comments and suggestions. Takes a lot more time than expected, though…

    Previous 30 Newer Entries Showing entries 31 to 60 of 234 Next 30 Older Entries

    Planet MySQL © 1995, 2013, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.