mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge from 5.1-bt to a local branch
This commit is contained in:
@ -330,41 +330,11 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
|
|||||||
AC_SUBST([NDB_SIZEOF_LONG])
|
AC_SUBST([NDB_SIZEOF_LONG])
|
||||||
AC_SUBST([NDB_SIZEOF_LONG_LONG])
|
AC_SUBST([NDB_SIZEOF_LONG_LONG])
|
||||||
|
|
||||||
AC_CONFIG_FILES(storage/ndb/include/Makefile dnl
|
AC_CONFIG_FILES([
|
||||||
storage/ndb/src/Makefile storage/ndb/src/common/Makefile dnl
|
storage/ndb/include/ndb_version.h
|
||||||
storage/ndb/docs/Makefile dnl
|
storage/ndb/include/ndb_global.h
|
||||||
storage/ndb/tools/Makefile dnl
|
storage/ndb/include/ndb_types.h
|
||||||
storage/ndb/src/common/debugger/Makefile dnl
|
])
|
||||||
storage/ndb/src/common/debugger/signaldata/Makefile dnl
|
|
||||||
storage/ndb/src/common/portlib/Makefile dnl
|
|
||||||
storage/ndb/src/common/util/Makefile dnl
|
|
||||||
storage/ndb/src/common/logger/Makefile dnl
|
|
||||||
storage/ndb/src/common/transporter/Makefile dnl
|
|
||||||
storage/ndb/src/common/mgmcommon/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/error/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/blocks/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/blocks/dbdict/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/blocks/dbdih/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/blocks/dblqh/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/blocks/dbtup/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/blocks/backup/Makefile dnl
|
|
||||||
storage/ndb/src/kernel/vm/Makefile dnl
|
|
||||||
storage/ndb/src/mgmapi/Makefile dnl
|
|
||||||
storage/ndb/src/ndbapi/Makefile dnl
|
|
||||||
storage/ndb/src/mgmsrv/Makefile dnl
|
|
||||||
storage/ndb/src/mgmclient/Makefile dnl
|
|
||||||
storage/ndb/src/cw/Makefile dnl
|
|
||||||
storage/ndb/src/cw/cpcd/Makefile dnl
|
|
||||||
storage/ndb/test/Makefile dnl
|
|
||||||
storage/ndb/test/src/Makefile dnl
|
|
||||||
storage/ndb/test/ndbapi/Makefile dnl
|
|
||||||
storage/ndb/test/ndbapi/bank/Makefile dnl
|
|
||||||
storage/ndb/test/tools/Makefile dnl
|
|
||||||
storage/ndb/test/run-test/Makefile dnl
|
|
||||||
storage/ndb/include/ndb_version.h storage/ndb/include/ndb_global.h dnl
|
|
||||||
storage/ndb/include/ndb_types.h dnl
|
|
||||||
)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_SUBST(TEST_NDBCLUSTER)
|
AC_SUBST(TEST_NDBCLUSTER)
|
||||||
|
@ -477,10 +477,23 @@ dnl Although this is "pretty", it breaks libmysqld build
|
|||||||
# Even if we don't build a plugin, we bundle its source into the dist
|
# Even if we don't build a plugin, we bundle its source into the dist
|
||||||
# file. So its Makefile (and Makefiles for any subdirs) must be
|
# file. So its Makefile (and Makefiles for any subdirs) must be
|
||||||
# generated for 'make dist' to work.
|
# generated for 'make dist' to work.
|
||||||
m4_syscmd(test -f "$6/configure")
|
m4_syscmd([test -f "]$6[/configure"])
|
||||||
ifelse(m4_sysval, 0,
|
ifelse(m4_sysval, 0,
|
||||||
[AC_CONFIG_SUBDIRS($6)],
|
[AC_CONFIG_SUBDIRS($6)],
|
||||||
[AC_CONFIG_FILES($6/Makefile)]
|
[
|
||||||
|
# autoconf doesn't provide an automatic way to configure DIST_SUBDIRS of
|
||||||
|
# a subdir; for our purposes, it's enough to just check for existing
|
||||||
|
# Makefile.am files and add them in here
|
||||||
|
dnl
|
||||||
|
dnl Warning, don't try to quote the m4_esyscmd() macro, it doesn't
|
||||||
|
dnl work. Quoting here is tricky.
|
||||||
|
dnl
|
||||||
|
dnl The $FIND or $SED variable can be set by the user when calling autoconf itself
|
||||||
|
dnl to if they need to pass a specific path. This is *NOT* used when calling
|
||||||
|
dnl running configure!
|
||||||
|
dnl
|
||||||
|
AC_CONFIG_FILES(m4_esyscmd([${FIND-find} "]$6[" -name Makefile.am -print | ${SED-sed} 's,\.am$,,']))
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
ifelse(
|
ifelse(
|
||||||
|
@ -48,7 +48,7 @@ NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NUL
|
|||||||
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
|
NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references
|
||||||
NULL mysql event name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
|
NULL mysql event name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
|
||||||
NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references
|
NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references
|
||||||
NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references
|
NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references
|
||||||
NULL mysql event sql_mode 15 NO set 478 1434 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') select,insert,update,references
|
NULL mysql event sql_mode 15 NO set 478 1434 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') select,insert,update,references
|
||||||
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
|
NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references
|
||||||
NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references
|
NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references
|
||||||
@ -60,7 +60,7 @@ NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('fu
|
|||||||
NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
|
NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
|
||||||
NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
|
NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
|
||||||
NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
|
NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
|
||||||
NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
|
NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references
|
||||||
NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
|
NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
|
||||||
NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
|
NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
|
||||||
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
|
NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references
|
||||||
@ -150,7 +150,7 @@ NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time
|
|||||||
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
|
NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references
|
||||||
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
|
NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
|
||||||
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
|
NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
|
||||||
NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references
|
NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references
|
||||||
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
|
NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
|
||||||
NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
|
NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
|
||||||
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
|
NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
|
||||||
@ -329,7 +329,7 @@ NULL mysql event ends datetime NULL NULL NULL NULL datetime
|
|||||||
3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE')
|
3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE')
|
||||||
3.0000 mysql event sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
|
3.0000 mysql event sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
|
||||||
3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64)
|
3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64)
|
||||||
NULL mysql event originator int NULL NULL NULL NULL int(10)
|
NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned
|
||||||
1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
|
1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64)
|
||||||
3.0000 mysql event character_set_client char 32 96 utf8 utf8_bin char(32)
|
3.0000 mysql event character_set_client char 32 96 utf8 utf8_bin char(32)
|
||||||
3.0000 mysql event collation_connection char 32 96 utf8 utf8_bin char(32)
|
3.0000 mysql event collation_connection char 32 96 utf8 utf8_bin char(32)
|
||||||
@ -342,7 +342,7 @@ NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1)
|
|||||||
NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp
|
NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp
|
||||||
1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
|
1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
|
||||||
NULL mysql general_log thread_id int NULL NULL NULL NULL int(11)
|
NULL mysql general_log thread_id int NULL NULL NULL NULL int(11)
|
||||||
NULL mysql general_log server_id int NULL NULL NULL NULL int(11)
|
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
|
||||||
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
|
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
|
||||||
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
|
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
|
||||||
NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
|
NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned
|
||||||
@ -434,7 +434,7 @@ NULL mysql slow_log rows_examined int NULL NULL NULL NULL int(11)
|
|||||||
3.0000 mysql slow_log db varchar 512 1536 utf8 utf8_general_ci varchar(512)
|
3.0000 mysql slow_log db varchar 512 1536 utf8 utf8_general_ci varchar(512)
|
||||||
NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11)
|
NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11)
|
||||||
NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11)
|
NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11)
|
||||||
NULL mysql slow_log server_id int NULL NULL NULL NULL int(11)
|
NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned
|
||||||
1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
|
1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
|
||||||
3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60)
|
3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60)
|
||||||
3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64)
|
3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64)
|
||||||
|
@ -2047,6 +2047,9 @@ extern SHOW_COMP_OPTION have_geometry, have_rtree_keys;
|
|||||||
extern SHOW_COMP_OPTION have_crypt;
|
extern SHOW_COMP_OPTION have_crypt;
|
||||||
extern SHOW_COMP_OPTION have_compress;
|
extern SHOW_COMP_OPTION have_compress;
|
||||||
|
|
||||||
|
extern int orig_argc;
|
||||||
|
extern char **orig_argv;
|
||||||
|
extern const char *load_default_groups[];
|
||||||
|
|
||||||
#ifndef __WIN__
|
#ifndef __WIN__
|
||||||
extern pthread_t signal_thread;
|
extern pthread_t signal_thread;
|
||||||
|
@ -648,6 +648,9 @@ static int defaults_argc;
|
|||||||
static char **defaults_argv;
|
static char **defaults_argv;
|
||||||
static char *opt_bin_logname;
|
static char *opt_bin_logname;
|
||||||
|
|
||||||
|
int orig_argc;
|
||||||
|
char **orig_argv;
|
||||||
|
|
||||||
static my_socket unix_sock,ip_sock;
|
static my_socket unix_sock,ip_sock;
|
||||||
struct rand_struct sql_rand; ///< used by sql_class.cc:THD::THD()
|
struct rand_struct sql_rand; ///< used by sql_class.cc:THD::THD()
|
||||||
|
|
||||||
@ -2922,18 +2925,16 @@ pthread_handler_t handle_shutdown(void *arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(EMBEDDED_LIBRARY)
|
const char *load_default_groups[]= {
|
||||||
static const char *load_default_groups[]= {
|
|
||||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||||
"mysql_cluster",
|
"mysql_cluster",
|
||||||
#endif
|
#endif
|
||||||
"mysqld","server", MYSQL_BASE_VERSION, 0, 0};
|
"mysqld","server", MYSQL_BASE_VERSION, 0, 0};
|
||||||
|
|
||||||
#if defined(__WIN__)
|
#if defined(__WIN__) && !defined(EMBEDDED_LIBRARY)
|
||||||
static const int load_default_groups_sz=
|
static const int load_default_groups_sz=
|
||||||
sizeof(load_default_groups)/sizeof(load_default_groups[0]);
|
sizeof(load_default_groups)/sizeof(load_default_groups[0]);
|
||||||
#endif
|
#endif
|
||||||
#endif /*!EMBEDDED_LIBRARY*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3221,6 +3222,8 @@ static int init_common_variables(const char *conf_file_name, int argc,
|
|||||||
SQLCOM_END + 8);
|
SQLCOM_END + 8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
orig_argc=argc;
|
||||||
|
orig_argv=argv;
|
||||||
load_defaults(conf_file_name, groups, &argc, &argv);
|
load_defaults(conf_file_name, groups, &argc, &argv);
|
||||||
defaults_argv=argv;
|
defaults_argv=argv;
|
||||||
defaults_argc=argc;
|
defaults_argc=argc;
|
||||||
@ -3886,6 +3889,7 @@ server.");
|
|||||||
if ((ho_error= handle_options(&defaults_argc, &tmp_argv, no_opts,
|
if ((ho_error= handle_options(&defaults_argc, &tmp_argv, no_opts,
|
||||||
mysqld_get_one_option)))
|
mysqld_get_one_option)))
|
||||||
unireg_abort(ho_error);
|
unireg_abort(ho_error);
|
||||||
|
my_getopt_skip_unknown= TRUE;
|
||||||
|
|
||||||
if (defaults_argc)
|
if (defaults_argc)
|
||||||
{
|
{
|
||||||
|
@ -1139,8 +1139,9 @@ int plugin_init(int *argc, char **argv, int flags)
|
|||||||
for (plugin= *builtins; plugin->info; plugin++)
|
for (plugin= *builtins; plugin->info; plugin++)
|
||||||
{
|
{
|
||||||
if (opt_ignore_builtin_innodb &&
|
if (opt_ignore_builtin_innodb &&
|
||||||
!my_strcasecmp(&my_charset_latin1, plugin->name, "InnoDB"))
|
!my_strnncoll(&my_charset_latin1, (const uchar*) plugin->name,
|
||||||
continue;
|
6, (const uchar*) "InnoDB", 6))
|
||||||
|
continue;
|
||||||
/* by default, ndbcluster and federated are disabled */
|
/* by default, ndbcluster and federated are disabled */
|
||||||
def_enabled=
|
def_enabled=
|
||||||
my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0 &&
|
my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0 &&
|
||||||
@ -1633,8 +1634,8 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl
|
|||||||
{
|
{
|
||||||
TABLE_LIST tables;
|
TABLE_LIST tables;
|
||||||
TABLE *table;
|
TABLE *table;
|
||||||
int error, argc;
|
int error, argc=orig_argc;
|
||||||
char *argv[2];
|
char **argv=orig_argv;
|
||||||
struct st_plugin_int *tmp;
|
struct st_plugin_int *tmp;
|
||||||
DBUG_ENTER("mysql_install_plugin");
|
DBUG_ENTER("mysql_install_plugin");
|
||||||
|
|
||||||
@ -1650,21 +1651,31 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl
|
|||||||
|
|
||||||
pthread_mutex_lock(&LOCK_plugin);
|
pthread_mutex_lock(&LOCK_plugin);
|
||||||
rw_wrlock(&LOCK_system_variables_hash);
|
rw_wrlock(&LOCK_system_variables_hash);
|
||||||
/* handle_options() assumes arg0 (program name) always exists */
|
|
||||||
argv[0]= const_cast<char*>(""); // without a cast gcc emits a warning
|
load_defaults(MYSQL_CONFIG_NAME, load_default_groups, &argc, &argv);
|
||||||
argv[1]= 0;
|
|
||||||
argc= 1;
|
|
||||||
error= plugin_add(thd->mem_root, name, dl, &argc, argv, REPORT_TO_USER);
|
error= plugin_add(thd->mem_root, name, dl, &argc, argv, REPORT_TO_USER);
|
||||||
|
if (argv)
|
||||||
|
free_defaults(argv);
|
||||||
rw_unlock(&LOCK_system_variables_hash);
|
rw_unlock(&LOCK_system_variables_hash);
|
||||||
|
|
||||||
if (error || !(tmp= plugin_find_internal(name, MYSQL_ANY_PLUGIN)))
|
if (error || !(tmp= plugin_find_internal(name, MYSQL_ANY_PLUGIN)))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (plugin_initialize(tmp))
|
if (tmp->state == PLUGIN_IS_DISABLED)
|
||||||
{
|
{
|
||||||
my_error(ER_CANT_INITIALIZE_UDF, MYF(0), name->str,
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||||
"Plugin initialization function failed.");
|
ER_CANT_INITIALIZE_UDF, ER(ER_CANT_INITIALIZE_UDF),
|
||||||
goto deinit;
|
name->str, "Plugin is disabled");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBUG_ASSERT(tmp->state == PLUGIN_IS_UNINITIALIZED);
|
||||||
|
if (plugin_initialize(tmp))
|
||||||
|
{
|
||||||
|
my_error(ER_CANT_INITIALIZE_UDF, MYF(0), name->str,
|
||||||
|
"Plugin initialization function failed.");
|
||||||
|
goto deinit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user