From b8585472e90ef75abbbc7711a18872ac69810887 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Apr 2004 03:00:19 +0400 Subject: Fix for Bug#3035 "Prepared statement integer inserts": now unsigned flag is sent to server with placeholder types. There were no need to extend the protocol as one additional byte was reserved for placeholder code, when placeholder code is in range 0-255. So this byte is now used for flags. Post-review fixes added. include/config-win.h: added floaststore implementation include/my_global.h: added floatstore implementation include/mysql.h: Bug#3035: added 'is_unsigned' member binary_data wasn't used, removed null_field wasn't necessary, removed include/mysql_com.h: Unused defines were removed. libmysql/libmysql.c: Function store_param_type was removed - too much for a function, especially with bug in it. New implementation is inline and takes into account signedness of placeholder. Fixed store functions to not perform double network-host order conversion on high-byte-first systems (should also fix Bug#3578 "Prepared statement integer conversions work wrong in 64-bit Power Mac G5 CPUs"). null_field removed. sql/sql_prepare.cc: Placeholder sign is taken into account when reading data from network. tests/client_test.c: Test for BUG#3035 added: insert and retrieve minimum and maximum of all integer types. --- include/mysql_com.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'include/mysql_com.h') 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 { -- cgit v1.2.1