From: Date: March 13 2007 8:56am Subject: bk commit into 5.1 tree (Justin.He:1.2444) BUG#25875 List-Archive: http://lists.mysql.com/commits/21777 X-Bug: 25875 Message-Id: <200703130756.l2D7uFmf003102@dev3-240.dev.cn.tlan> Below is the list of changes that have just been committed into a local 5.1 repository of justin.he. When justin.he does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-03-13 15:56:08+08:00, Justin.He@stripped +1 -0 Bug#25875, Newly created table through CREATE TABLE .. LIKE has no ndb_dd attributes sql/sql_table.cc@stripped, 2007-03-13 15:56:05+08:00, Justin.He@stripped +13 -0 add something to get possible tablespace info from src table in mysql_create_like_table() at sql/sql_table.cc # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: Justin.He # Host: dev3-240.dev.cn.tlan # Root: /home/justin.he/mysql/mysql-5.1/bug25875-5.1-new-ndb-bj --- 1.388/sql/sql_table.cc 2007-03-13 15:56:15 +08:00 +++ 1.389/sql/sql_table.cc 2007-03-13 15:56:15 +08:00 @@ -4613,6 +4613,7 @@ bool res= TRUE, unlock_dst_table= FALSE; enum legacy_db_type not_used; HA_CREATE_INFO *create_info; + char ts_name[FN_LEN]; TABLE_LIST src_tables_list, dst_tables_list; DBUG_ENTER("mysql_create_like_table"); @@ -4693,6 +4694,18 @@ 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