List:Commits« Previous MessageNext Message »
From:justin.he Date:August 9 2007 9:19am
Subject:bk commit into 5.1 tree (Justin.He:1.2569) BUG#27817
View as plain text  
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-08-09 17:19:02+08:00, Justin.He@stripped +1 -0
  Bug#27817, NDB table names cannot contain the '-' character

  sql/handler.cc@stripped, 2007-08-09 17:18:58+08:00, Justin.He@stripped +4 -2
    when discover table from engine, seems frm's filename isnot consistent with
    its original table creation, 
    use build_table_filename() to convert frm's name instead of using strxnmov 
    directly

diff -Nrup a/sql/handler.cc b/sql/handler.cc
--- a/sql/handler.cc	2007-07-19 18:54:28 +08:00
+++ b/sql/handler.cc	2007-08-09 17:18:58 +08:00
@@ -2648,6 +2648,7 @@ int ha_create_table_from_engine(THD* thd
   uchar *frmblob;
   size_t frmlen;
   char path[FN_REFLEN];
+  uint path_length;
   HA_CREATE_INFO create_info;
   TABLE table;
   TABLE_SHARE share;
@@ -2666,8 +2667,9 @@ int ha_create_table_from_engine(THD* thd
     frmblob and frmlen are set, write the frm to disk
   */
 
-  (void)strxnmov(path,FN_REFLEN-1,mysql_data_home,FN_ROOTDIR,
-                 db,FN_ROOTDIR,name,NullS);
+  path_length= build_table_filename(path, sizeof(path), db, name, reg_ext, 0);
+  path[path_length - reg_ext_length]= '\0'; // Remove .frm extension
+
   // Save the frm file
   error= writefrm(path, frmblob, frmlen);
   my_free(frmblob, MYF(0));
Thread
bk commit into 5.1 tree (Justin.He:1.2569) BUG#27817justin.he9 Aug