diff options
author | unknown <konstantin@mysql.com> | 2004-04-30 03:00:55 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2004-04-30 03:00:55 +0400 |
commit | be5d750a241dbf103f7546b2f83d1bdc312eb5ac (patch) | |
tree | 4251bda68c1a8c77fe6324d5c55590bc1fd0af11 /include | |
parent | 258a3d1678dc37363b7578a4cf61405aa6f7e4dc (diff) | |
parent | d5237fd09f71ccc8e008118607f8f22af4be630e (diff) | |
download | mariadb-git-be5d750a241dbf103f7546b2f83d1bdc312eb5ac.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-u2
include/mysql.h:
Auto merged
libmysql/libmysql.c:
Auto merged
sql/sql_prepare.cc:
Auto merged
tests/client_test.c:
Auto merged
Diffstat (limited to 'include')
-rw-r--r-- | include/config-win.h | 1 | ||||
-rw-r--r-- | include/my_global.h | 9 | ||||
-rw-r--r-- | include/mysql.h | 3 | ||||
-rw-r--r-- | include/mysql_com.h | 11 |
4 files changed, 11 insertions, 13 deletions
diff --git a/include/config-win.h b/include/config-win.h index 518f445861a..0298c9012ce 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -252,6 +252,7 @@ inline double ulonglong2double(ulonglong value) #define doublestore(T,V) { *((long *) T) = *((long*) &V); \ *(((long *) T)+1) = *(((long*) &V)+1); } #define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } +#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float)) #define float8get(V,M) doubleget((V),(M)) #define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) #define float8store(V,M) doublestore((V),(M)) diff --git a/include/my_global.h b/include/my_global.h index 6a5b7663c66..7540897e6f4 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -964,10 +964,15 @@ do { doubleget_union _tmp; \ #define float4get(V,M) do { *((long *) &(V)) = *((long*) (M)); } while(0) #define float8get(V,M) doubleget((V),(M)) #define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) +#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float)) #define float8store(V,M) doublestore((V),(M)) #endif /* __i386__ */ #ifndef sint2korr +/* + We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines + were done before) +*/ #define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\ ((int16) ((int16) (A)[1]) << 8)) #define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ @@ -1121,6 +1126,7 @@ do { doubleget_union _tmp; \ *((T)+1)=(((A) >> 16));\ *((T)+0)=(((A) >> 24)); } while(0) +#define floatstore(T,V) memcpy_fixed((byte*)(T), (byte*)(&V), sizeof(float)) #define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double)) #define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double)) #define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong)) @@ -1134,6 +1140,9 @@ do { doubleget_union _tmp; \ #define ulongget(V,M) do { V = uint4korr(M); } while(0) #define shortstore(T,V) int2store(T,V) #define longstore(T,V) int4store(T,V) +#ifndef floatstore +#define floatstore(T,V) memcpy_fixed((byte*)(T), (byte*)(&V), sizeof(float)) +#endif #ifndef doubleget #define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double)) #define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double)) diff --git a/include/mysql.h b/include/mysql.h index 077c66235a7..a5d8dc4c5f9 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -547,9 +547,8 @@ typedef struct st_mysql_bind unsigned long offset; /* offset position for char/binary fetch */ unsigned long internal_length; /* Used if length is 0 */ unsigned int param_number; /* For null count and error messages */ + my_bool is_unsigned; /* set if integer type is unsigned */ my_bool long_data_used; /* If used with mysql_send_long_data */ - my_bool binary_data; /* data buffer is binary */ - my_bool null_field; /* NULL data cache flag */ my_bool internal_is_null; /* Used if is_null is 0 */ void (*store_param_func)(NET *net, struct st_mysql_bind *param); void (*fetch_result)(struct st_mysql_bind *, unsigned char **row); diff --git a/include/mysql_com.h b/include/mysql_com.h index 578ef964d8d..ada2bd1f679 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -223,17 +223,6 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, #define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM #define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY -#if TO_BE_INCLUDED_LATER -/* For bind applications, to indicate unsigned buffers */ -#define MYSQL_TYPE_UTINY -10 -#define MYSQL_TYPE_USHORT -9 -#define MYSQL_TYPE_ULONG -8 -#define MYSQL_TYPE_UFLOAT -7 -#define MYSQL_TYPE_UDOUBLE -6 -#define MYSQL_TYPE_ULONGLONG -5 -#define MYSQL_TYPE_UINT24 -4 -#endif - /* options for mysql_set_option */ enum enum_mysql_set_option { |