1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name>

value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
This commit is contained in:
guilhem@gbichot4.local
2008-02-18 23:29:39 +01:00
parent ccd53222d6
commit 9e2b31b026
28 changed files with 82 additions and 78 deletions

View File

@ -3388,7 +3388,7 @@ static void read_binary_time(MYSQL_TIME *tm, uchar **pos)
if (length)
{
uchar *to= *pos;
tm->neg= (bool) to[0];
tm->neg= to[0];
tm->day= (ulong) sint4korr(to+1);
tm->hour= (uint) to[5];
@ -4218,7 +4218,7 @@ static my_bool is_binary_compatible(enum enum_field_types type1,
for (range= range_list; range != range_list_end; ++range)
{
/* check that both type1 and type2 are in the same range */
bool type1_found= FALSE, type2_found= FALSE;
my_bool type1_found= FALSE, type2_found= FALSE;
for (type= *range; *type != MYSQL_TYPE_NULL; type++)
{
type1_found|= type1 == *type;