summaryrefslogtreecommitdiff
path: root/sql/ha_myisammrg.cc
diff options
context:
space:
mode:
authorunknown <serg@sergbook.mysql.com>2002-11-05 17:10:31 +0100
committerunknown <serg@sergbook.mysql.com>2002-11-05 17:10:31 +0100
commit66f4e1b9ac5a8f406701062d8162f346ca7098a0 (patch)
tree08a1fa8fa160f71c0adbaa7ceb8fb19506f5c761 /sql/ha_myisammrg.cc
parentc0309e5a2f2b6f3f060f0a5b5fb781c1206c2c58 (diff)
parentec2df91657ed9042c706b3d0bd5f5574051ad3f7 (diff)
downloadmariadb-git-66f4e1b9ac5a8f406701062d8162f346ca7098a0.tar.gz
merged
BitKeeper/deleted/.del-compile-pentium-valgrind-max: Delete: BUILD/compile-pentium-valgrind-max Build-tools/Do-compile: Auto merged sql/field.h: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/stacktrace.c: Auto merged
Diffstat (limited to 'sql/ha_myisammrg.cc')
-rw-r--r--sql/ha_myisammrg.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc
index bba59dd49eb..9db796e5127 100644
--- a/sql/ha_myisammrg.cc
+++ b/sql/ha_myisammrg.cc
@@ -371,7 +371,28 @@ int ha_myisammrg::create(const char *name, register TABLE *form,
sizeof(char*))))
DBUG_RETURN(1);
for (pos=table_names ; tables ; tables=tables->next)
- *pos++= tables->real_name;
+ {
+ char *table_name;
+ if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
+ {
+ TABLE **tbl=find_temporary_table(current_thd,
+ tables->db, tables->real_name);
+ if (!tbl)
+ {
+ table_name=sql_alloc(1+
+ my_snprintf(buff,FN_REFLEN,"%s/%s/%s",mysql_real_data_home,
+ tables->db, tables->real_name));
+ if (!table_name)
+ DBUG_RETURN(1);
+ strcpy(table_name, buff);
+ }
+ else
+ table_name=(*tbl)->path;
+ }
+ else
+ table_name=tables->real_name;
+ *pos++= table_name;
+ }
*pos=0;
DBUG_RETURN(myrg_create(fn_format(buff,name,"","",2+4+16),
(const char **) table_names,