Merge branch '2.2' into develop
This commit is contained in:
@ -363,16 +363,13 @@ extern char *gwbuf_get_property(GWBUF *buf, const char *name);
|
||||
/**
|
||||
* Convert a chain of GWBUF structures into a single GWBUF structure
|
||||
*
|
||||
* @param orig The chain to convert
|
||||
* @param orig The chain to convert, must not be used after the function call
|
||||
*
|
||||
* @return NULL if @c buf is NULL or if a memory allocation fails,
|
||||
* @c buf if @c buf already is contiguous, and otherwise
|
||||
* a contigious copy of @c buf.
|
||||
* @return A contiguous version of @c buf.
|
||||
*
|
||||
* @attention If a non-NULL value is returned, the @c buf should no
|
||||
* longer be used as it may have been freed.
|
||||
* @attention Never returns NULL, memory allocation failures abort the process
|
||||
*/
|
||||
extern GWBUF *gwbuf_make_contiguous(GWBUF *buf);
|
||||
extern GWBUF* gwbuf_make_contiguous(GWBUF *buf);
|
||||
|
||||
/**
|
||||
* Add a buffer object to GWBUF buffer.
|
||||
@ -401,11 +398,12 @@ extern void dprintAllBuffers(void *pdcb);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Debug function for dumping buffer contents to INFO log
|
||||
* Debug function for dumping buffer contents to log
|
||||
*
|
||||
* @param buffer Buffer to dump
|
||||
* @param buffer Buffer to dump
|
||||
* @param log_level Log priority where the message is written
|
||||
*/
|
||||
void gwbuf_hexdump(GWBUF* buffer);
|
||||
void gwbuf_hexdump(GWBUF* buffer, int log_level);
|
||||
|
||||
/**
|
||||
* Return pointer of the byte at offset from start of chained buffer
|
||||
|
||||
@ -357,6 +357,8 @@ static inline void dcb_readq_set(DCB *dcb, GWBUF *buffer)
|
||||
*
|
||||
* @deprecated You should not use this function, use dcb_foreach_parallel instead
|
||||
*
|
||||
* @warning This must only be called from the main thread, otherwise deadlocks occur
|
||||
*
|
||||
* @param func Function to call. The function should return @c true to continue iteration
|
||||
* and @c false to stop iteration earlier. The first parameter is a DCB and the second
|
||||
* is the value of @c data that the user provided.
|
||||
@ -366,21 +368,15 @@ static inline void dcb_readq_set(DCB *dcb, GWBUF *buffer)
|
||||
bool dcb_foreach(bool (*func)(DCB *dcb, void *data), void *data);
|
||||
|
||||
/**
|
||||
* @brief Call a function for each connected DCB
|
||||
* @brief Call a function for each connected DCB on the current worker
|
||||
*
|
||||
* @note This function can call @c func from multiple thread at one time.
|
||||
* @param func Function to call. The function should return @c true to continue
|
||||
* iteration and @c false to stop iteration earlier. The first parameter
|
||||
* is the current DCB.
|
||||
*
|
||||
* @param func Function to call. The function should return @c true to continue iteration
|
||||
* and @c false to stop iteration earlier. The first is a DCB and
|
||||
* the second is this thread's value in the @c data array that
|
||||
* the user provided.
|
||||
*
|
||||
* @param data Array of user provided data passed as the second parameter to @c func.
|
||||
* The array must have more space for pointers thann the return
|
||||
* value of `config_threadcount()`. The value passed to @c func will
|
||||
* be the value of the array at the index of the current thread's ID.
|
||||
* @param data User provided data passed as the second parameter to @c func
|
||||
*/
|
||||
void dcb_foreach_parallel(bool (*func)(DCB *dcb, void *data), void **data);
|
||||
void dcb_foreach_local(bool (*func)(DCB *dcb, void *data), void *data);
|
||||
|
||||
/**
|
||||
* @brief Return the port number this DCB is connected to
|
||||
|
||||
@ -37,8 +37,8 @@ public:
|
||||
*
|
||||
* @return New virtual client or NULL on error
|
||||
*/
|
||||
static LocalClient* create(MXS_SESSION* session, SERVICE* service);
|
||||
static LocalClient* create(MXS_SESSION* session, SERVER* server);
|
||||
static LocalClient* create(MYSQL_session* session, MySQLProtocol* proto, SERVICE* service);
|
||||
static LocalClient* create(MYSQL_session* session, MySQLProtocol* proto, SERVER* server);
|
||||
|
||||
/**
|
||||
* Queue a new query for execution
|
||||
@ -57,8 +57,8 @@ public:
|
||||
void self_destruct();
|
||||
|
||||
private:
|
||||
static LocalClient* create(MXS_SESSION* session, const char* ip, uint64_t port);
|
||||
LocalClient(MXS_SESSION* session, int fd);
|
||||
static LocalClient* create(MYSQL_session* session, MySQLProtocol* proto, const char* ip, uint64_t port);
|
||||
LocalClient(MYSQL_session* session, MySQLProtocol* proto, int fd);
|
||||
static uint32_t poll_handler(struct mxs_poll_data* data, void* worker, uint32_t events);
|
||||
void process(uint32_t events);
|
||||
GWBUF* read_complete_packet();
|
||||
|
||||
Reference in New Issue
Block a user