<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.6.5" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: What to do When Your Data Smiles At You&#8230;</title>
	<link>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you</link>
	<description>News and views from Pythian DBAs</description>
	<pubDate>Thu,  4 Dec 2008 19:35:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Cevarief</title>
		<link>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-224030</link>
		<dc:creator>Cevarief</dc:creator>
		<pubDate>Wed, 25 Jun 2008 01:15:51 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-224030</guid>
		<description>I'm curious to test it on mysql shipped with opensuse 10.3. It shows diamond for bit 1 and blank for 0. When i paste to this comment text...it's different.

mysql&#62; select * from bits;
+------+
&#124; val  &#124;
+------+
&#124;    &#124; 
&#124;      &#124; 
&#124;    &#124; 
&#124;      &#124; 
+------+</description>
		<content:encoded><![CDATA[<p>I&#8217;m curious to test it on mysql shipped with opensuse 10.3. It shows diamond for bit 1 and blank for 0. When i paste to this comment text&#8230;it&#8217;s different.</p>
<p>mysql&gt; select * from bits;<br />
+&#8212;&#8212;+<br />
| val  |<br />
+&#8212;&#8212;+<br />
|    |<br />
|      |<br />
|    |<br />
|      |<br />
+&#8212;&#8212;+</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CaptTofu</title>
		<link>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223709</link>
		<dc:creator>CaptTofu</dc:creator>
		<pubDate>Tue, 24 Jun 2008 14:50:43 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223709</guid>
		<description>Yes, I've had all manner of oddball characters spew out at me, particularly when developing Federated and I break something in the process.</description>
		<content:encoded><![CDATA[<p>Yes, I&#8217;ve had all manner of oddball characters spew out at me, particularly when developing Federated and I break something in the process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Leith</title>
		<link>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223650</link>
		<dc:creator>Mark Leith</dc:creator>
		<pubDate>Tue, 24 Jun 2008 12:23:49 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223650</guid>
		<description>Yes, it has! :) The smiling only happens on Windows however - I guess it just tries to make you more happy! ;)

http://bugs.mysql.com/bug.php?id=28422

http://dev.mysql.com/doc/refman/5.0/en/bit-field-values.html</description>
		<content:encoded><![CDATA[<p>Yes, it has! :) The smiling only happens on Windows however - I guess it just tries to make you more happy! ;)</p>
<p><a href="http://bugs.mysql.com/bug.php?id=28422" rel="nofollow">http://bugs.mysql.com/bug.php?id=28422</a></p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/bit-field-values.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/bit-field-values.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Santo Leto</title>
		<link>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223616</link>
		<dc:creator>Santo Leto</dc:creator>
		<pubDate>Tue, 24 Jun 2008 11:10:46 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223616</guid>
		<description>Yeah, and...I stood in open-mouthed!

This is not due to 6.0.4-alpha. For bit fields, please try use the following script:

select version();

use test;

drop table if exists bits;
create table bits (id int auto_increment primary key, val bit(1));

insert into bits (id) values (1),(2),(3);
select * from bits;

update bits set val=b'1' where id=1;
update bits set val=b'0' where id=2;
update bits set val=b'1' where id=3;

select bin(val) from bits;

Output:

mysql&#62; select version();
+-------------------------+
&#124; version()               &#124;
+-------------------------+
&#124; 5.1.24-rc-community-log &#124;
+-------------------------+
1 row in set (0.00 sec)

mysql&#62;
mysql&#62; use test;
Database changed
mysql&#62;
mysql&#62; drop table if exists bits;
Query OK, 0 rows affected (0.05 sec)

mysql&#62; create table bits (id int auto_increment primary key, val bit(1));
Query OK, 0 rows affected (0.09 sec)

mysql&#62;
mysql&#62; insert into bits (id) values (1),(2),(3);
Query OK, 3 rows affected (0.05 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql&#62; select * from bits;
+----+------+
&#124; id &#124; val  &#124;
+----+------+
&#124;  1 &#124; NULL &#124;
&#124;  2 &#124; NULL &#124;
&#124;  3 &#124; NULL &#124;
+----+------+
3 rows in set (0.00 sec)

mysql&#62;
mysql&#62; update bits set val=b'1' where id=1;
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&#62; update bits set val=b'0' where id=2;
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&#62; update bits set val=b'1' where id=3;
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&#62;
mysql&#62; select bin(val) from bits;
+----------+
&#124; bin(val) &#124;
+----------+
&#124; 1        &#124;
&#124; 0        &#124;
&#124; 1        &#124;
+----------+</description>
		<content:encoded><![CDATA[<p>Yeah, and&#8230;I stood in open-mouthed!</p>
<p>This is not due to 6.0.4-alpha. For bit fields, please try use the following script:</p>
<p>select version();</p>
<p>use test;</p>
<p>drop table if exists bits;<br />
create table bits (id int auto_increment primary key, val bit(1));</p>
<p>insert into bits (id) values (1),(2),(3);<br />
select * from bits;</p>
<p>update bits set val=b&#8217;1&#8242; where id=1;<br />
update bits set val=b&#8217;0&#8242; where id=2;<br />
update bits set val=b&#8217;1&#8242; where id=3;</p>
<p>select bin(val) from bits;</p>
<p>Output:</p>
<p>mysql&gt; select version();<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| version()               |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| 5.1.24-rc-community-log |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
1 row in set (0.00 sec)</p>
<p>mysql&gt;<br />
mysql&gt; use test;<br />
Database changed<br />
mysql&gt;<br />
mysql&gt; drop table if exists bits;<br />
Query OK, 0 rows affected (0.05 sec)</p>
<p>mysql&gt; create table bits (id int auto_increment primary key, val bit(1));<br />
Query OK, 0 rows affected (0.09 sec)</p>
<p>mysql&gt;<br />
mysql&gt; insert into bits (id) values (1),(2),(3);<br />
Query OK, 3 rows affected (0.05 sec)<br />
Records: 3  Duplicates: 0  Warnings: 0</p>
<p>mysql&gt; select * from bits;<br />
+&#8212;-+&#8212;&#8212;+<br />
| id | val  |<br />
+&#8212;-+&#8212;&#8212;+<br />
|  1 | NULL |<br />
|  2 | NULL |<br />
|  3 | NULL |<br />
+&#8212;-+&#8212;&#8212;+<br />
3 rows in set (0.00 sec)</p>
<p>mysql&gt;<br />
mysql&gt; update bits set val=b&#8217;1&#8242; where id=1;<br />
Query OK, 1 row affected (0.03 sec)<br />
Rows matched: 1  Changed: 1  Warnings: 0</p>
<p>mysql&gt; update bits set val=b&#8217;0&#8242; where id=2;<br />
Query OK, 1 row affected (0.03 sec)<br />
Rows matched: 1  Changed: 1  Warnings: 0</p>
<p>mysql&gt; update bits set val=b&#8217;1&#8242; where id=3;<br />
Query OK, 1 row affected (0.03 sec)<br />
Rows matched: 1  Changed: 1  Warnings: 0</p>
<p>mysql&gt;<br />
mysql&gt; select bin(val) from bits;<br />
+&#8212;&#8212;&#8212;-+<br />
| bin(val) |<br />
+&#8212;&#8212;&#8212;-+<br />
| 1        |<br />
| 0        |<br />
| 1        |<br />
+&#8212;&#8212;&#8212;-+</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roland Bouman</title>
		<link>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223500</link>
		<dc:creator>Roland Bouman</dc:creator>
		<pubDate>Tue, 24 Jun 2008 06:21:50 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223500</guid>
		<description>I think this is due to the encoding used by the windows shell.</description>
		<content:encoded><![CDATA[<p>I think this is due to the encoding used by the windows shell.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arjen Lentz</title>
		<link>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223465</link>
		<dc:creator>Arjen Lentz</dc:creator>
		<pubDate>Tue, 24 Jun 2008 04:52:23 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223465</guid>
		<description>Yea - you just have UTF8 working in your console, plus the MySQL connection and everything else on the same wavelength.</description>
		<content:encoded><![CDATA[<p>Yea - you just have UTF8 working in your console, plus the MySQL connection and everything else on the same wavelength.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antony Curtis</title>
		<link>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223431</link>
		<dc:creator>Antony Curtis</dc:creator>
		<pubDate>Tue, 24 Jun 2008 03:56:18 +0000</pubDate>
		<guid>http://www.pythian.com/blogs/1087/what-to-do-when-your-data-smiles-at-you#comment-223431</guid>
		<description>IBM ASCII 1 looks like the smiley face...

Nothing unusual... trust me. ;)</description>
		<content:encoded><![CDATA[<p>IBM ASCII 1 looks like the smiley face&#8230;</p>
<p>Nothing unusual&#8230; trust me. ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
