mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-10777: Server crashed due to query_cache_info plugin
Possible fix. Make the pluging more safe.
This commit is contained in:
@ -156,8 +156,9 @@ struct Query_cache_query
|
||||
Query_cache_block *res;
|
||||
Query_cache_tls *wri;
|
||||
ulong len;
|
||||
uint8 tbls_type;
|
||||
unsigned int last_pkt_nr;
|
||||
uint8 tbls_type;
|
||||
uint8 ready;
|
||||
|
||||
Query_cache_query() {} /* Remove gcc warning */
|
||||
inline void init_n_lock();
|
||||
@ -177,6 +178,12 @@ struct Query_cache_query
|
||||
{
|
||||
return (((uchar*)this) + ALIGN_SIZE(sizeof(Query_cache_query)));
|
||||
}
|
||||
/**
|
||||
following used to check if result ready in plugin without
|
||||
locking rw_lock of the query.
|
||||
*/
|
||||
inline void set_results_ready() { ready= 1; }
|
||||
inline bool is_results_ready() { return ready; }
|
||||
void lock_writing();
|
||||
void lock_reading();
|
||||
bool try_lock_writing();
|
||||
|
Reference in New Issue
Block a user