summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <evgen@sunlight.local>2006-04-05 13:30:51 +0400
committerunknown <evgen@sunlight.local>2006-04-05 13:30:51 +0400
commitaf5e4098a8ec7677de4e1aae54f9326a5a2ec1c0 (patch)
tree116f994673f19b031ce126cd6d05f09d7e77eafd /sql/field.h
parent0a2cd4bb9f14c0e49b536063e304d9c9934f48a9 (diff)
parent0f8c11758d9fe04871d87496fc32d3a0439ce249 (diff)
downloadmariadb-git-af5e4098a8ec7677de4e1aae54f9326a5a2ec1c0.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into sunlight.local:/local_work/16281-bug-5.0-mysql sql/field.h: Auto merged
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/field.h b/sql/field.h
index 1bd72d79ce3..a4bdcc4da02 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -986,20 +986,23 @@ public:
class Field_string :public Field_longstr {
public:
+ bool can_alter_field_type;
Field_string(char *ptr_arg, uint32 len_arg,uchar *null_ptr_arg,
uchar null_bit_arg,
enum utype unireg_check_arg, const char *field_name_arg,
struct st_table *table_arg, CHARSET_INFO *cs)
:Field_longstr(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
- unireg_check_arg, field_name_arg, table_arg, cs) {};
+ unireg_check_arg, field_name_arg, table_arg, cs),
+ can_alter_field_type(1) {};
Field_string(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg,
struct st_table *table_arg, CHARSET_INFO *cs)
:Field_longstr((char*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0,
- NONE, field_name_arg, table_arg, cs) {};
+ NONE, field_name_arg, table_arg, cs),
+ can_alter_field_type(1) {};
enum_field_types type() const
{
- return ((orig_table &&
+ return ((can_alter_field_type && orig_table &&
orig_table->s->db_create_options & HA_OPTION_PACK_RECORD &&
field_length >= 4) &&
orig_table->s->frm_version < FRM_VER_TRUE_VARCHAR ?