MySQL 9.1.0
Source Code Documentation
|
The abstract class for basic byte input streams which provides read operations. More...
#include <basic_istream.h>
Public Member Functions | |
virtual ssize_t | read (unsigned char *buffer, size_t length)=0 |
Read some bytes from the input stream. More... | |
virtual | ~Basic_istream ()=default |
The abstract class for basic byte input streams which provides read operations.
|
virtualdefault |
|
pure virtual |
Read some bytes from the input stream.
It should read exact 'length' bytes unless error happens or it reaches the end of the stream. It should block when reaching the end of a pipe that is not closed.
[out] | buffer | Where data will be put in. |
[in] | length | The number of bytes that you want to read. length should not be larger than max long. |
'length' | Read 'length' bytes successfully |
>=0 | Reach EOF, return the number of bytes actually read. It is between 0 and length-1. |
-1 | Error. |
Implemented in IO_CACHE_istream, Stdin_istream, Binlog_encryption_istream, and Basic_binlog_ifile.