<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Richard Fearn</title>
	<atom:link href="http://richardfearn.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://richardfearn.co.uk</link>
	<description></description>
	<pubDate>Mon, 09 Jun 2008 20:05:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Upgrading to Firefox 3</title>
		<link>http://richardfearn.co.uk/2008/06/09/upgrading-to-firefox-3/</link>
		<comments>http://richardfearn.co.uk/2008/06/09/upgrading-to-firefox-3/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 19:52:41 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/?p=29</guid>
		<description><![CDATA[I&#8217;ve been using Firefox 3 for a while now - I&#8217;ve used the portable version on Windows, and Firefox 3 is the default browser on Fedora 9 and Ubuntu 8.04. RC2 was released a few days ago so I think it&#8217;s time to take the plunge and upgrade.
Foxmarks appears to work fine with the beta [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Firefox 3 for a while now - I&#8217;ve used the <a href="http://portableapps.com/apps/internet/firefox_portable/test">portable version</a> on Windows, and Firefox 3 is the default browser on Fedora 9 and Ubuntu 8.04. <a href="http://www.mozilla.com/en-US/firefox/all-rc.html">RC2 was released</a> a few days ago so I think it&#8217;s time to take the plunge and upgrade.</p>
<p><a href="http://www.foxmarks.com/">Foxmarks</a> appears to work fine with the beta versions used by Fedora and Ubuntu, and I&#8217;ve been using a FF3-compatible version with Firefox 2 for a while.</p>
<p>There are a few things that have irritated me so far with FF3:</p>
<ul>
<li>Folders on the Bookmarks Toolbar have an arrow next to them:<br/><br/><img style="float:none" src="/wp-content/uploads/2008/06/ff3-arrows.png" alt="Bookmark folder arrows in Firefox 3" /><br/><br/>This makes the toolbar much wider than it needs to be, so some of my folders drop off the right hand side. Fortunately, the arrows can easily be <a href="http://ubuntuforums.org/showthread.php?t=732134">turned off</a>.</li>
<li>Bookmark separators can&#8217;t have names any more. It doesn&#8217;t look like this will be fixed in the near future, according to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=404983">this bug</a>.</li>
</ul>
<p>Other than that, FF3 seems great. <a href="https://mail.google.com/">Gmail</a> is noticeably quicker, and I like the <a href="http://blog.mozilla.com/blog/2008/04/21/a-little-something-awesome-about-firefox-3/">AwesomeBar</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2008/06/09/upgrading-to-firefox-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chainloading from one grub to another</title>
		<link>http://richardfearn.co.uk/2008/03/14/chainloading-from-one-grub-to-another/</link>
		<comments>http://richardfearn.co.uk/2008/03/14/chainloading-from-one-grub-to-another/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 20:21:17 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2008/03/14/chainloading-from-one-grub-to-another/</guid>
		<description><![CDATA[If you install two (or more) Linux distributions on one machine, then by default they both install grub to the master boot record (MBR). The second distribution&#8217;s grub menu therefore overwrites the first.
For example, on my laptop, I have Windows on /dev/sda2, Fedora 8 on /dev/sda5 and Debian 4.0 (etch) on /dev/sda7. Having installed them [...]]]></description>
			<content:encoded><![CDATA[<p>If you install two (or more) Linux distributions on one machine, then by default they both install grub to the master boot record (MBR). The second distribution&#8217;s grub menu therefore overwrites the first.</p>
<p>For example, on my laptop, I have Windows on <code>/dev/sda2</code>, Fedora 8 on <code>/dev/sda5</code> and Debian 4.0 (etch) on <code>/dev/sda7</code>. Having installed them in that order, I ended up with Debian&#8217;s grub menu, allowing me to boot into Debian or Windows.</p>
<p>It&#8217;s tempting to copy all the Fedora grub entries into Debian&#8217;s grub menu file to regain access to Fedora, but if the Fedora kernel gets updated, you have to manually update the Debian grub menu file to include the new Fedora entries. Fortunately, there is a better way: have two grub installations, and allow them to chainload each other.</p>
<p><span id="more-26"></span></p>
<p>The idea is to install each distribution&#8217;s grub into the boot record of its own partition, in addition to also having grub installed in the MBR (this is the one that you see first when the machine is switched on). The reconfiguration can all be done by booting into one distribution (because you can access the other distribution&#8217;s grub menu file by mounting its partition from the distribution you boot into). I booted into Debian and setup Fedora first:</p>
<pre class="scrolling">
grub> root (hd0,4)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0,4)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,4)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,4)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0,4) /boot/grub/stage2 p /boot/grub/grub.conf "... succeeded
Done.
</pre>
<p>Then Debian:</p>
<pre class="scrolling">
grub> root (hd0,6)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0,6)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,6)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,6)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0,6) /boot/grub/stage2 p /boot/grub/grub.conf "... succeeded
Done.
</pre>
<p>If you want to change the &#8220;main&#8221; grub menu (the one that comes up when you first switch on the machine), you can do that too. Notice that this time grub gets installed to the MBR due to the <code>(hd0)</code>:</p>
<pre class="scrolling">
grub> root (hd0,4)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,4)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
</pre>
<p>Now you need to add the appropriate entries to each distribution&#8217;s grub menu file. For Fedora edit <code>/boot/grub/grub.conf</code>:</p>
<pre class="scrolling">
title Debian grub
    root (hd0,6)
    chainloader +1
