diff options
author | monty@donna.mysql.com <> | 2000-08-18 17:38:57 +0300 |
---|---|---|
committer | monty@donna.mysql.com <> | 2000-08-18 17:38:57 +0300 |
commit | 86f4dbe20e850a6161d69b7407838c28a8bf93f9 (patch) | |
tree | a407e69716564ef77bf47429757e05e7a5c4db89 /myisam | |
parent | b2760c0a8032134cbc7aadf0eeda407bee4121e4 (diff) | |
parent | 1243abdcf27fe3c4b132035c7d140e7c426b2f2f (diff) | |
download | mariadb-git-86f4dbe20e850a6161d69b7407838c28a8bf93f9.tar.gz |
Merge monty@work:/home/bk/mysql into donna.mysql.com:/home/my/bk/mysql
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/ft_eval.c | 3 | ||||
-rw-r--r-- | myisam/mi_locking.c | 5 | ||||
-rw-r--r-- | myisam/myisamdef.h | 20 | ||||
-rw-r--r-- | myisam/myisampack.c | 2 |
4 files changed, 19 insertions, 11 deletions
diff --git a/myisam/ft_eval.c b/myisam/ft_eval.c index 008e148385f..a8e4d8e8881 100644 --- a/myisam/ft_eval.c +++ b/myisam/ft_eval.c @@ -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 */ diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c index 24a23bda7e2..c6fc8736145 100644 --- a/myisam/mi_locking.c +++ b/myisam/mi_locking.c @@ -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; diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h index e1263c89ff5..bd100437c35 100644 --- a/myisam/myisamdef.h +++ b/myisam/myisamdef.h @@ -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 */ diff --git a/myisam/myisampack.c b/myisam/myisampack.c index 23d7f494994..fbb543152f8 100644 --- a/myisam/myisampack.c +++ b/myisam/myisampack.c @@ -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)); } |