diff options
author | monty@donna.mysql.com <> | 2000-08-29 19:38:32 +0300 |
---|---|---|
committer | monty@donna.mysql.com <> | 2000-08-29 19:38:32 +0300 |
commit | 306640e2747756fc201cf74508f1cbd8f1d48327 (patch) | |
tree | 11ed770fa863e0b50af0b27d2c231817f7655ef8 /myisam/mi_dbug.c | |
parent | 233857343574c3c80cbcc7f7f749e76fa33a1901 (diff) | |
download | mariadb-git-306640e2747756fc201cf74508f1cbd8f1d48327.tar.gz |
Updates for release
Diffstat (limited to 'myisam/mi_dbug.c')
-rw-r--r-- | myisam/mi_dbug.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/myisam/mi_dbug.c b/myisam/mi_dbug.c index 62d6e039059..c424d65f7ec 100644 --- a/myisam/mi_dbug.c +++ b/myisam/mi_dbug.c @@ -147,3 +147,26 @@ void _mi_print_key(FILE *stream, register MI_KEYSEG *keyseg, VOID(fputs("\"\n",stream)); return; } /* print_key */ + + +#ifdef EXTRA_DEBUG + +my_bool check_table_is_closed(const char *name, const char *where) +{ + char filename[FN_REFLEN]; + LIST *pos; + + (void) fn_format(filename,name,"",MI_NAME_IEXT,4+16+32); + for (pos=myisam_open_list ; pos ; pos=pos->next) + { + MI_INFO *info=(MI_INFO*) pos->data; + MYISAM_SHARE *share=info->s; + if (!strcmp(share->filename,filename)) + { + fprintf(stderr,"Warning: Table: %s is open on %s\n", name,where); + return 1; + } + } + return 0; +} +#endif /* EXTRA_DEBUG */ |