Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Same versions of Mysql and the OS (Ubuntu), Databases synced fully. Even the replica gives different results.

One mysql instance is showing 11 results (from a Select distinct statement) and all the other SYNCED db's are showing 12 results.

One the missing result server, if you change it to distinct by uid instead of *, then all 12 show up. So the record is there it's just not showing up in the select query.

any idea's why this is happening?

mysql server version is 5.1.56

here is the select statement:

select distinct
bdtag3_.*
from
Company bdcompany0_
inner join
Company_Tag tags1_
on bdcompany0_.UID=tags1_.COMPANY_UID
inner join
Tag bdtag2_
on tags1_.TAG_UID=bdtag2_.UID
inner join
Tag bdtag3_
on bdtag2_.PARENT=bdtag3_.UID,
CompanyPostedStatus bdcompanyp4_
where
bdcompany0_.POSTED_STATUS_UID=bdcompanyp4_.UID
and bdcompanyp4_.IS_POSTED=1
and bdtag2_.TAG_TYPE_UID=14
order by
bdtag3_.DESCRIPTION
share|improve this question

migrated from serverfault.com Jan 16 '12 at 16:18

This question came from our site for professional system and network administrators.

1 Answer 1

This is just a hunch, but make sure your collation settings are the same between the dbs. I know you said they're synced, but check.

If you can't find anything there run each select into their own outfile

select bdtag3_.* into outfile '/tmp/db1.data' ....

and

select bdtag3_.* into outfile '/tmp/db2.data' ....

You have an order by so running a basic commandline diff should quickly highlight differences.

The pt-table-checksum tool is also handy for finding differences.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.