On Fri, Feb 06, 2004 at 08:18:10PM +0000, Phil wrote:
> Doesn't seem to change the mtime on table files. It appears that for
> InnoDB tables these files are only updated when the definition of a
> table is changed. The content of the all InnoDB tables is kept in one or
> two massive files directly under the 'data' directory!

At _some_ point your data has to end up on disk.  I haven't read
up on the caching that MySQL does.  I know you can manually FLUSH
TABLES, but that's of no use to you: you want to passively detect
when the file's changed.

I just did a one-record update to a test database:

Before:

  # ls -ld user.*
  -rw-rw----  1 mysql  mysql  18168 Dec 22 16:58 user.MYD
  -rw-rw----  1 mysql  mysql  20480 Dec 26 18:00 user.MYI
  -rw-rw----  1 mysql  mysql   8794 Dec 11 14:20 user.frm

After:

  # ls -ld user.*
  -rw-rw----  1 mysql  mysql  18168 Feb  7 12:33 user.MYD
  -rw-rw----  1 mysql  mysql  20480 Feb  7 12:33 user.MYI
  -rw-rw----  1 mysql  mysql   8794 Dec 11 14:20 user.frm

I updated that same record again:

  # ls -ld user.*
  -rw-rw----  1 mysql  mysql  18168 Feb  7 12:34 user.MYD
  -rw-rw----  1 mysql  mysql  20480 Feb  7 12:34 user.MYI
  -rw-rw----  1 mysql  mysql   8794 Dec 11 14:20 user.frm

This is with MySQL 3.23.58 and MyISAM tables.

So, in my (very) limited testing; changing a table's content does
promptly correspond to an updated mtime of the data and index
columns.

I do see that you're using InnoDB tables; I'll try to set another
test environment.

Good luck, anyway...

-- 
Brian Reichert                          <[EMAIL PROTECTED]>
37 Crystal Ave. #303                    Daytime number: (603) 434-6842
Derry NH 03038-1713 USA                 BSD admin/developer at large    

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to