diff options
author | unknown <acurtis@xiphis.org> | 2006-05-02 04:11:00 -0700 |
---|---|---|
committer | unknown <acurtis@xiphis.org> | 2006-05-02 04:11:00 -0700 |
commit | ad4c32c89a1b12a38518b589c944ac06ae023b50 (patch) | |
tree | 5d9330a6ecd663b4caf7da376b8a6372a8edeac7 | |
parent | b0efe477fbec37c273098bc85263b195544f2edc (diff) | |
download | mariadb-git-ad4c32c89a1b12a38518b589c944ac06ae023b50.tar.gz |
WL#3201 additional post-review fixes
config/ac-macros/plugins.m4:
remove unneccessary `ifelse'
add comment, add missing dnl
configure.in:
change description for heap engine
include/mysql/plugin.h:
change macro name
sql/ha_berkeley.cc:
store strings statically for use in handlerton and plugin structures
sql/ha_federated.cc:
store strings statically for use in handlerton and plugin structures
sql/ha_heap.cc:
store strings statically for use in handlerton and plugin structures
sql/ha_innodb.cc:
store strings statically for use in handlerton and plugin structures
sql/ha_myisam.cc:
store strings statically for use in handlerton and plugin structures
sql/ha_myisammrg.cc:
store strings statically for use in handlerton and plugin structures
sql/ha_ndbcluster.cc:
store strings statically for use in handlerton and plugin structures
sql/ha_partition.cc:
store strings statically for use in handlerton and plugin structures
storage/archive/ha_archive.cc:
store strings statically for use in handlerton and plugin structures
storage/blackhole/ha_blackhole.cc:
store strings statically for use in handlerton and plugin structures
storage/csv/ha_tina.cc:
store strings statically for use in handlerton and plugin structures
storage/example/ha_example.cc:
store strings statically for use in handlerton and plugin structures
-rw-r--r-- | config/ac-macros/plugins.m4 | 8 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | include/mysql/plugin.h | 10 | ||||
-rw-r--r-- | sql/ha_berkeley.cc | 14 | ||||
-rw-r--r-- | sql/ha_federated.cc | 11 | ||||
-rw-r--r-- | sql/ha_heap.cc | 14 | ||||
-rw-r--r-- | sql/ha_innodb.cc | 12 | ||||
-rw-r--r-- | sql/ha_myisam.cc | 12 | ||||
-rw-r--r-- | sql/ha_myisammrg.cc | 12 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 7 | ||||
-rw-r--r-- | sql/ha_partition.cc | 11 | ||||
-rw-r--r-- | storage/archive/ha_archive.cc | 11 | ||||
-rw-r--r-- | storage/blackhole/ha_blackhole.cc | 12 | ||||
-rw-r--r-- | storage/csv/ha_tina.cc | 11 | ||||
-rw-r--r-- | storage/example/ha_example.cc | 11 |
15 files changed, 100 insertions, 58 deletions
diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4 index 0ca952c4354..385b6f1d66c 100644 --- a/config/ac-macros/plugins.m4 +++ b/config/ac-macros/plugins.m4 @@ -38,9 +38,7 @@ AC_DEFUN([_MYSQL_PLUGIN],[ _MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1]) m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3]) m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4]) - ifelse([$5], [], [], [ - _MYSQL_PLUGAPPEND_META([$1], $5) - ]) + _MYSQL_PLUGAPPEND_META([$1], $5) ]) ]) @@ -351,11 +349,13 @@ AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[ else m4_ifdef([$7],[ ifelse(m4_bregexp($7, [^lib[^.]+\.a$]), -2, [ +dnl change above "-2" to "0" to enable this section +dnl Although this is "pretty", it breaks libmysqld build m4_ifdef([$6],[ mysql_use_plugin_dir="$6" mysql_plugin_libs="$mysql_plugin_libs -L[\$(top_builddir)]/$6" ]) - mysql_plugin_libs="$mysql_plugin_libs + mysql_plugin_libs="$mysql_plugin_libs dnl [-l]m4_bregexp($7, [^lib\([^.]+\)], [\1])" ], m4_bregexp($7, [^\\\$]), 0, [ m4_ifdef([$6],[ diff --git a/configure.in b/configure.in index e7b06530012..162bff48b7f 100644 --- a/configure.in +++ b/configure.in @@ -91,7 +91,7 @@ MYSQL_PLUGIN_DIRECTORY(ftexample, [plugin/fulltext]) MYSQL_PLUGIN_DYNAMIC(ftexample, [mypluglib.la]) MYSQL_STORAGE_ENGINE(heap,no, [Memory Storage Engine], - [In memory hashed tables]) + [Volatile memory based tables]) MYSQL_PLUGIN_DIRECTORY(heap, [storage/heap]) MYSQL_PLUGIN_STATIC(heap, [libheap.a]) MYSQL_PLUGIN_MANDATORY(heap) dnl Memory tables diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 2093043744a..ab5ca6e7be4 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -39,23 +39,23 @@ #ifndef MYSQL_DYNAMIC_PLUGIN -#define __DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \ +#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \ int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; \ int PSIZE= sizeof(struct st_mysql_plugin); \ struct st_mysql_plugin DECLS[]= { #else -#define __DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \ +#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \ int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \ int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \ struct st_mysql_plugin _mysql_plugin_declarations_[]= { #endif -#define _DECLARE_PLUGIN(NAME) \ -__DECLARE_PLUGIN(NAME, builtin_ ## NAME ## _plugin_interface_version, \ +#define mysql_declare_plugin(NAME) \ +__MYSQL_DECLARE_PLUGIN(NAME, \ + builtin_ ## NAME ## _plugin_interface_version, \ builtin_ ## NAME ## _sizeof_struct_st_plugin, \ builtin_ ## NAME ## _plugin) -#define mysql_declare_plugin(NAME) _DECLARE_PLUGIN(NAME) #define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0}} /* diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 0fabd00faa3..ef1876c0e2e 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -125,11 +125,15 @@ static int berkeley_savepoint(THD* thd, void *savepoint); static int berkeley_release_savepoint(THD* thd, void *savepoint); static handler *berkeley_create_handler(TABLE_SHARE *table); +static const char berkeley_hton_name[]= "BerkeleyDB"; +static const char berkeley_hton_comment[]= + "Supports transactions and page-level locking"; + handlerton berkeley_hton = { MYSQL_HANDLERTON_INTERFACE_VERSION, - "BerkeleyDB", + berkeley_hton_name, SHOW_OPTION_YES, - "Supports transactions and page-level locking", + berkeley_hton_comment, DB_TYPE_BERKELEY_DB, berkeley_init, 0, /* slot */ @@ -2733,9 +2737,9 @@ mysql_declare_plugin(berkeley) { MYSQL_STORAGE_ENGINE_PLUGIN, &berkeley_hton, - berkeley_hton.name, - "MySQL AB", - "BerkeleyDB Storage Engine", + berkeley_hton_name, + "Sleepycat Software", + berkeley_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index f1d2b0025a9..f4fc5f47193 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -370,11 +370,14 @@ static int federated_rollback(THD *thd, bool all); /* Federated storage engine handlerton */ +static const char federated_hton_name[]= "FEDERATED"; +static const char federated_hton_comment[]= "Federated MySQL storage engine"; + handlerton federated_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, - "FEDERATED", + federated_hton_name, SHOW_OPTION_YES, - "Federated MySQL storage engine", + federated_hton_comment, DB_TYPE_FEDERATED_DB, federated_db_init, 0, /* slot */ @@ -2813,9 +2816,9 @@ mysql_declare_plugin(federated) { MYSQL_STORAGE_ENGINE_PLUGIN, &federated_hton, - federated_hton.name, + federated_hton_name, "Patrick Galbraith and Brian Aker, MySQL AB", - "Federated Storage Engine", + federated_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index 1223de37af8..ca33a31de4b 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -26,11 +26,15 @@ static handler *heap_create_handler(TABLE_SHARE *table); +static const char heap_hton_name[]= "MEMORY"; +static const char heap_hton_comment[]= + "Hash based, stored in memory, useful for temporary tables"; + handlerton heap_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, - "MEMORY", + heap_hton_name, SHOW_OPTION_YES, - "Hash based, stored in memory, useful for temporary tables", + heap_hton_comment, DB_TYPE_HEAP, NULL, 0, /* slot */ @@ -711,9 +715,9 @@ mysql_declare_plugin(heap) { MYSQL_STORAGE_ENGINE_PLUGIN, &heap_hton, - heap_hton.name, - NULL, - heap_hton.comment, + heap_hton_name, + "MySQL AB", + heap_hton_comment, NULL, NULL, 0 diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 530d513cf21..ad7c5fd2c0e 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -205,11 +205,15 @@ static int innobase_savepoint(THD* thd, void *savepoint); static int innobase_release_savepoint(THD* thd, void *savepoint); static handler *innobase_create_handler(TABLE_SHARE *table); +static const char innobase_hton_name[]= "InnoDB"; +static const char innobase_hton_comment[]= + "Supports transactions, row-level locking, and foreign keys"; + handlerton innobase_hton = { MYSQL_HANDLERTON_INTERFACE_VERSION, - "InnoDB", + innobase_hton_name, SHOW_OPTION_YES, - "Supports transactions, row-level locking, and foreign keys", + innobase_hton_comment, DB_TYPE_INNODB, innobase_init, 0, /* slot */ @@ -7439,9 +7443,9 @@ mysql_declare_plugin(innobase) { MYSQL_STORAGE_ENGINE_PLUGIN, &innobase_hton, - innobase_hton.name, + innobase_hton_name, "Innobase OY", - "InnoDB Storage Engine", + innobase_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 9a0a4a9896f..74aa157cbc1 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -56,11 +56,15 @@ static handler *myisam_create_handler(TABLE_SHARE *table); /* MyISAM handlerton */ +static const char myisam_hton_name[]= "MyISAM"; +static const char myisam_hton_comment[]= + "Default engine as of MySQL 3.23 with great performance"; + handlerton myisam_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, - "MyISAM", + myisam_hton_name, SHOW_OPTION_YES, - "Default engine as of MySQL 3.23 with great performance", + myisam_hton_comment, DB_TYPE_MYISAM, NULL, 0, /* slot */ @@ -1795,9 +1799,9 @@ mysql_declare_plugin(myisam) { MYSQL_STORAGE_ENGINE_PLUGIN, &myisam_hton, - myisam_hton.name, + myisam_hton_name, "MySQL AB", - "MyISAM Storage Engine", + myisam_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 8130a5d939a..89f0f9e3647 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -38,11 +38,15 @@ static handler *myisammrg_create_handler(TABLE_SHARE *table); /* MyISAM MERGE handlerton */ +static const char myisammrg_hton_name[]= "MRG_MYISAM"; +static const char myisammrg_hton_comment[]= + "Collection of identical MyISAM tables"; + handlerton myisammrg_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, - "MRG_MYISAM", + myisammrg_hton_name, SHOW_OPTION_YES, - "Collection of identical MyISAM tables", + myisammrg_hton_comment, DB_TYPE_MRG_MYISAM, NULL, 0, /* slot */ @@ -580,9 +584,9 @@ mysql_declare_plugin(myisammrg) { MYSQL_STORAGE_ENGINE_PLUGIN, &myisammrg_hton, - myisammrg_hton.name, + myisammrg_hton_name, "MySQL AB", - "MyISAMMRG Storage Engine", + myisammrg_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 89084f72217..a20026c7af9 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -69,6 +69,9 @@ static bool ndbcluster_show_status(THD*,stat_print_fn *,enum ha_stat_type); static int ndbcluster_alter_tablespace(THD* thd, st_alter_tablespace *info); static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond); +static const char ndbcluster_hton_name[]= "ndbcluster"; +static const char ndbcluster_hton_comment[]= "Clustered, fault-tolerant tables"; + handlerton ndbcluster_hton = { MYSQL_HANDLERTON_INTERFACE_VERSION, "ndbcluster", @@ -10287,9 +10290,9 @@ mysql_declare_plugin(ndbcluster) { MYSQL_STORAGE_ENGINE_PLUGIN, &ndbcluster_hton, - ndbcluster_hton.name, + ndbcluster_hton_name, "MySQL AB", - "NDB Storage Engine", + ndbcluster_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 6b29d6588fc..bff21d6681d 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -73,11 +73,14 @@ static handler *partition_create_handler(TABLE_SHARE *share); static uint partition_flags(); static uint alter_table_flags(uint flags); +static const char partition_hton_name[]= "partition"; +static const char partition_hton_comment[]= "Partition Storage Engine Helper"; + handlerton partition_hton = { MYSQL_HANDLERTON_INTERFACE_VERSION, - "partition", + partition_hton_name, SHOW_OPTION_YES, - "Partition Storage Engine Helper", /* A comment used by SHOW to describe an engine */ + partition_hton_comment, /* A comment used by SHOW to describe an engine */ DB_TYPE_PARTITION_DB, 0, /* Method that initializes a storage engine */ 0, /* slot */ @@ -5447,9 +5450,9 @@ mysql_declare_plugin(partition) { MYSQL_STORAGE_ENGINE_PLUGIN, &partition_hton, - partition_hton.name, + partition_hton_name, "Mikael Ronstrom, MySQL AB", - "Partitioning Support", + partition_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index cd28deaea47..e39ee976eb1 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -146,12 +146,15 @@ static handler *archive_create_handler(TABLE_SHARE *table); #define ARCHIVE_MIN_ROWS_TO_USE_BULK_INSERT 2 +static const char archive_hton_name[]= "ARCHIVE"; +static const char archive_hton_comment[]= "Archive storage engine"; + /* dummy handlerton - only to have something to return from archive_db_init */ handlerton archive_hton = { MYSQL_HANDLERTON_INTERFACE_VERSION, - "ARCHIVE", + archive_hton_name, SHOW_OPTION_YES, - "Archive storage engine", + archive_hton_comment, DB_TYPE_ARCHIVE_DB, archive_db_init, 0, /* slot */ @@ -1577,9 +1580,9 @@ mysql_declare_plugin(archive) { MYSQL_STORAGE_ENGINE_PLUGIN, &archive_hton, - archive_hton.name, + archive_hton_name, "Brian Aker, MySQL AB", - "Archive Storage Engine", + archive_hton_comment, NULL, /* Plugin Init */ archive_db_done, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc index 31d0b0c3917..e9fd1c2319d 100644 --- a/storage/blackhole/ha_blackhole.cc +++ b/storage/blackhole/ha_blackhole.cc @@ -29,13 +29,17 @@ static handler *blackhole_create_handler(TABLE_SHARE *table); +static const char blackhole_hton_name[]= "BLACKHOLE"; +static const char blackhole_hton_comment[]= + "/dev/null storage engine (anything you write to it disappears)"; + /* Blackhole storage engine handlerton */ handlerton blackhole_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, - "BLACKHOLE", + blackhole_hton_name, SHOW_OPTION_YES, - "/dev/null storage engine (anything you write to it disappears)", + blackhole_hton_comment, DB_TYPE_BLACKHOLE_DB, NULL, 0, /* slot */ @@ -256,9 +260,9 @@ mysql_declare_plugin(blackhole) { MYSQL_STORAGE_ENGINE_PLUGIN, &blackhole_hton, - blackhole_hton.name, + blackhole_hton_name, "MySQL AB", - "Blackhole Storage Engine", + blackhole_hton_comment, NULL, /* Plugin Init */ NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc index 8b1cfe71fa2..de69df90ed5 100644 --- a/storage/csv/ha_tina.cc +++ b/storage/csv/ha_tina.cc @@ -77,11 +77,14 @@ static int tina_init= 0; static handler *tina_create_handler(TABLE_SHARE *table); static int tina_init_func(); +static const char tina_hton_name[]= "CSV"; +static const char tina_hton_comment[]= "CSV storage engine"; + handlerton tina_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, - "CSV", + tina_hton_name, SHOW_OPTION_YES, - "CSV storage engine", + tina_hton_comment, DB_TYPE_CSV_DB, (bool (*)()) tina_init_func, 0, /* slot */ @@ -1403,9 +1406,9 @@ mysql_declare_plugin(csv) { MYSQL_STORAGE_ENGINE_PLUGIN, &tina_hton, - tina_hton.name, + tina_hton_name, "Brian Aker, MySQL AB", - "CSV Storage Engine", + tina_hton_comment, tina_init_func, /* Plugin Init */ tina_done_func, /* Plugin Deinit */ 0x0100 /* 1.0 */, diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index c723dcf648e..2ce543dfbb0 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -77,11 +77,14 @@ static int example_init_func(); static bool example_init_func_for_handlerton(); static int example_panic(enum ha_panic_function flag); +static const char example_hton_name[]= "EXAMPLE"; +static const char example_hton_comment[]= "Example storage engine"; + handlerton example_hton= { MYSQL_HANDLERTON_INTERFACE_VERSION, - "EXAMPLE", + example_hton_name, SHOW_OPTION_YES, - "Example storage engine", + example_hton_comment, DB_TYPE_EXAMPLE_DB, example_init_func_for_handlerton, 0, /* slot */ @@ -747,9 +750,9 @@ mysql_declare_plugin(example) { MYSQL_STORAGE_ENGINE_PLUGIN, &example_hton, - example_hton.name, + example_hton_name, "Brian Aker, MySQL AB", - "Example Storage Engine", + example_hton_comment, example_init_func, /* Plugin Init */ example_done_func, /* Plugin Deinit */ 0x0001 /* 0.1 */, |