Force bitkeeper into sync

This commit is contained in:
unknown 2000-08-18 17:38:24 +03:00
commit 4fedb12080
5 changed files with 55 additions and 17 deletions

View file

@ -1,15 +1,12 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

View file

@ -407,9 +407,10 @@ int _mi_mark_file_changed(MI_INFO *info)
{
char buff[3];
register MYISAM_SHARE *share=info->s;
if (!share->state.changed || ! share->global_changed)
if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed)
{
share->state.changed|=1;
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
if (!share->global_changed)
{
share->global_changed=1;

View file

@ -78,7 +78,7 @@ typedef struct st_mi_state_info
time_t check_time; /* Time for last check */
uint sortkey; /* sorted by this key (not used) */
uint open_count;
bool changed; /* Changed since isamchk */
uint8 changed; /* Changed since myisamchk */
my_off_t rec_per_key_rows; /* Rows when calculating rec_per_key */
ulong *rec_per_key_part;
@ -279,14 +279,24 @@ struct st_myisam_info {
#define WRITEINFO_UPDATE_KEYFILE 1
#define WRITEINFO_NO_UNLOCK 2
/* bits in state.changed */
#define STATE_CHANGED 1
#define STATE_CRASHED 2
#define STATE_CRASHED_ON_REPAIR 4
#define STATE_NOT_ANALYZED 8
#define STATE_NOT_OPTIMIZED_KEYS 16
#define STATE_NOT_SORTED_PAGES 32
#define mi_getint(x) ((uint) mi_uint2korr(x) & 32767)
#define mi_putint(x,y,nod) { uint16 boh=(nod ? (uint16) 32768 : 0) + (uint16) (y);\
mi_int2store(x,boh); }
#define mi_test_if_nod(x) (x[0] & 128 ? info->s->base.key_reflength : 0)
#define mi_mark_crashed(x) (x)->s->state.changed|=2
#define mi_mark_crashed_on_repair(x) (x)->s->state.changed|=4+2
#define mi_is_crashed(x) ((x)->s->state.changed & 2)
#define mi_is_crashed_on_repair(x) ((x)->s->state.changed & 4)
#define mi_mark_crashed(x) (x)->s->state.changed|=STATE_CRASHED
#define mi_mark_crashed_on_repair(x) (x)->s->state.changed|=STATE_CRASHED|STATE_CRASHED_ON_REPAIR
#define mi_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED)
#define mi_is_crashed_on_repair(x) ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR)
/* Functions to store length of space packed keys, VARCHAR or BLOB keys */

View file

@ -2078,7 +2078,7 @@ static int save_state_mrg(File file,MRG_INFO *mrg,my_off_t new_length,
state.checksum=crc;
if (isam_file->s->base.keys)
isamchk_neaded=1;
state.changed=1; /* Force one check of table */
state.changed=STATE_CHANGED | STATE_NOT_ANALYZED; /* Force check of table */
DBUG_RETURN (mi_state_info_write(file,&state,1+2));
}