Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 32361 to 32370 of 45496 « Previous | Next »
MySQL Locks (and a bit of the Query Cache)

MySQL uses locks for concurrency control. Whenever a client/thread acquires a lock, it will have exclusive access to that table or row (depending on the granularity of the lock). Other clients however, will be prevented from writing and possibly reading to/from the locked resource. The two main existing locks are:

READ LOCK – A read lock will allow the other clients to read from the locked resource but not write to it.
WRITE LOCK – a write lock will prevent the other clients from reading or writing to the locked resource.

Also, different storage engines have different lock granularity. For example, MyISAM will lock the whole table while InnoDB will only lock the rows it needs.

Let’s try this out using a MyISAM table. We open two concurrent sessions and in the first lock the City table from the world database (get it …

[Read more]
This should *never* happen!

While playing around with the great MySQL Activity Reporter , I ran into the following error.

[client 192.168.254.72] PHP Fatal error: strftime() [function.strftime]: Timezone database is corrupt - this should *never* happen! in /var/lib/mysqlard/mysqlar.php on line 62

Now the error is clear .. the Timezone database is corrupt and I`m the one to blame for .. this was on a pretty stripped down Centos that lives in UTC. So there wasn't a real Timezone database.

Obviously a quick apt-get install tzdata solved the problem, but once again the lesson is.. don't strip too much .. you'll eventually endup needing those 3 Kb of free space you gained anyhow.

my use case of 5.1 on mysql.com

I started to use MySQL 5.1 in a production environment at the beginning of August 2008. My purpose was to log all my web visits (more than 1 million pages per day) and to calculate real-time and on-demand statistics.
New features such as partitioning and event scheduler gave to me the opportunity to solve some problem.

I sent my “use case” to the competition proposed by mysql.com and now there’s an article on the developer section of the site where you can read what I did.
If you like, please read it.

(If you are here following the link on the article on mysql.com … don’t mind … and thanks)

This should *never* happen!

While playing around with the great MySQL Activity Reporter , I ran into the following error.

[client 192.168.254.72] PHP Fatal error: strftime() [function.strftime]: Timezone database is corrupt - this should *never* happen! in /var/lib/mysqlard/mysqlar.php on line 62

Now the error is clear .. the Timezone database is corrupt and I`m the one to blame for .. this was on a pretty stripped down Centos that lives in UTC. So there wasn't a real Timezone database.

Obviously a quick apt-get install tzdata solved the problem, but once again the lesson is.. don't strip too much .. you'll eventually endup needing those 3 Kb of free space you gained anyhow.

Alpha release v05.05 of the BLOB Streaming Engine


Alpha version 5.05 of the BLOB streaming engine for MySQL has been released. You can download the source code from www.blobstreaming.org/download. The documentation has also been updated .
What's new in 5.05:

  • A 'C' API has been added for client applications. It provides all the basic functions needed to connect to the BLOB streaming engine and upload and download BLOBs efficiently.
  • A test client application has been added to the project to demonstrate the use of the new API.
  • Added discover table support for the engine's system tables.
  • Simplified the configuration: To configure the engine all you have to do is provide the path to the MySQL source tree (after building MySQL). All build options are taken from the MySQL build.
  • And of course …
[Read more]
OWASP Israel 2008 Conference

If you are living in Israel, you have a chance to get more information about GreenSQL. Next Sunday on 14/09/2008 I am giving presentation about GreenSQL on OWASP Israel 2008 Conference.

At this event I am going to talk about MySQL security and how GreenSQL can help you to leverage your protection level. New version GreenSQL SQL firewall will be described.

Update: here you can find the presentation.

Table of Contents

This is a list of all entries published on the NetBeans PHP blog. Features

[Read more]
The NULL-safe equal to operator

Here is a little tid bit about a useful MySQL extension to the SQL standard, since I have given this same hint to several people in a short timeframe. A good friend from good old Berlin who runs a site for selling car parts was the first to ask, so I am giving him credit for bringing this nifty operator back to mind. Essentially the problem is that frequently we want to easily handle matching against some value or NULL with the same code. Obviously the standard expects you to switch from the standard equal operator to "IS" for matching a NULL. After all NULL is not equal to anything. Right, but its tedious to handle this in the code so MySQL invented the "<=>" operator aka the "NULL-safe equal to operator". Also very useful in combination with prepared statements.

Side note: I must …

[Read more]
MySQL University Session on OpenSolaris Web Stack — 11 Sep 2008

Tomorrow, there’s a particularly interesting MySQL University session coming up: The OpenSolaris Web Stack.

This session is presented by key experts outside the Database Group, but inside Sun:

  • Jyri Virkki, lead for OpenSolaris Web Stack community, Sun Microsystems
  • Murthy Chintalapati, Web Stack development, Sr Engineering Manager, Sun Microsystems

For practical reasons, this session happens three hours later than normal. To decipher that into a timezone which may be familiar to you, this means 9:00 PST / 16:00 UTC / 17:00 GMT / 18:00 CET.

Abstract:

OpenSolaris Web Stack is an OpenSolaris project and community building an integrated stack of …

[Read more]
MySQL University Session tomorrow: OpenSolaris Web Stack

Tomorrow (Thursday, 11th of September) at 9:00 PST/16:00 UTC/17:00 GMT/18:00 CET, there will be an new free MySQL University Session. MySQL University started as an internal training program for MySQL engineers, to share and spread knowledge about their areas of expertise and has been available to the public for quite some time now. It covers a wide range of technical topics around the MySQL Server and usually takes place once per week.

For the first time, the presentation will not be performed by (former) MySQL employees/developers, but by two of our "Sun Classic" colleagues: Jyri Virkki (OpenSolaris Web Stack community lead) and Murthy Chintalapati (Sr Engineering Manager, Web Stack development) will talk about the …

[Read more]