<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MySQL Preacher</title>
	<atom:link href="http://mysqlpreacher.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysqlpreacher.com/wordpress</link>
	<description>Because Sharing is Caring</description>
	<lastBuildDate>Tue, 31 Aug 2010 18:12:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Do you use MySQL replication? Do you use &#8220;FLUSH LOGS&#8221;? If yes you might want to read this.</title>
		<link>http://mysqlpreacher.com/wordpress/2010/08/do-you-use-mysql-replication-do-you-use-flush-logs-if-yes-you-might-want-to-read-this/</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/08/do-you-use-mysql-replication-do-you-use-flush-logs-if-yes-you-might-want-to-read-this/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 18:12:22 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[binary log]]></category>
		<category><![CDATA[error log]]></category>
		<category><![CDATA[flush logs]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=447</guid>
		<description><![CDATA[Scenario: Master-Master replication Description: Master A is the active db server whilst Master B is a read only swappable db server hence both are creating binary logs. During backup I run &#8220;FLUSH LOGS&#8221; in order to have a simpler point in time recovery procedure if that case arises. Problem: Flush logs is mean mean command [...]]]></description>
			<content:encoded><![CDATA[<p>Scenario: Master-Master replication<br />
Description: Master A is the active db server whilst Master B is a read only swappable db server hence both are creating binary logs. During backup I run &#8220;FLUSH LOGS&#8221; in order to have a simpler point in time recovery procedure if that case arises.<br />
Problem: Flush logs is mean mean command :) &#8230;. it rotates not only my binary logs but my error log too (since I user error-log=blahblahblah in my my.cnf). Well given I flush logs every night my error log is cycled through every night, but unlike binary logs which have an incrimental number attached to the fine, error logs only have a `-log` attached to the filename and a second &#8220;FLUSH LOG&#8221; would just clear all error logs permanently. That is really not fun believe me!</p>
<p>So what is the solution? you could either:<br />
1. Not use &#8220;FLUSH LOGS&#8221; (nah that aint happenin)<br />
2. Not use &#8211;error-log (that aint happenin either cos I need to use it for my specific setup)<br />
3. Create an ugly hack script which saves the error log or renames it or whatever (Ugly Ugly)<br />
4. Create a variable in MySQL which says: flush-log-ignore-error-log which if set &#8220;FLUSH LOGS&#8221; will know not to mess around with my error log. Hence &#8230; create a feature request (nicer and friendlier solution) and submit a tested patch too whilst at it. </p>
<p>If you think it is not idea that &#8220;FLUSH LOGS&#8221; recycles through error logs or and you have been bitten by the way it works like me, then feel free to put your vote into <a href="http://bugs.mysql.com/bug.php?id=56385&#038;thanks=sub" target=_blank>http://bugs.mysql.com/bug.php?id=56385&#038;thanks=sub</a> so that MySQL sees the importance of it.</p>
<p>Because Sharing is Caring!</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2010/08/do-you-use-mysql-replication-do-you-use-flush-logs-if-yes-you-might-want-to-read-this/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Rediscovering the roots.</title>
		<link>http://mysqlpreacher.com/wordpress/2010/08/thought-you-might-be-interested/</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/08/thought-you-might-be-interested/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 14:22:54 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[dolphin]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[sakila]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=435</guid>
		<description><![CDATA[Do you ever stop and think? It happens to me all the time, random subjects kick in and I end up searching (aka googling) and today I wondered &#8230; Why is MySQLs logo a dolphin? Shame on me it took me so long to ask the question but as the saying goes, better late than [...]]]></description>
			<content:encoded><![CDATA[<p>Do you ever stop and think? It happens to me all the time, random subjects kick in and I end up searching (aka googling) and today I wondered &#8230; Why is MySQLs logo a dolphin? Shame on me it took me so long to ask the question but as the saying goes, better late than never.</p>
<p>As per MySQLs own <a href="http://www.mysql.com/news-and-events/generate-article.php?id=77" target=_blank>article</a>:<br />
&#8220;We&#8217;ve been discussing a new logo for at least a year&#8221;, says main developer and MySQL AB founder Michael &#8220;Monty&#8221; Widenius. &#8220;I am personally concerned about the survival of endangered species, and I liked the idea of the dolphin as soon as it came up. It combines great symbol value with a powerful, modern design.&#8221;</p>
<p>After a while the name was chosen out of 6357 suggestions by the community and that is how Sakila the dolphin came to be :) &#8230;. and we lived happily ever after (or at least hope to!)</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2010/08/thought-you-might-be-interested/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a return code from a stored procedure</title>
		<link>http://mysqlpreacher.com/wordpress/2010/08/getting-a-return-code-from-a-stored-procedure/</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/08/getting-a-return-code-from-a-stored-procedure/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 06:00:20 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[stored procedure]]></category>
		<category><![CDATA[stored procedures]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=430</guid>
		<description><![CDATA[Sometimes we have some special need for a stored procedure to call another to do something. That is fine, but what if the second stored proc failed for some reason? Maybe you want to halt the first stored procedure (the caller) and not proceed with the work until the problem is verified and resolved. So [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we have some special need for a stored procedure to call another to do something. That is fine, but what if the second stored proc failed for some reason? Maybe you want to halt the first stored procedure (the caller) and not proceed with the work until the problem is verified and resolved. So How do you do it?</p>
<p>Simple, get a return code from the called procedure to determine if it worked or not!</p>
<p>Here&#8217;s a sample piece of code to explain better:</p>
<p><code><br />
DROP PROCEDURE IF EXISTS `test`.`testing123`;<br />
DELIMITER $$</p>
<p>CREATE<br />
    PROCEDURE `test`.`testing123`(OUT a INT)<br />
    BEGIN<br />
        DECLARE EXIT HANDLER FOR SQLEXCEPTION<br />
        BEGIN<br />
          SET a=2;<br />
        END;<br />
        SET a=0;</p>
<p># toggle the below as comment or not to see the call at the bottom working<br />
# if you uncomment select abc you'll see the error, otherwise all is cool</p>
<p>#        select abc;</p>
<p>    END$$</p>
<p>DELIMITER ;</p>
<p>DROP PROCEDURE IF EXISTS `test`.`testing456`;<br />
DELIMITER $$</p>
<p>CREATE<br />
    PROCEDURE `test`.`testing456`()<br />
    BEGIN<br />
        SET @a=0;<br />
        CALL `test`.`testing123` (@a);</p>
<p>        IF @a != 0 THEN<br />
           SELECT "There is a problem with proc `testing123`";<br />
        ELSE<br />
           SELECT "Everything is cool";<br />
        END IF;</p>
<p>    END$$</p>
<p>DELIMITER ;</p>
<p>CALL `test`.`testing456` ();<br />
</code></p>
<p>testing123 is the second stored proc in this case, called from testing456. The trick is to have an exit handler which returns a status number to the first stored proc (testing456). The latter will hold an if condition to do `something` depending on the return code received by testing123.</p>
<p>If you have any other suggestions I&#8217;d appreciate your input.</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2010/08/getting-a-return-code-from-a-stored-procedure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL stored procedure debugging, can I sue for going insane?</title>
		<link>http://mysqlpreacher.com/wordpress/2010/08/mysql-stored-procedure-debugging-can-i-sue-for-going-insane/</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/08/mysql-stored-procedure-debugging-can-i-sue-for-going-insane/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:10:28 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[mysq]]></category>
		<category><![CDATA[procs]]></category>
		<category><![CDATA[stored procedure]]></category>
		<category><![CDATA[stored procs]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=423</guid>
		<description><![CDATA[Lets paint the picture: Scenario part 1 : Migrating a couple thousand stored procedures from database technology X to mysql Scenario part 2 : Legacy system where the people who wrote it left a long time ago Scenario part 3 : Developers sure can get real creative and invent all kinds of ways to get [...]]]></description>
			<content:encoded><![CDATA[<p>Lets paint the picture:</p>
<p>Scenario part 1 : Migrating a couple thousand stored procedures from database technology X to mysql<br />
Scenario part 2 : Legacy system where the people who wrote it left a long time ago<br />
Scenario part 3 : Developers sure can get real creative and invent all kinds of ways to get data (eg: having a stored proc which formulates a big query using concat after going through a bunch of conditions (fair enough), BUT the parts making up the different queries are stored in a table on a database rather than within the stored proc itself) &#8230; talk about KIS &#8211; Keep it simple!!<br />
Scenario part 4 : This stored proc references 18 tables, 4 views, and another two stored procedures on 5 databases</p>
<p>Now close your eyes and try to imagine that for a few seconds, nah kidding don&#8217;t want you to hurt yourself.</p>
<p>I wonder, who&#8217;s gonna cover my health insurance if i go crazy? :)</p>
<p>mysql 02:55:47 DEV > call storedprocblahbla(&#8216;I&#8217;,'am&#8217;,'going&#8217;,'crazy&#8217;);<br />
ERROR 1052 (23000): Column &#8216;state_of_mind&#8217; in field list is ambiguous</p>
<p>Sure thats REALLY REALLY helpful thanks :), you know what, lets just mysqldump -d -R -B db1 db2 db3 db4 db5 > /wherever/you/like and grep for column &#8216;state_of_mind&#8217;.</p>
<p>I love a challenge but facing migration of so many stored procs I&#8217;d really love to have something &#8220;GOOD&#8221; to debug them with.</p>
<p>The solutions I found were:<br />
1. Illatis eclipse plugin for $40<br />
	works on linux, mac and windows but does show me a lot of:<br />
	&#8220;An error has occurred when activating this view<br />
	com/illatis/parser/lib/k&#8221;<br />
2. mydebugger for $50<br />
	works on linux and mac via wine<br />
3. dbForge for MySQL for $50<br />
	works only on windows due to .net framework (kinda crap because I `hate` using the former)</p>
<p>any other ideas are very welcome, especially opensource ones but I can&#8217;t find anything.</p>
<p>I can always try setting up debugging using GDB but would rather try to avoid that.</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2010/08/mysql-stored-procedure-debugging-can-i-sue-for-going-insane/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Securich 0.3.0</title>
		<link>http://mysqlpreacher.com/wordpress/2010/08/securich-0-3-0/</link>
		<comments>http://mysqlpreacher.com/wordpress/2010/08/securich-0-3-0/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 21:59:19 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[froscon]]></category>
		<category><![CDATA[grants]]></category>
		<category><![CDATA[roles]]></category>
		<category><![CDATA[securich]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=391</guid>
		<description><![CDATA[Around these days last year I presented `securich` for the first time. It was at froscon 2009, barely knowing anybody, spending my 27th birthday in a hostel in Germany fixing some bugs before the actual presentation on a 10 inch netbook (my mac had some problems at the time but thats another story :)). I [...]]]></description>
			<content:encoded><![CDATA[<p>Around these days last year I presented `securich` for the first time. It was at <a href="http://programm.froscon.org/2009/events/454.en.html" target="blank">froscon 2009</a>, barely knowing anybody, spending my 27th birthday in a hostel in Germany fixing some bugs before the actual presentation on a 10 inch netbook (my mac had some problems at the time but thats another story :)). I got a beating, verbally of course! Many of the people listening to the presentation were expecting something else since another presentation was supposed to be running at that time, some even started dozing off (encouraging? not really hehe) but after a few minutes people started getting interested and asking all kind of questions. &#8220;This awesome&#8221; I thought to myself, &#8220;questions are good, it means people are understanding and want to know more&#8221;, but the more they learnt the more they realised how young securich was as a tool, lacking fundamental features like reverse reconciling securich with mysql rather than the other way round, bugs cropping up (<a href="http://datacharmer.blogspot.com/" target="blank">Giuseppe aka datacharmer</a> made sure he found some on the fly :P) but oh well back then it was just four months old.</p>
<p>Now after a year and four months into it, Securich is still in Beta but MANY MANY more features were included, bugs fixed (others created) and it even made it through two sessions at the Oreilly MySQL Conference and Expo 2010 and two mysql university sessions.</p>
<p>The end points here are:<br />
1. Share your knowledge and code with the community, we learn, you learn!<br />
2. When you fall to the ground, climb back up and get on your feet again. Start running!<br />
3. Securich is now at version 0.3.0 (10th official release), help yourself at <a href="http://code.google.com/p/securich/" target="blank">google code</a> your feedback is greatly appreciated!</p>
<p>Most of the new release is bug fixes but some of the features added in this version are:<br />
1. Any user can now install securich not just mysql root<br />
2. You can now grant privileges on the mysql db (by default still disabled as it runs in &#8220;strict&#8221; mode which needs to be changed to &#8220;lenient&#8221; manually)<br />
3. The installation script now keeps the securich package intact for further many installations<br />
4. Better error reporting (for debugging purposes)<br />
5. Grants on tables using regexp are now case sensitive</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2010/08/securich-0-3-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
