Case insensitive constraint names in MySQL

By default, MySQL takes advantage of case-sensitive filenames on Linux, with lower_case_file_system = OFF and lower_case_table_names = 0 (i.e. the filesystem is case-sensitive, therefore database names are case sensitive; and table names aren’t forced to lower case). In this situation it’s possible to have two different databases whose names differ only in case – for example, Photos and photos – although this should probably be avoided wherever possible!

The FOREIGN KEY Constraints” section of the MySQL manual has this to say about constraint names:

If the CONSTRAINT symbol clause is given, the symbol value must be unique in the database. If the clause is not given, InnoDB creates the name automatically.

This isn’t completely accurate. Internally, InnoDB stores foreign key constraint names as case-insensitive, with the database name prepended. So although onedatabase.b_ibfk_1 is treated as different to anotherdatabase.b_ibfk_1, Photos.b_ibfk_1 and photos.b_ibfk_1 are treated as the same.

So if database names that only differ in case are to be avoided, why might this be a problem? Well, if you want to follow the advice in the MySQL manual, and use lower_case_table_names = 1, you need to change all database names to lower case before using the new setting.

Continue reading

Advertisements
Posted in Uncategorized | Tagged | 1 Comment

Building MySQL from source

After the introduction of the MySQL Enterprise Server, and the subsequent source-only release of Community Server 5.0.33, there was concern that MySQL would no longer provide official binary builds of the free Community Server. Fortunately, these concerns have now been addressed, but we will have to wait longer for binary releases.

In the meantime, you can either find an unofficial build, or build MySQL yourself. I decided to try and build it myself using the free edition of Visual C++.

Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Read only and read/write NFS mounts on Fedora

I share several directories from my Debian server to other machines on the network using NFS. On one of these machines, which runs Fedora Core, some of the directories are mounted read-only, whereas others are mounted read/write. After upgrading to FC6 recently, I noticed that they’d all become read-only.

After looking into this I discovered that starting with 2.6.19, NFS groups directories from the same filesystem on the server, and treats them as the same filesystem on the client. Trond Myklebust, the maintainer of the NFS client, explained in this post to the Linux Kernel Mailing List:

“The new NFS mount code will put those in the same superblock, and whichever directory gets mounted first will determine whether or not the superblock is marked as read-only.”

Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Removing the hard disk from a VAIO VGN-FE31H

Removing the hard disk from a VAIO VGN-FE31H is pretty easy. It’s located on the right hand side of the laptop, at the front (to the right of the touchpad).

Continue reading

Posted in Uncategorized | Tagged | 1 Comment

Installing Windows XP Professional SP2 on a Sony VAIO VGN-FE31H

I recently bought a Sony VAIO VGN-FE31H. It’s a pretty nice laptop, except for all the proprietary software that it comes with. The first thing I wanted to do was reinstall Windows XP from scratch.

I hoped that I would be able to get official drivers for the hardware in the laptop, but for most of the components, only the Sony-provided drivers are readily available. They come pre-installed, and the original driver files can be found in C:\Drivers. They can also be downloaded from the VAIO support web site (under “Preinstalled Drivers”).

Actually installing Windows was a breeze – XP Pro SP2 supports the SATA controller that’s in the VGN-FE31H. On the first boot there were 7 unrecognised devices. With official drivers hard to come by I opted in the end to just use the Sony-provided drivers. The table below describes how to get all the hardware working.

Continue reading

Posted in Uncategorized | Tagged , | 30 Comments

RealPlayer on Fedora Core 6

So you’ve installed Fedora Core 6, and the RealPlayer RPM from here. You go to Applications → Sound & Video → RealPlayer 10, and… nothing happens.

Open up a terminal. Try to run RealPlayer from there. Chances are you’ll see this:

[rich@penguin ~]$ realplay
/usr/local/RealPlayer/realplay.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

This is really easy to fix. Just type

yum install compat-libstdc++-33

and RealPlayer will work, from the terminal or from the Applications menu.

Posted in Uncategorized | Tagged , | Leave a comment

del.icio.us extension for Firefox 2.0

I’m sure that others have pointed this out elsewhere, but it’s easy to get the Firefox extension for del.icio.us working on Firefox 2.0.

Download the extension (delicious.xpi) to your computer, and then:

  • open it up with WinZip, 7-Zip or whatever you use (it’s just a zip file with the xpi extension)
  • extract the install.rdf file
  • find the <em:maxVersion> element (line 24 when I did this), and change the value from 1.5.0.* to 2.0.*
  • put the new install.rdf file into delicious.xpi
  • open the Add-ons window in Firefox (Tools → Add-ons) and drag your new delicious.xpi onto this window
  • install as normal.
Posted in Uncategorized | Tagged , | Leave a comment