summaryrefslogtreecommitdiff
path: root/sql/ha_myisammrg.cc
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2001-02-17 19:04:33 +0200
committermonty@donna.mysql.com <>2001-02-17 19:04:33 +0200
commitece13efde985355d0eb1df8875eabe3fd75cf007 (patch)
treea90993e8e601e10bc825a635e85bda9a1d5ee5bd /sql/ha_myisammrg.cc
parent6fd7fb49cb34e296884f4b5b7aa5f0efdf87e109 (diff)
downloadmariadb-git-ece13efde985355d0eb1df8875eabe3fd75cf007.tar.gz
Write UNION() for MERGE tables
Diffstat (limited to 'sql/ha_myisammrg.cc')
-rw-r--r--sql/ha_myisammrg.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc
index 4c562282090..181ae724cd8 100644
--- a/sql/ha_myisammrg.cc
+++ b/sql/ha_myisammrg.cc
@@ -238,3 +238,20 @@ int ha_myisammrg::create(const char *name, register TABLE *form,
DBUG_RETURN(myrg_create(fn_format(buff,name,"","",2+4+16),
(const char **) table_names, (my_bool) 0));
}
+
+void ha_myisammrg::append_create_info(String *packet)
+{
+ char buff[FN_REFLEN];
+ packet->append(" UNION=(",8);
+ MYRG_TABLE *table,*first;
+
+ for (first=table=file->open_tables ; table != file->end_table ; table++)
+ {
+ char *name=table->table->s->filename;
+ fn_format(buff,name,"","",3);
+ if (table != first)
+ packet->append(',');
+ packet->append(buff,(uint) strlen(buff));
+ }
+ packet->append(')');
+}