<?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: Idea: Couple of more string types</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:23:57 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: krteQ</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-300712</link>
		<dc:creator>krteQ</dc:creator>
		<pubDate>Sun, 18 May 2008 19:40:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-300712</guid>
		<description>We are using UNHEX() to store + HEX() to retrieve md5 data. Yes, it&#039;s not as comfortable as it could be, but still far better than VARCHAR(32)...</description>
		<content:encoded><![CDATA[<p>We are using UNHEX() to store + HEX() to retrieve md5 data. Yes, it&#8217;s not as comfortable as it could be, but still far better than VARCHAR(32)&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-295918</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 06 May 2008 21:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-295918</guid>
		<description>Jared,

for prepared statements you can use unhex(?)  though the main problem is still selecting the data</description>
		<content:encoded><![CDATA[<p>Jared,</p>
<p>for prepared statements you can use unhex(?)  though the main problem is still selecting the data</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-295858</link>
		<dc:creator>Jared</dc:creator>
		<pubDate>Tue, 06 May 2008 19:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-295858</guid>
		<description>ANSI Sql says you should be able to store hex data using

INSERT INTO foo VALUES(md5) (X&#039;0123456789abcdef&#039;);

Its just a pain none of the prepared APIs (in PHP) do the conversion, which means have to build the sql by hand. :/</description>
		<content:encoded><![CDATA[<p>ANSI Sql says you should be able to store hex data using</p>
<p>INSERT INTO foo VALUES(md5) (X&#8217;0123456789abcdef&#8217;);</p>
<p>Its just a pain none of the prepared APIs (in PHP) do the conversion, which means have to build the sql by hand. :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-284077</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Mon, 21 Apr 2008 04:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-284077</guid>
		<description>Yeah, I was complaining about this on friday. Mysqldump has the --hex-blob option to encode binary as hex. I never understood why the client didn&#039;t.</description>
		<content:encoded><![CDATA[<p>Yeah, I was complaining about this on friday. Mysqldump has the &#8211;hex-blob option to encode binary as hex. I never understood why the client didn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-283761</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sun, 20 Apr 2008 17:39:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-283761</guid>
		<description>Thanks for good catch. Fixed. 

Indeed it means case sensitive among other things</description>
		<content:encoded><![CDATA[<p>Thanks for good catch. Fixed. </p>
<p>Indeed it means case sensitive among other things</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olexandr Melnyk</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-283652</link>
		<dc:creator>Olexandr Melnyk</dc:creator>
		<pubDate>Sun, 20 Apr 2008 15:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-283652</guid>
		<description>Peter,

&gt; BINARY in MySQL means different. This means the string is processed as byte string rather 
&gt; than character string - so for example it is case insensitive and there are also 
&gt; differences end spaces handling.

Binary strings are indeed case sensitive. I assume, it was just a typo :)</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>&gt; BINARY in MySQL means different. This means the string is processed as byte string rather<br />
&gt; than character string &#8211; so for example it is case insensitive and there are also<br />
&gt; differences end spaces handling.</p>
<p>Binary strings are indeed case sensitive. I assume, it was just a typo <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-282341</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sat, 19 Apr 2008 07:09:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-282341</guid>
		<description>Jim,

BINARY in MySQL means different. This means the string is processed as byte string rather than character string - so for example it is case sensitive and there are also differences end spaces handling.</description>
		<content:encoded><![CDATA[<p>Jim,</p>
<p>BINARY in MySQL means different. This means the string is processed as byte string rather than character string &#8211; so for example it is case sensitive and there are also differences end spaces handling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jim</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-282328</link>
		<dc:creator>jim</dc:creator>
		<pubDate>Sat, 19 Apr 2008 06:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-282328</guid>
		<description>if the server did not mangle so many strings and declare them binary even though they obviously aren&#039;t, it would be easy for the client to properly encode binary fields instead of trying to display them.

in fact, maybe we should make the client do that so the server team would finally fix all the stupid cases where it flags non-binary strings as binary strings.</description>
		<content:encoded><![CDATA[<p>if the server did not mangle so many strings and declare them binary even though they obviously aren&#8217;t, it would be easy for the client to properly encode binary fields instead of trying to display them.</p>
<p>in fact, maybe we should make the client do that so the server team would finally fix all the stupid cases where it flags non-binary strings as binary strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-282271</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sat, 19 Apr 2008 06:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-282271</guid>
		<description>moo,

I do not care about syntax to be honest.  Just would like to see it and would like it to work fast.  If it can be done efficient in general enough way it is always good.</description>
		<content:encoded><![CDATA[<p>moo,</p>
<p>I do not care about syntax to be honest.  Just would like to see it and would like it to work fast.  If it can be done efficient in general enough way it is always good.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/comment-page-1/#comment-282270</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sat, 19 Apr 2008 06:00:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/04/18/idea-couple-of-more-string-types/#comment-282270</guid>
		<description>Kevin,

Indeed MD5 and SHA1 are binary strings 128 and 160 bits appropriately.    Using hex strings would indeed allow to STORE them as such,   You can get binary presentation of them now using unhex(sha1(&#039;&#039;))  for example but storing this in the database makes things non printable which adds a lot of inconvenience.   For example copy-paste query from the query log quite likely would not work, your console can be trashed by processlist etc. 

If is is not clear  by hex string I mean - string containing 0-f  digits which is packed two characters per byte for storage.</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Indeed MD5 and SHA1 are binary strings 128 and 160 bits appropriately.    Using hex strings would indeed allow to STORE them as such,   You can get binary presentation of them now using unhex(sha1(&#8221;))  for example but storing this in the database makes things non printable which adds a lot of inconvenience.   For example copy-paste query from the query log quite likely would not work, your console can be trashed by processlist etc. </p>
<p>If is is not clear  by hex string I mean &#8211; string containing 0-f  digits which is packed two characters per byte for storage.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
