diff options
author | svoj@mysql.com <> | 2005-10-10 23:53:53 +0500 |
---|---|---|
committer | svoj@mysql.com <> | 2005-10-10 23:53:53 +0500 |
commit | 83043c3c830a8ef20a5817337a34a7a849d16a64 (patch) | |
tree | 26b50042762d684389eda925a63c8133540a234e /sql/unireg.cc | |
parent | eb8ab300463fbfffd92f436496ecf9915de8a64e (diff) | |
download | mariadb-git-83043c3c830a8ef20a5817337a34a7a849d16a64.tar.gz |
Always save/restore connect string.
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index 402d24a665b..e4f5c8251dc 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -122,8 +122,7 @@ bool mysql_create_frm(THD *thd, my_string file_name, str_db_type.str= (char *)ha_get_storage_engine(create_info->db_type); str_db_type.length= strlen(str_db_type.str); create_info->extra_size= 2 + str_db_type.length; - if (create_info->db_type == DB_TYPE_FEDERATED_DB) - create_info->extra_size+= create_info->connect_string.length + 2; + create_info->extra_size+= create_info->connect_string.length + 2; if ((file=create_frm(thd, file_name, db, table, reclength, fileinfo, create_info, keys)) < 0) @@ -159,14 +158,12 @@ bool mysql_create_frm(THD *thd, my_string file_name, create_fields,reclength, data_offset)) goto err; - if (create_info->db_type == DB_TYPE_FEDERATED_DB) - { - int2store(buff, create_info->connect_string.length); - if (my_write(file, (const byte*)buff, sizeof(buff), MYF(MY_NABP)) || - my_write(file, (const byte*)create_info->connect_string.str, - create_info->connect_string.length, MYF(MY_NABP))) + int2store(buff, create_info->connect_string.length); + if (my_write(file, (const byte*)buff, sizeof(buff), MYF(MY_NABP)) || + my_write(file, (const byte*)create_info->connect_string.str, + create_info->connect_string.length, MYF(MY_NABP))) goto err; - } + int2store(buff, str_db_type.length); if (my_write(file, (const byte*)buff, sizeof(buff), MYF(MY_NABP)) || my_write(file, (const byte*)str_db_type.str, |