summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2004-08-26 22:47:34 +0400
committerunknown <konstantin@mysql.com>2004-08-26 22:47:34 +0400
commitce91cbb8676fd75a2a44ac0db989c6a29f827425 (patch)
tree1de1516ae5d9cf4fed01d62d562f719d9902f173 /libmysql
parent4b47cc97aaff047f62866f7f3521e618725b2ee6 (diff)
downloadmariadb-git-ce91cbb8676fd75a2a44ac0db989c6a29f827425.tar.gz
A short fix and test case for Bug#5126
"Mediumint and PS problem": just treat mediumint as long. libmysql/libmysql.c: A short fix for bug #5126 "Mediumint and PS problem": just treat mediumint as long, as it's sent just like long. tests/client_test.c: A test case for bug#5126
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index e9961ed11e3..380e53d7d47 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -3339,6 +3339,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
}
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
+ case MYSQL_TYPE_TIMESTAMP:
{
MYSQL_TIME *tm= (MYSQL_TIME *)buffer;
str_to_datetime(value, length, tm, 0, &err);
@@ -3612,6 +3613,7 @@ static void fetch_result_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
length= 2;
break;
}
+ case MYSQL_TYPE_INT24: /* mediumint is sent as 4 bytes int */
case MYSQL_TYPE_LONG:
{
long value= sint4korr(*row);