MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:November 26 2007 4:09pm
Subject:bk commit into 5.0 tree (davi:1.2588) BUG#29592
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of davi. When davi does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-11-26 14:09:37-02:00, davi@stripped +5 -0
  Bug#29592 SQL Injection issue
  
  Remove the mysql_odbc_escape_string() function. The function
  has multi-byte character escaping issues, doesn't honor the
  NO_BACKSLASH_ESCAPES mode and is not used anymore by the
  Connector/ODBC as of 3.51.17.

  include/mysql.h@stripped, 2007-11-26 14:09:35-02:00, davi@stripped +0 -10
    Remove mysql_odbc_escape_string() prototype.

  include/mysql_h.ic@stripped, 2007-11-26 14:09:35-02:00, davi@stripped +233 -235
    Update abi check file, mostly line changes and mysql_odbc_escape_string
    removal.

  libmysql/libmysql.c@stripped, 2007-11-26 14:09:35-02:00, davi@stripped +0 -72
    Remove mysql_odbc_escape_string() body.

  libmysql/libmysql.def@stripped, 2007-11-26 14:09:35-02:00, davi@stripped +0 -1
    Remove mysql_odbc_escape_string()

  libmysqld/libmysqld.def@stripped, 2007-11-26 14:09:35-02:00, davi@stripped +0 -1
    Remove mysql_odbc_escape_string()

diff -Nrup a/include/mysql.h b/include/mysql.h
--- a/include/mysql.h	2007-07-31 23:56:48 -03:00
+++ b/include/mysql.h	2007-11-26 14:09:35 -02:00
@@ -550,16 +550,6 @@ unsigned long STDCALL mysql_real_escape_
 					       char *to,const char *from,
 					       unsigned long length);
 void		STDCALL mysql_debug(const char *debug);
-char *		STDCALL mysql_odbc_escape_string(MYSQL *mysql,
-						 char *to,
-						 unsigned long to_length,
-						 const char *from,
-						 unsigned long from_length,
-						 void *param,
-						 char *
-						 (*extend_buffer)
-						 (void *, char *to,
-						  unsigned long *length));
 void 		STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
 unsigned int	STDCALL mysql_thread_safe(void);
 my_bool		STDCALL mysql_embedded(void);
diff -Nrup a/include/mysql_h.ic b/include/mysql_h.ic
--- a/include/mysql_h.ic	2006-12-19 07:24:41 -02:00
+++ b/include/mysql_h.ic	2007-11-26 14:09:35 -02:00
@@ -32,65 +32,65 @@ enum mysql_option;
 enum mysql_protocol_type;
 enum mysql_rpl_type;
 enum mysql_status;
-# 134 "mysql.h"
+# 138 "mysql.h"
 typedef struct st_mysql_rows MYSQL_ROWS;
-# 24 "my_list.h"
+# 23 "my_list.h"
 typedef struct st_list LIST;
-# 35 "my_alloc.h"
+# 34 "my_alloc.h"
 typedef struct st_mem_root MEM_ROOT;
-# 251 "mysql.h"
+# 255 "mysql.h"
 typedef struct st_mysql MYSQL;
-# 653 "mysql.h"
+# 647 "mysql.h"
 typedef struct st_mysql_bind MYSQL_BIND;
-# 93 "mysql.h"
+# 97 "mysql.h"
 typedef struct st_mysql_field MYSQL_FIELD;
-# 117 "mysql.h"
+# 121 "mysql.h"
 typedef unsigned int MYSQL_FIELD_OFFSET;
-# 340 "mysql.h"
+# 344 "mysql.h"
 typedef struct st_mysql_manager MYSQL_MANAGER;
-# 354 "mysql.h"
+# 358 "mysql.h"
 typedef struct st_mysql_parameters MYSQL_PARAMETERS;
-# 309 "mysql.h"
+# 313 "mysql.h"
 typedef struct st_mysql_res MYSQL_RES;
-# 116 "mysql.h"
+# 120 "mysql.h"
 typedef char * * MYSQL_ROW;
-# 140 "mysql.h"
+# 144 "mysql.h"
 typedef MYSQL_ROWS * MYSQL_ROW_OFFSET;
-# 681 "mysql.h"
+# 675 "mysql.h"
 typedef struct st_mysql_stmt MYSQL_STMT;
-# 236 "mysql.h"
+# 240 "mysql.h"
 typedef struct character_set MY_CHARSET_INFO;
-# 180 "mysql_com.h"
+# 179 "mysql_com.h"
 typedef struct st_net NET;
-# 23 "typelib.h"
+# 22 "typelib.h"
 typedef struct st_typelib TYPELIB;
-# 170 "mysql_com.h"
+# 169 "mysql_com.h"
 typedef struct st_vio Vio;
-# 57 "mysql.h"
+# 60 "mysql.h"
 typedef char * gptr;
-# 29 "my_list.h"
+# 28 "my_list.h"
 typedef int (* list_walk_action)(void *, void *);
-# 48 "mysql.h"
+# 51 "mysql.h"
 typedef char my_bool;
-# 63 "mysql.h"
+# 66 "mysql.h"
 typedef int my_socket;
-# 125 "mysql.h"
+# 129 "mysql.h"
 typedef unsigned long long int my_ulonglong;
-# 144 "mysql.h"
+# 148 "mysql.h"
 typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
