MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 7th, 2000, 12:47 AM
Shawn Shawn is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 1 Shawn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hello,

I have just begun to use mysql for a project I'm working on. mysql is
running on one machine, and on another, there are multiple instances of a
mysql client that repeatedly (and quite frequently) connect, query, and
disconnect from the mysql server.

The problem is, sometimes these queries that would conflict if they weren't
atomic happen at almost the exact same time, and mysqld crashes and
restarts. Here are some examples from the logs:

13313 Connect root@whatever.com on mp3share
13314 Connect root@whatever.com on mp3share
13313 Query DELETE FROM music WHERE
ownername="whatever"
13314 Query SELECT count(*) FROM music
Here, two different clients have connected and almost simultaneously
queried. According to everything I've read, this should not be a problem!
But it is. After this mysqld crashes and restarts.

67863 Connect root@whatever.com on mp3share
67863 Query LOCK TABLES music WRITE, login WRITE
67863 Query DELETE FROM music WHERE
ownername="whatever"
67864 Connect root@whatever.com on mp3share
67864 Query SELECT * FROM login WHERE ip != ""
67863 Query UPDATE login SET ip="" WHERE
user="whatever"
67863 Query UNLOCK TABLES
Here, I tried using write locks. But apparently connection 67864 could care
less about that!
mysqld crashed and restarted right after the UNLOCK TABLES.


1890 Connect root@whatever.com on mp3share
1890 Query LOCK TABLES music WRITE, login WRITE
1890 Query DELETE FROM music WHERE
ownername="whatever"
1891 Connect root@whatever.com on mp3share
1891 Query LOCK TABLES music READ
1890 Query UPDATE login SET ip="" WHERE
user="whatever"
1890 Query UNLOCK TABLES
So, I tried using both READ and WRITE locks on EVERYTHING I did. Exact same
problem!

Here is what shows up in the error log after a crash and restart like I
describe:
Number of processes running now: 1
mysqld process hanging, pid 8016 - killed
mysqld restarted on Mon Mar 6 16:37:27 EST 2000
/usr/sbin/mysqld: ready for connections

I thought any single query statement was atomic? What's going on here??

Clearly I am doing something wrong. I have no idea what. It's probably
really dumb. Thank you very much in advance for any help anyone might be
able to give.

Thanks,
Shawn

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > mysqld conflicting queries?!?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway