<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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>Comments on: MySQL Stored Procedures problems and use practices</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: osman corluk</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-886318</link>
		<dc:creator>osman corluk</dc:creator>
		<pubDate>Tue, 07 Feb 2012 18:49:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-886318</guid>
		<description>I think modeling in traditional way such as MVC may produce the same results but in fact for a some one excepted to be serious  programmer has to program computer in its natural way. Let me say
 to manuplate DOM use javascript and css
 or if your server is linux use php or perl if its windows use .net enviroment. 
So if data will be programmed better way will be using its own development tools  stored programs , triggers , events etc. to build model. 
Best Regards
Osman Corluk</description>
		<content:encoded><![CDATA[<p>I think modeling in traditional way such as MVC may produce the same results but in fact for a some one excepted to be serious  programmer has to program computer in its natural way. Let me say<br />
 to manuplate DOM use javascript and css<br />
 or if your server is linux use php or perl if its windows use .net enviroment.<br />
So if data will be programmed better way will be using its own development tools  stored programs , triggers , events etc. to build model.<br />
Best Regards<br />
Osman Corluk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claudio Nanni</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-800174</link>
		<dc:creator>Claudio Nanni</dc:creator>
		<pubDate>Sun, 27 Feb 2011 00:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-800174</guid>
		<description>Sleepstealing is the word best describing MySQL Stored Procedures.
A very simple SELECT is working interactively and giving NULL in the SP.
Leveraging MySQL 5.1 features like SP, Events, Prepared Statements I am was able to do some very interesting things, but this SP is giving me hard times.
It&#039;s a shame because this &quot;dark&quot; side of the database could be quite powerful.</description>
		<content:encoded><![CDATA[<p>Sleepstealing is the word best describing MySQL Stored Procedures.<br />
A very simple SELECT is working interactively and giving NULL in the SP.<br />
Leveraging MySQL 5.1 features like SP, Events, Prepared Statements I am was able to do some very interesting things, but this SP is giving me hard times.<br />
It&#8217;s a shame because this &#8220;dark&#8221; side of the database could be quite powerful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: samantha</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-786912</link>
		<dc:creator>samantha</dc:creator>
		<pubDate>Tue, 14 Dec 2010 10:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-786912</guid>
		<description>how to get dynamic sql queries on calling stored procedure?
i am not able to tackle error... 
please help</description>
		<content:encoded><![CDATA[<p>how to get dynamic sql queries on calling stored procedure?<br />
i am not able to tackle error&#8230;<br />
please help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josef Miran</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-773372</link>
		<dc:creator>Josef Miran</dc:creator>
		<pubDate>Mon, 06 Sep 2010 11:02:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-773372</guid>
		<description>Two approaches may be used to debug code in MySQL:
1. Control execution of stored code on the server (used in dbForge Studio for MySQL )
2. Interpretation of stored code in an external program with execution of stored code expressions on the server (used in Illatis StepIn and in Debugger for MySQL from MyDebugger.com)
The first approach is the same as use of debugging package DBMS_DEBUG in Oracle; it is used in dbForge Studio for MySQL. This approach guarantees validity of executed code, as an executed stored procedure/function/trigger does the same operations and gives the same result as during usual execution. See more information about the approach here: http://www.devart.com/dbforge/mysql/studio/articles/debugging.html
The second approach allows escaping code locating on the server. This does not guarantee debugging validity. The code executed during debugging and in a usual mode differs. The causes may be either an error in an external interpreter (errors during processing conditionals, errors during retrieving data during reading a cursor, work with variables) or an error on the server.
From release to release, sometimes errors appear in MySQL interpreter, or they are fixed. And in an external interpreter, it is impossible to take into account all the peculiarities of executing stored code with each released server version.
The first approach is more beneficial during debugging stored procedures, functions, and triggers, and other important code.</description>
		<content:encoded><![CDATA[<p>Two approaches may be used to debug code in MySQL:<br />
1. Control execution of stored code on the server (used in dbForge Studio for MySQL )<br />
2. Interpretation of stored code in an external program with execution of stored code expressions on the server (used in Illatis StepIn and in Debugger for MySQL from MyDebugger.com)<br />
The first approach is the same as use of debugging package DBMS_DEBUG in Oracle; it is used in dbForge Studio for MySQL. This approach guarantees validity of executed code, as an executed stored procedure/function/trigger does the same operations and gives the same result as during usual execution. See more information about the approach here: <a href="http://www.devart.com/dbforge/mysql/studio/articles/debugging.html" rel="nofollow">http://www.devart.com/dbforge/mysql/studio/articles/debugging.html</a><br />
The second approach allows escaping code locating on the server. This does not guarantee debugging validity. The code executed during debugging and in a usual mode differs. The causes may be either an error in an external interpreter (errors during processing conditionals, errors during retrieving data during reading a cursor, work with variables) or an error on the server.<br />
From release to release, sometimes errors appear in MySQL interpreter, or they are fixed. And in an external interpreter, it is impossible to take into account all the peculiarities of executing stored code with each released server version.<br />
The first approach is more beneficial during debugging stored procedures, functions, and triggers, and other important code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brandon</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-767943</link>
		<dc:creator>brandon</dc:creator>
		<pubDate>Sun, 27 Jun 2010 07:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-767943</guid>
		<description>Peter, thank you for the great post. Though I&#039;m not completely agree with you that stored procedures are evil. After all, they significantly improve performance while on the other side of the medal is code duplication and break up of a business logic. They are tricky to debug, yes, but there are plenty of debuggers out there which claim to solve the issue, at least partially. BTW, I&#039;m in the process of choosing some debugger. Have found these ones so far, could anyone comment if any of them is worth to look at?
- Toad for MySQL (Free)
- Illatis StepIn ($39)
- Debugger for MySQL ($49)
- dbForge Studio for MySQL ($99)

Brandon.</description>
		<content:encoded><![CDATA[<p>Peter, thank you for the great post. Though I&#8217;m not completely agree with you that stored procedures are evil. After all, they significantly improve performance while on the other side of the medal is code duplication and break up of a business logic. They are tricky to debug, yes, but there are plenty of debuggers out there which claim to solve the issue, at least partially. BTW, I&#8217;m in the process of choosing some debugger. Have found these ones so far, could anyone comment if any of them is worth to look at?<br />
- Toad for MySQL (Free)<br />
- Illatis StepIn ($39)<br />
- Debugger for MySQL ($49)<br />
- dbForge Studio for MySQL ($99)</p>
<p>Brandon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wastnakodakalaranaperunikeduku</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-679872</link>
		<dc:creator>wastnakodakalaranaperunikeduku</dc:creator>
		<pubDate>Thu, 19 Nov 2009 14:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-679872</guid>
		<description>hi bad programes,

I think every one is not stating from mysql as first db. It is very cool and very good db architecture . 

in every pl/sql server is poor debugging . not only mysql . I am working mysql good clients like google , facebook it is free .

wast fellow don&#039;t descrese othere . mysql is 4 rank database</description>
		<content:encoded><![CDATA[<p>hi bad programes,</p>
<p>I think every one is not stating from mysql as first db. It is very cool and very good db architecture . </p>
<p>in every pl/sql server is poor debugging . not only mysql . I am working mysql good clients like google , facebook it is free .</p>
<p>wast fellow don&#8217;t descrese othere . mysql is 4 rank database</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mine</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-656780</link>
		<dc:creator>mine</dc:creator>
		<pubDate>Wed, 23 Sep 2009 20:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-656780</guid>
		<description>Can I use a variable name from a cursor loop in an update statement within said loop ... in a trigger?

OPEN cursor1;
cursor_loop:LOOP
	FETCH cursor1 INTO l_customer_name;
	IF l_last_row_fetched=1 THEN
		LEAVE cursor_loop;
	END IF;
	UPDATE l_customer_name SET active = 1 WHERE customer_id = NEW.id;
END LOOP cursor_loop;
CLOSE cursor1;

right now, when i run this, i get &#039;l_customer_name&#039; table does not exist.</description>
		<content:encoded><![CDATA[<p>Can I use a variable name from a cursor loop in an update statement within said loop &#8230; in a trigger?</p>
<p>OPEN cursor1;<br />
cursor_loop:LOOP<br />
	FETCH cursor1 INTO l_customer_name;<br />
	IF l_last_row_fetched=1 THEN<br />
		LEAVE cursor_loop;<br />
	END IF;<br />
	UPDATE l_customer_name SET active = 1 WHERE customer_id = NEW.id;<br />
END LOOP cursor_loop;<br />
CLOSE cursor1;</p>
<p>right now, when i run this, i get &#8216;l_customer_name&#8217; table does not exist.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MD. Rayhan Chowdhury</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-643541</link>
		<dc:creator>MD. Rayhan Chowdhury</dc:creator>
		<pubDate>Mon, 31 Aug 2009 06:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-643541</guid>
		<description>I had very bad experience with mysql stored procedure and triggers. I think mysql should provide a tool for stored procedure programming with debug facility.</description>
		<content:encoded><![CDATA[<p>I had very bad experience with mysql stored procedure and triggers. I think mysql should provide a tool for stored procedure programming with debug facility.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-357948</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Fri, 26 Sep 2008 00:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-357948</guid>
		<description>oops, meant 
DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN
    -- in here, how do I see what the error was, and what message MySQL would have returned?
  END;</description>
		<content:encoded><![CDATA[<p>oops, meant<br />
DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN<br />
    &#8212; in here, how do I see what the error was, and what message MySQL would have returned?<br />
  END;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/comment-page-1/#comment-357947</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Fri, 26 Sep 2008 00:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2007/06/12/mysql-stored-procedures-problems-and-use-practices/#comment-357947</guid>
		<description>Inside DECLARE EXIT HANDLER ON SQLEXCEPTION, is there any way to find the error code and/or message that MySQL would have returned to the caller if the handler wasn&#039;t there?

Or is it necessary to write an individual handler for each and every possible error code in each and every stored procedure...</description>
		<content:encoded><![CDATA[<p>Inside DECLARE EXIT HANDLER ON SQLEXCEPTION, is there any way to find the error code and/or message that MySQL would have returned to the caller if the handler wasn&#8217;t there?</p>
<p>Or is it necessary to write an individual handler for each and every possible error code in each and every stored procedure&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

