summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2006-10-13 10:57:50 -0400
committerunknown <cmiller@zippy.cornsilk.net>2006-10-13 10:57:50 -0400
commit665e557533c707a8fc6d9ac66a8bd446682112c7 (patch)
tree68608caa59fc27e91994e1627adc03663e6a0aa4 /sql/sql_view.cc
parentaff965c3b1a6564cdc448b9a1101d02f6050bf59 (diff)
downloadmariadb-git-665e557533c707a8fc6d9ac66a8bd446682112c7.tar.gz
Merge fix-up.
vio/viossl.c: We prefer "0x%lx" to "%p".
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index a3e0f6b1e5a..82acab7129e 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -573,6 +573,19 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
}
append_identifier(thd, &buff, views->table_name,
views->table_name_length);
+ if (lex->view_list.elements)
+ {
+ List_iterator_fast<LEX_STRING> names(lex->view_list);
+ LEX_STRING *name;
+ int i;
+
+ for (i= 0; name= names++; i++)
+ {
+ buff.append(i ? ", " : "(");
+ append_identifier(thd, &buff, name->str, name->length);
+ }
+ buff.append(')');
+ }
buff.append(STRING_WITH_LEN(" AS "));
buff.append(views->source.str, views->source.length);
@@ -1378,7 +1391,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
error= TRUE;
query_cache_invalidate3(thd, view, 0);
sp_cache_invalidate();
-
+ }
if (mysql_bin_log.is_open())
{
thd->clear_error();