Commit db8f0dae authored by Sergei Golubchik's avatar Sergei Golubchik

CONNECT: calculate table_name from the path

CONNECT used to compute table file path as
table->s->db_name + table->s->table_name
instead of using table->s->path. This was incorrect and now it breaks
for temporary tables during ALTER TABLE.

Temporarily "fix" it by making CONNECT to use what it always used
as a table name - the last component in the table->s->path.
parent 676f43da
......@@ -1815,7 +1815,9 @@ PCSZ ha_connect::GetDBName(PCSZ name)
const char *ha_connect::GetTableName(void)
{
return tshp ? tshp->table_name.str : table_share->table_name.str;
const char *path= tshp ? tshp->path.str : table_share->path.str;
const char *name= strrchr(path, '/');
return name ? name+1 : path;
} // end of GetTableName
char *ha_connect::GetPartName(void)
......
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