Commit 347eeefb authored by Sergei Golubchik's avatar Sergei Golubchik

don't use my_copystat in the server

it was supposed to be used in command-line tools only.
Different fix for 4e547386:

Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
parent 611dc0dc
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. /* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2010, 2013, Monty Program Ab. Copyright (c) 2010, 2016, Monty Program Ab.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -246,7 +246,7 @@ extern my_bool my_use_symdir; ...@@ -246,7 +246,7 @@ extern my_bool my_use_symdir;
extern ulong my_default_record_cache_size; extern ulong my_default_record_cache_size;
extern my_bool my_disable_locking, my_disable_async_io, extern my_bool my_disable_locking, my_disable_async_io,
my_disable_flush_key_blocks, my_disable_symlinks; my_disable_flush_key_blocks, my_disable_symlinks;
extern my_bool my_disable_sync; extern my_bool my_disable_sync, my_disable_copystat_in_redel;
extern char wild_many,wild_one,wild_prefix; extern char wild_many,wild_one,wild_prefix;
extern const char *charsets_dir; extern const char *charsets_dir;
/* from default.c */ /* from default.c */
......
/* /* Copyright (c) 2000, 2010, Oracle and/or its affiliates
Copyright (c) 2000, 2010, Oracle and/or its affiliates Copyright (c) 2009, 2016, MariaDB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -49,7 +49,8 @@ int my_redel(const char *org_name, const char *tmp_name, ...@@ -49,7 +49,8 @@ int my_redel(const char *org_name, const char *tmp_name,
DBUG_PRINT("my",("org_name: '%s' tmp_name: '%s' MyFlags: %d", DBUG_PRINT("my",("org_name: '%s' tmp_name: '%s' MyFlags: %d",
org_name,tmp_name,MyFlags)); org_name,tmp_name,MyFlags));
if (my_copystat(org_name,tmp_name,MyFlags) < 0) if (!my_disable_copystat_in_redel &&
my_copystat(org_name,tmp_name,MyFlags) < 0)
goto end; goto end;
if (MyFlags & MY_REDEL_MAKE_BACKUP) if (MyFlags & MY_REDEL_MAKE_BACKUP)
{ {
......
...@@ -99,6 +99,7 @@ my_bool my_disable_sync=0; ...@@ -99,6 +99,7 @@ my_bool my_disable_sync=0;
my_bool my_disable_async_io=0; my_bool my_disable_async_io=0;
my_bool my_disable_flush_key_blocks=0; my_bool my_disable_flush_key_blocks=0;
my_bool my_disable_symlinks=0; my_bool my_disable_symlinks=0;
my_bool my_disable_copystat_in_redel=0;
/* /*
Note that PSI_hook and PSI_server are unconditionally Note that PSI_hook and PSI_server are unconditionally
......
...@@ -3455,6 +3455,7 @@ static int init_common_variables() ...@@ -3455,6 +3455,7 @@ static int init_common_variables()
max_system_variables.pseudo_thread_id= (ulong)~0; max_system_variables.pseudo_thread_id= (ulong)~0;
server_start_time= flush_status_time= my_time(0); server_start_time= flush_status_time= my_time(0);
my_disable_copystat_in_redel= 1;
rpl_filter= new Rpl_filter; rpl_filter= new Rpl_filter;
binlog_filter= new Rpl_filter; binlog_filter= new Rpl_filter;
......
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