List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:November 4 2001 9:54pm
Subject:Re: Source code for MySQL on Amiga
View as plain text  
Hi!

>>>>> "SixK" == SixK  <SixK@stripped> writes:

SixK> Hello Michael

SixK> Sorry, forgot to save changes to this file sql_db.cc

SixK> here they are.

SixK> have a nice day.

SixK> Regards

<cut>

Thanks!

SixK> #if !defined(__amiga__)
SixK>   unpack_dirname(path,path);			// Convert if not unix
SixK>   if ((dirp = my_dir(path,MYF(MY_DONT_SORT))))
SixK>   {
SixK>     my_dirend(dirp);
SixK>     if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS))
SixK>     {
SixK>       my_error(ER_DB_CREATE_EXISTS,MYF(0),db);
SixK>       error = -1;
SixK>       goto exit;
SixK>     }
SixK>     result = 0;
SixK>   }
SixK>   else
SixK>   {
SixK>     strend(path)[-1]=0;				// Remove last '/' from path
SixK>     if (my_mkdir(path,0777,MYF(0)) < 0)
SixK>     {
SixK>       my_error(ER_CANT_CREATE_DB,MYF(0),db,my_errno);
SixK>       error = -1;
SixK>       goto exit;
SixK>     }
SixK>   }
SixK> #else  
SixK>   if(mkdir(path,0777)<0)
SixK>   {
SixK>     if (errno==EEXIST)
SixK>     {
SixK>       net_printf(&thd->net,ER_DB_CREATE_EXISTS,db);
SixK>       goto exit;
SixK>     }else
SixK>     {
SixK>       net_printf(&thd->net,ER_CANT_CREATE_DB,db,my_errno);
SixK>       goto exit;
SixK>     }
SixK>   }
SixK> #endif

Can you please tell us why the original code doesn't work for Amiga?
my_dir() should work because this is needed by other MySQL code.
my_mkdir() is just a wrapper for mkdir() so this should also be safe.

I would prefer to get my_dir() fixed instead of having an '#ifdef amiga' in
this file.

Regards,
Monty
Thread
Re: Source code for MySQL on AmigaMichael Widenius4 Nov