mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge with MySQL 5.1.47
Fixed some bugs introduced in 5.1.47 Disabled some tests until we have merged with latest Xtradb configure.in: Added testing if valgrind/memcheck.h exists storage/pbxt/src/ha_pbxt.cc: LOCK_plugin is not anymore locked in init
This commit is contained in:
@@ -287,6 +287,37 @@ void **thd_ha_data(const THD *thd, const struct handlerton *hton)
|
||||
return (void **) &thd->ha_data[hton->slot].ha_ptr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Provide a handler data getter to simplify coding
|
||||
*/
|
||||
extern "C"
|
||||
void *thd_get_ha_data(const THD *thd, const struct handlerton *hton)
|
||||
{
|
||||
return *thd_ha_data(thd, hton);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Provide a handler data setter to simplify coding
|
||||
@see thd_set_ha_data() definition in plugin.h
|
||||
*/
|
||||
extern "C"
|
||||
void thd_set_ha_data(THD *thd, const struct handlerton *hton,
|
||||
const void *ha_data)
|
||||
{
|
||||
plugin_ref *lock= &thd->ha_data[hton->slot].lock;
|
||||
if (ha_data && !*lock)
|
||||
*lock= ha_lock_engine(NULL, (handlerton*) hton);
|
||||
else if (!ha_data && *lock)
|
||||
{
|
||||
plugin_unlock(NULL, *lock);
|
||||
*lock= NULL;
|
||||
}
|
||||
*thd_ha_data(thd, hton)= (void*) ha_data;
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
long long thd_test_options(const THD *thd, long long test_options)
|
||||
{
|
||||
@@ -1867,8 +1898,7 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
|
||||
else
|
||||
(void) fn_format(path, exchange->file_name, mysql_real_data_home, "", option);
|
||||
|
||||
if (opt_secure_file_priv &&
|
||||
strncmp(opt_secure_file_priv, path, strlen(opt_secure_file_priv)))
|
||||
if (!is_secure_file_path(path))
|
||||
{
|
||||
/* Write only allowed to dir or subdir specified by secure_file_priv */
|
||||
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv");
|
||||
|
||||
Reference in New Issue
Block a user