summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <rburnett@bk-internal.mysql.com>2006-05-24 14:57:44 +0200
committerunknown <rburnett@bk-internal.mysql.com>2006-05-24 14:57:44 +0200
commit2380913da8c9de155e6e8352c648eab68b4f4f8d (patch)
tree1d19307b77723acf31147c5356f8c9961968df2c /sql/sql_show.cc
parentbc1784298f3efe11f29710a207ff2b42372e4b0d (diff)
parenta04d9fa947ec5fc22368c15d7c6c7ba47898405f (diff)
downloadmariadb-git-2380913da8c9de155e6e8352c648eab68b4f4f8d.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1-new
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt sql/mysqld.cc: Auto merged sql/sql_parse.cc: Auto merged
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index f94ddc57c80..b6cc5c19594 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -25,6 +25,7 @@
#include "sp_head.h"
#include "sql_trigger.h"
#include "authors.h"
+#include "contributors.h"
#include "event.h"
#include <my_dir.h>
@@ -229,6 +230,41 @@ bool mysqld_show_authors(THD *thd)
DBUG_RETURN(FALSE);
}
+
+/***************************************************************************
+** List all Contributors.
+** Please get permission before updating
+***************************************************************************/
+
+bool mysqld_show_contributors(THD *thd)
+{
+ List<Item> field_list;
+ Protocol *protocol= thd->protocol;
+ DBUG_ENTER("mysqld_show_contributors");
+
+ field_list.push_back(new Item_empty_string("Name",40));
+ field_list.push_back(new Item_empty_string("Location",40));
+ field_list.push_back(new Item_empty_string("Comment",80));
+
+ if (protocol->send_fields(&field_list,
+ Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
+ DBUG_RETURN(TRUE);
+
+ show_table_contributors_st *contributors;
+ for (contributors= show_table_contributors; contributors->name; contributors++)
+ {
+ protocol->prepare_for_resend();
+ protocol->store(contributors->name, system_charset_info);
+ protocol->store(contributors->location, system_charset_info);
+ protocol->store(contributors->comment, system_charset_info);
+ if (protocol->write())
+ DBUG_RETURN(TRUE);
+ }
+ send_eof(thd);
+ DBUG_RETURN(FALSE);
+}
+
+
/***************************************************************************
List all privileges supported
***************************************************************************/