summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-08-15 18:35:48 +0300
committerunknown <monty@mysql.com>2005-08-15 18:35:48 +0300
commitc5aac211d02ebf672237141fbe767dd9d3af26da (patch)
tree613842f6646a144777e4e07d77c2a89dbb659781 /sql/sql_derived.cc
parente8b26c090348f2db3e4f33483a9135cd931f5687 (diff)
parent3b422187f6829da234914c713e4e8039c97e7291 (diff)
downloadmariadb-git-c5aac211d02ebf672237141fbe767dd9d3af26da.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0 sql/ha_berkeley.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_derived.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_update.cc: Auto merged sql/share/errmsg.txt: Auto merged sql/sql_yacc.yy: Auto merged sql/sql_class.cc: Manual merge
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index fc9d15e94c4..7b9191cd841 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -125,6 +125,11 @@ int mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *orig_table_list)
if ((res= unit->prepare(thd, derived_result, 0, orig_table_list->alias)))
goto exit;
+ if (check_duplicate_names(unit->types, 0))
+ {
+ res= -1;
+ goto exit;
+ }
derived_result->tmp_table_param.init();
derived_result->tmp_table_param.field_count= unit->types.elements;