1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-28 17:36:30 +03:00

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.
This commit is contained in:
Sergei Golubchik
2019-02-03 18:43:42 +01:00
parent 676f43da3a
commit db8f0daeb4

View File

@@ -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)