Skip to content
Permalink
Browse files
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.
  • Loading branch information
vuvova committed Feb 5, 2019
1 parent 676f43d commit db8f0da
Showing 1 changed file with 3 additions and 1 deletion.
@@ -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)

0 comments on commit db8f0da

Please sign in to comment.