mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merged 5.1 with maria 5.1
This commit is contained in:
@@ -1137,9 +1137,10 @@ int plugin_init(int *argc, char **argv, int flags)
|
||||
{
|
||||
for (plugin= *builtins; plugin->info; plugin++)
|
||||
{
|
||||
/* by default, only ndbcluster is disabled */
|
||||
/* by default, ndbcluster and federated are disabled */
|
||||
def_enabled=
|
||||
my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0;
|
||||
my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0 &&
|
||||
my_strcasecmp(&my_charset_latin1, plugin->name, "FEDERATED") != 0;
|
||||
bzero(&tmp, sizeof(tmp));
|
||||
tmp.plugin= plugin;
|
||||
tmp.name.str= (char *)plugin->name;
|
||||
@@ -1360,7 +1361,7 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
table= tables.table;
|
||||
init_read_record(&read_record_info, new_thd, table, NULL, 1, 0);
|
||||
init_read_record(&read_record_info, new_thd, table, NULL, 1, 0, FALSE);
|
||||
table->use_all_columns();
|
||||
/*
|
||||
there're no other threads running yet, so we don't need a mutex.
|
||||
@@ -1661,11 +1662,18 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl
|
||||
goto deinit;
|
||||
}
|
||||
|
||||
/*
|
||||
We do not replicate the INSTALL PLUGIN statement. Disable binlogging
|
||||
of the insert into the plugin table, so that it is not replicated in
|
||||
row based mode.
|
||||
*/
|
||||
tmp_disable_binlog(thd);
|
||||
table->use_all_columns();
|
||||
restore_record(table, s->default_values);
|
||||
table->field[0]->store(name->str, name->length, system_charset_info);
|
||||
table->field[1]->store(dl->str, dl->length, files_charset_info);
|
||||
error= table->file->ha_write_row(table->record[0]);
|
||||
reenable_binlog(thd);
|
||||
if (error)
|
||||
{
|
||||
table->file->print_error(error, MYF(0));
|
||||
@@ -1730,7 +1738,15 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name)
|
||||
HA_READ_KEY_EXACT))
|
||||
{
|
||||
int error;
|
||||
if ((error= table->file->ha_delete_row(table->record[0])))
|
||||
/*
|
||||
We do not replicate the UNINSTALL PLUGIN statement. Disable binlogging
|
||||
of the delete from the plugin table, so that it is not replicated in
|
||||
row based mode.
|
||||
*/
|
||||
tmp_disable_binlog(thd);
|
||||
error= table->file->ha_delete_row(table->record[0]);
|
||||
reenable_binlog(thd);
|
||||
if (error)
|
||||
{
|
||||
table->file->print_error(error, MYF(0));
|
||||
DBUG_RETURN(TRUE);
|
||||
@@ -1881,7 +1897,7 @@ static int check_func_bool(THD *thd, struct st_mysql_sys_var *var,
|
||||
}
|
||||
result= (int) tmp;
|
||||
}
|
||||
*(int*)save= -result;
|
||||
*(my_bool *) save= -result;
|
||||
return 0;
|
||||
err:
|
||||
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->name, strvalue);
|
||||
@@ -2062,7 +2078,7 @@ err:
|
||||
static void update_func_bool(THD *thd, struct st_mysql_sys_var *var,
|
||||
void *tgt, const void *save)
|
||||
{
|
||||
*(my_bool *) tgt= *(int *) save ? 1 : 0;
|
||||
*(my_bool *) tgt= *(my_bool *) save ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user