1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

rename of net_pkg.cc to protocol.cc

Class for sending data from server to client (Protocol)
This handles both the old ( <= 4.0 ) protocol and then new binary protocol that is used for prepared statements.


libmysql/libmysql.c:
  Jump over reserved bits in the binary protocol
libmysqld/Makefile.am:
  rename of net_pkg.cc to protocol.cc
mysql-test/r/case.result:
  Fixed previously wrong test
mysql-test/r/cast.result:
  Fixed previously wrong test
sql/Makefile.am:
  Rename of net_pkg.cc to protocol.cc
sql/field.cc:
  Binary protocol
  Added key handling functions for new VARCHAR type
sql/field.h:
  New protocol
sql/ha_berkeley.cc:
  New protocol
sql/ha_berkeley.h:
  New protocol
sql/ha_innodb.cc:
  New protocol
sql/ha_myisam.cc:
  New protocol
sql/item.cc:
  New protocol
sql/item.h:
  New protocol
sql/item_func.cc:
  Removed old code from 3.23
sql/item_func.h:
  Set cached_result_type as it was previosly used before set
sql/item_subselect.cc:
  Standard make_field() is now good enough
sql/item_subselect.h:
  Use default make_field()
sql/item_sum.cc:
  Clean up Item_sum::make_field()
sql/item_sum.h:
  Use standard make_field()
sql/item_timefunc.h:
  return correct types for casts()
  Use standard make_field()
sql/log_event.cc:
  New protocol
sql/log_event.h:
  New protocol
sql/mysql_priv.h:
  Move things to protocol.h
sql/opt_range.cc:
  Indentation cleanups + small optimization
sql/procedure.h:
  Use MYSQL_TYPE instead of FIELD_TYPE
sql/protocol.cc:
  Class for sending data from server to client.
  This handles both the old ( <= 4.0 ) protocol and then new binary protocol that is used for prepared statements.
sql/repl_failsafe.cc:
  New protocol
sql/slave.cc:
  New protocol
sql/sql_acl.cc:
  New protocol
sql/sql_base.cc:
  Move send_fields() to protocol.cc
sql/sql_class.cc:
  New protocol
sql/sql_class.h:
  New protocol
sql/sql_db.cc:
  New protocol
sql/sql_error.cc:
  New protocol
sql/sql_handler.cc:
  New protocol
sql/sql_help.cc:
  New protocol
sql/sql_parse.cc:
  Remove wrong assert (variable was not initalized at this point)
sql/sql_prepare.cc:
  New protocol
sql/sql_repl.cc:
  New protocol
sql/sql_select.cc:
  New protocol
sql/sql_show.cc:
  New protocol
sql/sql_string.h:
  New functions used by the protocol functions
sql/sql_table.cc:
  New protocol
sql/structs.h:
  Make second_part ulong to prepare for ANSI sub-seconds
sql/time.cc:
  New convert function needed by the new protocol functions
This commit is contained in:
unknown
2002-12-11 09:17:51 +02:00
parent b392b78400
commit f918dfc8b2
48 changed files with 2877 additions and 1659 deletions

View File

@ -316,6 +316,7 @@ public:
Item_date() :Item_func() {}
Item_date(Item *a) :Item_func(a) {}
enum Item_result result_type () const { return STRING_RESULT; }
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
String *val_str(String *str);
double val() { return (double) val_int(); }
const char *func_name() const { return "date"; }
@ -326,10 +327,6 @@ public:
max_length=10*thd_charset()->mbmaxlen;
}
int save_in_field(Field *to, bool no_conversions);
void make_field(Send_field *tmp_field)
{
init_make_field(tmp_field,FIELD_TYPE_DATE);
}
Field *tmp_table_field(TABLE *t_arg)
{
return (!t_arg) ? result_field : new Field_date(maybe_null, name, t_arg, thd_charset());
@ -343,10 +340,7 @@ public:
Item_date_func() :Item_str_func() {}
Item_date_func(Item *a) :Item_str_func(a) {}
Item_date_func(Item *a,Item *b) :Item_str_func(a,b) {}
void make_field(Send_field *tmp_field)
{
init_make_field(tmp_field,FIELD_TYPE_DATETIME);
}
enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
Field *tmp_table_field(TABLE *t_arg)
{
return (!t_arg) ? result_field : new Field_datetime(maybe_null, name,
@ -364,15 +358,12 @@ public:
Item_func_curtime() :Item_func() {}
Item_func_curtime(Item *a) :Item_func(a) {}
enum Item_result result_type () const { return STRING_RESULT; }
enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
double val() { return (double) value; }
longlong val_int() { return value; }
String *val_str(String *str);
const char *func_name() const { return "curtime"; }
void fix_length_and_dec();
void make_field(Send_field *tmp_field)
{
init_make_field(tmp_field,FIELD_TYPE_TIME);
}
Field *tmp_table_field(TABLE *t_arg)
{
return (!t_arg) ? result_field :
@ -470,11 +461,8 @@ public:
maybe_null=1;
max_length=13*thd_charset()->mbmaxlen;
}
enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
const char *func_name() const { return "sec_to_time"; }
void make_field(Send_field *tmp_field)
{
init_make_field(tmp_field,FIELD_TYPE_TIME);
}
Field *tmp_table_field(TABLE *t_arg)
{
return (!t_arg) ? result_field :
@ -566,10 +554,7 @@ class Item_date_typecast :public Item_typecast
public:
Item_date_typecast(Item *a) :Item_typecast(a) {}
const char *func_name() const { return "date"; }
void make_field(Send_field *tmp_field)
{
init_make_field(tmp_field,FIELD_TYPE_DATE);
}
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
Field *tmp_table_field(TABLE *t_arg)
{
return (!t_arg) ? result_field :
@ -583,10 +568,7 @@ class Item_time_typecast :public Item_typecast
public:
Item_time_typecast(Item *a) :Item_typecast(a) {}
const char *func_name() const { return "time"; }
void make_field(Send_field *tmp_field)
{
init_make_field(tmp_field,FIELD_TYPE_TIME);
}
enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
Field *tmp_table_field(TABLE *t_arg)
{
return (!t_arg) ? result_field :
@ -600,10 +582,7 @@ class Item_datetime_typecast :public Item_typecast
public:
Item_datetime_typecast(Item *a) :Item_typecast(a) {}
const char *func_name() const { return "datetime"; }
void make_field(Send_field *tmp_field)
{
init_make_field(tmp_field,FIELD_TYPE_DATETIME);
}
enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
Field *tmp_table_field(TABLE *t_arg)
{
return (!t_arg) ? result_field : new Field_datetime(maybe_null, name,