LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-14-2009, 11:14 AM   #1
cooljai
Member
 
Registered: May 2007
Location: /dev/random
Distribution: CentOS, Fedora, RHEL, SuSE
Posts: 62

Rep: Reputation: 15
Angry Weird issue in mysql db server


Hi,

I've two Mysql servers (both 5.0.45) on RHEL 5 boxes. I've setup Master to Master Replication and its running perfectly since few weeks. Both servers are accepting read/write with heavy usage.

few related settings (my.cnf):

Server 1:
---------
Code:
server-id=1
auto_increment_increment=2
auto_increment_offset=1
Server 2:
----------
Code:
server-id=2
auto_increment_increment=2
auto_increment_offset=2
So, both servers will insert records without conflicting on auto increment fields, one will generate even numbers and other will odds.

This is what I understood and happening but I just checked an incident where a table has weird values in autoincrement field. A script insert records in this table connecting Server 2 only. No other program/script accessing this table.

Record 1:

ID: 10011 Time: 2009-10-13 02:00:25

Record 2:

ID: 10014 Time: 2009-10-13 02:00:23

Hows this possible? record 1 has higher timestamp but smaller id value then record 2 and moreover isn't record 2 should have odd id value (ie 10013)

Any pointer will be helpful.
 
Old 10-14-2009, 03:12 PM   #2
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
Per MySQL Reference Manual

I am not a MySql guru by any means . . .


You don't say what type of table you are using but it looks like you may have been premature in your settings, since there were problems with them until 5.0.46, at least with NDB tables.

Quote:
#

auto_increment_increment is supported for use with NDB tables beginning with MySQL 5.0.46. Previously, setting it when using MySQL Cluster tables produced unpredictable results.
#

auto_increment_offset is supported for use with NDB tables beginning with MySQL 5.0.46. Previously, setting it when using MySQL Cluster tables produced unpredictable results.
This information can be found here:
http://dev.mysql.com/doc/refman/5.0/...crement_offset

Hope this is useful
 
Old 10-14-2009, 09:51 PM   #3
cooljai
Member
 
Registered: May 2007
Location: /dev/random
Distribution: CentOS, Fedora, RHEL, SuSE
Posts: 62

Original Poster
Rep: Reputation: 15
Hi, thanks for info but all tables in our databases are in MyISAM. I'm still clueless.
 
Old 10-14-2009, 10:41 PM   #4
Smartpatrol
Member
 
Registered: Sep 2009
Posts: 196

Rep: Reputation: 38
...

Last edited by Smartpatrol; 03-11-2010 at 09:44 PM.
 
Old 10-15-2009, 01:05 AM   #5
cooljai
Member
 
Registered: May 2007
Location: /dev/random
Distribution: CentOS, Fedora, RHEL, SuSE
Posts: 62

Original Poster
Rep: Reputation: 15
Hello Smartpatrol, thanks for info. Just checked the time on both servers and found exactly same.

Any other thoughts?

Thanks,
 
  


Reply

Tags
mysql, replication


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird Nagios server issue? - It seems to just stop running lin*x Linux - Server 2 09-21-2009 06:29 AM
Can't access Windows. Weird, weird grub issue. MightyHard Linux - General 2 12-31-2008 04:35 PM
Buzilla issue: "Can't connect to local MySQL server through socket '/tmp/mysql.sock'" vitopn Linux - General 3 05-21-2007 10:13 AM
Multiple Mysql Server issue on Linux rajnair0278 Linux - Software 2 11-08-2006 05:04 AM
weird server issue Nic-MDKman Linux - Security 1 04-26-2004 04:46 PM


All times are GMT -5. The time now is 06:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration