mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
d889c1a8bd
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint BUILD/compile-dist: Auto merged client/mysqltest.c: Auto merged config/ac-macros/ssl.m4: Auto merged include/config-win.h: Auto merged include/my_base.h: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/func_group.result: Auto merged mysql-test/r/group_min_max.result: Auto merged mysql-test/r/partition.result: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/r/rpl_insert_id_pk.result: Auto merged mysql-test/r/rpl_ndb_multi_update3.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/join_outer.test: Auto merged mysql-test/t/partition.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/r/rpl_ndb_sp006.result: Auto merged mysql-test/t/sp.test: Auto merged mysys/my_clock.c: Auto merged mysys/my_copy.c: Auto merged mysys/my_create.c: Auto merged mysys/my_dup.c: Auto merged mysys/my_lib.c: Auto merged mysys/my_open.c: Auto merged mysys/my_redel.c: Auto merged mysql-test/r/create.result: Manual merge mysql-test/r/innodb_mysql.result: Manual merge mysql-test/r/join_outer.result: Manual merge mysql-test/t/func_group.test: Manual merge mysql-test/t/group_min_max.test: Manual merge mysql-test/t/innodb_mysql.test: Manual merge
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
/* Copyright (C) 2000 MySQL AB
|
|
|
|
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
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
#include "mysys_priv.h"
|
|
#include "mysys_err.h"
|
|
#include <my_dir.h>
|
|
#include <errno.h>
|
|
#if defined(__WIN__)
|
|
#include <share.h>
|
|
#endif
|
|
|
|
/* Open a file */
|
|
|
|
File my_dup(File file, myf MyFlags)
|
|
{
|
|
File fd;
|
|
const char *filename;
|
|
DBUG_ENTER("my_dup");
|
|
DBUG_PRINT("my",("file: %d MyFlags: %d", MyFlags));
|
|
fd = dup(file);
|
|
filename= (((uint) file < my_file_limit) ?
|
|
my_file_info[(int) file].name : "Unknown");
|
|
DBUG_RETURN(my_register_filename(fd, filename, FILE_BY_DUP,
|
|
EE_FILENOTFOUND, MyFlags));
|
|
} /* my_open */
|