<?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: Beware of MySQL Data Truncation</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2009/02/07/beware-of-mysql-data-truncation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2009/02/07/beware-of-mysql-data-truncation/</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: Onno</title>
		<link>http://www.mysqlperformanceblog.com/2009/02/07/beware-of-mysql-data-truncation/comment-page-1/#comment-469562</link>
		<dc:creator>Onno</dc:creator>
		<pubDate>Sun, 08 Feb 2009 18:39:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=611#comment-469562</guid>
		<description>right you are :)</description>
		<content:encoded><![CDATA[<p>right you are <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/2009/02/07/beware-of-mysql-data-truncation/comment-page-1/#comment-469546</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sun, 08 Feb 2009 16:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=611#comment-469546</guid>
		<description>Onno,

In consulting we do not always deal with perfectly designed systems plus this is of course simplified example

It does not matter what comment_id is  - quite common comment_id is unique by itself (so we can fetch data by comment id easily) which may reduce the need of such index.  Not to mention people hunting for performance may be easy on unique indexes because (in innodb) it blocks insert buffer.</description>
		<content:encoded><![CDATA[<p>Onno,</p>
<p>In consulting we do not always deal with perfectly designed systems plus this is of course simplified example</p>
<p>It does not matter what comment_id is  &#8211; quite common comment_id is unique by itself (so we can fetch data by comment id easily) which may reduce the need of such index.  Not to mention people hunting for performance may be easy on unique indexes because (in innodb) it blocks insert buffer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Onno</title>
		<link>http://www.mysqlperformanceblog.com/2009/02/07/beware-of-mysql-data-truncation/comment-page-1/#comment-469275</link>
		<dc:creator>Onno</dc:creator>
		<pubDate>Sun, 08 Feb 2009 09:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=611#comment-469275</guid>
		<description>uh oh.... typed to quickly...

&quot;you change the type for article_id to bigint unsigned but forget linked tables.&quot;

I would never do that, of course. Please forget my second remark 
:)</description>
		<content:encoded><![CDATA[<p>uh oh&#8230;. typed to quickly&#8230;</p>
<p>&#8220;you change the type for article_id to bigint unsigned but forget linked tables.&#8221;</p>
<p>I would never do that, of course. Please forget my second remark<br />
 <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Onno</title>
		<link>http://www.mysqlperformanceblog.com/2009/02/07/beware-of-mysql-data-truncation/comment-page-1/#comment-469268</link>
		<dc:creator>Onno</dc:creator>
		<pubDate>Sun, 08 Feb 2009 09:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=611#comment-469268</guid>
		<description>Nice to know, and indeed, I hardly ever check the warnings...

However, this seems like a bit of a futile problem.

In the case comments can have the same id (i.e. comment #1 can exist on several articles) it would seem logical to me to simply create a unique key on the columns &#039;article_id&#039; and &#039;comment_id&#039; in the table preventing this issue. 
But more importantly; if the database were to be designed coherently, the article with ID 4300000000 would not get created in the first place, so how are people going to comment on an article that never got created in the first place? ;)</description>
		<content:encoded><![CDATA[<p>Nice to know, and indeed, I hardly ever check the warnings&#8230;</p>
<p>However, this seems like a bit of a futile problem.</p>
<p>In the case comments can have the same id (i.e. comment #1 can exist on several articles) it would seem logical to me to simply create a unique key on the columns &#8216;article_id&#8217; and &#8216;comment_id&#8217; in the table preventing this issue.<br />
But more importantly; if the database were to be designed coherently, the article with ID 4300000000 would not get created in the first place, so how are people going to comment on an article that never got created in the first place? <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
