summaryrefslogtreecommitdiff
path: root/mysys/my_redel.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-11 20:55:11 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-12 16:42:05 +0200
commit347eeefbfc658c8531878218487d729f4e020805 (patch)
tree0502ac4bdf1c09e8ee70aad97431474003bde51f /mysys/my_redel.c
parent611dc0dcf4b39c670daf229f10e43b8b33f6e8c3 (diff)
downloadmariadb-git-347eeefbfc658c8531878218487d729f4e020805.tar.gz
don't use my_copystat in the server
it was supposed to be used in command-line tools only. Different fix for 4e5473862e: Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
Diffstat (limited to 'mysys/my_redel.c')
-rw-r--r--mysys/my_redel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mysys/my_redel.c b/mysys/my_redel.c
index b285bb25e2e..e5e4f48d9d5 100644
--- a/mysys/my_redel.c
+++ b/mysys/my_redel.c
@@ -1,5 +1,5 @@
-/*
- 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
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,
DBUG_PRINT("my",("org_name: '%s' tmp_name: '%s' MyFlags: %d",
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;
if (MyFlags & MY_REDEL_MAKE_BACKUP)
{