Commit d2b6d80b authored by Olivier Bertrand's avatar Olivier Bertrand

- A quick and dirty fix for erased or not erased files when executing an

  Alter table on an auto-generated CONNECT table.

modified:
  storage/connect/ha_connect.cc
parent ebcf6ad9
......@@ -3193,6 +3193,10 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to)
TABLE_SHARE *share;
THD *thd= current_thd;
if (to)
if (sscanf(to, fmt, db, tabname) != 2 || *tabname == '#')
goto fin;
if (sscanf(name, fmt, db, tabname) != 2 || *tabname == '#')
goto fin;
......@@ -3932,7 +3936,10 @@ int ha_connect::create(const char *name, TABLE *table_arg,
char buf[256], fn[_MAX_PATH], dbpath[128];
int h;
strcat(strcat(strcpy(buf, GetTableName()), "."), options->type);
strcpy(buf, GetTableName());
if (*buf != '#') {
strcat(strcat(buf, "."), options->type);
sprintf(g->Message, "No file name. Table will use %s", buf);
push_warning(table->in_use,
MYSQL_ERROR::WARN_LEVEL_WARN, 0, g->Message);
......@@ -3946,6 +3953,8 @@ int ha_connect::create(const char *name, TABLE *table_arg,
} else
::close(h);
} // endif buf
} else {
// Check whether indexes were specified
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment