diff options
author | unknown <ingo@mysql.com> | 2005-03-02 10:56:13 +0100 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2005-03-02 10:56:13 +0100 |
commit | cc4455631a51c999324759391f6f843cf97fd923 (patch) | |
tree | 04e597e0f2cb62e0de40965ce2cecaf4f015f6ab /myisam/mi_create.c | |
parent | c4409a7cbf9b43ed450340ba9dd6a33f821df5f2 (diff) | |
parent | 26f75ffc83e39ee915e8d4973955c950ddabb35b (diff) | |
download | mariadb-git-cc4455631a51c999324759391f6f843cf97fd923.tar.gz |
Merge
innobase/include/srv0srv.h:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
myisam/mi_create.c:
Auto merged
myisam/mi_open.c:
Auto merged
myisam/myisamdef.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
mysql-test/r/myisam.result:
SCCS merged
mysql-test/t/myisam.test:
SCCS merged
sql/ha_innodb.h:
SCCS merged
Diffstat (limited to 'myisam/mi_create.c')
-rw-r--r-- | myisam/mi_create.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 1f6ed87182c..3e144cfcbfb 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -558,6 +558,21 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, create_flag=MY_DELETE_OLD; } + /* + If a MRG_MyISAM table is in use, the mapped MyISAM tables are open, + but no entry is made in the table cache for them. + A TRUNCATE command checks for the table in the cache only and could + be fooled to believe, the table is not open. + Pull the emergency brake in this situation. (Bug #8306) + */ + if (test_if_reopen(filename)) + { + my_printf_error(0, "MyISAM table '%s' is in use " + "(most likely by a MERGE table). Try FLUSH TABLES.", + MYF(0), name + dirname_length(name)); + goto err; + } + if ((file= my_create_with_symlink(linkname_ptr, filename, 0, O_RDWR | O_TRUNC, |