From 753a5a1df0c047f3f1635e066278714a114ec5ee Mon Sep 17 00:00:00 2001 From: marko <> Date: Wed, 6 Feb 2008 16:11:46 +0000 Subject: [PATCH] branches/zip: Hide some global variables that were accidentally not hidden in r2276. Now the following symbols will be exported when InnoDB is built as a dynamic plugin: * the virtual method pointer table of class ha_innodb * the three variables that MySQL will reference when linking at runtime: _mysql_plugin_declarations_ _mysql_plugin_interface_version_ _mysql_sizeof_struct_st_plugin_ Furthermore, the following symbols are weak globals, to allow us to access the built-in InnoDB in the mysqld executable, in case it contains a statically linked InnoDB: builtin_innobase_plugin innodb_hton_ptr --- data/data0type.c | 2 +- handler/i_s.cc | 10 +++++----- trx/trx0i_s.c | 2 +- ut/ut0rnd.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/data0type.c b/data/data0type.c index b99303ac736..36a01db8789 100644 --- a/data/data0type.c +++ b/data/data0type.c @@ -38,7 +38,7 @@ this MySQL installation to this global variable. If we have < 4.1.2 format column definitions, or records in the insert buffer, we use this charset-collation code for them. */ -ulint data_mysql_default_charset_coll = 99999999; +UNIV_INTERN ulint data_mysql_default_charset_coll; /************************************************************************* Determine how many bytes the first n characters of the given string occupy. diff --git a/handler/i_s.cc b/handler/i_s.cc index 78ffc82f724..01a21180f63 100644 --- a/handler/i_s.cc +++ b/handler/i_s.cc @@ -373,7 +373,7 @@ static struct st_mysql_information_schema i_s_info = MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION }; -struct st_mysql_plugin i_s_innodb_trx = +UNIV_INTERN struct st_mysql_plugin i_s_innodb_trx = { /* the plugin type (a MYSQL_XXX_PLUGIN value) */ /* int */ @@ -648,7 +648,7 @@ innodb_locks_init( DBUG_RETURN(0); } -struct st_mysql_plugin i_s_innodb_locks = +UNIV_INTERN struct st_mysql_plugin i_s_innodb_locks = { /* the plugin type (a MYSQL_XXX_PLUGIN value) */ /* int */ @@ -831,7 +831,7 @@ innodb_lock_waits_init( DBUG_RETURN(0); } -struct st_mysql_plugin i_s_innodb_lock_waits = +UNIV_INTERN struct st_mysql_plugin i_s_innodb_lock_waits = { /* the plugin type (a MYSQL_XXX_PLUGIN value) */ /* int */ @@ -1171,7 +1171,7 @@ i_s_zip_reset_init( DBUG_RETURN(0); } -struct st_mysql_plugin i_s_innodb_zip = +UNIV_INTERN struct st_mysql_plugin i_s_innodb_zip = { /* the plugin type (a MYSQL_XXX_PLUGIN value) */ /* int */ @@ -1220,7 +1220,7 @@ struct st_mysql_plugin i_s_innodb_zip = STRUCT_FLD(__reserved1, NULL) }; -struct st_mysql_plugin i_s_innodb_zip_reset = +UNIV_INTERN struct st_mysql_plugin i_s_innodb_zip_reset = { /* the plugin type (a MYSQL_XXX_PLUGIN value) */ /* int */ diff --git a/trx/trx0i_s.c b/trx/trx0i_s.c index 8ebe6819e2f..066686edfed 100644 --- a/trx/trx0i_s.c +++ b/trx/trx0i_s.c @@ -152,7 +152,7 @@ struct trx_i_s_cache_struct { INFORMATION SCHEMA tables is fetched and later retrieved by the C++ code in handler/i_s.cc. */ static trx_i_s_cache_t trx_i_s_cache_static; -trx_i_s_cache_t* trx_i_s_cache = &trx_i_s_cache_static; +UNIV_INTERN trx_i_s_cache_t* trx_i_s_cache = &trx_i_s_cache_static; /*********************************************************************** For a record lock that is in waiting state retrieves the only bit that diff --git a/ut/ut0rnd.c b/ut/ut0rnd.c index 1ff7e881162..c7a0ca1ab2a 100644 --- a/ut/ut0rnd.c +++ b/ut/ut0rnd.c @@ -18,7 +18,7 @@ Created 5/11/1994 Heikki Tuuri #define UT_RANDOM_3 1.0132677 -ulint ut_rnd_ulint_counter = 65654363; +UNIV_INTERN ulint ut_rnd_ulint_counter = 65654363; /*************************************************************** Looks for a prime number slightly greater than the given argument.