</pre>
<p>For Debian, edit <code>/boot/grub/menu.lst</code>:</p>
<pre class="scrolling">
title           Fedora grub
root            (hd0,4)
chainloader     +1
</pre>
<p>Now I get a &#8220;Debian grub&#8221; option in the Fedora grub menu, and a &#8220;Fedora grub&#8221; option in the Debian grub menu. Whenever I update either distribution, any new grub entries are added to the appropriate grub menu and I don&#8217;t need to tinker with the menu files.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2008/03/14/chainloading-from-one-grub-to-another/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Booting the Fedora installer with PXE</title>
		<link>http://richardfearn.co.uk/2008/02/02/booting-the-fedora-installer-with-pxe/</link>
		<comments>http://richardfearn.co.uk/2008/02/02/booting-the-fedora-installer-with-pxe/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 17:41:27 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2008/02/02/booting-the-fedora-installer-with-pxe/</guid>
		<description><![CDATA[Launching the Fedora installer over the network, as well as having a local mirror of the Fedora repository, means you don&#8217;t need to burn a CD or DVD. It&#8217;s a convenient way of trying out a new distro.
I&#8217;ve done this for Fedora 8. I have a local Fedora repository on my Fedora 7 gateway. You [...]]]></description>
			<content:encoded><![CDATA[<p>Launching the Fedora installer over the network, as well as having a local mirror of the Fedora repository, means you don&#8217;t need to burn a CD or DVD. It&#8217;s a convenient way of trying out a new distro.</p>
<p>I&#8217;ve done this for Fedora 8. I have a local Fedora repository on my Fedora 7 gateway. You need a working DHCP server, which I won&#8217;t cover here. To get the network boot working I did this:</p>
<ol>
<li>install <code>tftp-server</code>. Ensure it&#8217;s enabled (<code>chkconfig tftp-server on</code>).</li>
<li>install <code>syslinux</code>. Copy <code>/usr/lib/syslinux/pxelinux.0</code> into <code>/tftpboot</code>.</li>
<li>create the directory <code>/tftpboot/fedora8</code> and copy the contents of <a href="http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/i386/os/images/pxeboot/"><code>Fedora/i386/os/images/pxeboot</code></a> into it.</li>
<li>create the directory <code>/tftpboot/pxelinux.cfg</code> and put this <a href="/files/pxe/default">default</a> file in that directory.</li>
<li>add the following options to your <code>dhcpd.conf</code> (change <code>111.222.333.444</code> to your server&#8217;s IP address):
<pre>
next-server 111.222.333.444;
filename "pxelinux.0";
</pre>
</li>
</ol>
<p>If you boot the client machine, it should automatically boot the Fedora installer.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2008/02/02/booting-the-fedora-installer-with-pxe/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building pssh using Cygwin</title>
		<link>http://richardfearn.co.uk/2007/10/04/building-pssh-using-cygwin/</link>
		<comments>http://richardfearn.co.uk/2007/10/04/building-pssh-using-cygwin/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 19:06:09 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[Palm]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2007/10/04/building-pssh-using-cygwin/</guid>
		<description><![CDATA[This is how I build pssh on Windows XP, using Cygwin and prc-tools.

Install Cygwin
Firstly install Cygwin. When asked for the Download Site, enter http://prc-tools.sourceforge.net/install and click &#8220;Add&#8221;. Now choose this new site, and also choose a mirror close to you (Ctrl-click to select multiple sites in the list).
I find it easier to click the &#8220;View&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>This is how I build pssh on Windows XP, using Cygwin and prc-tools.</p>
<p><span id="more-24"></span></p>
<p><strong>Install Cygwin</strong></p>
<p>Firstly install Cygwin. When asked for the Download Site, enter <a href="http://prc-tools.sourceforge.net/install">http://prc-tools.sourceforge.net/install</a> and click &#8220;Add&#8221;. Now choose this new site, and also choose a mirror close to you (Ctrl-click to select multiple sites in the list).</p>
<p>I find it easier to click the &#8220;View&#8221; button to get the &#8220;Full&#8221; listing of packages - a flat list, ordered alphabetically by package name. In addition to the packages that are installed by default, you will also need:</p>
<ul>
<li>gcc-g++</li>
<li>make</li>
<li>pilrc</li>
<li>prc-tools</li>
<li>prc-tools-arm</li>
</ul>
<p><strong>Palm SDK</strong></p>
<p>I&#8217;ve always used a slightly older copy of the SDK, <code>palmos-sdk-5.0r3-1.tar.gz</code>. I&#8217;m not sure if this file is still available. An SDK is still available from <a href="http://pdn.palm.com/">Palm Developer Network</a>, but I don&#8217;t think pssh can be built with it - not without modifying the code, anyway.</p>
<p>Create a directory in the Cygwin root called <code>PalmDev</code>, and unpack the SDK in there (which will create a directory called <code>sdk-5r3</code>).</p>
<p>Now you need to type <code>palmdev-prep</code> to make the dev tools find the SDK:</p>
<blockquote><pre>
Checking SDKs in /PalmDev
  sdk-5r3       headers in 'include', libraries in 'lib'

When GCC is given no -palmos options, SDK '5r3' will be used by default

Writing SDK details to configuration files...
...done
</pre>
</blockquote>
<p><strong>Build pssh</strong></p>
<p>Next you need to download:</p>
<ul>
<li>the pssh source code, from <a href="http://www.sealiesoftware.com/pssh/">http://www.sealiesoftware.com/pssh/</a></li>
<li>the peal source code, from <a href="http://www.sealiesoftware.com/peal/">http://www.sealiesoftware.com/peal/</a></li>
<li><a href="http://www.sealiesoftware.com/pssh/dist/libc.a">libc.a</a> and <a href="http://www.sealiesoftware.com/pssh/dist/libgcc.a">libgcc.a</a></li>
</ul>
<p>Unpack the two zip files somewhere. You&#8217;ll have two directories, <code>pssh-source-2005_06_23</code> and <code>peal-2005_4_14</code>. Put the two <code>.a</code> files in the same directory.</p>
<p>pssh expects peal to be in a directory called <code>peal</code>, so rename <code>peal-2005_4_14</code> to <code>peal</code>.</p>
<p>Go into <code>peal/postlink</code>, and build <code>peal-postlink</code> by typing <code>make</code>.</p>
<p>Now go into the <code>pssh-source-2005_06_23</code> directory and build pssh by typing <code>make</code>. This should create <code>pssh.prc</code>, the Palm application.</p>
<p>Don&#8217;t worry about the final error:</p>
<blockquote><pre>
open pssh.prc
make: open: Command not found
make: [install] Error 127 (ignored)
</pre>
</blockquote>
<p>As long as you have <code>pssh.prc</code>, the build was successful.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2007/10/04/building-pssh-using-cygwin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pre-queue content-filter connection overload</title>
		<link>http://richardfearn.co.uk/2007/08/24/pre-queue-content-filter-connection-overload/</link>
		<comments>http://richardfearn.co.uk/2007/08/24/pre-queue-content-filter-connection-overload/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 18:54:28 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2007/08/24/pre-queue-content-filter-connection-overload/</guid>
		<description><![CDATA[Ever since updating my gateway to Fedora 7, I&#8217;ve been getting messages like this in my daily Logwatch:
84&#160;&#160;&#160;*Warning: Pre-queue content-filter connection overload
Worrying that I might be losing mail, I looked at the logwatch script for postfix in /usr/share/logwatch/scripts/services/postfix, and discovered that this message refers to lost connections from clients whose IP addresses are unknown - [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since updating my gateway to Fedora 7, I&#8217;ve been getting messages like this in my daily Logwatch:</p>
<p><code>84&nbsp;&nbsp;&nbsp;*Warning: Pre-queue content-filter connection overload</code></p>
<p>Worrying that I might be losing mail, I looked at the logwatch script for postfix in <code>/usr/share/logwatch/scripts/services/postfix</code>, and discovered that this message refers to lost connections from clients whose IP addresses are unknown - in other words, entries in the postfix log that look like this:</p>
<p><code>Aug 24 19:44:17 gateway postfix/smtpd[29089]: lost connection after CONNECT from unknown[unknown]<br />
</code></p>
<p>This happens when postfix doesn&#8217;t know the IP address of the client, probably because the client is &#8220;disconnecting&#8221; before the connection to postfix is properly established.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2007/08/24/pre-queue-content-filter-connection-overload/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Slow NFS mount in Ubuntu 6.10 (Edgy Eft)</title>
		<link>http://richardfearn.co.uk/2007/05/22/slow-nfs-mount-in-ubuntu-610-edgy-eft/</link>
		<comments>http://richardfearn.co.uk/2007/05/22/slow-nfs-mount-in-ubuntu-610-edgy-eft/#comments</comments>
		<pubDate>Tue, 22 May 2007 19:37:07 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2007/05/22/slow-nfs-mount-in-ubuntu-610-edgy-eft/</guid>
		<description><![CDATA[NFS mounts were taking ages using Ubuntu. The server was OK (I&#8217;d used it from other Linux clients without any problems).
I noticed this in the logs:

May 22 20:32:37 penguin kernel: [17181317.116000] portmap: server localhost not responding, timed out
May 22 20:32:37 penguin kernel: [17181317.116000] RPC: failed to contact portmap (errno -5).
May 22 20:33:12 penguin kernel: [17181352.116000] [...]]]></description>
			<content:encoded><![CDATA[<p>NFS mounts were taking ages using Ubuntu. The server was OK (I&#8217;d used it from other Linux clients without any problems).</p>
<p>I noticed this in the logs:</p>
<pre style="font-family:monospace;background:#eeeeee;overflow: auto;white-space:pre">
May 22 20:32:37 penguin kernel: [17181317.116000] portmap: server localhost not responding, timed out
May 22 20:32:37 penguin kernel: [17181317.116000] RPC: failed to contact portmap (errno -5).
May 22 20:33:12 penguin kernel: [17181352.116000] portmap: server localhost not responding, timed out
May 22 20:33:12 penguin kernel: [17181352.116000] RPC: failed to contact portmap (errno -5).
May 22 20:33:47 penguin kernel: [17181387.116000] portmap: server localhost not responding, timed out
May 22 20:33:47 penguin kernel: [17181387.116000] RPC: failed to contact portmap (errno -5).
</pre>
<p>So the obvious solution&#8230;</p>
<pre>
sudo apt-get install portmap
</pre>
<p>Now NFS mounts take a fraction of a second.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2007/05/22/slow-nfs-mount-in-ubuntu-610-edgy-eft/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making the brightness keys work on a VAIO VGN-FE31H</title>
		<link>http://richardfearn.co.uk/2007/04/23/making-the-brightness-keys-work-on-a-vaio-vgn-fe31h/</link>
		<comments>http://richardfearn.co.uk/2007/04/23/making-the-brightness-keys-work-on-a-vaio-vgn-fe31h/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 20:17:56 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[VAIO]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2007/04/23/making-the-brightness-keys-work-on-a-vaio-vgn-fe31h/</guid>
		<description><![CDATA[After installing Windows XP on the VGN-FE31H, the screen brightness keys (Fn-F5 and Fn-F6) no longer work. To make them work again you need to install some of the utilities that ship with the laptop, which are also available in the FE3_Utilities.zip download from the Sony web site.

The three utilities are:

Utils Installer 1 SonyUtils DLL
Utils [...]]]></description>
			<content:encoded><![CDATA[<p>After installing Windows XP on the VGN-FE31H, the screen brightness keys (Fn-F5 and Fn-F6) no longer work. To make them work again you need to install some of the utilities that ship with the laptop, which are also available in the <code>FE3_Utilities.zip</code> download from the Sony web site.</p>
<p><span id="more-21"></span></p>
<p>The three utilities are:</p>
<ol>
<li>Utils Installer 1 SonyUtils DLL</li>
<li>Utils Installer 2 Sony Shared Library (this one needs a reboot)</li>
<li>Utils Installer VAIO Event Service</li>
</ol>
<p>The &#8220;VAIO Event Service&#8221; needs to be running for the keys to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2007/04/23/making-the-brightness-keys-work-on-a-vaio-vgn-fe31h/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Passing reference data to the success view</title>
		<link>http://richardfearn.co.uk/2007/03/17/passing-reference-data-to-the-success-view/</link>
		<comments>http://richardfearn.co.uk/2007/03/17/passing-reference-data-to-the-success-view/#comments</comments>
		<pubDate>Sat, 17 Mar 2007 12:14:51 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2007/03/17/passing-reference-data-to-the-success-view/</guid>
		<description><![CDATA[When using Spring&#8217;s SimpleFormController, the default behaviour is to pass reference data to the form view, but not to the success view. However it&#8217;s very easy to override this behaviour, and access the reference data from the success view as well.
To do this, override the 4-argument onSubmit method like this:

protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, [...]]]></description>
			<content:encoded><![CDATA[<p>When using Spring&#8217;s <a href="http://springframework.org/docs/api/org/springframework/web/servlet/mvc/SimpleFormController.html"><code>SimpleFormController</code></a>, the default behaviour is to pass reference data to the form view, but not to the success view. However it&#8217;s very easy to override this behaviour, and access the reference data from the success view as well.</p>
<p>To do this, override the 4-argument <code>onSubmit</code> method like this:</p>
<pre style="font-family:monospace;background:#eeeeee;overflow: auto;white-space:pre">
protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
    ModelAndView mav = onSubmit(command, errors);
    Map refData = referenceData(request, command, errors);
    mav.getModel().putAll(refData);
    return mav;
}
</pre>
<p>If you&#8217;ve only implemented the 1-argument <code>referenceData</code> method, don&#8217;t worry; the default 3-argument <code>referenceData</code> just delegates to the 1-argument method, so your implementation will be called.</p>
<p>If you&#8217;re interested, you can see the <a href="http://springframework.cvs.sourceforge.net/springframework/spring/src/org/springframework/web/servlet/mvc/SimpleFormController.java?view=markup">code for <code>SimpleFormController</code></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2007/03/17/passing-reference-data-to-the-success-view/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Case insensitive constraint names in MySQL</title>
		<link>http://richardfearn.co.uk/2007/03/12/case-insensitive-constraint-names-in-mysql/</link>
		<comments>http://richardfearn.co.uk/2007/03/12/case-insensitive-constraint-names-in-mysql/#comments</comments>
		<pubDate>Mon, 12 Mar 2007 21:32:26 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2007/03/12/case-insensitive-constraint-names-in-mysql/</guid>
		<description><![CDATA[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&#8217;t forced to lower case). In this situation it&#8217;s possible to have two different databases whose names differ only in case - for [...]]]></description>
			<content:encoded><![CDATA[<p>By default, MySQL takes advantage of case-sensitive filenames on Linux, with <code>lower_case_file_system = OFF</code> and <code>lower_case_table_names = 0</code> (i.e. the filesystem is case-sensitive, therefore database names are case sensitive; and table names aren&#8217;t forced to lower case). In this situation it&#8217;s possible to have two different databases whose names differ only in case - for example, <code>Photos</code> and <code>photos</code> - although this should probably be avoided wherever possible!</p>
<p>The <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html">&#8220;<code>FOREIGN KEY</code> Constraints&#8221; section of the MySQL manual</a> has this to say about constraint names:</p>
<blockquote><p>If the <code>CONSTRAINT <i>symbol</i></code> clause is given, the <code><i>symbol</i></code> value must be unique in the database. If the clause is not given, InnoDB creates the name automatically.</p></blockquote>
<p>This isn&#8217;t completely accurate. Internally, InnoDB stores foreign key constraint names as case-insensitive, with the database name prepended. So although <code>onedatabase.b_ibfk_1</code> is treated as different to <code>anotherdatabase.b_ibfk_1</code>, <code>Photos.b_ibfk_1</code> and <code>photos.b_ibfk_1</code> are treated as the same.</p>
<p>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 <a href="http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html">advice in the MySQL manual</a>, and use <code>lower_case_table_names = 1</code>, you need to change all database names to lower case before using the new setting.</p>
<p><span id="more-19"></span></p>
<p>Say you have this database:</p>
<blockquote><p><code>CREATE DATABASE Photos;<br />
USE Photos;<br />
CREATE TABLE a (one INT PRIMARY KEY) TYPE=InnoDB;<br />
CREATE TABLE b (one INT PRIMARY KEY, FOREIGN KEY (one) REFERENCES a(one)) TYPE=InnoDB;<br />
</code></p></blockquote>
<p>Notice the constraint on table <code>b</code>. Now you want to change the database name to <code>photos</code>, so you create a new database with that name, dump the tables and data from the old database with <code>mysqldump</code>, and then try to import them into the new database. You&#8217;ll get this error:</p>
<blockquote><p><code>ERROR 1005 (HY000) at line 42: Can't create table './photos/b.frm' (errno: 121)</code></p></blockquote>
<p>This slightly cryptic message is telling you that table <code>b</code> can&#8217;t be created in database <code>photos</code> - because the constraint name you&#8217;re trying to use in <code>photos</code> (lower case) is already used in <code>Photos</code> (upper case). The full details of the error can be seen in the output from <code>SHOW INNODB STATUS</code>:</p>
<blockquote><p><code><br />
070312 21:31:27 Error in foreign key constraint creation for table `photos/b`.<br />
A foreign key constraint of name `photos/ba_ibfk_1`<br />
already exists. (Note that internally InnoDB adds 'databasename/'<br />
in front of the user-defined constraint name).<br />
Note that InnoDB's FOREIGN KEY system tables store<br />
constraint names as case-insensitive, with the<br />
MySQL standard latin1_swedish_ci collation. If you<br />
create tables or databases whose names differ only in<br />
the character case, then collisions in constraint<br />
names can occur. Workaround: name your constraints<br />
explicitly with unique names.<br />
</code></p></blockquote>
<p>There are a number of ways to get around this:</p>
<ul>
<li>drop the old database before importing into the new one;</li>
<li>remove the constraints from the old database before importing into the new one;</li>
<li>manually change the constraint names in the export file before running the import.</li>
</ul>
<p>Since MySQL 5.0 doesn&#8217;t allow a database to be renamed, it&#8217;s worth bearing this is in mind if you&#8217;re going through the <code>mysqldump</code> and import procedure to rename a database, where the old and new database names differ only in their case.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2007/03/12/case-insensitive-constraint-names-in-mysql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building MySQL from source</title>
		<link>http://richardfearn.co.uk/2007/02/25/building-mysql-from-source/</link>
		<comments>http://richardfearn.co.uk/2007/02/25/building-mysql-from-source/#comments</comments>
		<pubDate>Sun, 25 Feb 2007 14:45:22 +0000</pubDate>
		<dc:creator>Rich</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://richardfearn.co.uk/2007/02/25/building-mysql-from-source/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>After the <a href="http://www.planetmysql.org/kaj/?p=64">introduction of the MySQL Enterprise Server</a>, and the subsequent <a href="http://www.planetmysql.org/kaj/?p=83">source-only release of Community Server 5.0.33</a>, there was concern that MySQL would no longer provide official binary builds of the free Community Server. Fortunately, these concerns <a href="http://www.planetmysql.org/kaj/?p=84">have now been addressed</a>, but we will have to wait longer for binary releases.</p>
<p>In the meantime, you can either <a href="http://www.mysqlperformanceblog.com/2007/01/19/mysql-binaries-availability/">find an unofficial build</a>, or build MySQL yourself. I decided to try and build it myself using the free edition of Visual C++.</p>
<p><span id="more-18"></span></p>
<p>The MySQL Reference Manual contains <a href="http://dev.mysql.com/doc/refman/5.0/en/windows-source-build.html">instructions for building from source on Windows</a>. All you need is Visual C++ 2005 Express Edition, and the Platform SDK. Don&#8217;t use the links in the MySQL instructions; just follow steps 1 to 4 on this page: <a href="http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/">Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK</a>.</p>
<p>Now just follow the <a href="http://dev.mysql.com/doc/refman/5.0/en/windows-source-build.html#windows-vc-plus-plus-build">instructions for building using VC++</a>, bearing in mind the following:</p>
<ul>
<li>although the instructions refer to Visual Studio 7.1, they also apply to Visual C++ 2005 Express Edition;</li>
<li>when opening the .sln file, allow the Visual Studio Conversion Wizard to convert the solution.</li>
</ul>
<p>The solution should build and you should end up with <code>mysqld-nt.exe</code> and <code>mysql.exe</code> (the server and client respectively) in <code>SRC/client_release</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://richardfearn.co.uk/2007/02/25/building-mysql-from-source/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
