diff options
author | Kristofer.Pettersson@naruto. <> | 2006-09-20 07:40:56 +0200 |
---|---|---|
committer | Kristofer.Pettersson@naruto. <> | 2006-09-20 07:40:56 +0200 |
commit | 1db3f602485f0d6e55cf2aa040d7e2f67987c4a6 (patch) | |
tree | ffc0ac8835c6953887642cd1c679c60b4b888b48 /storage/myisam/mi_locking.c | |
parent | 8ec47c091e7313bd6dff65671dcc397f0d18047e (diff) | |
parent | 70316e06873e645e09da63a8eec7a48a9abde906 (diff) | |
download | mariadb-git-1db3f602485f0d6e55cf2aa040d7e2f67987c4a6.tar.gz |
Merge naruto.:C:/cpp/bug20789/my50-bug20789
into naruto.:C:/cpp/bug20789/my51-bug20789
Diffstat (limited to 'storage/myisam/mi_locking.c')
-rw-r--r-- | storage/myisam/mi_locking.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/storage/myisam/mi_locking.c b/storage/myisam/mi_locking.c index ecb737867f5..a8e2de5ea5a 100644 --- a/storage/myisam/mi_locking.c +++ b/storage/myisam/mi_locking.c @@ -237,6 +237,21 @@ int mi_lock_database(MI_INFO *info, int lock_type) break; /* Impossible */ } } +#ifdef __WIN__ + else + { + /* + Check for bad file descriptors if this table is part + of a merge union. Failing to capture this may cause + a crash on windows if the table is renamed and + later on referenced by the merge table. + */ + if( info->owned_by_merge && (info->s)->kfile < 0 ) + { + error = HA_ERR_NO_SUCH_TABLE; + } + } +#endif pthread_mutex_unlock(&share->intern_lock); #if defined(FULL_LOG) || defined(_lint) lock_type|=(int) (flag << 8); /* Set bit to set if real lock */ |