Commit 0a51e72a authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Added symlink support to mysys library.

parent 8ad79ab0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -44847,7 +44847,9 @@ table for a different site you are working on, but the table is just a
bit different (that is - fields in different order, etc.).
By Steve Shreeve.
@item @uref{http://www.mysql.com/Downloads/Contrib/oracledump, oracledump}
Perl program to convert Oracle databases to @strong{MySQL}. By Johan Andersson.
Perl program to convert Oracle databases to @strong{MySQL}. Has same
output format as mysqldump. By Johan Andersson.
@item @uref{http://www.mysql.com/Downloads/Contrib/excel2mysql, excel2mysql}
Perl program to import Excel spreadsheets into a @strong{MySQL} database. By Stephen Hurd @email{shurd@@sk.sympatico.ca}
+2 −0
Original line number Diff line number Diff line
@@ -385,6 +385,8 @@ extern int my_realpath(char *to, const char *filename, myf MyFlags);
extern File my_create_with_symlink(const char *linkname, const char *filename,
				   int createflags, int access_flags,
				   myf MyFlags);
extern int my_delete_with_symlink(const char *name, myf MyFlags);
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags);
extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset,
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
			mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo\
			mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo \
			mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
			my_fstream.lo \
			my_symlink.lo my_fstream.lo \
			mf_loadpath.lo my_pthread.lo my_thr_init.lo \
			thr_mutex.lo mulalloc.lo string.lo default.lo \
			my_compress.lo array.lo my_once.lo list.lo my_net.lo \
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c\
			my_alloc.c safemalloc.c my_fopen.c my_fstream.c \
			my_error.c errors.c my_div.c my_messnc.c \
			mf_format.c mf_same.c mf_dirname.c mf_fn_ext.c \
			my_symlink.c \
			my_symlink.c my_symlink2.c \
			mf_pack.c mf_pack2.c mf_unixpath.c mf_stripp.c \
			mf_casecnv.c mf_soundex.c mf_wcomp.c mf_wfile.c \
			mf_qsort.c mf_qsort2.c mf_sort.c \
+9 −6
Original line number Diff line number Diff line
@@ -20,19 +20,22 @@
#include "mysys_priv.h"
#include <m_string.h>

	/* Formaterar ett filnamn i avsende p} ett annat namn */
	/* Klarar {ven to = name */
	/* Denna funktion r|r inte p} utg}ngsnamnet */

my_string fn_same(my_string toname, const char *name, int flag)
        /*
	  Copy directory and/or extension between filenames.
	  (For the meaning of 'flag', check mf_format.c)
	  'to' may be equal to 'name'.
	  Returns 'to'.
	*/

my_string fn_same(char *to, const char *name, int flag)
{
  char dev[FN_REFLEN];
  const char *ext;
  DBUG_ENTER("fn_same");
  DBUG_PRINT("mfunkt",("to: %s  name: %s  flag: %d",toname,name,flag));
  DBUG_PRINT("enter",("to: %s  name: %s  flag: %d",to,name,flag));

  if ((ext=strrchr(name+dirname_part(dev,name),FN_EXTCHAR)) == 0)
    ext="";

  DBUG_RETURN(fn_format(toname,toname,dev,ext,flag));
  DBUG_RETURN(fn_format(to,to,dev,ext,flag));
} /* fn_same */
Loading