Commit a9aebd43 authored by venu@myvenu.com's avatar venu@myvenu.com

protocol merge

parents 1c8e36d5 b74c43f4
......@@ -59,7 +59,7 @@ const char *client_errors[]=
"No parameters exists in the statement",
"Invalid parameter number",
"Can't send long data for non string or binary data types (parameter: %d)",
"Using not supported parameter type: %d (parameter: %d)"
"Using un supported parameter type: %d (parameter: %d)"
"Shared memory (%lu)",
"Can't open shared memory. Request event don't create (%lu)",
"Can't open shared memory. Answer event don't create (%lu)",
......@@ -113,7 +113,7 @@ const char *client_errors[]=
"No parameters exists in the statement",
"Invalid parameter number",
"Can't send long data for non string or binary data types (parameter: %d)",
"Using not supported parameter type: %d (parameter: %d)"
"Using un supported parameter type: %d (parameter: %d)"
"Shared memory (%lu)",
"Can't open shared memory. Request event don't create (%lu)",
"Can't open shared memory. Answer event don't create (%lu)",
......@@ -165,7 +165,7 @@ const char *client_errors[]=
"No parameters exists in the statement",
"Invalid parameter number",
"Can't send long data for non string or binary data types (parameter: %d)",
"Using not supported parameter type: %d (parameter: %d)"
"Using un supported parameter type: %d (parameter: %d)"
"Shared memory (%lu)",
"Can't open shared memory. Request event don't create (%lu)",
"Can't open shared memory. Answer event don't create (%lu)",
......
This diff is collapsed.
......@@ -102,8 +102,24 @@ EXPORTS
mysql_add_slave
mysql_warning_count
mysql_warnings
mysql_prepare
mysql_execute
mysql_param_count
mysql_bind_param
mysql_bind_result
mysql_prepare_result
mysql_stmt_close
mysql_stmt_error
mysql_stmt_errno
mysql_fetch
mysql_send_long_data
mysql_multi_query
mysql_next_result
mysql_commit
mysql_rollback
mysql_autocommit
......
......@@ -315,32 +315,27 @@ void Item_param::set_null()
void Item_param::set_int(longlong i)
{
int_value=(longlong)i;
item_result_type = INT_RESULT;
item_type = INT_ITEM;
}
void Item_param::set_double(double value)
{
real_value=value;
item_result_type = REAL_RESULT;
item_type = REAL_ITEM;
}
void Item_param::set_value(const char *str, uint length, CHARSET_INFO *cs)
void Item_param::set_value(const char *str, uint length)
{
str_value.set(str,length,cs);
item_result_type = STRING_RESULT;
str_value.set(str,length,thd_charset());
item_type = STRING_ITEM;
}
void Item_param::set_longdata(const char *str, ulong length, CHARSET_INFO *cs)
{
/* TODO: Fix this for binary handling by making use of
buffer_type..
*/
str_value.append(str,length);
void Item_param::set_longdata(const char *str, ulong length)
{
str_value.append(str,length);
long_data_supplied= 1;
}
......
......@@ -186,8 +186,8 @@ class Item_param :public Item
Item_param(char *name_par=0)
{
name= name_par ? name_par : (char*) "?";
long_data_supplied = false;
item_type = STRING_ITEM;
long_data_supplied= false;
item_type= STRING_ITEM;
item_result_type = STRING_RESULT;
}
enum Type type() const { return item_type; }
......@@ -199,12 +199,13 @@ class Item_param :public Item
void set_null();
void set_int(longlong i);
void set_double(double i);
void set_value(const char *str, uint length, CHARSET_INFO *cs);
void set_long_str(const char *str, ulong length, CHARSET_INFO *cs);
void set_long_binary(const char *str, ulong length, CHARSET_INFO *cs);
void set_longdata(const char *str, ulong length, CHARSET_INFO *cs);
void set_value(const char *str, uint length);
void set_long_str(const char *str, ulong length);
void set_long_binary(const char *str, ulong length);
void set_longdata(const char *str, ulong length);
void set_long_end();
void reset() {}
void (*setup_param_func)(Item_param *param, uchar **pos);
enum Item_result result_type () const
{ return item_result_type; }
Item *new_item() { return new Item_param(name); }
......
......@@ -512,7 +512,7 @@ int mysqld_show_column_types(THD *thd);
int mysqld_help (THD *thd, const char *text);
/* sql_prepare.cc */
int compare_prep_stmt(PREP_STMT *a, PREP_STMT *b, void *not_used);
int compare_prep_stmt(void *not_used, PREP_STMT *stmt, ulong *key);
void free_prep_stmt(PREP_STMT *stmt, TREE_FREE mode, void *not_used);
bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length);
void mysql_stmt_execute(THD *thd, char *packet);
......
......@@ -325,7 +325,7 @@ typedef struct st_prep_stmt
uint param_count;
uint last_errno;
char last_error[MYSQL_ERRMSG_SIZE];
bool error_in_prepare, long_data_used;
bool error_in_prepare, long_data_used, param_inited;
} PREP_STMT;
......@@ -510,7 +510,6 @@ class THD :public ilink {
bool safe_to_cache_query;
bool volatile killed;
bool prepare_command;
Item_param *params; // Pointer to array of params
/*
If we do a purge of binary logs, log index info of the threads
......
......@@ -127,7 +127,7 @@ static const char *warning_level_names[]= {"Note", "Warning", "Error", "?"};
my_bool mysqld_show_warnings(THD *thd, ulong levels_to_show)
{
List<Item> field_list;
DBUG_ENTER("mysqld_show_errors");
DBUG_ENTER("mysqld_show_warnings");
field_list.push_back(new Item_empty_string("Level", 7));
field_list.push_back(new Item_int("Code",0,4));
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment