mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
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
This commit is contained in:
commit
cc4455631a
9 changed files with 69 additions and 11 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ if (pos > end_pos) \
|
|||
** In MySQL the server will handle version issues.
|
||||
******************************************************************************/
|
||||
|
||||
static MI_INFO *test_if_reopen(char *filename)
|
||||
MI_INFO *test_if_reopen(char *filename)
|
||||
{
|
||||
LIST *pos;
|
||||
|
||||
|
|
|
|||
|
|
@ -708,6 +708,7 @@ void mi_copy_status(void* to,void *from);
|
|||
my_bool mi_check_status(void* param);
|
||||
void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
|
||||
|
||||
extern MI_INFO *test_if_reopen(char *filename);
|
||||
my_bool check_table_is_closed(const char *name, const char *where);
|
||||
int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, File file_to_dup);
|
||||
int mi_open_keyfile(MYISAM_SHARE *share);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue