diff options
author | unknown <dlenev@mysql.com> | 2006-02-27 20:00:07 +0300 |
---|---|---|
committer | unknown <dlenev@mysql.com> | 2006-02-27 20:00:07 +0300 |
commit | e54ecf09beca168cc7fba6d0a21b440be4f2783d (patch) | |
tree | 0fde704b3ac2031c62de8957626945f2239d8343 /sql/field.cc | |
parent | e2393aa24a02505688aabc73fa4ebf79aeff17d9 (diff) | |
parent | 475eb3e9179fa4c1af3e0daa980dc6f30025ac28 (diff) | |
download | mariadb-git-e54ecf09beca168cc7fba6d0a21b440be4f2783d.tar.gz |
Merge mysql.com:/home/dlenev/src/mysql-5.0-bg13525
into mysql.com:/home/dlenev/src/mysql-5.1-merges2
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
storage/myisammrg/myrg_queue.c:
Auto merged
sql/sql_rename.cc:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/field.cc b/sql/field.cc index c2c41bc2ee9..65c0d1b9397 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -8297,13 +8297,11 @@ void Field_bit_as_char::sql_type(String &res) const create_field::create_length_to_internal_length() DESCRIPTION - Convert create_field::length from number of characters to number of bytes, - save original value in chars_length. + Convert create_field::length from number of characters to number of bytes. */ void create_field::create_length_to_internal_length(void) { - chars_length= length; switch (sql_type) { case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: @@ -8355,7 +8353,7 @@ void create_field::init_for_tmp_table(enum_field_types sql_type_arg, { field_name= ""; sql_type= sql_type_arg; - length= length_arg;; + char_length= length= length_arg;; unireg_check= Field::NONE; interval= 0; charset= &my_charset_bin; @@ -8683,6 +8681,8 @@ bool create_field::init(THD *thd, char *fld_name, enum_field_types fld_type, case FIELD_TYPE_DECIMAL: DBUG_ASSERT(0); /* Was obsolete */ } + /* Remember the value of length */ + char_length= length; if (!(flags & BLOB_FLAG) && ((length > max_field_charlength && fld_type != FIELD_TYPE_SET && @@ -9023,6 +9023,7 @@ create_field::create_field(Field *old_field,Field *orig_field) else interval=0; def=0; + char_length= length; if (!(flags & (NO_DEFAULT_VALUE_FLAG | BLOB_FLAG)) && old_field->ptr && orig_field && |