summaryrefslogtreecommitdiff
path: root/storage/myisam/myisamdef.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisam/myisamdef.h')
-rw-r--r--storage/myisam/myisamdef.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h
index 7f617fd044e..43746975232 100644
--- a/storage/myisam/myisamdef.h
+++ b/storage/myisam/myisamdef.h
@@ -166,6 +166,7 @@ typedef struct st_mi_isam_share { /* Shared between opens */
MI_COLUMNDEF *rec; /* Pointer to field information */
MI_PACK pack; /* Data about packed records */
MI_BLOB *blobs; /* Pointer to blobs */
+ LIST *in_use; /* List of threads using this table */
char *unique_file_name; /* realpath() of index file */
char *data_file_name, /* Resolved path names from symlinks */
*index_file_name;
@@ -243,6 +244,7 @@ struct st_myisam_info {
DYNAMIC_ARRAY *ft1_to_ft2; /* used only in ft1->ft2 conversion */
MEM_ROOT ft_memroot; /* used by the parser */
MYSQL_FTPARSER_PARAM *ftparser_param; /* share info between init/deinit */
+ LIST in_use; /* Thread using this table */
char *filename; /* parameter to open filename */
uchar *buff, /* Temp area for key */
*lastkey,*lastkey2; /* Last used search key */
@@ -386,8 +388,10 @@ typedef struct st_mi_sort_param
#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_report_crashed(A, B) _mi_report_crashed((A), (B), __FILE__, __LINE__)
#define mi_mark_crashed(x) do{(x)->s->state.changed|= STATE_CRASHED; \
DBUG_PRINT("error", ("Marked table crashed")); \
+ mi_report_crashed((x), 0); \
}while(0)
#define mi_mark_crashed_on_repair(x) do{(x)->s->state.changed|= \
STATE_CRASHED|STATE_CRASHED_ON_REPAIR; \
@@ -765,6 +769,8 @@ int mi_open_keyfile(MYISAM_SHARE *share);
void mi_setup_functions(register MYISAM_SHARE *share);
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size);
void mi_remap_file(MI_INFO *info, my_off_t size);
+void _mi_report_crashed(MI_INFO *file, const char *message,
+ const char *sfile, uint sline);
/* Functions needed by mi_check */
volatile int *killed_ptr(MI_CHECK *param);