Bug 224251 - Mysql insert query corrupts table randomly
Mysql insert query corrupts table randomly
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: mysql (Show other bugs)
6
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
David Lawrence
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-24 16:00 EST by Edmond Hui
Modified: 2013-07-02 23:12 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-23 12:56:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Edmond Hui 2007-01-24 16:00:30 EST
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(), '既然中国没有审查互联网,那么
唠点闲嗑', 'http://blog.cnblog.org/archives/2007/01/post_21.html', '', '关于
Tor,大家都比较熟悉了,现在为您介绍另外一款用于突破GFW(也许你需要首先配置好YF,
才能访问这个链接)的软件:Your Freedom,简称YF。 自称为“The Internet\'s most
sophisticated Proxy tunneling solution”的YF安装简便,支持二级代理,且可用于在局
域网用户间共享(根据现行服务条款,Free package不包含Relaying)。最重要的,在海缆
故障期间,欧洲通道优于北美通道,而YF的服务器多位于欧洲,因此YF的速度比Tor要快不
少。 下面开始正题: 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-24 19:38:54 EST
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 06:30:28 EST
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 10:45:01 EST
It's probably beyond my ability to fix :-(  Suggest you report it upstream at
http://bugs.mysql.com/
Comment 4 Edmond Hui 2007-01-25 11:05:26 EST
agreed.
Comment 5 Edmond Hui 2007-03-15 11:51:50 EDT
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?

see http://bugs.mysql.com/bug.php?id=25853
Comment 6 Tom Lane 2007-03-15 21:47:08 EDT
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-15 21:50:07 EDT
Thanks for looking into it.
Comment 8 Tom Lane 2007-03-23 12:56:34 EDT
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.