1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Added license information display to output of plugins schema, and tagged all plugins with GPL flag.

This commit is contained in:
brian@zim.(none)
2006-10-05 00:41:29 -07:00
parent 4b51032fa5
commit faff46eefe
16 changed files with 41 additions and 0 deletions

View File

@ -31,6 +31,15 @@
#define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */
#define MYSQL_MAX_PLUGIN_TYPE_NUM 3 /* The number of plugin types */
/* We use the following strings to define licenses for plugins */
#define PLUGIN_LICENSE_PROPRIETARY 0
#define PLUGIN_LICENSE_GPL 1
#define PLUGIN_LICENSE_BSD 2
#define PLUGIN_LICENSE_PROPRIETARY_STRING "PROPRIETARY"
#define PLUGIN_LICENSE_GPL_STRING "GPL"
#define PLUGIN_LICENSE_BSD_STRING "BSD"
/*
Macros for beginning and ending plugin declarations. Between
mysql_declare_plugin and mysql_declare_plugin_end there should
@ -88,6 +97,7 @@ struct st_mysql_plugin
const char *name; /* plugin name */
const char *author; /* plugin author (for SHOW PLUGINS) */
const char *descr; /* general descriptive text (for SHOW PLUGINS ) */
int license; /* the plugin type (a MYSQL_XXX_PLUGIN value) */
int (*init)(void *); /* the function to invoke when plugin is loaded */
int (*deinit)(void *);/* the function to invoke when plugin is unloaded */
unsigned int version; /* plugin version (for SHOW PLUGINS) */

View File

@ -226,6 +226,7 @@ mysql_declare_plugin(ftexample)
"simple_parser", /* name */
"MySQL AB", /* author */
"Simple Full-Text Parser", /* description */
PLUGIN_LICENSE_GPL,
simple_parser_plugin_init, /* init function (when loaded) */
simple_parser_plugin_deinit,/* deinit function (when unloaded) */
0x0001, /* version */

View File

@ -10773,6 +10773,7 @@ mysql_declare_plugin(ndbcluster)
ndbcluster_hton_name,
"MySQL AB",
"Clustered, fault-tolerant tables",
PLUGIN_LICENSE_GPL,
ndbcluster_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,

View File

@ -5643,6 +5643,7 @@ mysql_declare_plugin(partition)
"partition",
"Mikael Ronstrom, MySQL AB",
"Partition Storage Engine Helper",
PLUGIN_LICENSE_GPL,
partition_initialize, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100, /* 1.0 */

View File

@ -683,6 +683,7 @@ struct handlerton
const char *wild, bool dir, List<char> *files);
int (*table_exists_in_engine)(handlerton *hton, THD* thd, const char *db,
const char *name);
uint32 license; /* Flag for Engine License */
};

View File

@ -4689,6 +4689,7 @@ mysql_declare_plugin(binlog)
"binlog",
"MySQL AB",
"This is a pseudo storage engine to represent the binlog in a transaction",
PLUGIN_LICENSE_GPL,
binlog_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,

View File

@ -211,6 +211,22 @@ static my_bool show_plugins(THD *thd, st_plugin_int *plugin,
else
table->field[8]->set_null();
switch (plug->license) {
case PLUGIN_LICENSE_GPL:
table->field[9]->store(PLUGIN_LICENSE_GPL_STRING,
strlen(PLUGIN_LICENSE_GPL_STRING), cs);
break;
case PLUGIN_LICENSE_BSD:
table->field[9]->store(PLUGIN_LICENSE_BSD_STRING,
strlen(PLUGIN_LICENSE_BSD_STRING), cs);
break;
default:
table->field[9]->store(PLUGIN_LICENSE_PROPRIETARY_STRING,
strlen(PLUGIN_LICENSE_PROPRIETARY_STRING), cs);
break;
}
table->field[9]->set_notnull();
return schema_table_store_record(thd, table);
}
@ -5579,6 +5595,7 @@ ST_FIELD_INFO plugin_fields_info[]=
{"PLUGIN_LIBRARY_VERSION", 20, MYSQL_TYPE_STRING, 0, 1, 0},
{"PLUGIN_AUTHOR", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
{"PLUGIN_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0},
{"PLUGIN_LICENSE", 80, MYSQL_TYPE_STRING, 0, 1, "License"},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
};

View File

@ -1585,6 +1585,7 @@ mysql_declare_plugin(archive)
"ARCHIVE",
"Brian Aker, MySQL AB",
"Archive storage engine",
PLUGIN_LICENSE_GPL,
archive_db_init, /* Plugin Init */
archive_db_done, /* Plugin Deinit */
0x0100 /* 1.0 */,

View File

@ -223,6 +223,7 @@ mysql_declare_plugin(blackhole)
"BLACKHOLE",
"MySQL AB",
"/dev/null storage engine (anything you write to it disappears)",
PLUGIN_LICENSE_GPL,
blackhole_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,

View File

@ -1533,6 +1533,7 @@ mysql_declare_plugin(csv)
"CSV",
"Brian Aker, MySQL AB",
"CSV storage engine",
PLUGIN_LICENSE_GPL,
tina_init_func, /* Plugin Init */
tina_done_func, /* Plugin Deinit */
0x0100 /* 1.0 */,

View File

@ -717,6 +717,7 @@ mysql_declare_plugin(example)
"EXAMPLE",
"Brian Aker, MySQL AB",
"Example storage engine",
PLUGIN_LICENSE_GPL,
example_init_func, /* Plugin Init */
example_done_func, /* Plugin Deinit */
0x0001 /* 0.1 */,

View File

@ -2895,6 +2895,7 @@ mysql_declare_plugin(federated)
"FEDERATED",
"Patrick Galbraith and Brian Aker, MySQL AB",
"Federated MySQL storage engine",
PLUGIN_LICENSE_GPL,
federated_db_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,

View File

@ -720,6 +720,7 @@ mysql_declare_plugin(heap)
"MEMORY",
"MySQL AB",
"Hash based, stored in memory, useful for temporary tables",
PLUGIN_LICENSE_GPL,
heap_init,
NULL,
0x0100, /* 1.0 */

View File

@ -7640,6 +7640,7 @@ mysql_declare_plugin(innobase)
innobase_hton_name,
"Innobase OY",
"Supports transactions, row-level locking, and foreign keys",
PLUGIN_LICENSE_GPL,
innobase_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,

View File

@ -1818,6 +1818,7 @@ mysql_declare_plugin(myisam)
"MyISAM",
"MySQL AB",
"Default engine as of MySQL 3.23 with great performance",
PLUGIN_LICENSE_GPL,
myisam_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100, /* 1.0 */

View File

@ -582,6 +582,7 @@ mysql_declare_plugin(myisammrg)
"MRG_MYISAM",
"MySQL AB",
"Collection of identical MyISAM tables",
PLUGIN_LICENSE_GPL,
myisammrg_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100, /* 1.0 */