Commit af3f646c authored by unknown's avatar unknown

Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1

into  production.mysql.com:/usersnfs/jamppa/mysql-5.1-bug-20208


BitKeeper/deleted/.del-ps_6bdb.result:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
parents 224e0b5f 6db41716
...@@ -182,7 +182,7 @@ typedef struct st_vio Vio; ...@@ -182,7 +182,7 @@ typedef struct st_vio Vio;
#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */ #define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */ #define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */ #define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */ #define MAX_BLOB_WIDTH 16777216 /* Default width for blob */
typedef struct st_net { typedef struct st_net {
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY) #if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -626,6 +626,7 @@ static inline void store_length(uchar *to, uint length, uint pack_length) ...@@ -626,6 +626,7 @@ static inline void store_length(uchar *to, uint length, uint pack_length)
break; break;
case 3: case 3:
mi_int3store(to, length); mi_int3store(to, length);
break;
default: default:
mi_int4store(to, length); mi_int4store(to, length);
break; break;
......
...@@ -4001,21 +4001,27 @@ void Item::make_field(Send_field *tmp_field) ...@@ -4001,21 +4001,27 @@ void Item::make_field(Send_field *tmp_field)
} }
void Item_empty_string::make_field(Send_field *tmp_field) enum_field_types Item::string_field_type() const
{ {
enum_field_types type= FIELD_TYPE_VAR_STRING; enum_field_types type= FIELD_TYPE_VAR_STRING;
if (max_length >= 16777216) if (max_length >= 16777216)
type= FIELD_TYPE_LONG_BLOB; type= FIELD_TYPE_LONG_BLOB;
else if (max_length >= 65536) else if (max_length >= 65536)
type= FIELD_TYPE_MEDIUM_BLOB; type= FIELD_TYPE_MEDIUM_BLOB;
init_make_field(tmp_field, type); return type;
}
void Item_empty_string::make_field(Send_field *tmp_field)
{
init_make_field(tmp_field, string_field_type());
} }
enum_field_types Item::field_type() const enum_field_types Item::field_type() const
{ {
switch (result_type()) { switch (result_type()) {
case STRING_RESULT: return MYSQL_TYPE_VARCHAR; case STRING_RESULT: return string_field_type();
case INT_RESULT: return FIELD_TYPE_LONGLONG; case INT_RESULT: return FIELD_TYPE_LONGLONG;
case DECIMAL_RESULT: return FIELD_TYPE_NEWDECIMAL; case DECIMAL_RESULT: return FIELD_TYPE_NEWDECIMAL;
case REAL_RESULT: return FIELD_TYPE_DOUBLE; case REAL_RESULT: return FIELD_TYPE_DOUBLE;
......
...@@ -548,6 +548,7 @@ public: ...@@ -548,6 +548,7 @@ public:
virtual bool eq(const Item *, bool binary_cmp) const; virtual bool eq(const Item *, bool binary_cmp) const;
virtual Item_result result_type() const { return REAL_RESULT; } virtual Item_result result_type() const { return REAL_RESULT; }
virtual Item_result cast_to_int_type() const { return result_type(); } virtual Item_result cast_to_int_type() const { return result_type(); }
virtual enum_field_types string_field_type() const;
virtual enum_field_types field_type() const; virtual enum_field_types field_type() const;
virtual enum Type type() const =0; virtual enum Type type() const =0;
......
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