<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>GL Software Blog - Databases</title>
    <link>http://www.glsoftware.net/blog/</link>
    <description></description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.3.1 - http://www.s9y.org/</generator>
    <pubDate>Wed, 30 Apr 2008 20:43:13 GMT</pubDate>

    <image>
        <url>http://www.glsoftware.net/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: GL Software Blog - Databases - </title>
        <link>http://www.glsoftware.net/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>MySQL Stored Procedure Caveat</title>
    <link>http://www.glsoftware.net/blog/archives/8-MySQL-Stored-Procedure-Caveat.html</link>
            <category>MySQL</category>
    
    <comments>http://www.glsoftware.net/blog/archives/8-MySQL-Stored-Procedure-Caveat.html#comments</comments>
    <wfw:comment>http://www.glsoftware.net/blog/wfwcomment.php?cid=8</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.glsoftware.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=8</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
        While processing some radar data at the office last week, I ran into a little problem.  I found that individually, two of my stored procedures were working fine, but having one call the other caused problems. It would call the procedure, but it wouldn&#039;t actually do anything.&lt;br /&gt;&lt;br /&gt;
After some investigation, I realized one of my in variables was the same as the name of a field in a select query for a cursor.  What I think MySQL was doing was replacing the value of the in variable into the select query rather than seeing it as a field name.  I&#039;m sure this is still possible to do if you escape the field name with `field_name`  rather than just field_name.  &lt;br /&gt;&lt;br /&gt;
I just wanted to throw this little tidbit of information out there for anyone else running into a similar problem.  Don&#039;t name your in variables the same as a column name!! &lt;br /&gt;
     
    </content:encoded>

    <pubDate>Sun, 27 Apr 2008 07:51:00 -0700</pubDate>
    <guid isPermaLink="false">http://www.glsoftware.net/blog/archives/8-guid.html</guid>
    <category>mysql</category>
<category>stored procedures</category>

</item>
<item>
    <title>Compiling MySQL as a Universal Binary on Mac OS X Leopard</title>
    <link>http://www.glsoftware.net/blog/archives/6-Compiling-MySQL-as-a-Universal-Binary-on-Mac-OS-X-Leopard.html</link>
            <category>MySQL</category>
    
    <comments>http://www.glsoftware.net/blog/archives/6-Compiling-MySQL-as-a-Universal-Binary-on-Mac-OS-X-Leopard.html#comments</comments>
    <wfw:comment>http://www.glsoftware.net/blog/wfwcomment.php?cid=6</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.glsoftware.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=6</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    A few months ago I found an Objective-C framework called SMySQL for connecting to MySQL databases via Objective-C.  I wanted to test it out, so I tried writing a small test program that used it.  That&#039;s when I found out that the SMySQL framework hadn&#039;t been updated since 2006, before Apple switched over to Intel processors.  So I tried my hand at creating a universal binary version of the SMySQL framework.&lt;br /&gt;&lt;br /&gt;
The first thing I realized was that in order to make a universal binary framework that links to MySQL, I also need a universal binary of libmysqlclient (.a and .dylib).  Unfortunately at this time, MySQL is not distributing universal binary versions of mysql.  They only have versions for the individual processor types ppc, ppc64, x86, and x86_64.&lt;br /&gt;&lt;br /&gt;
So we start by downloading the source for MySQL &lt;a href=&quot;http://dev.mysql.com/downloads/mysql/5.0.html#source&quot; title=&quot;MySQL Source Download&quot;&gt;here&lt;/a&gt;. Unarchive that and cd into the mysql source folder.  Now set the following environment variables:&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;bash&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;MACOSX_DEPLOYMENT_TARGET=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;10&lt;/span&gt;.&lt;span style=&quot;color: #cc66cc;&quot;&gt;5&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;LDFLAGS=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;-lz&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;CC=&lt;/span&gt;gcc&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;CFLAGS=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -fno-omit-frame-pointer -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;CPPFLAGS=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;CXX=&lt;/span&gt;gcc&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;CXXFLAGS=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -fno-omit-frame-pointer -fno-exceptions -fno-rtti -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk&quot;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;
These let the ./configure script know that we want to build a universal binary for OS X 10.5.  Next, you need to run the ./configure script with whatever options you want included or disabled in your copy of MySQL.  The only option you&lt;em&gt; must&lt;/em&gt; use as a configure option is &lt;em&gt;&lt;strong&gt;--disable-dependency-tracking&lt;/strong&gt;&lt;/em&gt;.  GCC 4.0 will not build for multiple architectures when using dependency tracking.  Here&#039;s the configure command line I used:&lt;br /&gt;&lt;br /&gt;
&lt;div class=&quot;bash&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;./configure --&lt;span style=&quot;color: #0000ff;&quot;&gt;prefix=&lt;/span&gt;/opt/mysql --with-extra-&lt;span style=&quot;color: #0000ff;&quot;&gt;charsets=&lt;/span&gt;complex --enable-local-infile --enable-largefile --with-innodb --with-big-tables --with-unix-socket-&lt;span style=&quot;color: #0000ff;&quot;&gt;path=&lt;/span&gt;/private/tmp/mysql.sock --with-comment --with-gnu-ld --disable-dependency-tracking --with-federated-storage-engine --with-csv-storage-engine --with-archive-storage-engine --with-blackhole-storage-engine --enable-assembler --enable-static --enable-shared &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;
Once that finishes, run make, and a little while later, you have yourself a universal binary version of MySQL and its libraries.&lt;br /&gt;&lt;br /&gt;
The SMySQL Framework can be found at &lt;a href=&quot;http://code.google.com/p/mysql-cocoa-framework/&quot; title=&quot;code.google.com&quot;&gt;code.google.com&lt;/a&gt;. It was originally written by Serge Cohen and his original project is hosted at &lt;a href=&quot;https://sourceforge.net/projects/mysql-cocoa/&quot; title=&quot;sourceforge.net&quot;&gt;sourceforge.net&lt;/a&gt;.  I attempted to contact Serge via the sourceforge project page to give him a copy of the updated Xcode project but never heard back from him.  
    </content:encoded>

    <pubDate>Thu, 24 Apr 2008 17:59:00 -0700</pubDate>
    <guid isPermaLink="false">http://www.glsoftware.net/blog/archives/6-guid.html</guid>
    <category>mac</category>
<category>mysql</category>
<category>osx</category>
<category>universal binary</category>

</item>

</channel>
</rss>