Below is the list of changes that have just been committed into a local
5.0 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1911 05/09/23 19:49:42 svoj@stripped +1 -0
WL#2575 - Fulltext: Parser plugin for FTS
After review fixes.
sql/sql_plugin.cc
1.10 05/09/23 19:49:37 svoj@stripped +23 -17
Convert plugin path from system_charset to files_charset.
close_threaded_tables removed from mysql_install_plugin.
Initialize plugin before openning grant table.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: svoj
# Host: svoj-laptop.mysql.com
# Root: /home/svoj/devel/mysql/CNET/mysql-5.0
--- 1.9/sql/sql_plugin.cc 2005-09-22 19:56:27 +05:00
+++ 1.10/sql/sql_plugin.cc 2005-09-23 19:49:37 +05:00
@@ -53,7 +53,7 @@
{
#ifdef HAVE_DLOPEN
char dlpath[FN_REFLEN];
- uint plugin_dir_len;
+ uint plugin_dir_len, dummy_errors;
struct st_plugin_dl *tmp, plugin_dl;
void *sym;
DBUG_ENTER("plugin_dl_add");
@@ -129,17 +129,21 @@
DBUG_RETURN(0);
}
plugin_dl.plugins= (struct st_mysql_plugin *)sym;
- /* Duplicate dll name */
- if (!(plugin_dl.dl.str= my_strdup(dl->str, MYF(0))))
+ /* Duplicate and convert dll name */
+ plugin_dl.dl.length= dl->length * files_charset_info->mbmaxlen + 1;
+ if (! (plugin_dl.dl.str= my_malloc(plugin_dl.dl.length, MYF(0))))
{
dlclose(plugin_dl.handle);
if (report & REPORT_TO_USER)
- my_error(ER_OUTOFMEMORY, MYF(0), dl->length + 1);
+ my_error(ER_OUTOFMEMORY, MYF(0), plugin_dl.dl.length);
if (report & REPORT_TO_LOG)
- sql_print_error(ER(ER_OUTOFMEMORY), dl->length + 1);
+ sql_print_error(ER(ER_OUTOFMEMORY), plugin_dl.dl.length);
DBUG_RETURN(0);
}
- plugin_dl.dl.length= dl->length;
+ plugin_dl.dl.length= copy_and_convert(plugin_dl.dl.str, plugin_dl.dl.length,
+ files_charset_info, dl->str, dl->length, system_charset_info,
+ &dummy_errors);
+ plugin_dl.dl.str[plugin_dl.dl.length]= 0;
/* Add this dll to array */
if (insert_dynamic(&plugin_dl_array, (gptr)&plugin_dl))
{
@@ -449,17 +453,6 @@
rw_wrlock(&THR_LOCK_plugin);
if (plugin_add(name, dl, REPORT_TO_USER))
goto err;
- if (! (table = open_ltable(thd, &tables, TL_WRITE)))
- goto err;
- 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->write_row(table->record[0]);
- close_thread_tables(thd);
- if (error)
- {
- table->file->print_error(error, MYF(0));
- goto err;
- }
tmp= plugin_find_internal(name, MYSQL_ANY_PLUGIN);
if (tmp->plugin->init)
{
@@ -469,8 +462,21 @@
goto err;
}
}
+ if (! (table = open_ltable(thd, &tables, TL_WRITE)))
+ goto deinit;
+ 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->write_row(table->record[0]);
+ if (error)
+ {
+ table->file->print_error(error, MYF(0));
+ goto deinit;
+ }
rw_unlock(&THR_LOCK_plugin);
DBUG_RETURN(FALSE);
+deinit:
+ if (tmp->plugin->deinit)
+ tmp->plugin->deinit();
err:
plugin_del(name);
rw_unlock(&THR_LOCK_plugin);
| Thread |
|---|
| • bk commit into 5.0 tree (svoj:1.1911) | svoj | 23 Sep |