Last Update time of a MyISAM table

Last Update time of a MyISAM table

am 06.06.2007 10:34:32 von Guy Gordon

I have an application (written in Delphi) in which I read a small table =
into an
array for constant access. At any time (but infrequently) the table =
might be
updated by a different process. I want my code to spot this event and =
reload
the table. This doesn't have to be done in seconds, but within a few =
minutes.

I intend to do this;
SQL 'Flush Tables tname1,tname2,tname3'
SQL 'Show Table Status like "tname1"'
if (SavedUpdateTname1<>Row[12]) then ReloadTable1;
....2,3

I found I have to Flush the tables, or else changes are not reflected in =
the
Status. This code will run about every minute or even several times per =
minute.

Questions:
1. Does this look like a reasonable way to accomplish my goal? =20

2. In the Flush Tables documentation there is this cryptic paragraph:

13.5.5.2. FLUSH Syntax
{TABLE | TABLES} [tbl_name [, tbl_name] ...]
When no tables are named, closes all open tables and forces all tables in=
use to
be closed. This also flushes the query cache. With one or more table =
names,
flushes only the given tables. FLUSH TABLES also removes all query =
results from
the query cache, like the RESET QUERY CACHE statement.

I certainly don't want to flush the query cache several times per minute.=
Do
the second two sentences above refer to the case "When no tables are =
named",
or will it also happen when I name a table?





--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org