<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Software is Crap]]></provider_name><provider_url><![CDATA[https://davmac.wordpress.com]]></provider_url><author_name><![CDATA[davmac]]></author_name><author_url><![CDATA[https://davmac.wordpress.com/author/davmac/]]></author_url><title><![CDATA[MySql 5.1 build documentation &#8211; utter&nbsp;crap]]></title><type><![CDATA[link]]></type><html><![CDATA[<p>I&#8217;m currently experiencing the joy of upgrading from MySql 5.0 to 5.1 on our server. After building MySql with the same &#8220;configure&#8221; options as used previously, then installing it, I run the &#8220;mysql_upgrade&#8221; command, which gives me some alarming output, basically along the lines of:</p>
<p style="padding-left:30px;"><code>mygame.scenarios_tags<br />
Error : Unknown table engine 'InnoDB'<br />
error : Corrupt<br />
mygame.schema_migrations<br />
Error : Unknown table engine 'InnoDB'<br />
error : Corrupt<br />
mygame.screenshot_attachments<br />
Error : Unknown table engine 'InnoDB'<br />
error : Corrupt</code></p>
<p>Unknown table engine? what the&#8230; Corrupt?</p>
<p>So, I go do some googling and reading of manuals (which I suppose I should have done beforehand, sure) and it turns out that in 5.1, the &#8220;InnoDB&#8221; storage engine (the only one worth actually using, as it actually supports locking and transactions) is now a &#8220;plugin&#8221; and you need a configuration option to enable it:<br />
<code></code></p>
<p style="padding-left:30px;"><code>[mysqld]<br />
plugin-load=innodb=ha_innodb_plugin.so</code></p>
<p>Ok, so, problem solved, right? Wrong. I then get the following output in the mysqld log:</p>
<p style="padding-left:30px;">111212 14:27:37 [ERROR] Can&#8217;t open shared library &#8216;/u1/overflow/usr/local/mysql-5.1.60/lib/mysql/plugin/ha_innodb_plugin.so&#8217; (errno: 2 ld.so.1: mysqld: fatal: relocation error: file /u1/overflow/usr/local/mysql-5.1.60/lib/mysql/plugin/ha_innodb_plugin.so: symbol )<br />
111212 14:27:37 [ERROR] Couldn&#8217;t load plugin named &#8216;innodb&#8217; with soname &#8216;ha_innodb_plugin.so&#8217;.</p>
<p>Hmm, not what I call an extremely useful error message. There seems to be some symbol resolution problem, but I don&#8217;t even know what particular symbol it&#8217;s having trouble with. Rather than mess around and trying to debug this, I go back to the build options. When I run &#8220;configure &#8211;help&#8221; I see, amongst other things:</p>
<pre>  --with-plugin-PLUGIN    Forces the named plugin to be linked into mysqld
                          statically.</pre>
<p>Err, what the&#8230; so, if say &#8220;&#8211;with-plugin-innodb&#8221; or something similar, it will link the plugin statically into mysqld? Weird. But hey, it&#8217;s a worth a shot. I try adding that to my &#8220;configure&#8221; options, and it immediately spews out a message saying that it doesn&#8217;t recognize the &#8220;&#8211;with-plugin-innodb&#8221; option! What the hell? I try a few variations but no joy. Getting quite frustrated by now. Ok, the &#8220;configure &#8211;help&#8221; output doesn&#8217;t match what &#8220;configure&#8221; actually accepts, maybe the <a href="http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html">manual</a> will be more update? Hmm, not really; it&#8217;s a bit of a confusing mess actually, and it claims that &#8220;&#8211;with-plugin-PLUGIN&#8221; should work. It does suggest however that no plugins are built by default, and therefore I decide to try the alternative &#8220;&#8211;with-plugins=innodb_plugin,innobase&#8221;. I&#8217;m not really sure if I need &#8220;innobase&#8221; but it seems like it can&#8217;t hurt. Waiting for compilation to finish now&#8230;</p>
<p>&#8230;</p>
<p>Success!</p>
<p>So, compiling without InnoDB support still produced a file called &#8220;ha_innodb_plugin.so&#8221;, which I can&#8217;t actually use? What the?</p>
]]></html></oembed>