diff -Narup ./server/sql/ha_partition.cc ./server-with-connect-string-patch/sql/ha_partition.cc
--- ./server/sql/ha_partition.cc	2016-11-29 19:56:47.037326899 +0900
+++ ./server-with-connect-string-patch/sql/ha_partition.cc	2016-11-30 09:57:24.000000000 +0900
@@ -1515,7 +1515,10 @@ int ha_partition::prepare_new_partition(
   if ((error= set_up_table_before_create(tbl, part_name, create_info, p_elem)))
     goto error_create;
 
+  if (!(file->ht->flags & HTON_CAN_READ_CONNECT_STRING_IN_PARTITION))
+  {
   tbl->s->connect_string = p_elem->connect_string;
+  }
   if ((error= file->ha_create(part_name, tbl, create_info)))
   {
     /*
@@ -2083,7 +2086,10 @@ void ha_partition::update_create_info(HA
   my_bool from_alter = (create_info->data_file_name == (const char*) -1);
   create_info->data_file_name= create_info->index_file_name = NULL;
 
+  if (!(m_file[0]->ht->flags & HTON_CAN_READ_CONNECT_STRING_IN_PARTITION))
+  {
   create_info->connect_string= null_lex_str;
+  }
 
   /*
     We do not need to update the individual partition DATA DIRECTORY settings
@@ -2554,10 +2560,13 @@ int ha_partition::set_up_table_before_cr
   }
   info->index_file_name= part_elem->index_file_name;
   info->data_file_name= part_elem->data_file_name;
+  if (!(m_file[0]->ht->flags & HTON_CAN_READ_CONNECT_STRING_IN_PARTITION))
+  {
   info->connect_string= part_elem->connect_string;
   if (info->connect_string.length)
     info->used_fields|= HA_CREATE_USED_CONNECTION;
   tbl->s->connect_string= part_elem->connect_string;
+  }
   DBUG_RETURN(0);
 }
 
@@ -3488,11 +3497,17 @@ int ha_partition::open(const char *name,
    {
       create_partition_name(name_buff, name, name_buffer_ptr, NORMAL_PART_NAME,
                             FALSE);
+      if (!((*file)->ht->flags & HTON_CAN_READ_CONNECT_STRING_IN_PARTITION))
+      {
       table->s->connect_string = m_connect_string[(uint)(file-m_file)];
+      }
       if ((error= (*file)->ha_open(table, name_buff, mode,
                                    test_if_locked | HA_OPEN_NO_PSI_CALL)))
         goto err_handler;
+      if (!((*file)->ht->flags & HTON_CAN_READ_CONNECT_STRING_IN_PARTITION))
+      {
       bzero(&table->s->connect_string, sizeof(LEX_STRING));
+      }
       if (m_file == file)
         m_num_locks= (*file)->lock_count();
       DBUG_ASSERT(m_num_locks == (*file)->lock_count());
diff -Narup ./server/sql/handler.h ./server-with-connect-string-patch/sql/handler.h
--- ./server/sql/handler.h	2016-11-29 19:56:47.040326899 +0900
+++ ./server-with-connect-string-patch/sql/handler.h	2016-11-30 02:50:34.000000000 +0900
@@ -1402,6 +1402,7 @@ handlerton *ha_default_tmp_handlerton(TH
 #define HTON_SUPPORT_LOG_TABLES      (1 << 7) //Engine supports log tables
 #define HTON_NO_PARTITION            (1 << 8) //Not partition of these tables
 #define HTON_CAN_MULTISTEP_MERGE     (1 << 9) //You can merge mearged tables
+#define HTON_CAN_READ_CONNECT_STRING_IN_PARTITION (1 <<10) //Engine can read connect string in partition directly
 
 /*
   This flag should be set when deciding that the engine does not allow
diff -Narup ./server/sql/sql_table.cc ./server-with-connect-string-patch/sql/sql_table.cc
--- ./server/sql/sql_table.cc	2016-11-29 19:56:47.118326899 +0900
+++ ./server-with-connect-string-patch/sql/sql_table.cc	2016-11-30 09:47:28.000000000 +0900
@@ -7978,6 +7978,11 @@ mysql_prepare_alter_table(THD *thd, TABL
     create_info->comment.str= table->s->comment.str;
     create_info->comment.length= table->s->comment.length;
   }
+  if (!create_info->connect_string.str)
+  {
+    create_info->connect_string.str= table->s->connect_string.str;
+    create_info->connect_string.length= table->s->connect_string.length;
+  }
 
   table->file->update_create_info(create_info);
   if ((create_info->table_options &
diff -Narup ./server/sql/table.cc ./server-with-connect-string-patch/sql/table.cc
--- ./server/sql/table.cc	2016-11-29 19:56:47.129326899 +0900
+++ ./server-with-connect-string-patch/sql/table.cc	2016-11-30 09:50:45.000000000 +0900
@@ -3758,6 +3758,7 @@ void update_create_info_from_table(HA_CR
   create_info->default_table_charset= share->table_charset;
   create_info->table_charset= 0;
   create_info->comment= share->comment;
+  create_info->connect_string= share->connect_string;
   create_info->transactional= share->transactional;
   create_info->page_checksum= share->page_checksum;
   create_info->option_list= share->option_list;
