summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2006-05-13 11:40:27 -0700
committerunknown <brian@zim.(none)>2006-05-13 11:40:27 -0700
commit6f9768fd5620191b93bd33687a9f7cb694e6e86a (patch)
tree29b6bda9273eebc05c76122379e047e14ded39ef /sql/sql_show.cc
parent44de69cfdd696552bd396195b2e9e6cc9335993e (diff)
parent94e140fbb640003fe18c845cfaff5a088cb7b384 (diff)
downloadmariadb-git-6f9768fd5620191b93bd33687a9f7cb694e6e86a.tar.gz
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into zim.(none):/home/brian/mysql/dep-5.1 sql/mysql_priv.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_show.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 5fad0c7e09b..c8ca80990a9 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
***************************************************************************/