summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorunknown <eric@mysql.com>2005-09-12 18:02:17 -0700
committerunknown <eric@mysql.com>2005-09-12 18:02:17 -0700
commit00d77fdd75aa132249594a16db2c674f3642b28d (patch)
tree6c75268ce9925e6ce7ea68145119322cc40faafb /sql/unireg.cc
parent3d1658f71337aeb6ba235d7b0a4cf2198e1888bc (diff)
downloadmariadb-git-00d77fdd75aa132249594a16db2c674f3642b28d.tar.gz
Made changes to add federated CONNECTION information to the .frm file
(per Monty's patch). Remove references to the "COMMENT" field. WL#2414 mysql-test/r/federated.result: alter from "COMMENT=" to "CONNECTION=" mysql-test/r/federated_archive.result: change "COMMENT=" to "CONNECTION=" mysql-test/t/federated.test: change from "COMMENT=" to "CONNECTION=" mysql-test/t/federated_archive.test: change from "COMMENT=" to "CONNECTION=" sql/ha_federated.cc: Change parsing of char* table->s->comment to LEX_STRING table->s->connect_string (per Monty's patch) sql/handler.h: added LEX_STRING "connection_string" (per Monty's patch) sql/sql_yacc.yy: added setting of "connect_string" string and length sql/table.cc: Modifying frm file to store connecting information (code change came from Monty). sql/table.h: added connect_string sql/unireg.cc: Storing information on connection_string (code came from Monty).
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index a89d89426a6..18905c5368d 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -149,6 +149,15 @@ bool mysql_create_frm(THD *thd, my_string file_name,
if (make_empty_rec(thd,file,create_info->db_type,create_info->table_options,
create_fields,reclength, data_offset))
goto err;
+ if (create_info->connect_string.length)
+ {
+ char buff[2];
+ int2store(buff,create_info->connect_string.length);
+ if (my_write(file, buff, sizeof(buff), MYF(MY_NABP)) ||
+ my_write(file, create_info->connect_string.str,
+ create_info->connect_string.length, MYF(MY_NABP)))
+ goto err;
+ }
VOID(my_seek(file,filepos,MY_SEEK_SET,MYF(0)));
if (my_write(file,(byte*) forminfo,288,MYF_RW) ||