mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix for Bug#6024 "Test "client_test" fails in 4.1.6-gamma build (1)":
let's not assume that char is signed (its signedness is not defined). The server was also affected by the wrong typedef. include/my_global.h: Fix for Bug#6024 "Test "client_test" fails in 4.1.6-gamma build (1)": let's not assume that char is signed (its signedness is not defined). libmysql/libmysql.c: Fix for Bug#6024 "Test "client_test" fails in 4.1.6-gamma build (1)": let's not assume that char is signed (its signedness is not defined).
This commit is contained in:
@ -3611,9 +3611,10 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
|
||||
switch (field_type) {
|
||||
case MYSQL_TYPE_TINY:
|
||||
{
|
||||
char value= (char) **row;
|
||||
longlong data= field_is_unsigned ? (longlong) (unsigned char) value :
|
||||
(longlong) value;
|
||||
uchar value= **row;
|
||||
/* sic: we need to cast to 'signed char' as 'char' may be unsigned */
|
||||
longlong data= field_is_unsigned ? (longlong) value :
|
||||
(longlong) (signed char) value;
|
||||
fetch_long_with_conversion(param, field, data);
|
||||
*row+= 1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user