summaryrefslogtreecommitdiff
path: root/include/mysql.h
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2004-04-30 03:00:19 +0400
committerunknown <konstantin@mysql.com>2004-04-30 03:00:19 +0400
commitd5237fd09f71ccc8e008118607f8f22af4be630e (patch)
treefc6d7dc87294264a61e636135a576237a43d072f /include/mysql.h
parentae629fff866dda4e0e3411b0614d0c1efdfb6362 (diff)
downloadmariadb-git-d5237fd09f71ccc8e008118607f8f22af4be630e.tar.gz
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.
Diffstat (limited to 'include/mysql.h')
-rw-r--r--include/mysql.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/mysql.h b/include/mysql.h
index 852d633facf..b8476682bb3 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);