| Bug #46751 | mysql client application cannot read from Windows named pipes | ||
|---|---|---|---|
| Submitted: | 17 Aug 2009 2:18 | Modified: | 29 Dec 2009 22:24 |
| Reporter: | Alex Goncharov | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
| Version: | 5.1, 5.4, 6.0 | OS: | Windows (\\.\foo\bar is unwisely converted to \foo\bar ) |
| Assigned to: | CPU Architecture: | Any | |
[17 Aug 2009 2:18]
Alex Goncharov
[21 Aug 2009 1:33]
MySQL Verification Team
See bug: http://bugs.mysql.com/bug.php?id=44835.
[29 Dec 2009 22:24]
Sveta Smirnova
Thank you for the report. Verified as described.
[18 Apr 2015 1:33]
supreet padhi
I am also getting the same issue. Steps to reproduce
1. Create a named pipe server using
LPTSTR lpszPipename = TEXT("\\\\.\\pipe\\mynamedpipe");
HANDLE hPipe;
hPipe = CreateNamedPipe(
lpszPipename, // pipe name
PIPE_ACCESS_DUPLEX, // read/write access
PIPE_TYPE_MESSAGE | // message type pipe
PIPE_READMODE_MESSAGE | // message-read mode
PIPE_WAIT, // blocking mode
PIPE_UNLIMITED_INSTANCES, // max. instances
BUFSIZE, // output buffer size
BUFSIZE, // input buffer size
0, // client time-out
NULL); // default security attribute
fConnected = ConnectNamedPipe(hPipe, NULL) ?
TRUE : (GetLastError() == ERROR_PIPE_CONNECTED);
if (fConnected)
{
printf("Client connected.\n");
LPTSTR lpvMessage = TEXT("abc|2|ff|1.2\n");
DWORD cbToWrite = (lstrlen(lpvMessage) + 1)*sizeof(TCHAR);
DWORD cbWritten;
// Write the reply to the pipe.
BOOL fSuccess = WriteFile(
hPipe, // handle to pipe
lpvMessage, // buffer to write from
cbToWrite, // number of bytes to write
&cbWritten, // number of bytes written
NULL); // not overlapped I/O
}
CloseHandle(hPipe);
2. Create table test with ddl: create table test (a char(10), b int , c varchar(10), d float(2,2))
3. start writing to the named pipe using mysql client utility mysql --database=test --local-infile=true -e "load data local infile '\\\\.\\pipe\\mynamedpipe' into table test FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' " .
I am getting the following error message
ERROR 2 (HY000) at line 1: File '\\pipe\mynamedpipe' not found (Errcode: 2 - No such file or directory)
