List:Internals« Previous MessageNext Message »
From:Guilhem Bichot Date:February 3 2009 2:18pm
Subject:Re: Question about data_file_length and key_file_length from
st_myisam_info::state
View as plain text  

MARK CALLAGHAN a écrit, Le 02/03/2009 03:10 PM:
> On Tue, Feb 3, 2009 at 5:19 AM, Guilhem Bichot <guilhem@stripped> wrote:
>> Hi Mark,
>>
>> MARK CALLAGHAN a écrit, Le 02/02/2009 10:32 PM:
>>> Are data_file_length and key_file_length valid in ha_myisam::write_row
>>> when accessed via file->state in the MyISAM handler? I want to enforce
>>> a limit on the max on-disk size of a table and this might be simple to
>>> do for MyISAM tables if I can trust the values of
>>> file->state->data_file_length and file->state->key_file_length
> without
>>> calling mi_status().
>> You can at least trust that at the moment when the table is locked, they are
>> equal to the files' length.
>> Between locking and unlocking, I'm unclear about what happens (something in
>> the mi_*_status() functions of mi_locking.c).
>> I suggest using gdb to check, or waiting for a more knowledgable answer
>> here.
> 
> OK. I need to refine my question. I want to know whether the data is
> reasonably accurate. It doesn't have to be exact.

Yes, it is reasonably exact. I guess it will be different from the true 
size by something between 0 and the size of your record.

-- 
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com
Thread
Question about data_file_length and key_file_length from st_myisam_info::stateMARK CALLAGHAN2 Feb
  • Re: Question about data_file_length and key_file_length fromst_myisam_info::stateGuilhem Bichot3 Feb
    • Re: Question about data_file_length and key_file_length from st_myisam_info::stateMARK CALLAGHAN3 Feb
      • Re: Question about data_file_length and key_file_length fromst_myisam_info::stateGuilhem Bichot3 Feb