[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-win32
Subject:    Last Update time of a MyISAM table
From:       Guy Gordon <gordon () white-crane ! com>
Date:       2007-06-06 8:34:32
Message-ID: 07rc63tcc2c5dafo84trntj8gf5je0o8bj () 4ax ! com
[Download RAW message or body]

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?   

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=mysql-win32@progressive-comp.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic