<?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>PlanetMysql.ru - информация о СУБД MySQL &#187; SQL</title>
	<atom:link href="http://planetmysql.ru/category/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Sat, 04 Feb 2012 15:42:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>More details about SchoonerSQL performance, please!</title>
		<link>http://www.xaprb.com/blog/2012/02/02/more-details-about-schoonersql-performance-please/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=more-details-about-schoonersql-performance-please</link>
		<comments>http://www.xaprb.com/blog/2012/02/02/more-details-about-schoonersql-performance-please/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 20:37:52 +0000</pubDate>
		<dc:creator>Baron Schwartz (xaprb)</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=2581</guid>
		<description><![CDATA[Schooner has a blog post showing that one node of their product beats 9 nodes of Clustrix&#8217;s in throughput.  But this reduces everything to a single number, and that&#8217;s not everything that matters. If you&#8217;ve looked at Vadim&#8217;s white paper about Clustrix&#8217;s (paid-for) performance evaluation with Percona, you see there is a lot of detail about how consistent the throughput and response time are.

I&#8217;d love to see that level of details in any product comparison.  A single number often isn&#8217;t enough to judge how good the performance is &#8212; fast is not the only thing that matters.

I have absolutely no doubts that a single node of Schooner&#8217;s product can run like a deer. It isn&#8217;t doing any cross-node communication, after all, so it had better be faster than something that blends multiple nodes together into a virtual &#8220;single database server.&#8221;  And I think if the full story were told, it would be a great knock-down drag-out fight.  Give us more details, Schooner!

Further Reading:High Performance MySQL, Second Edition: Query Performance Optimization
An ongoing thread of blogs on MySQL performance
Status update on High Performance MySQL
High Performance MySQL Third Edition pre-order available
Sessions of interest at the Percona Performance Conference]]></description>
			<content:encoded><![CDATA[<p>Schooner has a <a href="http://schoonerha.blogspot.com/2012/02/one-schoonersql-node-is-equavalent-to-9.html">blog post</a> showing that one node of their product beats 9 nodes of Clustrix&#8217;s in throughput.  But this reduces everything to a single number, and that&#8217;s not everything that matters. If you&#8217;ve looked at <a href="http://www.percona.com/redir/files/white-papers/clustrix-tpcc-mysql-benchmark.pdf">Vadim&#8217;s white paper</a> about Clustrix&#8217;s (paid-for) performance evaluation with Percona, you see there is a lot of detail about how consistent the throughput and response time are.</p>

<p>I&#8217;d love to see that level of details in any product comparison.  A single number often isn&#8217;t enough to judge how good the performance is &#8212; fast is not the only thing that matters.</p>

<p>I have absolutely no doubts that a single node of Schooner&#8217;s product can run like a deer. It isn&#8217;t doing any cross-node communication, after all, so it had better be faster than something that blends multiple nodes together into a virtual &#8220;single database server.&#8221;  And I think if the full story were told, it would be a great knock-down drag-out fight.  Give us more details, Schooner!</p>

<p><strong>Further Reading:</strong><ul><li><a href="http://www.xaprb.com/blog/2007/10/07/high-performance-mysql-second-edition-query-performance-optimization/" rel="bookmark" title="Permanent Link: High Performance MySQL, Second Edition: Query Performance Optimization">High Performance MySQL, Second Edition: Query Performance Optimization</a></li>
<li><a href="http://www.xaprb.com/blog/2009/06/07/an-ongoing-thread-of-blogs-on-mysql-performance/" rel="bookmark" title="Permanent Link: An ongoing thread of blogs on MySQL performance">An ongoing thread of blogs on MySQL performance</a></li>
<li><a href="http://www.xaprb.com/blog/2011/11/21/status-update-on-high-performance-mysql/" rel="bookmark" title="Permanent Link: Status update on High Performance MySQL">Status update on High Performance MySQL</a></li>
<li><a href="http://www.xaprb.com/blog/2012/01/13/high-performance-mysql-third-edition-pre-order-available/" rel="bookmark" title="Permanent Link: High Performance MySQL Third Edition pre-order available">High Performance MySQL Third Edition pre-order available</a></li>
<li><a href="http://www.xaprb.com/blog/2009/04/17/sessions-of-interest-at-the-percona-performance-conference/" rel="bookmark" title="Permanent Link: Sessions of interest at the Percona Performance Conference">Sessions of interest at the Percona Performance Conference</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31876&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31876&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/02/02/more-details-about-schoonersql-performance-please/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Collaborate 2012 Registration is Now Open!</title>
		<link>http://blogs.ioug.org/2012/02/02/collaborate-2012-registration-is-now-open/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=collaborate-2012-registration-is-now-open</link>
		<comments>http://blogs.ioug.org/2012/02/02/collaborate-2012-registration-is-now-open/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 18:11:32 +0000</pubDate>
		<dc:creator>IOUG Blogs</dc:creator>
				<category><![CDATA[11g]]></category>
		<category><![CDATA[12c]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[collaborate 2012]]></category>
		<category><![CDATA[dba]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[exadata]]></category>
		<category><![CDATA[IOUG]]></category>
		<category><![CDATA[IOUG General]]></category>
		<category><![CDATA[Las Vegas]]></category>
		<category><![CDATA[Mandalay Bay]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[OEM]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[Oracle Enterprise Manager]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://blogs.ioug.org/?p=281</guid>
		<description><![CDATA[http://collaborate12.ioug.org
&#160;







Double Down at COLLABORATE 12- The IOUG Forum with Two Ways to Save- and a Chance to Win!
The user-driven Oracle event of the year is fast-approaching, and IOUG wants you to make youreducational experience a sure bet. Between hundreds of cutting-edge education sessions, workshops and legendary Oracle speakers, you&#8217;ll return from Las Vegas with valuable knowledge to transform into immediate results for your business. No need to go all in to attend- IOUG is sweetening the pot with ways for you to save big bucks and even pocket some cash while you&#8217;re at it. Register today for your chance to win a $200 American Express Gift Card!The deck is stacked at COLLABORATE 12 &#8211; The IOUG Forum in your favor.

Register for the conference today with the priority code EM03 and be immediately entered for a chance to add a $200 AmEx Gift Card to your winnings for the week. Treat yourself to some fusion cuisine while in Vegas, catch a show on the strip, or just pocket the prize for a rainy day!
Buy-in to the table at COLLABORATE 12-The IOUG Forum has never been more reasonable. Hotel rates are only going up from here on out, so book your room today to take advantage of the final day of ultra-reasonable rates! 
How about adding more savings to the mix on your conference registration?Sign up for a seat at the table with IOUG before February 29 and be dealt a winning hand: save up to $500 on conference registration by booking ahead of the early bird, and we&#8217;ll even throw in a bonus, extra day of education($599 value)! Don&#8217;t miss your chance to to take advantage of these massive savings . Book your COLLABORATE 12 journey today!
Guarantee your seat at the table today, and save by registering before the Early Bird Deadline! Registration rates start as low as $1,295* for members of IOUG. Resolve to give yourself a fantastic week of Oracle Education, and happy 2012!
* Rate assumes hotel and group discount



Boot Camp Information
Housing


Deep Dive Information
IOUG Registration Benefits


Exhibit at COLLABORATE 12
Session Schedule



Want to sponsor a Deep Dive? Contact Jconlon@ioug.org for more information.

&#160;
&#160;
&#160;
&#160;]]></description>
			<content:encoded><![CDATA[<p><a title="Collaborate 2012 IOUG Forum Registration" href="http://collaborate12.ioug.org" >http://collaborate12.ioug.org</a></p>
<p>&nbsp;</p>
<table width="589" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tbody>
<tr>
<td colspan="2" height="153"><img src="http://www.ioug.org/portals/0/images/collab12/email/11.1-IOUG-banner_d1.jpg" alt="" width="589" height="153" usemap="http://blogs.ioug.org/2012/02/02/collaborate-2012-registration-is-now-open/#135359e73408cebc_Map2" border="0" /></td>
</tr>
<tr>
<td valign="top" width="570">
<blockquote><p>Double Down at COLLABORATE 12- The IOUG Forum with Two Ways to Save- and a Chance to Win!<a href="http://lists.mail.ioug.org/t/960297/50864871/60636/0/" ><img src="http://www.ioug.org/portals/0/images/collab12/email/MembersRegister.jpg" alt="members register for $1295 by 2/29/04" width="150" height="121" align="right" border="0" /></a><br />
The user-driven Oracle event of the year is fast-approaching, and IOUG wants you to make youreducational experience a sure bet. Between hundreds of cutting-edge education sessions, workshops and legendary Oracle speakers, you&#8217;ll return from Las Vegas with valuable knowledge to transform into immediate results for your business. No need to go all in to attend- IOUG is sweetening the pot with ways for you to save big bucks and even pocket some cash while you&#8217;re at it. <strong><a href="http://lists.mail.ioug.org/t/960297/50864871/60641/0/" >Register today</a> for your chance to win a $200 American Express Gift Card!</strong>The deck is stacked at COLLABORATE 12 &#8211; The IOUG Forum in your favor.<strong><br />
</strong><strong><a><img src="http://www.ioug.org/portals/0/images/collab12/email/DeepDives.jpg" alt="Deep Dives" width="150" height="173" align="right" border="0" /></a></strong><br />
<a href="http://lists.mail.ioug.org/t/960297/50864871/60641/0/" >Register</a> for the conference today with the priority code <strong>EM03</strong> and <strong></strong>b<strong></strong>e immediately entered for a chance to <strong>add a $200 AmEx Gift Card to your winnings for the week</strong>. Treat yourself to <strong></strong>some fusion cuisine while in Vegas, catch a show on the strip, or just pocket the prize for a rainy day!</p>
<p>Buy-in to the table at COLLABORATE 12-The IOUG Forum has never been more reasonable. <strong>Hotel rates are only going up from here on out, so book your room today to take advantage of the <a href="http://lists.mail.ioug.org/t/960297/50864871/60638/0/" >final day of ultra-reasonable rates</a>! </strong></p>
<p>How about adding more savings to the mix on your conference registration?<strong>Sign up for a seat at the table with IOUG before February 29 and be dealt a winning hand: save up to $500 on conference registration by booking ahead of the early bird, and we&#8217;ll even throw in <a><img src="http://www.ioug.org/portals/0/images/collab12/email/Bootcamps.jpg" alt="Bootcamps" width="150" height="173" align="right" border="0" /></a>a <a href="http://lists.mail.ioug.org/t/960297/50864871/60630/0/" >bonus, extra day of education($599 value)</a>!</strong> Don&#8217;t miss your chance to to take advantage of these massive savings . Book your COLLABORATE 12 journey today!</p></blockquote>
<blockquote><p><a href="http://lists.mail.ioug.org/t/960297/50864871/60638/0/" >Guarantee your seat at the table today</a>, and save by registering before the Early Bird Deadline!<strong></strong> Registration rates start as low as $1,295* for members of IOUG. Resolve to give yourself a fantastic week of Oracle Education, and happy 2012!<br />
* <em>Rate assumes hotel and group discount</em></p>
<table width="400" border="0">
<tbody>
<tr>
<td><a href="http://lists.mail.ioug.org/t/960297/50864871/60776/0/" >Boot Camp Information</a></td>
<td><a href="http://ioug.org/housingC12" >Housing</a></td>
</tr>
<tr>
<td><a href="http://ioug.org/diveC12" >Deep Dive Information</a></td>
<td><a href="http://lists.mail.ioug.org/t/960297/50864871/60629/0/" >IOUG Registration Benefits</a><strong></strong></td>
</tr>
<tr>
<td><a href="http://lists.mail.ioug.org/t/960297/50864871/60634/0/" >Exhibit at COLLABORATE 12</a></td>
<td><a href="http://lists.mail.ioug.org/t/960297/50864871/60635/0/" >Session Schedule</a></td>
</tr>
</tbody>
</table>
<p>Want to sponsor a Deep Dive? Contact <a href="mailto:jconlon@ioug.org" >Jconlon@ioug.org</a> for more information.</p></blockquote>
</td>
<td valign="top" width="19">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</td>
</tr>
<tr>
<td colspan="2"><center><a href="http://lists.mail.ioug.org/t/960297/50864871/56856/0/" ><img src="http://files.smithbucklin.com/client_designs/ioug/collaborate11/ioug.jpg" alt="" align="absmiddle" border="0" /></a></center></td>
</tr>
</tbody>
</table>
<div></div><br /><div>
				<a href="http://twitter.com/share?url=http://blogs.ioug.org/2012/02/02/collaborate-2012-registration-is-now-open/&amp;text=Collaborate%202012%20Registration%20is%20Now%20Open!"  title="Click here if you liked this article">
					<img src="http://blogs.ioug.org/wp-content/plugins/twitter-plugin/images/twitt.gif" alt="Twitt" />
				</a>
			</div><fb:like href='http://blogs.ioug.org/2012/02/02/collaborate-2012-registration-is-now-open/' send='true' layout='standard' show_faces='true' width='450' height='65' action='like' colorscheme='light' font='lucida+grande'></fb:like><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31875&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31875&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/02/02/collaborate-2012-registration-is-now-open/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Central Virginia MySQL Meetup has reached cruising altitude</title>
		<link>http://www.xaprb.com/blog/2012/01/31/central-virginia-mysql-meetup-has-reached-cruising-altitude/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=central-virginia-mysql-meetup-has-reached-cruising-altitude</link>
		<comments>http://www.xaprb.com/blog/2012/01/31/central-virginia-mysql-meetup-has-reached-cruising-altitude/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 03:06:23 +0000</pubDate>
		<dc:creator>Baron Schwartz (xaprb)</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=2578</guid>
		<description><![CDATA[The first Central Virginia MySQL Meetup was a nice little howdy-do, and as a test flight, I think it showed that the bird can get off the ground quite nicely.  So, with the generous help of our meeting host Meddius, we&#8217;re going to do it regularly on the 3rd Wednesday of every month.  The next event is already scheduled &#8212; I will be talking about high availability options for MySQL.

I&#8217;m interested in having outside speakers. Anyone who&#8217;d like to come and present something MySQL-relevant, please feel free to email me, or contact me via the Meetup page with the &#8220;suggest a Meetup&#8221; feature. If you&#8217;re traveling from outside the area, the airport is CHO, and it&#8217;s about 30 minutes away.  Amtrak is also very convenient.  I&#8217;m happy to chauffeur you, and can help you find lodging too.

I will not try to steer overly much, but I hope that this turns into a group where people introduce themselves, mention job openings and other news of interest, and so on.

There are also a couple of related meetups nearby that I want to promote: NOVA MySQL at AOL&#8217;s headquarters led by Mike DelNegro, DevOps DC at CustomInk&#8217;s offices led by Nathen Harvey, and one I haven&#8217;t been to yet but hope to attend soon, Shenandoah Ruby Users Group in Harrisonburg near Rosetta Stone&#8217;s headquarters, led by John Paul Ashenfelter.

Further Reading:New Central Virginia MySQL Meetup
Speaking at MySQL Meetup in Northern Virginia
Free DevOpsDC meetup on Tuesday
News on MySQL Cacti Templates
An ongoing thread of blogs on MySQL performance]]></description>
			<content:encoded><![CDATA[<p>The first <a href="http://www.meetup.com/Central-Virginia-MySQL-Meetup/">Central Virginia MySQL Meetup</a> was a nice little howdy-do, and as a test flight, I think it showed that the bird can get off the ground quite nicely.  So, with the generous help of our meeting host <a href="http://www.meddius.com/">Meddius</a>, we&#8217;re going to do it regularly on the 3rd Wednesday of every month.  The next event is already scheduled &#8212; I will be talking about <a href="http://www.meetup.com/Central-Virginia-MySQL-Meetup/events/50492012/">high availability options for MySQL</a>.</p>

<p>I&#8217;m interested in having outside speakers. Anyone who&#8217;d like to come and present something MySQL-relevant, please feel free to email me, or contact me via the Meetup page with the &#8220;suggest a Meetup&#8221; feature. If you&#8217;re traveling from outside the area, the airport is CHO, and it&#8217;s about 30 minutes away.  Amtrak is also very convenient.  I&#8217;m happy to chauffeur you, and can help you find lodging too.</p>

<p>I will not try to steer overly much, but I hope that this turns into a group where people introduce themselves, mention job openings and other news of interest, and so on.</p>

<p>There are also a couple of related meetups nearby that I want to promote: <a href="http://www.meetup.com/NOVA-MySQL/">NOVA MySQL</a> at AOL&#8217;s headquarters led by Mike DelNegro, <a href="http://www.meetup.com/DevOpsDC/">DevOps DC</a> at CustomInk&#8217;s offices led by Nathen Harvey, and one I haven&#8217;t been to yet but hope to attend soon, <a href="http://www.meetup.com/ruby-128/">Shenandoah Ruby Users Group</a> in Harrisonburg near Rosetta Stone&#8217;s headquarters, led by John Paul Ashenfelter.</p>

<p><strong>Further Reading:</strong><ul><li><a href="http://www.xaprb.com/blog/2012/01/04/new-central-virginia-mysql-meetup/" rel="bookmark" title="Permanent Link: New Central Virginia MySQL Meetup">New Central Virginia MySQL Meetup</a></li>
<li><a href="http://www.xaprb.com/blog/2010/07/21/speaking-at-mysql-meetup-in-northern-virginia/" rel="bookmark" title="Permanent Link: Speaking at MySQL Meetup in Northern Virginia">Speaking at MySQL Meetup in Northern Virginia</a></li>
<li><a href="http://www.xaprb.com/blog/2011/11/02/free-devopsdc-meetup-on-tuesday/" rel="bookmark" title="Permanent Link: Free DevOpsDC meetup on Tuesday">Free DevOpsDC meetup on Tuesday</a></li>
<li><a href="http://www.xaprb.com/blog/2009/02/09/news-on-mysql-cacti-templates/" rel="bookmark" title="Permanent Link: News on MySQL Cacti Templates">News on MySQL Cacti Templates</a></li>
<li><a href="http://www.xaprb.com/blog/2009/06/07/an-ongoing-thread-of-blogs-on-mysql-performance/" rel="bookmark" title="Permanent Link: An ongoing thread of blogs on MySQL performance">An ongoing thread of blogs on MySQL performance</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31859&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31859&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/02/01/central-virginia-mysql-meetup-has-reached-cruising-altitude/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syntax of the day: IS TRUE and IS FALSE</title>
		<link>http://code.openark.org/blog/mysql/syntax-of-the-day-is-true-and-is-false?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=syntax-of-the-day-is-true-and-is-false</link>
		<comments>http://code.openark.org/blog/mysql/syntax-of-the-day-is-true-and-is-false#comments</comments>
		<pubDate>Thu, 26 Jan 2012 04:09:23 +0000</pubDate>
		<dc:creator>Shlomi Noach</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Syntax]]></category>

		<guid isPermaLink="false">http://code.openark.org/blog/?p=4198</guid>
		<description><![CDATA[What makes for a true statement?
We usually test statements using a WHERE clause:

SELECT * FROM world.City WHERE Population &#62; 1000000

The "Population &#62; 1000000" statement makes for a boolean expression. Using WHERE is just one way of evaluating it. One can also test with IF():

SET @val := 7;
SELECT IF(@val &#62; 2, 'Yes', 'No')

TRUE and FALSE
The two are keywords. They also map for the numerals 1 and 0, as follows:

mysql&#62; SELECT TRUE, FALSE;
+------+-------+
&#124; TRUE &#124; FALSE &#124;
+------+-------+
&#124;    1 &#124;     0 &#124;
+------+-------+

Like in the C programming language, a nonzero value evaluates to a true value. A zero evaluates to false. A NULL evaluates to... well, NULL. But aside from 3-valued logic, what's important in our case is that it is not true.
However, simple value comparison is incorrect:

mysql&#62; SELECT @val, @val &#62; 3, @val &#62; 3 = TRUE as result;
+------+----------+--------+
&#124; @val &#124; @val &#62; 3 &#124; result &#124;
+------+----------+--------+
&#124;    7 &#124;        1 &#124;      1 &#124;
+------+----------+--------+

mysql&#62; SELECT @val, @val = TRUE as result;
+------+--------+
&#124; @val &#124; result &#124;
+------+--------+
&#124;    7 &#124;      0 &#124;
+------+--------+

To test for the truth value of an expression, the correct syntax is by using IS TRUE:

SELECT @val, @val IS TRUE as result;
+------+--------+
&#124; @val &#124; result &#124;
+------+--------+
&#124;    7 &#124;      1 &#124;
+------+--------+

Likewise, one may use IS FALSE to test for falsehood. However, if you wish to note NULL as a false value this does not work:

SELECT @empty, @empty IS TRUE, @empty IS FALSE;
+--------+----------------+-----------------+
&#124; @empty &#124; @empty IS TRUE &#124; @empty IS FALSE &#124;
+--------+----------------+-----------------+
&#124; NULL   &#124;              0 &#124;               0 &#124;
+--------+----------------+-----------------+

If you're unsure why, you should read more on three-valued logic in SQL. To solve the above, simply use IS NOT TRUE:

SELECT @empty, @empty IS NOT TRUE;
+--------+--------------------+
&#124; @empty &#124; @empty IS NOT TRUE &#124;
+--------+--------------------+
&#124; NULL   &#124;                  1 &#124;
+--------+--------------------+

In summary, use IS TRUE and IS NOT TRUE so as to normalize truth values into a 0, 1 value range, C style, including handling of NULLs.]]></description>
			<content:encoded><![CDATA[<p>What makes for a <em>true</em> statement?</p>
<p>We usually test statements using a WHERE clause:</p>
<blockquote>
<pre>SELECT * FROM world.City WHERE Population &gt; 1000000</pre>
</blockquote>
<p>The <strong>"Population &gt; 1000000"</strong> statement makes for a boolean expression. Using <strong>WHERE</strong> is just one way of evaluating it. One can also test with <a href="http://dev.mysql.com/doc/refman/5.1/en/control-flow-functions.html#function_if"><strong>IF()</strong></a>:</p>
<blockquote>
<pre>SET @val := 7;
SELECT IF(@val &gt; 2, 'Yes', 'No')</pre>
</blockquote>
<h4>TRUE and FALSE</h4>
<p>The two are keywords. They also map for the numerals <strong>1</strong> and <strong>0</strong>, as follows:</p>
<blockquote>
<pre>mysql&gt; SELECT TRUE, FALSE;
+------+-------+
| TRUE | FALSE |
+------+-------+
|    1 |     0 |
+------+-------+</pre>
</blockquote>
<p>Like in the <strong>C</strong> programming language, a nonzero value evaluates to a <em>true</em> value. A zero evaluates to <em>false</em>. A NULL evaluates to... well, NULL. But aside from 3-valued logic, what's important in our case is that it is <em>not true</em>.<span></span></p>
<p>However, simple value comparison is incorrect:</p>
<blockquote>
<pre>mysql&gt; SELECT @val, @val &gt; 3, @val &gt; 3 = TRUE as result;
+------+----------+--------+
| @val | @val &gt; 3 | result |
+------+----------+--------+
|    7 |        1 |      1 |
+------+----------+--------+

mysql&gt; SELECT @val, @val = TRUE as result;
+------+--------+
| @val | result |
+------+--------+
|    7 |      0 |
+------+--------+</pre>
</blockquote>
<p>To test for the truth value of an expression, the correct syntax is by using <strong>IS TRUE</strong>:</p>
<blockquote>
<pre>SELECT @val, @val IS TRUE as result;
+------+--------+
| @val | result |
+------+--------+
|    7 |      1 |
+------+--------+</pre>
</blockquote>
<p>Likewise, one may use <strong>IS FALSE</strong> to test for falsehood. However, if you wish to note <strong>NULL</strong> as a <em>false</em> value this does not work:</p>
<blockquote>
<pre>SELECT @empty, @empty IS TRUE, @empty IS FALSE;
+--------+----------------+-----------------+
| @empty | @empty IS TRUE | @empty IS FALSE |
+--------+----------------+-----------------+
| NULL   |              0 |               0 |
+--------+----------------+-----------------+</pre>
</blockquote>
<p>If you're unsure why, you should read more on three-valued logic in SQL. To solve the above, simply use <strong>IS NOT TRUE</strong>:</p>
<blockquote>
<pre>SELECT @empty, @empty IS NOT TRUE;
+--------+--------------------+
| @empty | @empty IS NOT TRUE |
+--------+--------------------+
| NULL   |                  1 |
+--------+--------------------+</pre>
</blockquote>
<p>In summary, use <strong>IS TRUE</strong> and <strong>IS NOT TRUE</strong> so as to normalize truth values into a <strong>0</strong>, <strong>1</strong> value range, <strong>C</strong> style, including handling of <strong>NULL</strong>s.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31809&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31809&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/26/syntax-of-the-day-is-true-and-is-false/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Joins with On or Using</title>
		<link>http://www.lornajane.net/posts/2012/sql-joins-with-on-or-using?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sql-joins-with-on-or-using&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sql-joins-with-on-or-using</link>
		<comments>http://www.lornajane.net/posts/2012/sql-joins-with-on-or-using?utm_source=rss&#038;amp;utm_medium=rss&#038;amp;utm_campaign=sql-joins-with-on-or-using#comments</comments>
		<pubDate>Tue, 17 Jan 2012 08:25:14 +0000</pubDate>
		<dc:creator>Lorna Mitchell</dc:creator>
				<category><![CDATA[join]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.lornajane.net/?p=1364</guid>
		<description><![CDATA[I recently wrote a post about inner and outer joins, and a couple of people asked what the difference is between USING and ON. 
In a nutshell, you use ON for most things, but USING is a handy shorthand for the situation where the column names are the same.
Consider this example dataset:

mysql&#62; select * from pets;
+---------+---------+--------+-----------+
&#124; pets_id &#124; animal  &#124; name   &#124; owners_id &#124;
+---------+---------+--------+-----------+
&#124;       1 &#124; fox     &#124; Rusty  &#124;         2 &#124;
&#124;       2 &#124; cat     &#124; Fluffy &#124;         2 &#124;
&#124;       3 &#124; cat     &#124; Smudge &#124;         3 &#124;
&#124;       4 &#124; cat     &#124; Toffee &#124;         3 &#124;
&#124;       5 &#124; dog     &#124; Pig    &#124;         3 &#124;
&#124;       6 &#124; hamster &#124; Henry  &#124;         1 &#124;
&#124;       7 &#124; dog     &#124; Honey  &#124;         1 &#124;
+---------+---------+--------+-----------+
7 rows in set (0.00 sec)

mysql&#62; select * from owners;
+-----------+-------+
&#124; owners_id &#124; name  &#124;
+-----------+-------+
&#124;         1 &#124; Susie &#124;
&#124;         2 &#124; Sally &#124;
&#124;         3 &#124; Sarah &#124;
+-----------+-------+
3 rows in set (0.00 sec)

To find out who has which pets, we would join the two tables together like this:

mysql&#62; select owners.name as owner, pets.name as pet, pets.animal
    -&#62; from owners join pets on (pets.owners_id = owners.owners_id);
+-------+--------+---------+
&#124; owner &#124; pet    &#124; animal  &#124;
+-------+--------+---------+
&#124; Sally &#124; Rusty  &#124; fox     &#124;
&#124; Sally &#124; Fluffy &#124; cat     &#124;
&#124; Sarah &#124; Smudge &#124; cat     &#124;
&#124; Sarah &#124; Toffee &#124; cat     &#124;
&#124; Sarah &#124; Pig    &#124; dog     &#124;
&#124; Susie &#124; Henry  &#124; hamster &#124;
&#124; Susie &#124; Honey  &#124; dog     &#124;
+-------+--------+---------+
7 rows in set (0.00 sec)

The example above uses the ON keyword, but since the columns we use to join are called owners_id in both tables, then we can instead put in USING as a shorthand.

mysql&#62; select owners.name as owner, pets.name as pet, pets.animal
    -&#62; from owners join pets using (owners_id);
+-------+--------+---------+
&#124; owner &#124; pet    &#124; animal  &#124;
+-------+--------+---------+
&#124; Sally &#124; Rusty  &#124; fox     &#124;
&#124; Sally &#124; Fluffy &#124; cat     &#124;
&#124; Sarah &#124; Smudge &#124; cat     &#124;
&#124; Sarah &#124; Toffee &#124; cat     &#124;
&#124; Sarah &#124; Pig    &#124; dog     &#124;
&#124; Susie &#124; Henry  &#124; hamster &#124;
&#124; Susie &#124; Honey  &#124; dog     &#124;
+-------+--------+---------+
7 rows in set (0.00 sec)

OK so it's a super-simple tip but until you see the different approaches laid out side-by-side, it can be confusing.  This USING trick is why you will often see fields named, for example, "user_id" when they are in the "users" table - then the shorthand can be used any time you join this user_id to any other user_id column.
Lorna is an independent web development consultant, writer and trainer, open source project lead and community evangelist.  This post was originally published at LornaJane]]></description>
			<content:encoded><![CDATA[<p>I recently wrote a post about <a href="http://www.lornajane.net/posts/2011/inner-vs-outer-joins-on-a-many-to-many-relationship">inner and outer joins</a>, and a couple of people asked what the difference is between <code>USING</code> and <code>ON</code>. <span></span></p>
<p>In a nutshell, you use <code>ON</code> for most things, but <code>USING</code> is a handy shorthand for the situation where the column names are the same.</p>
<p>Consider this example dataset:</p>
<pre>
mysql> select * from pets;
+---------+---------+--------+-----------+
| pets_id | animal  | name   | owners_id |
+---------+---------+--------+-----------+
|       1 | fox     | Rusty  |         2 |
|       2 | cat     | Fluffy |         2 |
|       3 | cat     | Smudge |         3 |
|       4 | cat     | Toffee |         3 |
|       5 | dog     | Pig    |         3 |
|       6 | hamster | Henry  |         1 |
|       7 | dog     | Honey  |         1 |
+---------+---------+--------+-----------+
7 rows in set (0.00 sec)

mysql> select * from owners;
+-----------+-------+
| owners_id | name  |
+-----------+-------+
|         1 | Susie |
|         2 | Sally |
|         3 | Sarah |
+-----------+-------+
3 rows in set (0.00 sec)
</pre>
<p>To find out who has which pets, we would join the two tables together like this:</p>
<pre>
mysql> select owners.name as owner, pets.name as pet, pets.animal
    -> from owners join pets on (pets.owners_id = owners.owners_id);
+-------+--------+---------+
| owner | pet    | animal  |
+-------+--------+---------+
| Sally | Rusty  | fox     |
| Sally | Fluffy | cat     |
| Sarah | Smudge | cat     |
| Sarah | Toffee | cat     |
| Sarah | Pig    | dog     |
| Susie | Henry  | hamster |
| Susie | Honey  | dog     |
+-------+--------+---------+
7 rows in set (0.00 sec)
</pre>
<p>The example above uses the <code>ON</code> keyword, but since the columns we use to join are called <code>owners_id</code> in both tables, then we can instead put in <code>USING</code> as a shorthand.</p>
<pre>
mysql> select owners.name as owner, pets.name as pet, pets.animal
    -> from owners join pets using (owners_id);
+-------+--------+---------+
| owner | pet    | animal  |
+-------+--------+---------+
| Sally | Rusty  | fox     |
| Sally | Fluffy | cat     |
| Sarah | Smudge | cat     |
| Sarah | Toffee | cat     |
| Sarah | Pig    | dog     |
| Susie | Henry  | hamster |
| Susie | Honey  | dog     |
+-------+--------+---------+
7 rows in set (0.00 sec)
</pre>
<p>OK so it's a super-simple tip but until you see the different approaches laid out side-by-side, it can be confusing.  This <code>USING</code> trick is why you will often see fields named, for example, "user_id" when they are in the "users" table - then the shorthand can be used any time you join this user_id to any other user_id column.</p>
<p>Lorna is an independent web development consultant, writer and trainer, open source project lead and community evangelist.  This post was originally published at <a href="http://www.lornajane.net">LornaJane</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31600&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31600&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/17/sql-joins-with-on-or-using/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free webinar Wednesday: verifying replication integrity</title>
		<link>http://www.xaprb.com/blog/2012/01/16/free-webinar-wednesday-verifying-replication-integrity/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=free-webinar-wednesday-verifying-replication-integrity</link>
		<comments>http://www.xaprb.com/blog/2012/01/16/free-webinar-wednesday-verifying-replication-integrity/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 20:30:26 +0000</pubDate>
		<dc:creator>Baron Schwartz (xaprb)</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=2573</guid>
		<description><![CDATA[Join me Wednesday for a free webinar on using the new Percona Toolkit v2.0.3 to verify replication integrity. If you&#8217;re not familiar with this topic, it&#8217;s one of those must-do things that no one officially tells you is necessary with MySQL. The new tools in Percona Toolkit 2.0.3 make it much easier and less complicated &#8212; and safer &#8212; than before. Well worth an hour of your time.

Further Reading:Free webinar on preventing MySQL downtime
Free webinar on MySQL performance this Thursday
How to check MySQL replication integrity continually
Why I write Free Software
A review of MySQL Replication by Russell Dyer]]></description>
			<content:encoded><![CDATA[<p>Join me Wednesday for a free webinar on using the new <a href="http://www.percona.com/webinars/2012-01-18-verifying-replication-integrity-with-percona-toolkit/">Percona Toolkit v2.0.3 to verify replication integrity</a>. If you&#8217;re not familiar with this topic, it&#8217;s one of those must-do things that no one officially tells you is necessary with MySQL. The new tools in Percona Toolkit 2.0.3 make it much easier and less complicated &#8212; and safer &#8212; than before. Well worth an hour of your time.</p>

<p><strong>Further Reading:</strong><ul><li><a href="http://www.xaprb.com/blog/2011/10/13/free-webinar-on-preventing-mysql-downtime/" rel="bookmark" title="Permanent Link: Free webinar on preventing MySQL downtime">Free webinar on preventing MySQL downtime</a></li>
<li><a href="http://www.xaprb.com/blog/2010/08/23/free-webinar-on-mysql-performance-this-thursday/" rel="bookmark" title="Permanent Link: Free webinar on MySQL performance this Thursday">Free webinar on MySQL performance this Thursday</a></li>
<li><a href="http://www.xaprb.com/blog/2008/10/04/how-to-check-mysql-replication-integrity-continually/" rel="bookmark" title="Permanent Link: How to check MySQL replication integrity continually">How to check MySQL replication integrity continually</a></li>
<li><a href="http://www.xaprb.com/blog/2007/06/19/why-i-write-free-software/" rel="bookmark" title="Permanent Link: Why I write Free Software">Why I write Free Software</a></li>
<li><a href="http://www.xaprb.com/blog/2011/06/09/a-review-of-mysql-replication-by-russell-dyer/" rel="bookmark" title="Permanent Link: A review of MySQL Replication by Russell Dyer">A review of MySQL Replication by Russell Dyer</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31599&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31599&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/16/free-webinar-wednesday-verifying-replication-integrity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>High Performance MySQL Third Edition pre-order available</title>
		<link>http://www.xaprb.com/blog/2012/01/13/high-performance-mysql-third-edition-pre-order-available/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=high-performance-mysql-third-edition-pre-order-available</link>
		<comments>http://www.xaprb.com/blog/2012/01/13/high-performance-mysql-third-edition-pre-order-available/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 16:38:55 +0000</pubDate>
		<dc:creator>Baron Schwartz (xaprb)</dc:creator>
				<category><![CDATA[High Performance MySQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=2568</guid>
		<description><![CDATA[You can pre-order the new edition of High Performance MySQL now on Amazon or via O&#8217;Reilly&#8217;s website.

Eric Bergen called the second edition &#8220;the best MySQL book on the planet&#8220;. What will the third edition be called?  The best in the solar system? This reminds me of a joke, supposed to be a true story: three pizza restaurants next to each other had signs saying &#8220;best pizza in town,&#8221; &#8220;best pizza in the world,&#8221; and &#8220;best pizza on this block.&#8221;

Further Reading:Pre-Order High Performance MySQL Second Edition
High Performance MySQL Second Edition Schedule
High Performance MySQL is going to press, again
High Performance MySQL Second Edition goes to press!
Are you sure you&#8217;re reading the second edition of High Performance MySQL?]]></description>
			<content:encoded><![CDATA[<p>You can pre-order the new edition of High Performance MySQL now on <a href="http://www.amazon.com/High-Performance-MySQL-Optimization-Replication/dp/1449314287/?tag=xaprb-20">Amazon</a> or via <a href="http://shop.oreilly.com/product/0636920022343.do">O&#8217;Reilly&#8217;s website</a>.</p>

<p>Eric Bergen called the second edition &#8220;<a href="http://ebergen.net/wordpress/2010/07/20/how-to-be-a-mysql-dba-and-the-best-mysql-book-on-the-planet/">the best MySQL book on the planet</a>&#8220;. What will the third edition be called?  The best in the solar system? This reminds me of a joke, supposed to be a true story: three pizza restaurants next to each other had signs saying &#8220;best pizza in town,&#8221; &#8220;best pizza in the world,&#8221; and &#8220;best pizza on this block.&#8221;</p>

<p><strong>Further Reading:</strong><ul><li><a href="http://www.xaprb.com/blog/2008/05/02/pre-order-high-performance-mysql-second-edition/" rel="bookmark" title="Permanent Link: Pre-Order High Performance MySQL Second Edition">Pre-Order High Performance MySQL Second Edition</a></li>
<li><a href="http://www.xaprb.com/blog/2008/05/07/high-performance-mysql-second-edition-schedule/" rel="bookmark" title="Permanent Link: High Performance MySQL Second Edition Schedule">High Performance MySQL Second Edition Schedule</a></li>
<li><a href="http://www.xaprb.com/blog/2008/07/15/high-performance-mysql-is-going-to-press-again/" rel="bookmark" title="Permanent Link: High Performance MySQL is going to press, again">High Performance MySQL is going to press, again</a></li>
<li><a href="http://www.xaprb.com/blog/2008/06/06/high-performance-mysql-second-edition-goes-to-press/" rel="bookmark" title="Permanent Link: High Performance MySQL Second Edition goes to press!">High Performance MySQL Second Edition goes to press!</a></li>
<li><a href="http://www.xaprb.com/blog/2008/07/17/are-you-sure-youre-reading-the-second-edition-of-high-performance-mysql/" rel="bookmark" title="Permanent Link: Are you sure you’re reading the second edition of High Performance MySQL?">Are you sure you&#8217;re reading the second edition of High Performance MySQL?</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31582&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31582&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/13/high-performance-mysql-third-edition-pre-order-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not if, but when</title>
		<link>http://www.xaprb.com/blog/2012/01/09/not-if-but-when/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=not-if-but-when</link>
		<comments>http://www.xaprb.com/blog/2012/01/09/not-if-but-when/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 14:49:27 +0000</pubDate>
		<dc:creator>Baron Schwartz (xaprb)</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=2564</guid>
		<description><![CDATA[As a MySQL  consultant, I spend a lot of time talking with people about their backups. More specifically, we talk a lot about recovery. I had an interesting incident myself, which illustrates some of the things that are bound to happen as time passes.

First, let me explain how I do my personal backups. I have a series of external hard drives, which are fully encrypted, as is my computer&#8217;s hard drive. I maintain a full mirror of my computer&#8217;s hard drive on these external hard drives. I occasionally switch the hard drives out, and carry one or more of them to a bank&#8217;s safe deposit box. I try to do this once a week, but sometimes it isn&#8217;t quite that often.

As a result, I have one hard drive located physically near my computer, which contains a very recent backup of all my work. I have at least one, usually 3 or more, other copies of my data in a slightly less fresh format, but durably stored in a bank.

While setting up a new computer recently, I somehow corrupted a GPG-encrypted file that I use quite often, and update frequently. (Perhaps a quantum bit flip or a solar flare &#8212; I don&#8217;t use ECC server-grade RAM, so this is actually possible/likely). As a result, I needed to get my most recent backup. I plugged in my external hard drive, and the drive physically failed. I spent some time doing diagnostics, and concluded that the drive really had failed. This reminded me that I had another hard drive, which I had set aside on a shelf couple of weeks ago, because it had also apparently failed. I pulled this drive off the shelf and ran diagnostics on it. It was also bad.

So I had lost my most recent copy of my file, as well as my most recent backup of it. it I could go to the bank and retrieve my previous backup of it, but that was a couple of weeks old, and I knew there were some changes that were not in that copy.

The happy ending to this story is that the corruption was only in the tail of the file, actually only in the last couple of bytes.  I was able to decrypt everything except the last block or so, and then I retrieved that  portion from my old backup. So  in the end, I did not lose any data, but it was an interesting exercise.

The most interesting thing about this is the probability of several failures happening together. I think it is a natural human tendency to underestimate the probability of several different kinds of failures, or even several identical failures, happening at the same time.  It quite commonly happens that hard drives fail at the same time, and we know that backups fail, and we know that  files are corrupted or deleted, and it&#8217;s not a matter of if, but when these things happen together.  This is why I have several copies of my backups in different places.

I&#8217;m still glad that I do backups the way that I do, keeping my own backups instead of relying on some online backup provider. I have heard many horror stories about them, and witnessed a few myself.  I do not trust anyone else with my backups.

Further Reading:Progress on High Performance MySQL Backup and Recovery chapter
How to use MySQL binlogs to undo a DROP statement
The new hotness in open-core: InnoDB
MySQL disaster recovery by promoting a slave
A review of SecoBackup Amazon S3 backups for MySQL]]></description>
			<content:encoded><![CDATA[<p>As a MySQL  consultant, I spend a lot of time talking with people about their backups. More specifically, we talk a lot about recovery. I had an interesting incident myself, which illustrates some of the things that are bound to happen as time passes.

<p>First, let me explain how I do my personal backups. I have a series of external hard drives, which are fully encrypted, as is my computer&#8217;s hard drive. I maintain a full mirror of my computer&#8217;s hard drive on these external hard drives. I occasionally switch the hard drives out, and carry one or more of them to a bank&#8217;s safe deposit box. I try to do this once a week, but sometimes it isn&#8217;t quite that often.

<p>As a result, I have one hard drive located physically near my computer, which contains a very recent backup of all my work. I have at least one, usually 3 or more, other copies of my data in a slightly less fresh format, but durably stored in a bank.

<p>While setting up a new computer recently, I somehow corrupted a GPG-encrypted file that I use quite often, and update frequently. (Perhaps a quantum bit flip or a solar flare &#8212; I don&#8217;t use ECC server-grade RAM, so this is actually possible/likely). As a result, I needed to get my most recent backup. I plugged in my external hard drive, and the drive physically failed. I spent some time doing diagnostics, and concluded that the drive really had failed. This reminded me that I had another hard drive, which I had set aside on a shelf couple of weeks ago, because it had also apparently failed. I pulled this drive off the shelf and ran diagnostics on it. It was also bad.

<p>So I had lost my most recent copy of my file, as well as my most recent backup of it. it I could go to the bank and retrieve my previous backup of it, but that was a couple of weeks old, and I knew there were some changes that were not in that copy.

<p>The happy ending to this story is that the corruption was only in the tail of the file, actually only in the last couple of bytes.  I was able to decrypt everything except the last block or so, and then I retrieved that  portion from my old backup. So  in the end, I did not lose any data, but it was an interesting exercise.

<p>The most interesting thing about this is the probability of several failures happening together. I think it is a natural human tendency to underestimate the probability of several different kinds of failures, or even several identical failures, happening at the same time.  It quite commonly happens that hard drives fail at the same time, and we know that backups fail, and we know that  files are corrupted or deleted, and it&#8217;s not a matter of if, but when these things happen together.  This is why I have several copies of my backups in different places.

<p>I&#8217;m still glad that I do backups the way that I do, keeping my own backups instead of relying on some online backup provider. I have heard many horror stories about them, and witnessed a few myself.  I do not trust anyone else with my backups.

<p><strong>Further Reading:</strong><ul><li><a href="http://www.xaprb.com/blog/2007/10/02/progress-on-high-performance-mysql-backup-and-recovery-chapter/" rel="bookmark" title="Permanent Link: Progress on High Performance MySQL Backup and Recovery chapter">Progress on High Performance MySQL Backup and Recovery chapter</a></li>
<li><a href="http://www.xaprb.com/blog/2009/01/01/how-to-use-mysql-binlogs-to-undo-a-drop-statement/" rel="bookmark" title="Permanent Link: How to use MySQL binlogs to undo a DROP statement">How to use MySQL binlogs to undo a DROP statement</a></li>
<li><a href="http://www.xaprb.com/blog/2010/07/02/the-new-hotness-in-open-core-innodb/" rel="bookmark" title="Permanent Link: The new hotness in open-core: InnoDB">The new hotness in open-core: InnoDB</a></li>
<li><a href="http://www.xaprb.com/blog/2009/01/20/mysql-disaster-recovery-by-promoting-a-slave/" rel="bookmark" title="Permanent Link: MySQL disaster recovery by promoting a slave">MySQL disaster recovery by promoting a slave</a></li>
<li><a href="http://www.xaprb.com/blog/2009/03/07/a-review-of-secobackup-amazon-s3-backups-for-mysql/" rel="bookmark" title="Permanent Link: A review of SecoBackup Amazon S3 backups for MySQL">A review of SecoBackup Amazon S3 backups for MySQL</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31531&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31531&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/09/not-if-but-when/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Central Virginia MySQL Meetup</title>
		<link>http://www.xaprb.com/blog/2012/01/04/new-central-virginia-mysql-meetup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-central-virginia-mysql-meetup</link>
		<comments>http://www.xaprb.com/blog/2012/01/04/new-central-virginia-mysql-meetup/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 16:52:11 +0000</pubDate>
		<dc:creator>Baron Schwartz (xaprb)</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=2562</guid>
		<description><![CDATA[I&#8217;ve created a Central Virginia MySQL Meetup group for those of you in the area.  Our first event will be in a couple of weeks at Meddius&#8217;s headquarters. I&#8217;d like to meet and get to know more people in this area who use MySQL, so come out and we&#8217;ll have a good time together!  Oh, and beer. And pizza. Of course.

Further Reading:Speaking at MySQL Meetup in Northern Virginia
Free DevOpsDC meetup on Tuesday
Recap of Portland OpenSQL Camp 2009
MySQL Camp 2007
Announcing OpenSQL Camp 2008]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a Central Virginia MySQL Meetup group for those of you in the area.  Our <a href="http://www.meetup.com/Central-Virginia-MySQL-Meetup/events/46623002/">first event</a> will be in a couple of weeks at <a href="http://www.meddius.com/">Meddius&#8217;s</a> headquarters. I&#8217;d like to meet and get to know more people in this area who use MySQL, so come out and we&#8217;ll have a good time together!  Oh, and beer. And pizza. Of course.</p>

<p><strong>Further Reading:</strong><ul><li><a href="http://www.xaprb.com/blog/2010/07/21/speaking-at-mysql-meetup-in-northern-virginia/" rel="bookmark" title="Permanent Link: Speaking at MySQL Meetup in Northern Virginia">Speaking at MySQL Meetup in Northern Virginia</a></li>
<li><a href="http://www.xaprb.com/blog/2011/11/02/free-devopsdc-meetup-on-tuesday/" rel="bookmark" title="Permanent Link: Free DevOpsDC meetup on Tuesday">Free DevOpsDC meetup on Tuesday</a></li>
<li><a href="http://www.xaprb.com/blog/2009/11/17/recap-of-portland-opensql-camp-2009/" rel="bookmark" title="Permanent Link: Recap of Portland OpenSQL Camp 2009">Recap of Portland OpenSQL Camp 2009</a></li>
<li><a href="http://www.xaprb.com/blog/2007/08/24/mysql-camp-2007/" rel="bookmark" title="Permanent Link: MySQL Camp 2007">MySQL Camp 2007</a></li>
<li><a href="http://www.xaprb.com/blog/2008/08/26/announcing-opensql-camp-2008/" rel="bookmark" title="Permanent Link: Announcing OpenSQL Camp 2008">Announcing OpenSQL Camp 2008</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31491&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31491&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2012/01/04/new-central-virginia-mysql-meetup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fake O&#8217;Reilly Covers</title>
		<link>http://www.theopenforce.com/2011/12/fake-oreilly-covers.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fake-oreilly-covers</link>
		<comments>http://www.theopenforce.com/2011/12/fake-oreilly-covers.html#comments</comments>
		<pubDate>Mon, 19 Dec 2011 11:27:00 +0000</pubDate>
		<dc:creator>Zack Urlocker</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[Hadoop]]></category>
		<category><![CDATA[interactive fiction]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[O'Reilly]]></category>
		<category><![CDATA[SaaS]]></category>
		<category><![CDATA[satire]]></category>
		<category><![CDATA[screensaver]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://planetmysql.ru/?guid=188244ed516cd5fecce96f39b3d40c91</guid>
		<description><![CDATA[Here are some of the fake O&#039;Reilly book covers I mentioned in a prior post.  These have been optimized for use as black &#38; white Kindle screensaver wallpaper images.  If you haven&#039;t done so already, you can install a Kindle screensaver hack with a couple of downloads. 



Update: I&#039;ve embedded a slideshow from PicasaWeb, but it requires Flash.  If you don&#039;t see it you can click on the links below to go directly to PicasaWeb.

Kindle hacks: Installing a Kindle Screensaver, Kindle Screensaver Hack
PicasaWeb: Infocom covers, Mad covers, Fake covers, Book covers]]></description>
			<content:encoded><![CDATA[<p><a href="http://zurlocker.typepad.com/.a/6a00d83452e46469e2015393849bf4970b-popup"><img alt="Fake mongodb" src="http://zurlocker.typepad.com/.a/6a00d83452e46469e2015393849bf4970b-250wi" title="Fake mongodb" /></a></p>
<p>Here are some of the <a href="https://picasaweb.google.com/ZUrlocker/KindleFakeOReillyScreensavers" >fake O&#039;Reilly book covers</a> I mentioned in a prior post.  These have been optimized for use as black &amp; white Kindle screensaver wallpaper images.  <span>If you haven&#039;t done so already, you can install a </span><span><a href="http://wiki.mobileread.com/wiki/Kindle_Screen_Saver_Hack_for_all_2.x_and_3.x_Kindles" >Kindle screensaver hack</a> with a couple of downloads. </span></p>
<p></p>
<ul>
</ul>
<p><em><strong>Update: </strong>I&#039;ve embedded a slideshow from PicasaWeb, but it requires Flash.  If you don&#039;t see it you can click on the links below to go directly to PicasaWeb.</em></p>
<ul>
<li><strong>Kindle hacks:</strong> <a href="http://www.howtogeek.com/howto/37424/jailbreak-your-kindle-for-dead-simple-screensaver-customization/" >Installing a Kindle Screensaver</a>, <a href="http://wiki.mobileread.com/wiki/Kindle_Screen_Saver_Hack_for_all_2.x_and_3.x_Kindles" >Kindle Screensaver Hack</a></li>
<li><strong>PicasaWeb:</strong> <a href="https://picasaweb.google.com/ZUrlocker/KindleInfocomScreensavers?authuser=0&amp;feat=directlink" >Infocom covers</a>, <a href="https://picasaweb.google.com/ZUrlocker/KindleMadMagazineScreensavers?authuser=0&amp;feat=directlink" >Mad covers</a>, <a href="https://picasaweb.google.com/ZUrlocker/KindleFakeOReillyScreensavers" >Fake covers</a>, <a href="https://picasaweb.google.com/ZUrlocker/KindleScreensaverBookCovers?authuser=0&amp;feat=directlink" >Book covers</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31355&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=31355&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/12/19/fake-oreilly-covers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

