1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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
This commit is contained in:
unknown
2004-08-26 22:47:34 +04:00
parent 4b47cc97aa
commit ce91cbb867
2 changed files with 50 additions and 0 deletions

View File

@ -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);