summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorguilhem@gbichot4.local <>2008-02-18 23:29:39 +0100
committerguilhem@gbichot4.local <>2008-02-18 23:29:39 +0100
commit9e2b31b0268a05a94032ba96c0830536ce983685 (patch)
tree7bffd7a5bcb1eea8fb0183e3a4e3a40cf6a783a6 /libmysql
parentccd53222d61d25ae2702d87a3b617a1f835eedc7 (diff)
downloadmariadb-git-9e2b31b0268a05a94032ba96c0830536ce983685.tar.gz
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).
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index f5ac1c09248..06eae528574 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -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;