mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
patch fixing after review on patch-fixing of
Bug #5492 "set @@session.read_rnd_buffer_size=33554432" crashes server on query 1. added warning comments for uint3korr (need one more byte allocated) 2. unsigned long in uint3korr was replaced by unsigned int to avoid problems on 64-bits platforms 3. shorten warning comments in init_rr_cache in sql/records.cc include/config-win.h: 1. added warning comments for uint3korr (need one more byte allocated) 2. unsigned long in uint3korr was replaced by unsigned int to avoid problems on 64-bits platforms include/my_global.h: 1. added warning comments for uint3korr (need one more byte allocated) 2. unsigned long in uint3korr was replaced by unsigned int to avoid problems on 64-bits platforms sql/records.cc: shorten warning comments for my_malloc_lock in init_rr_cache
This commit is contained in:
@ -218,7 +218,13 @@ inline double ulonglong2double(ulonglong value)
|
||||
((uint32) (uchar) (A)[0])))
|
||||
#define sint4korr(A) (*((long *) (A)))
|
||||
#define uint2korr(A) (*((uint16 *) (A)))
|
||||
#define uint3korr(A) (long) (*((unsigned long *) (A)) & 0xFFFFFF)
|
||||
/*
|
||||
ATTENTION !
|
||||
|
||||
Please, note, uint3korr reads 4 bytes (not 3) !
|
||||
It means, that you have to provide enough allocated space !
|
||||
*/
|
||||
#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
|
||||
#define uint4korr(A) (*((unsigned long *) (A)))
|
||||
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
|
||||
(((uint32) ((uchar) (A)[1])) << 8) +\
|
||||
|
Reference in New Issue
Block a user