One of the things about working with MySQL Community is trying to
reach you all. If you are reading this then we have reached
you. Talking about community is frankly about where our
community exists, where you chat and feel comfortable. To that
end we've created a poll about where you might be intrested in
hearing *from* us. Please, do let us know which social network you are
interested in here from us!
There is no ulterior motive, the poll is anonymous, but it gives
us some crucial information on where you want to interact with
us, or where we might begin to ask the questions.
Check out the poll.
Welcome to the 156th edition of Log Buffer, the weekly review of database blogs.
Oracle
Jonathan Lewis gets things rolling with his post, Empiricism. Jonathan asks his readers if an empirical approach to tuning would be appropriate for a particular wait scenario.
Doug Burns was also looking into wait times, beginning, “Sometimes you think a subject is understood so well, including by yourself, that you tend to overlook it until asked to explain it. That which seems intuitive to us …
[Read more]
MySQL GIS functions don't seem to include a Midpoint function;
it's trivial to write one, but I thought posting this might save
someone a few minutes. Enjoy!
DROP FUNCTION IF EXISTS midpoint;
DELIMITER //
CREATE FUNCTION midpoint(line GEOMETRY)
RETURNS POINT DETERMINISTIC
BEGIN
IF NumPoints(line) != 2 THEN
RETURN NULL;
END IF;
RETURN GeomFromText(CONCAT('POINT(',(X(StartPoint(line))
+X(EndPoint(line))) / 2,'
',(Y(StartPoint(line))+Y(EndPoint(line))) / 2,')'));
END //
DELIMITER ;
The feature I announced some time ago http://www.mysqlperformanceblog.com/2009/06/08/impossible-possible-moving-innodb-tables-between-servers/ is now available in our latest releases of XtraBackup 0.8.1 and XtraDB-6.
Now I am going to show how to use it (the video will be also
available on percona.tv).
Let's take tpcc schema and running standard MySQL ® 5.0.83, and
assume we want to copy order_line table to different server. Note
I am going to do it online, no needs to lock or shutdown server.
To export table you need XtraBackup, and you can …
[Read more]
I'm pleased to announce the release of the Memcached Functions
for MySQL, version 1.0.
This release contains several changes, per the ChangeLog:
1.0 Thursday, July 30, 2009 12:00:00 EST 2009
* Fixed issue of setting NULLs with user-defined variables
(Thanks to
Jean-Jacques Moortgat at aol dot com !)
* Fixed issue of obtaining a NULL value FROM memcached
* All set functions now return 0 (failure) or 1 (success)
* Other cleanups
* More tests
Importantly, there was an issue that I blogged about several days
ago where in the UDF API, if you pass a user-defined variable
that is set to NULL to memc_set(), the length of the argument is
8192 even though the value of the argument itself is NULL, which
caused much unhappiness in MySQL (crash). That is fixed by
setting the length to 0 if the argument itself is NULL. Also
fixed is obtaining the NULL value from memcached using …
When open source goes bad. Is open source a success or failure? And more.
Follow 451 CAOS Links live @caostheory on Twitter and
Identi.ca
“Tracking the open source news wires, so you don’t have
to.”
When open source goes bad
The H reported
on the apparent turmoil at the CentOS project, while Jay Lyman
offered the CAOS perspective. Meanwhile
Slashdot reported that Alan Cox has quit as Linux TTY
subsystem maintainer.
Success or failure?
Danny Windham, Digium CEO, …
I realized the other day that I need the sleep() function, which
up until this morning, Drizzle did not have, for testing the
memcached Drizzle UDFs. Well, now it does:
drizzle> select sleep(3);
+----------+
| sleep(3) |
+----------+
| 0 |
+----------+
1 row in set (3 sec)
drizzle> select sleep(0);
+----------+
| sleep(0) |
+----------+
| 0 |
+----------+
1 row in set (0 sec)
drizzle> select sleep(20);
+-----------+
| sleep(20) |
+-----------+
| 0 |
+-----------+
1 row in set (20 sec)
As you see, it returns zero, just as the MySQL sleep() function
does.
The code can be had at:
lp:~capttofu/drizzle/sleep
I’m going to be giving a talk at the PHP user group here in Portland, OR on August 11th. Details can be found here. If you’re in the Portland area please join the group and come check it out! This will be similar to the Boston MySQL Meetup group talk I gave earlier this month with Patrick, but with more focus on PHP.
There is a lot happening with Gearman right now. Last week at OSCON we received quite a bit of good feedback with the project which will certainly help direct our priorities moving forward. In the past couple weeks we’ve had the following Gearman releases:
- Gearman C Server and Library 0.9 – This added libsqlite3 and libpq (PostgreSQL) persistent queue support. Thanks to Cory Bennett for the SQLite patch!
- Gearman PHP Extension 0.5.0 – This release includes a few more functions from the C library and bug fixes. Thanks James!
- Gearman Perl XS 0.4 – This release includes a few more functions from …
I was actually exploring inotify-tools for something else, but they can also be handy for seeing what goes on below a mysqld process. inotify hooks into the filesystem handlers, and sees which files are accessed. You can then set triggers, or just display a tally over a certain period.
It has been a standard Linux kernel module since 2.6.13
(2005, wow that’s a long time ago already) and can be
used through calls or the inotify-tools (commandline). So with
the instrumentation already in the kernel, apt-get install
inotify-tools
is all you need to get started.
# inotifywatch -v -t 20 -r /var/lib/mysql/* /var/lib/mysql/zabbix/* Establishing watches... Setting up watch(es) on /var/lib/mysql/mysql/user.frm OK, /var/lib/mysql/mysql/user.frm is now being watched. [...] Total of 212 watches. Finished establishing watches, now collecting …[Read more]