mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Bug#25875, Newly created table through CREATE TABLE .. LIKE has no ndb_dd attributes
sql/sql_table.cc: add something to get possible tablespace info from src table in mysql_create_like_table() at sql/sql_table.cc
This commit is contained in:
parent
2bb6cec5d4
commit
e10f4df414
1 changed files with 13 additions and 0 deletions
|
@ -4611,6 +4611,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
|
|||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
char tmp_path[FN_REFLEN];
|
||||
#endif
|
||||
char ts_name[FN_LEN];
|
||||
TABLE_LIST src_tables_list, dst_tables_list;
|
||||
DBUG_ENTER("mysql_create_like_table");
|
||||
|
||||
|
@ -4691,6 +4692,18 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
|
|||
if (simple_open_n_lock_tables(thd, &src_tables_list))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
/*
|
||||
For bug#25875, Newly created table through CREATE TABLE .. LIKE
|
||||
has no ndb_dd attributes;
|
||||
Add something to get possible tablespace info from src table,
|
||||
it can get valid tablespace name only for disk-base ndb table
|
||||
*/
|
||||
if ((src_tables_list.table->file->get_tablespace_name(thd, ts_name, FN_LEN)))
|
||||
{
|
||||
create_info->tablespace= ts_name;
|
||||
create_info->storage_media= HA_SM_DISK;
|
||||
}
|
||||
|
||||
/*
|
||||
Validate the destination table
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue