1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -1042,7 +1042,8 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
DBUG_RETURN(0);
if (maybe_null)
*str= (char) field->is_real_null(); // Set to 1 if null
field->get_key_image(str+maybe_null,key_part->part_length, key_part->image_type);
field->get_key_image(str+maybe_null,key_part->part_length,
key_part->image_type);
if (!(tree=new SEL_ARG(field,str,str)))
DBUG_RETURN(0);
@ -2284,9 +2285,11 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key,
key_tree->min_flag : key_tree->min_flag | key_tree->max_flag;
}
/* Ensure that some part of min_key and max_key are used. If not,
regard this as no lower/upper range */
if((flag & GEOM_FLAG) == 0)
/*
Ensure that some part of min_key and max_key are used. If not,
regard this as no lower/upper range
*/
if ((flag & GEOM_FLAG) == 0)
{
if (tmp_min_key != param->min_key)
flag&= ~NO_MIN_RANGE;
@ -2451,17 +2454,17 @@ int QUICK_SELECT::get_next()
if (!(range=it++))
DBUG_RETURN(HA_ERR_END_OF_FILE); // All ranges used
if(range->flag & GEOM_FLAG)
if (range->flag & GEOM_FLAG)
{
if ((result = file->index_read(record,
(byte*) (range->min_key + ((range->flag & GEOM_FLAG) > 0)),
range->min_length,
(ha_rkey_function)(range->flag ^ GEOM_FLAG))))
(byte*) (range->min_key +1),
range->min_length,
(ha_rkey_function)(range->flag ^
GEOM_FLAG))))
{
if (result != HA_ERR_KEY_NOT_FOUND)
DBUG_RETURN(result);
range=0; // Not found, to next range
range=0; // Not found, to next range
continue;
}
DBUG_RETURN(0);
@ -2478,13 +2481,14 @@ int QUICK_SELECT::get_next()
continue;
}
if ((result = file->index_read(record,
(byte*) (range->min_key + ((range->flag & GEOM_FLAG) > 0)),
range->min_length,
(range->flag & NEAR_MIN) ?
HA_READ_AFTER_KEY:
(range->flag & EQ_RANGE) ?
HA_READ_KEY_EXACT :
HA_READ_KEY_OR_NEXT)))
(byte*) (range->min_key +
test(range->flag & GEOM_FLAG)),
range->min_length,
(range->flag & NEAR_MIN) ?
HA_READ_AFTER_KEY:
(range->flag & EQ_RANGE) ?
HA_READ_KEY_EXACT :
HA_READ_KEY_OR_NEXT)))
{
if (result != HA_ERR_KEY_NOT_FOUND)
@ -2502,8 +2506,11 @@ int QUICK_SELECT::get_next()
}
}
/* compare if found key is over max-value */
/* Returns 0 if key <= range->max_key */
/*
Compare if found key is over max-value
Returns 0 if key <= range->max_key
*/
int QUICK_SELECT::cmp_next(QUICK_RANGE *range_arg)
{