summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2005-08-15 13:21:55 +0400
committerunknown <evgen@moonbone.local>2005-08-15 13:21:55 +0400
commit6ed4935212ce5a3e8824ad25a9eb6718e2703537 (patch)
tree7562b2623c103e6a4bd19999af2883e2b61d8b76 /sql/sql_derived.cc
parent7b91cd9a5866106d8f8c39c03302a59ea18b30ee (diff)
parente66cd71698e033c788adb6364fdf261143fb5601 (diff)
downloadmariadb-git-6ed4935212ce5a3e8824ad25a9eb6718e2703537.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11864 mysql-test/r/derived.result: Auto merged sql/sql_derived.cc: Auto merged sql/sql_view.cc: Auto merged
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 afcf7dbd93f..da1525fc133 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;