My laptop disk died on Friday.
Although this is a sad occurrence, I was very pleased to find out
that my backup was in good shape, and I was back in working
conditions 30 minutes after the accident.
I don't regret buying a 2 TB firewire hard disk.
That made a huge difference. Last time that I had a breakout,
restoring 50GB from a USB external disk took about 5 hours.
Transferring the same amount of data through a firewire interface
takes now less than 25 minutes. I love technology!
MySQL recommends using the BLACKHOLE engine as a replication
filter. Well it turns out there is a flaw in the implementation
that makes it very dangerous to use it for that. Normally,
when an INSERT is made to a table with an AUTO_INCREMENT column,
MySQL writes a INSERT_ID_EVENT packet into the binary log.
This is broken for INSERT statements executed against a
BLACKHOLE table.
I've opened the bug here:
http://bugs.mysql.com/35178
Let me demonstrate:
mysql> show create table n1\G
*************************** 1. row ***************************
Table: n1
Create Table: CREATE TABLE `n1` (
`c1` int(11) NOT NULL auto_increment,
PRIMARY KEY (`c1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
mysql> show create table n2\G
*************************** 1. row ***************************
Table: …[Read more]
The last leg of the IRC world tour meetup was initially scheduled
for last week, but it had to be changed for technical reasons.
The rescheduled time was announced last week, but nobody took into
account the Daylight Saving Time, which starts on March 9 in
the USA, and on March 30 in Europe. Consequently, the announced
Pacific time is right, but the European time is not. So, let’s
remind what it is:
The IRC meeting with Bob Brewin will take place on
Wednesday, March 12, at 9am PDT, 5pm CET.
For those of you who still live in a single time zone, this
timetable can be helpful.
This quiz is based on an email I got from a somewhat annoyed Jesper Krogh.
btw, I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
Given:
SELECT * FROM car_parts: +---------+---------+-------+--------+ | part_id | car_id | price | weight | +---------+---------+-------+--------+ | 1 | 1 | 2.20 | 3.00 | | 2 | 1 | 3.30 | 5.00 | | 3 | 1 | 4.40 | 7.00 | | 4 | 2 | 2.20 | 9.00 | | 5 | 2 | 3.30 | 11.00 | | 6 | 2 | 4.40 | 13.00 | +---------+---------+-------+--------+
We want to know the least expensive part of each car, and how much that part weighs:
SELECT car_id, MIN(price), weight FROM parts GROUP BY car_id; +---------+------------+--------+ | car_id | MIN(price) | weight | …[Read more]
|
Disclaimer: Forget about my affiliation, this is my personal list of things that I am going to enjoy at the UC. #7 MySQL Proxy : the complete tutorial I shall start with a shameless plug, of course. I am going to enjoy this tutorial for several reasons. |
For starters, it's the first tutorial I get to host at the Users
Conference, and this is understandably satisfactory in
itself.
Then, because it is going to give me the technical room that I
was longing for. I have been writing and speaking about MySQL
Proxy for 10 months, and on every occasion I felt that I had time
or space limitations. There was not enough time to explain all
that we …
You have to love error messages some times. Today in MySQL is was “ERROR 1289 (HY000): The ‘UNKNOWN’ feature is disabled;”
What was even more interesting is the error message and indeed the error number changed across different versions. I took the time to also review the error in the current versions of 5.0, 5.1 and 6.0.
5.0.37/5.0.51a - ERROR 1289 (HY000): The ‘InnoDB’ feature is
disabled; you need MySQL built with ‘InnoDB’ to have it
working
5.1.19/5.1.23/6.0.4 - ERROR 1286 (42000): Unknown table engine
‘InnoDB’
6.0.0 - ERROR 1289 (HY000): The ‘UNKNOWN’ feature is disabled;
you need MySQL built with ‘UNKNOWN’ to have it working
You can read more at Bug #29373
You have to love error messages some times. Today in MySQL is was “ERROR 1289 (HY000): The ‘UNKNOWN’ feature is disabled;” What was even more interesting is the error message and indeed the error number changed across different versions.
I wrote a User-Defined Function that implements the FNV (Fowler-Voll-No) hash function for MySQL. I’m not the first person to do this — in fact, I was inspired by the Google patches for MySQL. But my implementation is a little bit different from most, in a very important way that leads directly to much higher performance, especially suited for the Maatkit tools.
A bit of background: FNV hashing is a very fast hash algorithm
that operates in fixed memory. It is widely used in lots of
important areas in computer science. My implementation requires
absolutely no malloc() calls, which is a darn good
thing because I am not to be trusted with malloc(),
having spent too …
We had the Meetup in Austin featuring Zack Urlocker on March 9th.
He was in Austin for the South By Southwest Festival. Part of
SWSX was Sun's sponsored concert by Seven Mary Three and the
Smithereens. Plus there was the added bonus of meeting members of
the local community and SWSX conference attendees. And it was a
good opportunity for the Texas MySQL-ers to gather together. Long
story short is that we had a great meal, met some very nice
people from Sun, and head lots of great music. Look for the
Sun/MySQL Meetup/Mashup near you. The people are great
and the events are a lot of fun!
--
I was asked which is a better certification for the 'average' PHP
developer : The Developer or DBA? Most of the PHP shops I know of
(or have employed me) are very small and one person has to cover
a lot of territory. This brings us to a 'which came first, the …
Sometimes I see people having great difficulties in describing how to fetch data for a report.They are unable to reason by sets and tend to describe things in procedural terms.Here I'm posting a small example of how you can write a query that reproduces that procedural reasoning and lets the optimizer do the work of translating it into efficient SQL.Say someone has a table structure like this, a