summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <lenz@mysql.com>2004-12-17 18:41:53 +0100
committerunknown <lenz@mysql.com>2004-12-17 18:41:53 +0100
commit91a76445335eb251440e61b114b4fdbb0dba5813 (patch)
treeafee8ecc53ecbe371d892059b8c8234ac905f4b3
parent1577b63abfcea397af666c678e0d95813b0ecc57 (diff)
parent6ce4c255df10854fe13f58be9f5d4ba4319a5b85 (diff)
downloadmariadb-git-91a76445335eb251440e61b114b4fdbb0dba5813.tar.gz
Merge lgrimmer@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/space/my/mysql-5.0
-rw-r--r--libmysql/libmysql.c18
-rw-r--r--tests/client_test.c6
2 files changed, 13 insertions, 11 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 2e9721abbe3..7d078a179ed 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -3813,8 +3813,9 @@ static void fetch_datetime_with_conversion(MYSQL_BIND *param,
case MYSQL_TYPE_DOUBLE:
{
ulonglong value= TIME_to_ulonglong(time);
- return fetch_float_with_conversion(param, field,
- ulonglong2double(value), DBL_DIG);
+ fetch_float_with_conversion(param, field,
+ ulonglong2double(value), DBL_DIG);
+ break;
}
case MYSQL_TYPE_TINY:
case MYSQL_TYPE_SHORT:
@@ -3823,7 +3824,8 @@ static void fetch_datetime_with_conversion(MYSQL_BIND *param,
case MYSQL_TYPE_LONGLONG:
{
longlong value= (longlong) TIME_to_ulonglong(time);
- return fetch_long_with_conversion(param, field, value);
+ fetch_long_with_conversion(param, field, value);
+ break;
}
default:
{
@@ -4140,13 +4142,13 @@ static my_bool is_binary_compatible(enum enum_field_types type1,
enum enum_field_types type2)
{
static const enum enum_field_types
- range1[]= { MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR, 0 },
- range2[]= { MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, 0 },
- range3[]= { MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, 0 },
+ range1[]= { MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR, MYSQL_TYPE_NULL },
+ range2[]= { MYSQL_TYPE_INT24, MYSQL_TYPE_LONG, MYSQL_TYPE_NULL },
+ range3[]= { MYSQL_TYPE_DATETIME, MYSQL_TYPE_TIMESTAMP, MYSQL_TYPE_NULL },
range4[]= { MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB,
MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING, MYSQL_TYPE_GEOMETRY,
- MYSQL_TYPE_DECIMAL, 0 },
+ MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL },
*range_list[]= { range1, range2, range3, range4 },
**range_list_end= range_list + sizeof(range_list)/sizeof(*range_list);
const enum enum_field_types **range, *type;
@@ -4157,7 +4159,7 @@ static my_bool is_binary_compatible(enum enum_field_types type1,
{
/* check that both type1 and type2 are in the same range */
bool type1_found= FALSE, type2_found= FALSE;
- for (type= *range; *type; type++)
+ for (type= *range; *type != MYSQL_TYPE_NULL; type++)
{
type1_found|= type1 == *type;
type2_found|= type2 == *type;
diff --git a/tests/client_test.c b/tests/client_test.c
index b00be2d35b8..f524415eb1c 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -11936,7 +11936,7 @@ static void test_bug4172()
MYSQL_ROW row;
int rc;
char f[100], d[100], e[100];
- long f_len, d_len, e_len;
+ ulong f_len, d_len, e_len;
myheader("test_bug4172");
@@ -12027,8 +12027,8 @@ static void test_conversion()
mysql_stmt_bind_param(stmt, bind);
- buff[0]= 0xC3;
- buff[1]= 0xA0;
+ buff[0]= (uchar) 0xC3;
+ buff[1]= (uchar) 0xA0;
length= 2;
rc= mysql_stmt_execute(stmt);