<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Rails, Stored Procedures, Migrations, Mysql 5+ and &#8230; Trouble!</title>
	<link>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/</link>
	<description>A blog mostly about my ongoing experiences in the software R&#038;D business</description>
	<pubDate>Wed, 20 Aug 2008 09:07:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>

	<item>
		<title>By: Rasmus</title>
		<link>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-3156</link>
		<author>Rasmus</author>
		<pubDate>Mon, 02 Apr 2007 06:59:54 +0000</pubDate>
		<guid>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-3156</guid>
					<description>Hmmm it looks like you've been playing alot with RoR since you have the time to actually work with legacy databases and need to call stored procedures. Though I can think of scenarios where I need to do a stored procedure I try all I can to avoid it. 

One could speculate....  MySql only got SPs in the most recent edition and Oracle have only had them a couple of years... Couldn't we do database driven applications before that?! Or are SPs just MS's way of keeping you on their platform?!?!

Hope to see you soon so we can go into some nerdie discussions about it... ;)</description>
		<content:encoded><![CDATA[<p>Hmmm it looks like you&#8217;ve been playing alot with RoR since you have the time to actually work with legacy databases and need to call stored procedures. Though I can think of scenarios where I need to do a stored procedure I try all I can to avoid it. </p>
<p>One could speculate&#8230;.  MySql only got SPs in the most recent edition and Oracle have only had them a couple of years&#8230; Couldn&#8217;t we do database driven applications before that?! Or are SPs just MS&#8217;s way of keeping you on their platform?!?!</p>
<p>Hope to see you soon so we can go into some nerdie discussions about it&#8230; <img src='http://www.mortench.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Chris R</title>
		<link>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-3177</link>
		<author>Chris R</author>
		<pubDate>Mon, 02 Apr 2007 16:16:51 +0000</pubDate>
		<guid>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-3177</guid>
					<description>@Rasmus:

Cough! Splutter! Oracle have only had stored procedures for a couple of years? I think you should check your history. PL/SQL was first released in *1992* as an optional extension to Oracle 6.</description>
		<content:encoded><![CDATA[<p>@Rasmus:</p>
<p>Cough! Splutter! Oracle have only had stored procedures for a couple of years? I think you should check your history. PL/SQL was first released in *1992* as an optional extension to Oracle 6.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Fung</title>
		<link>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-3863</link>
		<author>Fung</author>
		<pubDate>Thu, 24 May 2007 19:09:53 +0000</pubDate>
		<guid>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-3863</guid>
					<description>Thank you so much!

I have tried executing sql file and hacking the MySql adapter. And found your  solution here by Google.

However, I got into another situation that it failed for testing: the testing DB is missing the stored procedures.

I tried to add them manually, but those SPs were dropped when I ran the tests ($rake test:units) again.

Do you have a way out there?

Thanks</description>
		<content:encoded><![CDATA[<p>Thank you so much!</p>
<p>I have tried executing sql file and hacking the MySql adapter. And found your  solution here by Google.</p>
<p>However, I got into another situation that it failed for testing: the testing DB is missing the stored procedures.</p>
<p>I tried to add them manually, but those SPs were dropped when I ran the tests ($rake test:units) again.</p>
<p>Do you have a way out there?</p>
<p>Thanks</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Luke</title>
		<link>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-3864</link>
		<author>Luke</author>
		<pubDate>Sat, 26 May 2007 16:33:45 +0000</pubDate>
		<guid>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-3864</guid>
					<description>I've been working on the same problem for quite some time using Rails 116. I created a plugin with install instructions here: http://rubyscriptconsole.com/articles/2007/01/13/mysql-routine-migration-mrm-plugin/. 

I'm surprised by the lack of discussion and alternatives for using stored procs in Rails. My plugin is far from a perfect solution, but it has been a functioning tool for me for about 6 mos. now. As I mention several times on my blog, I've worked on exactly 0 development projects that didn't require at a least few stored procs for some heavy-lifting chores. Integrating stored routine migrations into Rails was a must for me, so I had to create something.

Anyway, look forward to getting your feedback.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been working on the same problem for quite some time using Rails 116. I created a plugin with install instructions here: <a href="http://rubyscriptconsole.com/articles/2007/01/13/mysql-routine-migration-mrm-plugin/." rel="nofollow">http://rubyscriptconsole.com/articles/2007/01/13/mysql-routine-migration-mrm-plugin/.</a> </p>
<p>I&#8217;m surprised by the lack of discussion and alternatives for using stored procs in Rails. My plugin is far from a perfect solution, but it has been a functioning tool for me for about 6 mos. now. As I mention several times on my blog, I&#8217;ve worked on exactly 0 development projects that didn&#8217;t require at a least few stored procs for some heavy-lifting chores. Integrating stored routine migrations into Rails was a must for me, so I had to create something.</p>
<p>Anyway, look forward to getting your feedback.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: foo</title>
		<link>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-4710</link>
		<author>foo</author>
		<pubDate>Thu, 15 Nov 2007 10:19:12 +0000</pubDate>
		<guid>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-4710</guid>
					<description>i have the same problem when trying to create my stored procedures from within migrations (loading the mysql scripts from files) and 
i really wonder what the "meaningless error" was in your case? 
for me it seems as if the execute method does not take scripts with multiple sql commands but expects each sql command one by one.</description>
		<content:encoded><![CDATA[<p>i have the same problem when trying to create my stored procedures from within migrations (loading the mysql scripts from files) and<br />
i really wonder what the &#8220;meaningless error&#8221; was in your case?<br />
for me it seems as if the execute method does not take scripts with multiple sql commands but expects each sql command one by one.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: foo</title>
		<link>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-4711</link>
		<author>foo</author>
		<pubDate>Thu, 15 Nov 2007 10:59:45 +0000</pubDate>
		<guid>http://www.mortench.net/blog/2007/03/31/rails-stored-procedures-migrations-mysql-5-and-trouble/#comment-4711</guid>
					<description>the mysql c api has information on "Multiple Statement Execution": http://dev.mysql.com/doc/refman/5.0/en/c-api-multiple-queries.html</description>
		<content:encoded><![CDATA[<p>the mysql c api has information on &#8220;Multiple Statement Execution&#8221;: <a href="http://dev.mysql.com/doc/refman/5.0/en/c-api-multiple-queries.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/c-api-multiple-queries.html</a></p>
]]></content:encoded>
				</item>
</channel>
</rss>
