On 09.02.2011, at 21:09, Vladislav Vaintroub wrote:
> Hi Dmitry,
Hi Vladislav!
> With my_fstat() you need my_fileno(), my_fopen(), my_fclose() etc , i.e
> consistent usage of my_ prefix. If you use fileno() here, it will
> assert in my_get_osfhandle() inside my_win_fstat() - it does not like the
> mix of CRT file descriptors and the ones returned by my_winfile.c
You are right.
But it doesn't matter because I decided to put this 'if' statement inside #ifdef __WIN__
since MY_S_ISBLK doesn't make sense on Windows.
So on Windows mysqld will successfully open a directory and then get an error when reading
from it.
Regards, Dmitry.
>
>> LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
>> {
>> LINE_BUFFER *line_buff;
>> + MY_STAT input_file_stat;
>> +
>> + if (my_fstat(fileno(file), &input_file_stat, MYF(MY_WME)) ||
>
>
>
>
>