Bug #11692 insert or delete command was excuted, though execute update command
Submitted: 1 Jul 2005 14:51 Modified: 13 Nov 2005 14:02
Reporter: ryou kasumi Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:1.0.4 OS:Windows (windows2003)
Assigned to: Vasily Kishkin CPU Architecture:Any

[1 Jul 2005 14:51] ryou kasumi
Description:
hello,

<ENV>
OS:windows2003, windows2000 advanced server
.NET: 1.1
MySQL:4.0.21-nt, 4.0.23-nt
.NET connector:1.0.4

<Web application>
I made the web application.
Any users edit the record he selected with web application at same time.
User push edit button, "update" command is executed to MySQL DB via .NET connector1.0.4.
UI is made by ASP.NET 1.1.

<Problem>
In case two user push edit button at same time,
Web application executes "update" command, but "insert" or "delete" or other  update command was executed, sometime new record was added, sometime that record was deleted.

<Debug>
By debug mode, I could confirm Web application send "update" command to .NET connector, but I could confirm other command was executed on DB log.

How to repeat:
<sample Table structure>
Z int
X text
C varchar(100)
v char(1)
upd_date datetime

<sample table data>
Z|X|C|v|upd_date
1|null|hoge|A|null
2|null|hoge2|B|null

<step1>
User A choice record A on Web Data Grid
User B choice recrod B on Web Data Grid
(select * from sample)
<step2>
User A can browse web page he can edit record A.
(this page is text box)
User B also can browse web page record B.
(select * from sample where v='A') (select * from sample where v='B')
<step3>
User A push edit button 
User B push edit button, at same time or near the timing.
(update sample set X='AAA'  where v='A') 
(update sample set X='BBB'  where v='B') 

<step4>
(update sample set X='AAA'  where v='A') 
(update sample set X='BBB'  where v='B') 
both sql command is not executed,

(update sample set Z='1' X='AAA' C='hoge' v='A' where v='A')
is executed, but double records was made and B record was deleted.
Z|X|C|v|update
1|AAA|hoge|A|2005/07/01 12:22:22
1|AAA|hoge|A|

where is B record????

<DB log>
12:22:21 update sample set Z='1' X='AAA' C='hoge' v='A' where v='A'
12:22:22 update sample set X='AAA'  where v='A'

so, delete command log is nothing....
and wrong update command was executed before correct update command.....

Best Regards,
Ryou
[3 Jul 2005 12:41] ryou kasumi
The login user that web application use doesn't have authority to DB "insert" and "delete".
Just only "select" and "update".
[11 Oct 2005 8:02] Vasily Kishkin
Sorry... I was not able to reproduce the bug. Could you please create and attach some simple test case ?
[12 Nov 2005 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[13 Nov 2005 14:02] ryou kasumi
thank you confirming.
I knew my application has bug.
so, it's possibility of the cause is my application.
I closed this issue.

Thanks.