From: Rick James Date: February 26 2013 9:14pm Subject: RE: data loss due to misconfiguration List-Archive: http://lists.mysql.com/mysql/229043 Message-Id: <582AFBFC517D194489EF570FE21694CF13661540@GQ1-EX10-MB03.y.corp.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable If it is MyISAM and there is some form of corruption, you might get the sym= ptom you see. Do CHECK TABLE. information_schema has the same "flaw" in row count as SHOW TABLE STATUS fo= r InnoDB. > -----Original Message----- > From: Stillman, Benjamin [mailto:BStillman@stripped] > Sent: Tuesday, February 26, 2013 11:04 AM > To: Zachary Stern; mysql@stripped > Subject: RE: data loss due to misconfiguration >=20 > Are you actually querying the table (select count(*) from table_name), > or just the stats (show table status)? Is the table Innodb? >=20 > If you're using Innodb and aren't doing a select count (or other > select query) on the table, then yes you'll have varying results. This > is because unlike MyISAM, Innodb does not keep a count of the records. > Using show table status gives just an estimation. This would be my > first path of investigation. >=20 > http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html >=20 > "The number of rows. Some storage engines, such as MyISAM, store the > exact count. For other storage engines, such as InnoDB, this value is > an approximation, and may vary from the actual value by as much as 40 > to 50%. In such cases, use SELECT COUNT(*) to obtain an accurate > count." >=20 >=20 >=20 > -----Original Message----- > From: Zachary Stern [mailto:zs@stripped] > Sent: Tuesday, February 26, 2013 12:42 PM > To: mysql@stripped > Subject: data loss due to misconfiguration >=20 > Is such a thing possible? There are no errors or issues, but we can > query a table, get X number of rows, query it later, and all of the > sudden be missing a thousand rows. >=20 > I know this isn't much to go on, but I'm not even sure what information > to provide. Will be happy to give anything you guys might be able to > think of. >=20 > TIA. >=20 > -Zachary >=20 > ________________________________ >=20 > Notice: This communication may contain privileged and/or confidential > information. If you are not the intended recipient, please notify the > sender by email, and immediately delete the message and any attachments > without copying or disclosing them. LBI may, for any reason, intercept, > access, use, and disclose any information that is communicated by or > through, or which is stored on, its networks, applications, services, > and devices. >=20 > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql