Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 224251 - Mysql insert query corrupts table randomly
Summary: Mysql insert query corrupts table randomly
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 6
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Tom Lane
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2007-01-24 21:00 UTC by Edmond Hui
Modified: 2013-07-03 03:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-03-23 16:56:34 UTC

Attachments (Terms of Use)

Description Edmond Hui 2007-01-24 21:00:30 UTC
Description of problem:

MySQL insert operation seem to corrupt table with a duplicate key often. (This
does not happen in FC4 before upgrade)

How reproducible:

I am running many web application i.e. NucleusCMS and Gregarius, both encounter
this issue.

error often like this:
Failed to execute the SQL query

insert into item (cid, added, title, url, enclosure, description, author,
unread, pubdate, md5sum, guid) values (30, now(), '既然中国没有审查互联网,那么
唠点闲嗑', '', '', '关于
才能访问这个链接)的软件:Your Freedom,简称YF。 自称为“The Internet\'s most
sophisticated Proxy tunneling solution”的YF安装简便,支持二级代理,且可用于在局
域网用户间共享(根据现行服务条款,Free package不包含Relaying)。最重要的,在海缆
少。 下面开始正题: 1、在YF的网站上注册一个用户,并通过电子邮件验证; 2、下载并
安装YF,YF构建得很勤,现在的版本是20070112; 3、运行,使用向导建立最基本的配置,
重要的是选择Freedom server时要根据实际的测试结果选一个最佳的,而不一定是使用默认
的第一行; 4、配置你的客户端程序,socks端口是1080,http端口是8080。 后记,与伟大
的金盾工程相比,虽然SSH/VPN Tunneling技术让内容过滤变得困难,但是毕竟路由节点是
有限的,即使是戴了套套也无济于事,所以只是还没到Net Nanny发脾气的时候。同时,听
说已经有人民警察放出了psiphon服务器的诱饵,就等你上钩了。...', 'hanson', 1,
FROM_UNIXTIME(1168923240), 'c2cdfc07847c6ce9e6c98e8f6817f5ea', '')

Error 1062: Duplicate entry '565' for key 1

In this case, Gregarius (a PHP based RSS reader) trying to insert a new item to
the a table.

Comment 1 Tom Lane 2007-01-25 00:38:54 UTC
With such a vague problem description, there's really nothing I can do with this
report.  Can you put together a reproducible test case?

Comment 2 Edmond Hui 2007-01-25 11:30:28 UTC
Sorry for not giving more info. The problem really happen randomly. I have a 
few web applications running on the server and this just happened once every 
few days. So, I have no idea how to reproduce it.

Some more info hopefully help shine some light is My server is a AMD64 X2 3800+ 
deal-core CPU, I suspect this happened when multiple insert queries execute at 
the same time. The reason for saying this is that I notice Gregarius is 
configured to do 3 RSS feeds checking on the same time, and once in a while 
this corruption resulted. And in my NucleusCMS blog case, the corrupted table 
is to store a key that generate during on each page load, which multiple access 
can happened on the same time.

Not sure this give some more idea on the problem.

Comment 3 Tom Lane 2007-01-25 15:45:01 UTC
It's probably beyond my ability to fix :-(  Suggest you report it upstream at

Comment 4 Edmond Hui 2007-01-25 16:05:26 UTC

Comment 5 Edmond Hui 2007-03-15 15:51:50 UTC
I contact MySQL and they said to retry on 5.0.37. Is there plan to upgrade to
this version for FC6 on x86_64?


Comment 6 Tom Lane 2007-03-16 01:47:08 UTC
I'm looking at it ... they seem to have made some incompatible changes, which we can't allow to go into 
FC6 (people would be unhappy if a routine "yum update" broke their databases ...), so it's a question of 
whether I can back those out or not.

Comment 7 Edmond Hui 2007-03-16 01:50:07 UTC
Thanks for looking into it.

Comment 8 Tom Lane 2007-03-23 16:56:34 UTC
5.0.37 has been pushed as a test update for FC6.

Note You need to log in before you can comment on or make changes to this bug.