-# 145 "mysql.h"
+# 149 "mysql.h"
 typedef struct st_mysql_data MYSQL_DATA;
-# 750 "mysql.h"
+# 744 "mysql.h"
 typedef struct st_mysql_methods MYSQL_METHODS;
-# 48 "mysql_time.h"
+# 47 "mysql_time.h"
 typedef struct st_mysql_time MYSQL_TIME;
-# 371 "mysql_com.h"
+# 375 "mysql_com.h"
 typedef struct st_udf_args UDF_ARGS;
-# 384 "mysql_com.h"
+# 388 "mysql_com.h"
 typedef struct st_udf_init UDF_INIT;
-# 27 "my_alloc.h"
+# 26 "my_alloc.h"
 typedef struct st_used_mem USED_MEM;
-# 236 "mysql.h"
+# 240 "mysql.h"
 struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) character_set
   {
     unsigned int number;
@@ -102,7 +102,7 @@ struct __attribute__((aligned(__alignof_
     unsigned int mbminlen;
     unsigned int mbmaxlen;
   };
-# 357 "mysql_com.h"
+# 361 "mysql_com.h"
 struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct
   {
     unsigned long int seed1;
@@ -110,14 +110,14 @@ struct __attribute__((aligned(__alignof_
     unsigned long int max_value;
     double max_value_dbl;
   };
-# 24 "my_list.h"
+# 23 "my_list.h"
 struct __attribute__((aligned(__alignof__(void *)))) st_list
   {
     struct st_list * prev;
     struct st_list * next;
     void * data;
   };
-# 35 "my_alloc.h"
+# 34 "my_alloc.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_mem_root
   {
     USED_MEM * free;
@@ -129,7 +129,7 @@ struct __attribute__((aligned(__alignof_
     unsigned int first_block_usage;
     void (* error_handler)(void);
   };
-# 251 "mysql.h"
+# 255 "mysql.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql
   {
     NET net;
@@ -173,7 +173,7 @@ struct __attribute__((aligned(__alignof_
     void * thd;
     my_bool * unbuffered_fetch_owner;
   };
-# 653 "mysql.h"
+# 647 "mysql.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_bind
   {
     unsigned long int * length;
@@ -195,7 +195,7 @@ struct __attribute__((aligned(__alignof_
     void (* fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char * * row);
     void (* skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char * * row);
   };
-# 145 "mysql.h"
+# 149 "mysql.h"
 struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_data
   {
     my_ulonglong rows;
@@ -204,7 +204,7 @@ struct __attribute__((aligned(__alignof_
     MEM_ROOT alloc;
     struct embedded_query_result * embedded_info;
   };
-# 93 "mysql.h"
+# 97 "mysql.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_field
   {
     char * name;
@@ -228,7 +228,7 @@ struct __attribute__((aligned(__alignof_
     unsigned int charsetnr;
     enum enum_field_types type;
   };
-# 340 "mysql.h"
+# 344 "mysql.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_manager
   {
     NET net;
@@ -246,7 +246,7 @@ struct __attribute__((aligned(__alignof_
     int net_buf_size;
     char last_error[256];
   };
-# 750 "mysql.h"
+# 744 "mysql.h"
 struct __attribute__((aligned(__alignof__(void *)))) st_mysql_methods
   {
     my_bool (* read_query_result)(MYSQL * mysql);
@@ -266,7 +266,7 @@ struct __attribute__((aligned(__alignof_
     int (* read_change_user_result)(MYSQL * mysql, char * buff, char const * passwd);
     int (* read_rows_from_cursor)(MYSQL_STMT * stmt);
   };
-# 167 "mysql.h"
+# 171 "mysql.h"
 struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_mysql_options
   {
     unsigned int connect_timeout;
@@ -309,13 +309,13 @@ struct __attribute__((aligned(__alignof_
     int (* local_infile_error)(void *, char *, unsigned int);
     void * local_infile_userdata;
   };
-# 354 "mysql.h"
+# 358 "mysql.h"
 struct __attribute__((aligned(__alignof__(void *)))) st_mysql_parameters
   {
     unsigned long int * p_max_allowed_packet;
     unsigned long int * p_net_buffer_length;
   };
-# 309 "mysql.h"
+# 313 "mysql.h"
 struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_res
   {
     my_ulonglong row_count;
@@ -333,14 +333,14 @@ struct __attribute__((aligned(__alignof_
     my_bool unbuffered_fetch_cancelled;
     struct st_mysql_methods const * methods;
   };
-# 134 "mysql.h"
+# 138 "mysql.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_rows
   {
     struct st_mysql_rows * next;
     MYSQL_ROW data;
     unsigned long int length;
   };
-# 681 "mysql.h"
+# 675 "mysql.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql_stmt
   {
     MEM_ROOT mem_root;
@@ -370,7 +370,7 @@ struct __attribute__((aligned(__alignof_
     my_bool unbuffered_fetch_cancelled;
     my_bool update_max_length;
   };
-# 48 "mysql_time.h"
+# 47 "mysql_time.h"
 struct __attribute__((aligned(__alignof__(unsigned long int)))) st_mysql_time
   {
     unsigned int year;
@@ -383,7 +383,7 @@ struct __attribute__((aligned(__alignof_
     my_bool neg;
     enum enum_mysql_timestamp_type time_type;
   };
-# 180 "mysql_com.h"
+# 179 "mysql_com.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_net
   {
     Vio * vio;
@@ -419,7 +419,7 @@ struct __attribute__((aligned(__alignof_
     my_bool report_error;
     my_bool return_errno;
   };
-# 23 "typelib.h"
+# 22 "typelib.h"
 struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_typelib
   {
     unsigned int count;
@@ -427,7 +427,7 @@ struct __attribute__((aligned(__alignof_
     char const * * type_names;
     unsigned int * type_lengths;
   };
-# 371 "mysql_com.h"
+# 375 "mysql_com.h"
 struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args
   {
     unsigned int arg_count;
@@ -438,7 +438,7 @@ struct __attribute__((aligned(__alignof_
     char * * attributes;
     unsigned long int * attribute_lengths;
   };
-# 384 "mysql_com.h"
+# 388 "mysql_com.h"
 struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init
   {
     my_bool maybe_null;
@@ -447,14 +447,14 @@ struct __attribute__((aligned(__alignof_
     char * ptr;
     my_bool const_item;
   };
-# 27 "my_alloc.h"
+# 26 "my_alloc.h"
 struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_used_mem
   {
     struct st_used_mem * next;
     unsigned int left;
     unsigned int size;
   };
-# 368 "mysql_com.h"
+# 372 "mysql_com.h"
 enum Item_result
   {
     STRING_RESULT = 0,
@@ -463,7 +463,7 @@ enum Item_result
     ROW_RESULT = 3,
     DECIMAL_RESULT = 4,
   };
-# 314 "mysql_com.h"
+# 313 "mysql_com.h"
 enum enum_cursor_type
   {
     CURSOR_TYPE_NO_CURSOR = 0,
@@ -471,7 +471,7 @@ enum enum_cursor_type
     CURSOR_TYPE_FOR_UPDATE = 2,
     CURSOR_TYPE_SCROLLABLE = 4,
   };
-# 227 "mysql_com.h"
+# 226 "mysql_com.h"
 enum enum_field_types
   {
     MYSQL_TYPE_DECIMAL = 0,
@@ -502,13 +502,13 @@ enum enum_field_types
     MYSQL_TYPE_STRING = 254,
     MYSQL_TYPE_GEOMETRY = 255,
   };
-# 324 "mysql_com.h"
+# 323 "mysql_com.h"
 enum enum_mysql_set_option
   {
     MYSQL_OPTION_MULTI_STATEMENTS_ON = 0,
     MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1,
   };
-# 583 "mysql.h"
+# 577 "mysql.h"
 enum enum_mysql_stmt_state
   {
     MYSQL_STMT_INIT_DONE = 1,
@@ -516,7 +516,7 @@ enum enum_mysql_stmt_state
     MYSQL_STMT_EXECUTE_DONE = 3,
     MYSQL_STMT_FETCH_DONE = 4,
   };
-# 29 "mysql_time.h"
+# 28 "mysql_time.h"
 enum enum_mysql_timestamp_type
   {
     MYSQL_TIMESTAMP_NONE = -(2),
@@ -525,7 +525,7 @@ enum enum_mysql_timestamp_type
     MYSQL_TIMESTAMP_DATETIME = 1,
     MYSQL_TIMESTAMP_TIME = 2,
   };
-# 52 "mysql_com.h"
+# 51 "mysql_com.h"
 enum enum_server_command
   {
     COM_SLEEP = 0,
@@ -559,14 +559,14 @@ enum enum_server_command
     COM_STMT_FETCH = 28,
     COM_END = 29,
   };
-# 727 "mysql.h"
+# 721 "mysql.h"
 enum enum_stmt_attr_type
   {
     STMT_ATTR_UPDATE_MAX_LENGTH = 0,
     STMT_ATTR_CURSOR_TYPE = 1,
     STMT_ATTR_PREFETCH_ROWS = 2,
   };
-# 289 "mysql_com.h"
+# 288 "mysql_com.h"
 enum mysql_enum_shutdown_level
   {
     SHUTDOWN_DEFAULT = 0,
@@ -578,7 +578,7 @@ enum mysql_enum_shutdown_level
     KILL_QUERY = 254,
     KILL_CONNECTION = 255,
   };
-# 154 "mysql.h"
+# 158 "mysql.h"
 enum mysql_option
   {
     MYSQL_OPT_CONNECT_TIMEOUT = 0,
@@ -604,7 +604,7 @@ enum mysql_option
     MYSQL_OPT_RECONNECT = 20,
     MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 21,
   };
-# 221 "mysql.h"
+# 225 "mysql.h"
 enum mysql_protocol_type
   {
     MYSQL_PROTOCOL_DEFAULT = 0,
@@ -613,357 +613,355 @@ enum mysql_protocol_type
     MYSQL_PROTOCOL_PIPE = 3,
     MYSQL_PROTOCOL_MEMORY = 4,
   };
-# 231 "mysql.h"
+# 235 "mysql.h"
 enum mysql_rpl_type
   {
     MYSQL_RPL_MASTER = 0,
     MYSQL_RPL_SLAVE = 1,
     MYSQL_RPL_ADMIN = 2,
   };
-# 216 "mysql.h"
+# 220 "mysql.h"
 enum mysql_status
   {
     MYSQL_STATUS_READY = 0,
     MYSQL_STATUS_GET_RESULT = 1,
     MYSQL_STATUS_USE_RESULT = 2,
   };
-# 423 "mysql_com.h"
+# 427 "mysql_com.h"
 extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2);
-# 416 "mysql_com.h"
+# 420 "mysql_com.h"
 extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt);
-# 33 "typelib.h"
+# 32 "typelib.h"
 extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from);
-# 411 "mysql_com.h"
+# 415 "mysql_com.h"
 extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st);
-# 30 "typelib.h"
+# 29 "typelib.h"
 extern int find_type(char * x, TYPELIB * typelib, unsigned int);
-# 425 "mysql_com.h"
+# 429 "mysql_com.h"
 extern void get_salt_from_password(unsigned char * res, char const * password);
-# 418 "mysql_com.h"
+# 422 "mysql_com.h"
 extern void get_salt_from_password_323(unsigned long int * res, char const * password);
-# 431 "mysql_com.h"
+# 435 "mysql_com.h"
 extern char * get_tty_password(char * opt_message);
-# 32 "typelib.h"
+# 31 "typelib.h"
 extern char const * get_type(TYPELIB * typelib, unsigned int);
-# 413 "mysql_com.h"
+# 417 "mysql_com.h"
 extern void hash_password(unsigned long int * to, char const * password, unsigned int);
-# 31 "my_list.h"
+# 30 "my_list.h"
 extern LIST * list_add(LIST * root, LIST * element);
-# 33 "my_list.h"
-extern LIST * list_cons(void * data, LIST * root);
 # 32 "my_list.h"
+extern LIST * list_cons(void * data, LIST * root);
+# 31 "my_list.h"
 extern LIST * list_delete(LIST * root, LIST * element);
-# 35 "my_list.h"
+# 34 "my_list.h"
 extern void list_free(LIST * root, unsigned int);
-# 36 "my_list.h"
+# 35 "my_list.h"
 extern unsigned int list_length(LIST *);
-# 34 "my_list.h"
+# 33 "my_list.h"
 extern LIST * list_reverse(LIST * root);
-# 37 "my_list.h"
+# 36 "my_list.h"
 extern int list_walk(LIST *, list_walk_action, gptr);
-# 440 "mysql_com.h"
+# 444 "mysql_com.h"
 extern int load_defaults(char const * conf_file, char const * * groups, int * argc, char * * * argv);
-# 426 "mysql_com.h"
+# 430 "mysql_com.h"
 extern void make_password_from_salt(char * to, unsigned char const * hash_stage2);
-# 419 "mysql_com.h"
+# 423 "mysql_com.h"
 extern void make_password_from_salt_323(char * to, unsigned long int const * salt);
-# 421 "mysql_com.h"
+# 425 "mysql_com.h"
 extern void make_scrambled_password(char * to, char const * password);
-# 414 "mysql_com.h"
+# 418 "mysql_com.h"
 extern void make_scrambled_password_323(char * to, char const * password);
-# 31 "typelib.h"
+# 30 "typelib.h"
 extern void make_type(char * to, unsigned int, TYPELIB * typelib);
-# 437 "mysql_com.h"
+# 441 "mysql_com.h"
 extern int modify_defaults_file(char const * file_location, char const * option, char const * option_value, char const * section_name, int);
-# 354 "mysql_com.h"
+# 358 "mysql_com.h"
 extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int);
-# 436 "mysql_com.h"
+# 440 "mysql_com.h"
 extern my_bool my_init(void);
-# 336 "mysql_com.h"
+# 335 "mysql_com.h"
 extern my_bool my_net_init(NET * net, Vio * vio);
-# 337 "mysql_com.h"
+# 336 "mysql_com.h"
 extern void my_net_local_init(NET * net);
-# 347 "mysql_com.h"
+# 346 "mysql_com.h"
 extern unsigned long int my_net_read(NET * net);
-# 342 "mysql_com.h"
+# 341 "mysql_com.h"
 extern my_bool my_net_write(NET * net, char const * packet, unsigned long int);
-# 410 "mysql_com.h"
+# 414 "mysql_com.h"
 extern double my_rnd(struct rand_struct *);
-# 443 "mysql_com.h"
+# 447 "mysql_com.h"
 extern void my_thread_end(void);
-# 442 "mysql_com.h"
+# 446 "mysql_com.h"
 extern my_bool my_thread_init(void);
-# 559 "mysql.h"
+# 553 "mysql.h"
 extern void myodbc_remove_escape(MYSQL * mysql, char * name);
-# 501 "mysql.h"
+# 505 "mysql.h"
 extern int mysql_add_slave(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
-# 410 "mysql.h"
+# 414 "mysql.h"
 extern my_ulonglong mysql_affected_rows(MYSQL * mysql);
-# 823 "mysql.h"
+# 817 "mysql.h"
 extern my_bool mysql_autocommit(MYSQL * mysql, my_bool);
-# 426 "mysql.h"
+# 430 "mysql.h"
 extern my_bool mysql_change_user(MYSQL * mysql, char const * user, char const * passwd, char const * db);
-# 418 "mysql.h"
+# 422 "mysql.h"
 extern char const * mysql_character_set_name(MYSQL * mysql);
-# 826 "mysql.h"
+# 820 "mysql.h"
 extern void mysql_close(MYSQL * sock);
-# 821 "mysql.h"
+# 815 "mysql.h"
 extern my_bool mysql_commit(MYSQL * mysql);
-# 530 "mysql.h"
+# 534 "mysql.h"
 extern void mysql_data_seek(MYSQL_RES * result, my_ulonglong);
-# 548 "mysql.h"
+# 552 "mysql.h"
 extern void mysql_debug(char const * debug);
-# 487 "mysql.h"
+# 491 "mysql.h"
 extern void mysql_disable_reads_from_master(MYSQL * mysql);
-# 481 "mysql.h"
+# 485 "mysql.h"
 extern void mysql_disable_rpl_parse(MYSQL * mysql);
-# 509 "mysql.h"
+# 513 "mysql.h"
 extern int mysql_dump_debug_info(MYSQL * mysql);
-# 561 "mysql.h"
+# 555 "mysql.h"
 extern my_bool mysql_embedded(void);
-# 486 "mysql.h"
+# 490 "mysql.h"
 extern void mysql_enable_reads_from_master(MYSQL * mysql);
-# 480 "mysql.h"
+# 484 "mysql.h"
 extern void mysql_enable_rpl_parse(MYSQL * mysql);
-# 402 "mysql.h"
+# 406 "mysql.h"
 extern my_bool mysql_eof(MYSQL_RES * res);
-# 412 "mysql.h"
+# 416 "mysql.h"
 extern unsigned int mysql_errno(MYSQL * mysql);
-# 432 "mysql_com.h"
+# 436 "mysql_com.h"
 extern char const * mysql_errno_to_sqlstate(unsigned int);
-# 413 "mysql.h"
+# 417 "mysql.h"
 extern char const * mysql_error(MYSQL * mysql);
-# 541 "mysql.h"
+# 545 "mysql.h"
 extern unsigned long int mysql_escape_string(char * to, char const * from, unsigned long int);
-# 538 "mysql.h"
+# 542 "mysql.h"
 extern MYSQL_FIELD * mysql_fetch_field(MYSQL_RES * result);
-# 403 "mysql.h"
+# 407 "mysql.h"
 extern MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res, unsigned int);
-# 405 "mysql.h"
+# 409 "mysql.h"
 extern MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res);
-# 537 "mysql.h"
+# 541 "mysql.h"
 extern unsigned long int * mysql_fetch_lengths(MYSQL_RES * result);
-# 536 "mysql.h"
+# 540 "mysql.h"
 extern MYSQL_ROW mysql_fetch_row(MYSQL_RES * result);
-# 409 "mysql.h"
+# 413 "mysql.h"
 extern unsigned int mysql_field_count(MYSQL * mysql);
-# 534 "mysql.h"
+# 538 "mysql.h"
 extern MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result, MYSQL_FIELD_OFFSET);
-# 407 "mysql.h"
+# 411 "mysql.h"
 extern MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES * res);
-# 529 "mysql.h"
+# 533 "mysql.h"
 extern void mysql_free_result(MYSQL_RES * result);
-# 454 "mysql.h"
+# 458 "mysql.h"
 extern void mysql_get_character_set_info(MYSQL * mysql, MY_CHARSET_INFO * charset);
-# 519 "mysql.h"
+# 523 "mysql.h"
 extern char const * mysql_get_client_info(void);
-# 520 "mysql.h"
+# 524 "mysql.h"
 extern unsigned long int mysql_get_client_version(void);
-# 521 "mysql.h"
+# 525 "mysql.h"
 extern char const * mysql_get_host_info(MYSQL * mysql);
-# 384 "mysql.h"
+# 388 "mysql.h"
 extern MYSQL_PARAMETERS * mysql_get_parameters(void);
-# 523 "mysql.h"
+# 527 "mysql.h"
 extern unsigned int mysql_get_proto_info(MYSQL * mysql);
-# 518 "mysql.h"
-extern char const * mysql_get_server_info(MYSQL * mysql);
 # 522 "mysql.h"
+extern char const * mysql_get_server_info(MYSQL * mysql);
+# 526 "mysql.h"
 extern unsigned long int mysql_get_server_version(MYSQL * mysql);
-# 425 "mysql.h"
+# 429 "mysql.h"
 extern char const * mysql_get_ssl_cipher(MYSQL * mysql);
-# 543 "mysql.h"
+# 547 "mysql.h"
 extern unsigned long int mysql_hex_string(char * to, char const * from, unsigned long int);
-# 416 "mysql.h"
+# 420 "mysql.h"
 extern char const * mysql_info(MYSQL * mysql);
-# 421 "mysql.h"
+# 425 "mysql.h"
 extern MYSQL * mysql_init(MYSQL * mysql);
-# 411 "mysql.h"
+# 415 "mysql.h"
 extern my_ulonglong mysql_insert_id(MYSQL * mysql);
-# 512 "mysql.h"
+# 516 "mysql.h"
 extern int mysql_kill(MYSQL * mysql, unsigned long int);
-# 524 "mysql.h"
+# 528 "mysql.h"
 extern MYSQL_RES * mysql_list_dbs(MYSQL * mysql, char const * wild);
-# 539 "mysql.h"
+# 543 "mysql.h"
 extern MYSQL_RES * mysql_list_fields(MYSQL * mysql, char const * table, char const * wild);
-# 526 "mysql.h"
+# 530 "mysql.h"
 extern MYSQL_RES * mysql_list_processes(MYSQL * mysql);
-# 525 "mysql.h"
+# 529 "mysql.h"
 extern MYSQL_RES * mysql_list_tables(MYSQL * mysql, char const * wild);
-# 568 "mysql.h"
+# 562 "mysql.h"
 extern void mysql_manager_close(MYSQL_MANAGER * con);
-# 569 "mysql.h"
-extern int mysql_manager_command(MYSQL_MANAGER * con, char const * cmd, int);
 # 563 "mysql.h"
+extern int mysql_manager_command(MYSQL_MANAGER * con, char const * cmd, int);
+# 557 "mysql.h"
 extern MYSQL_MANAGER * mysql_manager_connect(MYSQL_MANAGER * con, char const * host, char const * user, char const * passwd, unsigned int);
-# 571 "mysql.h"
+# 565 "mysql.h"
 extern int mysql_manager_fetch_line(MYSQL_MANAGER * con, char * res_buf, int);
-# 562 "mysql.h"
+# 556 "mysql.h"
 extern MYSQL_MANAGER * mysql_manager_init(MYSQL_MANAGER * con);
-# 445 "mysql.h"
+# 449 "mysql.h"
 extern my_bool mysql_master_query(MYSQL * mysql, char const * q, unsigned long int);
-# 447 "mysql.h"
+# 451 "mysql.h"
 extern my_bool mysql_master_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 824 "mysql.h"
+# 818 "mysql.h"
 extern my_bool mysql_more_results(MYSQL * mysql);
-# 825 "mysql.h"
+# 819 "mysql.h"
 extern int mysql_next_result(MYSQL * mysql);
-# 401 "mysql.h"
+# 405 "mysql.h"
 extern unsigned int mysql_num_fields(MYSQL_RES * res);
-# 400 "mysql.h"
+# 404 "mysql.h"
 extern my_ulonglong mysql_num_rows(MYSQL_RES * res);
-# 549 "mysql.h"
-extern char * mysql_odbc_escape_string(MYSQL * mysql, char * to, unsigned long int, char const * from, unsigned long int, void * param, char * (* extend_buffer)(void *, char * to, unsigned long int * length));
-# 527 "mysql.h"
+# 531 "mysql.h"
 extern int mysql_options(MYSQL * mysql, enum mysql_option, char const * arg);
-# 516 "mysql.h"
+# 520 "mysql.h"
 extern int mysql_ping(MYSQL * mysql);
-# 75 "mysql.h"
+# 78 "mysql.h"
 extern unsigned int mysql_port;
-# 436 "mysql.h"
+# 440 "mysql.h"
 extern int mysql_query(MYSQL * mysql, char const * q);
-# 574 "mysql.h"
+# 568 "mysql.h"
 extern my_bool mysql_read_query_result(MYSQL * mysql);
-# 489 "mysql.h"
+# 493 "mysql.h"
 extern my_bool mysql_reads_from_master_enabled(MYSQL * mysql);
-# 428 "mysql.h"
+# 432 "mysql.h"
 extern MYSQL * mysql_real_connect(MYSQL * mysql, char const * host, char const * user, char const * passwd, char const * db, unsigned int, char const * unix_socket, unsigned long int);
-# 545 "mysql.h"
+# 549 "mysql.h"
 extern unsigned long int mysql_real_escape_string(MYSQL * mysql, char * to, char const * from, unsigned long int);
-# 439 "mysql.h"
+# 443 "mysql.h"
 extern int mysql_real_query(MYSQL * mysql, char const * q, unsigned long int);
-# 510 "mysql.h"
+# 514 "mysql.h"
 extern int mysql_refresh(MYSQL * mysql, unsigned int);
-# 822 "mysql.h"
+# 816 "mysql.h"
 extern my_bool mysql_rollback(MYSQL * mysql);
-# 532 "mysql.h"
+# 536 "mysql.h"
 extern MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result, MYSQL_ROW_OFFSET);
-# 406 "mysql.h"
+# 410 "mysql.h"
 extern MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res);
-# 483 "mysql.h"
+# 487 "mysql.h"
 extern int mysql_rpl_parse_enabled(MYSQL * mysql);
-# 494 "mysql.h"
+# 498 "mysql.h"
 extern my_bool mysql_rpl_probe(MYSQL * mysql);
-# 491 "mysql.h"
+# 495 "mysql.h"
 extern enum mysql_rpl_type mysql_rpl_query_type(char const * q, int);
-# 435 "mysql.h"
+# 439 "mysql.h"
 extern int mysql_select_db(MYSQL * mysql, char const * db);
-# 437 "mysql.h"
+# 441 "mysql.h"
 extern int mysql_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 371 "mysql.h"
+# 375 "mysql.h"
 extern void mysql_server_end(void);
-# 370 "mysql.h"
+# 374 "mysql.h"
 extern int mysql_server_init(int, char * * argv, char * * groups);
-# 419 "mysql.h"
+# 423 "mysql.h"
 extern int mysql_set_character_set(MYSQL * mysql, char const * csname);
-# 472 "mysql.h"
+# 476 "mysql.h"
 extern void mysql_set_local_infile_default(MYSQL * mysql);
-# 461 "mysql.h"
+# 465 "mysql.h"
 extern void mysql_set_local_infile_handler(MYSQL * mysql, int (* local_infile_init)(void * *, char const *, void *), int (* local_infile_read)(void *, char *, unsigned int), void (* local_infile_end)(void), int (* local_infile_error)(void *, char *, unsigned int), void *);
-# 497 "mysql.h"
+# 501 "mysql.h"
 extern int mysql_set_master(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
-# 513 "mysql.h"
+# 517 "mysql.h"
 extern int mysql_set_server_option(MYSQL * mysql, enum enum_mysql_set_option);
-# 506 "mysql.h"
+# 510 "mysql.h"
 extern int mysql_shutdown(MYSQL * mysql, enum mysql_enum_shutdown_level);
-# 450 "mysql.h"
+# 454 "mysql.h"
 extern my_bool mysql_slave_query(MYSQL * mysql, char const * q, unsigned long int);
-# 452 "mysql.h"
+# 456 "mysql.h"
 extern my_bool mysql_slave_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 414 "mysql.h"
+# 418 "mysql.h"
 extern char const * mysql_sqlstate(MYSQL * mysql);
-# 422 "mysql.h"
+# 426 "mysql.h"
 extern my_bool mysql_ssl_set(MYSQL * mysql, char const * key, char const * cert, char const * ca, char const * capath, char const * cipher);
-# 517 "mysql.h"
+# 521 "mysql.h"
 extern char const * mysql_stat(MYSQL * mysql);
-# 817 "mysql.h"
+# 811 "mysql.h"
 extern my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt);
-# 795 "mysql.h"
+# 789 "mysql.h"
 extern my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void * attr);
-# 792 "mysql.h"
+# 786 "mysql.h"
 extern my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void const * attr);
-# 798 "mysql.h"
+# 792 "mysql.h"
 extern my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-# 799 "mysql.h"
+# 793 "mysql.h"
 extern my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-# 800 "mysql.h"
+# 794 "mysql.h"
 extern my_bool mysql_stmt_close(MYSQL_STMT * stmt);
-# 815 "mysql.h"
-extern void mysql_stmt_data_seek(MYSQL_STMT * stmt, my_ulonglong);
 # 809 "mysql.h"
+extern void mysql_stmt_data_seek(MYSQL_STMT * stmt, my_ulonglong);
+# 803 "mysql.h"
 extern unsigned int mysql_stmt_errno(MYSQL_STMT * stmt);
-# 810 "mysql.h"
+# 804 "mysql.h"
 extern char const * mysql_stmt_error(MYSQL_STMT * stmt);
-# 785 "mysql.h"
+# 779 "mysql.h"
 extern int mysql_stmt_execute(MYSQL_STMT * stmt);
-# 786 "mysql.h"
+# 780 "mysql.h"
 extern int mysql_stmt_fetch(MYSQL_STMT * stmt);
-# 787 "mysql.h"
-extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind, unsigned int, unsigned long int);
-# 819 "mysql.h"
+# 781 "mysql.h"
+extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind_arg, unsigned int, unsigned long int);
+# 813 "mysql.h"
 extern unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt);
-# 802 "mysql.h"
+# 796 "mysql.h"
 extern my_bool mysql_stmt_free_result(MYSQL_STMT * stmt);
-# 782 "mysql.h"
+# 776 "mysql.h"
 extern MYSQL_STMT * mysql_stmt_init(MYSQL * mysql);
-# 818 "mysql.h"
+# 812 "mysql.h"
 extern my_ulonglong mysql_stmt_insert_id(MYSQL_STMT * stmt);
-# 816 "mysql.h"
+# 810 "mysql.h"
 extern my_ulonglong mysql_stmt_num_rows(MYSQL_STMT * stmt);
-# 791 "mysql.h"
+# 785 "mysql.h"
 extern unsigned long int mysql_stmt_param_count(MYSQL_STMT * stmt);
-# 808 "mysql.h"
+# 802 "mysql.h"
 extern MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT * stmt);
-# 783 "mysql.h"
+# 777 "mysql.h"
 extern int mysql_stmt_prepare(MYSQL_STMT * stmt, char const * query, unsigned long int);
-# 801 "mysql.h"
+# 795 "mysql.h"
 extern my_bool mysql_stmt_reset(MYSQL_STMT * stmt);
-# 807 "mysql.h"
+# 801 "mysql.h"
 extern MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt);
-# 812 "mysql.h"
+# 806 "mysql.h"
 extern MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT * stmt, MYSQL_ROW_OFFSET);
-# 814 "mysql.h"
+# 808 "mysql.h"
 extern MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt);
-# 803 "mysql.h"
+# 797 "mysql.h"
 extern my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt, unsigned int, char const * data, unsigned long int);
-# 811 "mysql.h"
+# 805 "mysql.h"
 extern char const * mysql_stmt_sqlstate(MYSQL_STMT * stmt);
-# 790 "mysql.h"
+# 784 "mysql.h"
 extern int mysql_stmt_store_result(MYSQL_STMT * stmt);
-# 441 "mysql.h"
+# 445 "mysql.h"
 extern MYSQL_RES * mysql_store_result(MYSQL * mysql);
-# 393 "mysql.h"
+# 397 "mysql.h"
 extern void mysql_thread_end(void);
-# 417 "mysql.h"
+# 421 "mysql.h"
 extern unsigned long int mysql_thread_id(MYSQL * mysql);
-# 392 "mysql.h"
+# 396 "mysql.h"
 extern my_bool mysql_thread_init(void);
-# 560 "mysql.h"
+# 554 "mysql.h"
 extern unsigned int mysql_thread_safe(void);
-# 76 "mysql.h"
+# 79 "mysql.h"
 extern char * mysql_unix_port;
-# 442 "mysql.h"
+# 446 "mysql.h"
 extern MYSQL_RES * mysql_use_result(MYSQL * mysql);
-# 415 "mysql.h"
+# 419 "mysql.h"
 extern unsigned int mysql_warning_count(MYSQL * mysql);
-# 339 "mysql_com.h"
-extern void net_clear(NET * net);
 # 338 "mysql_com.h"
+extern void net_clear(NET * net);
+# 337 "mysql_com.h"
 extern void net_end(NET * net);
-# 341 "mysql_com.h"
+# 340 "mysql_com.h"
 extern my_bool net_flush(NET * net);
-# 346 "mysql_com.h"
+# 345 "mysql_com.h"
 extern int net_real_write(NET * net, char const * packet, unsigned long int);
-# 340 "mysql_com.h"
+# 339 "mysql_com.h"
 extern my_bool net_realloc(NET * net, unsigned long int);
-# 343 "mysql_com.h"
+# 342 "mysql_com.h"
 extern my_bool net_write_command(NET * net, unsigned char, char const * header, unsigned long int, char const * packet, unsigned long int);
-# 427 "mysql_com.h"
+# 431 "mysql_com.h"
 extern char * octet2hex(char * to, char const * str, unsigned int);
-# 408 "mysql_com.h"
+# 412 "mysql_com.h"
 extern void randominit(struct rand_struct *, unsigned long int, unsigned long int);
-# 422 "mysql_com.h"
+# 426 "mysql_com.h"
 extern void scramble(char * to, char const * message, char const * password);
-# 415 "mysql_com.h"
+# 419 "mysql_com.h"
 extern void scramble_323(char * to, char const * message, char const * password);
-# 35 "typelib.h"
+# 34 "typelib.h"
 extern TYPELIB sql_protocol_typelib;
diff -Nrup a/libmysql/libmysql.c b/libmysql/libmysql.c
--- a/libmysql/libmysql.c	2007-10-30 10:41:20 -02:00
+++ b/libmysql/libmysql.c	2007-11-26 14:09:35 -02:00
@@ -1617,78 +1617,6 @@ mysql_real_escape_string(MYSQL *mysql, c
   return escape_string_for_mysql(mysql->charset, to, 0, from, length);
 }
 
-
-char * STDCALL
-mysql_odbc_escape_string(MYSQL *mysql,
-			 char *to, ulong to_length,
-			 const char *from, ulong from_length,
-			 void *param,
-			 char * (*extend_buffer)
-			 (void *, char *, ulong *))
-{
-  char *to_end=to+to_length-5;
-  const char *end;
-#ifdef USE_MB
-  my_bool use_mb_flag=use_mb(mysql->charset);
-#endif
-
-  for (end=from+from_length; from != end ; from++)
-  {
-    if (to >= to_end)
-    {
-      to_length = (ulong) (end-from)+512;	/* We want this much more */
-      if (!(to=(*extend_buffer)(param, to, &to_length)))
-	return to;
-      to_end=to+to_length-5;
-    }
-#ifdef USE_MB
-    {
-      int l;
-      if (use_mb_flag && (l = my_ismbchar(mysql->charset, from, end)))
-      {
-	while (l--)
-	  *to++ = *from++;
-	from--;
-	continue;
-      }
-    }
-#endif
-    switch (*from) {
-    case 0:				/* Must be escaped for 'mysql' */
-      *to++= '\\';
-      *to++= '0';
-      break;
-    case '\n':				/* Must be escaped for logs */
-      *to++= '\\';
-      *to++= 'n';
-      break;
-    case '\r':
-      *to++= '\\';
-      *to++= 'r';
-      break;
-    case '\\':
-      *to++= '\\';
-      *to++= '\\';
-      break;
-    case '\'':
-      *to++= '\\';
-      *to++= '\'';
-      break;
-    case '"':				/* Better safe than sorry */
-      *to++= '\\';
-      *to++= '"';
-      break;
-    case '\032':			/* This gives problems on Win32 */
-      *to++= '\\';
-      *to++= 'Z';
-      break;
-    default:
-      *to++= *from;
-    }
-  }
-  return to;
-}
-
 void STDCALL
 myodbc_remove_escape(MYSQL *mysql,char *name)
 {
diff -Nrup a/libmysql/libmysql.def b/libmysql/libmysql.def
--- a/libmysql/libmysql.def	2007-02-22 12:59:54 -02:00
+++ b/libmysql/libmysql.def	2007-11-26 14:09:35 -02:00
@@ -78,7 +78,6 @@ EXPORTS
 	mysql_next_result
 	mysql_num_fields
 	mysql_num_rows
-	mysql_odbc_escape_string
 	mysql_options
 	mysql_stmt_param_count
 	mysql_stmt_param_metadata
diff -Nrup a/libmysqld/libmysqld.def b/libmysqld/libmysqld.def
--- a/libmysqld/libmysqld.def	2007-06-18 14:21:42 -03:00
+++ b/libmysqld/libmysqld.def	2007-11-26 14:09:35 -02:00
@@ -71,7 +71,6 @@ EXPORTS
 	mysql_next_result
 	mysql_num_fields
 	mysql_num_rows
-	mysql_odbc_escape_string
 	mysql_options
 	mysql_ping
 	mysql_query
Thread
bk commit into 5.0 tree (davi:1.2588) BUG#29592Davi Arnaut26 Nov
  • Re: bk commit into 5.0 tree (davi:1.2588) BUG#29592Konstantin Osipov5 Dec