Commit acc730a3 authored by unknown's avatar unknown

monty review: fixes after reapplying plugin patch from "crashed" 5.1 tree


include/my_global.h:
  removed double commit of same code
sql/mysqld.cc:
  monty review: moved initialiation of opt_plugin_dir_ptr
sql/table.cc:
  monty review: reset key_info->flags after plugin_unlock in closefrm()
parent b65f90f8
...@@ -1380,16 +1380,6 @@ do { doubleget_union _tmp; \ ...@@ -1380,16 +1380,6 @@ do { doubleget_union _tmp; \
#define dlerror() "" #define dlerror() ""
#endif #endif
#ifdef HAVE_DLOPEN
#if defined(__WIN__)
#define dlsym(lib, name) GetProcAddress((HMODULE)lib, name)
#define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0)
#define dlclose(lib) FreeLibrary((HMODULE)lib)
#elif !defined(OS2)
#include <dlfcn.h>
#endif
#endif
/* FreeBSD 2.2.2 does not define RTLD_NOW) */ /* FreeBSD 2.2.2 does not define RTLD_NOW) */
#ifndef RTLD_NOW #ifndef RTLD_NOW
#define RTLD_NOW 1 #define RTLD_NOW 1
......
...@@ -6303,9 +6303,6 @@ static void mysql_init_variables(void) ...@@ -6303,9 +6303,6 @@ static void mysql_init_variables(void)
sizeof(mysql_real_data_home)-1); sizeof(mysql_real_data_home)-1);
mysql_data_home_buff[0]=FN_CURLIB; // all paths are relative from here mysql_data_home_buff[0]=FN_CURLIB; // all paths are relative from here
mysql_data_home_buff[1]=0; mysql_data_home_buff[1]=0;
strmake(opt_plugin_dir, get_relative_path(LIBDIR),
sizeof(opt_plugin_dir) - 1);
opt_plugin_dir_ptr= opt_plugin_dir;
/* Replication parameters */ /* Replication parameters */
master_user= (char*) "test"; master_user= (char*) "test";
...@@ -7229,6 +7226,9 @@ static void fix_paths(void) ...@@ -7229,6 +7226,9 @@ static void fix_paths(void)
(void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir (void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir
(void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home); (void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home);
(void) my_load_path(pidfile_name,pidfile_name,mysql_real_data_home); (void) my_load_path(pidfile_name,pidfile_name,mysql_real_data_home);
strmake(opt_plugin_dir, get_relative_path(LIBDIR),
sizeof(opt_plugin_dir) - 1);
opt_plugin_dir_ptr= opt_plugin_dir;
(void) my_load_path(opt_plugin_dir, opt_plugin_dir_ptr, mysql_home); (void) my_load_path(opt_plugin_dir, opt_plugin_dir_ptr, mysql_home);
char *sharedir=get_relative_path(SHAREDIR); char *sharedir=get_relative_path(SHAREDIR);
......
...@@ -1074,7 +1074,10 @@ int closefrm(register TABLE *table) ...@@ -1074,7 +1074,10 @@ int closefrm(register TABLE *table)
for (idx= table->s->keys; idx; idx--, key_info++) for (idx= table->s->keys; idx; idx--, key_info++)
{ {
if (key_info->flags & HA_USES_PARSER) if (key_info->flags & HA_USES_PARSER)
{
plugin_unlock(key_info->parser); plugin_unlock(key_info->parser);
key_info->flags= 0;
}
} }
my_free((char*) table->alias, MYF(MY_ALLOW_ZERO_PTR)); my_free((char*) table->alias, MYF(MY_ALLOW_ZERO_PTR));
table->alias= 0; table->alias= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment