summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_locking.c13
-rw-r--r--myisam/mi_open.c13
-rw-r--r--myisam/mi_rkey.c2
-rw-r--r--myisam/mi_search.c8
-rw-r--r--myisam/mi_static.c2
-rw-r--r--myisam/myisamdef.h2
6 files changed, 24 insertions, 16 deletions
diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c
index e067e80fcf3..8ef5db1d344 100644
--- a/myisam/mi_locking.c
+++ b/myisam/mi_locking.c
@@ -412,11 +412,14 @@ int _mi_mark_file_changed(MI_INFO *info)
share->global_changed=1;
share->state.open_count++;
}
- mi_int2store(buff,share->state.open_count);
- buff[2]=1; /* Mark that it's changed */
- return (my_pwrite(share->kfile,buff,sizeof(buff),
- sizeof(share->state.header),
- MYF(MY_NABP)));
+ if (!share->temporary)
+ {
+ mi_int2store(buff,share->state.open_count);
+ buff[2]=1; /* Mark that it's changed */
+ return (my_pwrite(share->kfile,buff,sizeof(buff),
+ sizeof(share->state.header),
+ MYF(MY_NABP)));
+ }
}
return 0;
}
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 28f984006df..7f94de9ffa2 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -777,14 +777,17 @@ uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, my_bool pRead)
{
char buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE];
- if (pRead)
+ if (!myisam_single_user)
{
- if (my_pread(file, buff, state->state_length,0L, MYF(MY_NABP)))
+ if (pRead)
+ {
+ if (my_pread(file, buff, state->state_length,0L, MYF(MY_NABP)))
+ return (MY_FILE_ERROR);
+ }
+ else if (my_read(file, buff, state->state_length,MYF(MY_NABP)))
return (MY_FILE_ERROR);
+ mi_state_info_read(buff, state);
}
- else if (my_read(file, buff, state->state_length,MYF(MY_NABP)))
- return (MY_FILE_ERROR);
- mi_state_info_read(buff, state);
return 0;
}
diff --git a/myisam/mi_rkey.c b/myisam/mi_rkey.c
index 84612779f5d..0df390412b9 100644
--- a/myisam/mi_rkey.c
+++ b/myisam/mi_rkey.c
@@ -28,7 +28,7 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
uchar *key_buff;
MYISAM_SHARE *share=info->s;
uint pack_key_length;
- DBUG_ENTER("_mi_rkey");
+ DBUG_ENTER("mi_rkey");
DBUG_PRINT("enter",("base: %lx inx: %d search_flag: %d",
info,inx,search_flag));
diff --git a/myisam/mi_search.c b/myisam/mi_search.c
index 972f7fc5093..1db8c2a8b67 100644
--- a/myisam/mi_search.c
+++ b/myisam/mi_search.c
@@ -158,7 +158,7 @@ int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
info->page_changed=0;
info->buff_used= (info->buff != buff); /* If we have to reread buff */
- DBUG_PRINT("exit",("found key at %ld",info->lastpos));
+ DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos));
DBUG_RETURN(0);
err:
DBUG_PRINT("exit",("Error: %d",my_errno));
@@ -1478,7 +1478,7 @@ int _mi_search_next(register MI_INFO *info, register MI_KEYDEF *keyinfo,
}
memcpy(info->lastkey,lastkey,info->lastkey_length);
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
- DBUG_PRINT("exit",("found key at %d",info->lastpos));
+ DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos));
DBUG_RETURN(0);
} /* _mi_search_next */
@@ -1520,7 +1520,7 @@ int _mi_search_first(register MI_INFO *info, register MI_KEYDEF *keyinfo,
info->page_changed=info->buff_used=0;
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
- DBUG_PRINT("exit",("found key at %d",info->lastpos));
+ DBUG_PRINT("exit",("found key at %ld",(ulong) info->lastpos));
DBUG_RETURN(0);
} /* _mi_search_first */
@@ -1564,7 +1564,7 @@ int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo,
info->last_search_keypage=info->last_keypage;
info->page_changed=info->buff_used=0;
- DBUG_PRINT("exit",("found key at %d",info->lastpos));
+ DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos));
DBUG_RETURN(0);
} /* _mi_search_last */
diff --git a/myisam/mi_static.c b/myisam/mi_static.c
index f790f90ca78..bb7fece4d18 100644
--- a/myisam/mi_static.c
+++ b/myisam/mi_static.c
@@ -32,7 +32,7 @@ my_string myisam_log_filename=(char*) "myisam.log";
File myisam_log_file= -1;
uint myisam_quick_table_bits=9;
uint myisam_block_size=MI_KEY_BLOCK_LENGTH; /* Best by test */
-my_bool myisam_flush=0,myisam_delay_key_write=0;
+my_bool myisam_flush=0, myisam_delay_key_write=0, myisam_single_user=0;
#if defined(THREAD) && !defined(DONT_USE_RW_LOCKS)
my_bool myisam_concurrent_insert=1;
#else
diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h
index d309bbc9c8e..7c8a4a113f4 100644
--- a/myisam/myisamdef.h
+++ b/myisam/myisamdef.h
@@ -531,6 +531,8 @@ extern int _mi_read_rnd_pack_record(MI_INFO*, byte *,my_off_t, my_bool);
extern int _mi_pack_rec_unpack(MI_INFO *info,byte *to,byte *from,
ulong reclength);
extern ulonglong mi_safe_mul(ulonglong a,ulonglong b);
+extern int _mi_ft_update(MI_INFO *info, uint keynr, byte *keybuf,
+ const byte *oldrec, const byte *newrec, my_off_t pos);
struct st_sort_info;