summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-06-21 10:24:40 +0300
committerunknown <monty@mysql.com>2004-06-21 10:24:40 +0300
commit028dfdb3f723aed827475fe4ddcc9377f7805567 (patch)
tree0e02d42f7a1f1f532c1d780d1c57097202d7369d /libmysql
parenta3c22ae7d2d719e6e4ba052056c1dba316390985 (diff)
parentb5dfd05662464d2c19da349942914cce897cdbaf (diff)
downloadmariadb-git-028dfdb3f723aed827475fe4ddcc9377f7805567.tar.gz
merge
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union Build-tools/Do-compile: Auto merged include/my_global.h: Auto merged innobase/row/row0ins.c: Auto merged libmysql/libmysql.c: Auto merged libmysqld/Makefile.am: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/subselect.result: Auto merged scripts/mysql_install_db.sh: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged innobase/fil/fil0fil.c: merge (Use heikki's code)
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 0a830c695bb..d1e92f5d91f 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -3114,6 +3114,7 @@ static uint read_binary_date(MYSQL_TIME *tm, uchar **pos)
return length;
}
+
/* Convert Numeric to buffer types */
static void send_data_long(MYSQL_BIND *param, MYSQL_FIELD *field,
longlong value)
@@ -3128,26 +3129,26 @@ static void send_data_long(MYSQL_BIND *param, MYSQL_FIELD *field,
*param->buffer= (uchar) value;
break;
case MYSQL_TYPE_SHORT:
- int2store(buffer, value);
+ shortstore(buffer, value);
break;
case MYSQL_TYPE_LONG:
- int4store(buffer, value);
+ longstore(buffer, value);
break;
case MYSQL_TYPE_LONGLONG:
- int8store(buffer, value);
+ longlongstore(buffer, value);
break;
case MYSQL_TYPE_FLOAT:
{
float data= (field_is_unsigned ? (float) ulonglong2double(value) :
(float) value);
- float4store(buffer, data);
+ floatstore(buffer, data);
break;
}
case MYSQL_TYPE_DOUBLE:
{
double data= (field_is_unsigned ? ulonglong2double(value) :
(double) value);
- float8store(buffer, data);
+ doublestore(buffer, data);
break;
}
default:
@@ -3183,24 +3184,26 @@ static void send_data_double(MYSQL_BIND *param, double value)
*buffer= (uchar)value;
break;
case MYSQL_TYPE_SHORT:
- int2store(buffer, (short)value);
+ shortstore(buffer, (short)value);
break;
case MYSQL_TYPE_LONG:
- int4store(buffer, (long)value);
+ longstore(buffer, (long)value);
break;
case MYSQL_TYPE_LONGLONG:
- int8store(buffer, (longlong)value);
+ {
+ longlong val= (longlong) value;
+ longlongstore(buffer, val);
break;
+ }
case MYSQL_TYPE_FLOAT:
{
- float data= (float)value;
- float4store(buffer, data);
+ float data= (float) value;
+ floatstore(buffer, data);
break;
}
case MYSQL_TYPE_DOUBLE:
{
- double data= (double)value;
- float8store(buffer, data);
+ doublestore(buffer, value);
break;
}
default: