summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-05-25 18:11:47 -0700
committerunknown <jimw@mysql.com>2005-05-25 18:11:47 -0700
commitf0329bfb8c9215272cc176c874f79d14a02d20fa (patch)
treedf8ba3b3f75b02647220adb07b938891c3179959 /sql/field.h
parentf0f9b5959eecb87b369fc45c981d926b79de0c61 (diff)
downloadmariadb-git-f0329bfb8c9215272cc176c874f79d14a02d20fa.tar.gz
Fix partial keys when converting VARCHAR to TEXT. (Bug #10543)
mysql-test/r/type_varchar.result: Update results mysql-test/t/type_varchar.test: Add new regression test sql/field.cc: Add Field::type_can_have_key_part() static method sql/field.h: Add Field::type_can_have_key_part() signature. sql/sql_table.cc: Only reset the length of a key part when changing from a field type that can't be used partially to a field that can, or vice versa, or when the part is smaller than the length of the field.
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index f68a2327dff..8510c59c9f2 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -119,6 +119,7 @@ public:
virtual Item_result result_type () const=0;
virtual Item_result cmp_type () const { return result_type(); }
virtual Item_result cast_to_int_type () const { return result_type(); }
+ static bool type_can_have_key_part(enum_field_types);
static enum_field_types field_type_merge(enum_field_types, enum_field_types);
static Item_result result_merge_type(enum_field_types);
bool eq(Field *field)