summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-07-19 11:05:49 -0700
committerunknown <jimw@mysql.com>2005-07-19 11:05:49 -0700
commite9c64ae296457b04bd68945c5de12c369de71b8b (patch)
tree04692d95c000bd65df72b0a4c5c605b71afa5287 /sql/item_timefunc.cc
parent6ae060305541019882bcb60bf086458b010faa45 (diff)
parentabcd8b032cb4afad6640d21e08763349e116da32 (diff)
downloadmariadb-git-e9c64ae296457b04bd68945c5de12c369de71b8b.tar.gz
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean extra/perror.c: Auto merged include/my_global.h: Auto merged mysql-test/r/ps_1general.result: 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 mysql-test/r/ps_6bdb.result: Auto merged mysql-test/r/ps_7ndb.result: Auto merged mysql-test/r/select.result: Auto merged ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged ndb/src/mgmsrv/main.cpp: Auto merged sql/des_key_file.cc: Auto merged sql/field_conv.cc: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged tests/mysql_client_test.c: Auto merged mysql-test/t/select.test: Resolve conflicts scripts/mysqld_safe.sh: Resolve conflict sql/item.cc: Resolve conflict, don't return FIELD_TYPE_BLOB since VARCHAR can be longer in 5.0 than 4.1. sql/log_event.cc: Resolve conflict sql/mysql_priv.h: Resolve conflict sql/mysqld.cc: Remove incorrect fix (merge from 4.1) sql/sql_show.cc: Resolve conflict
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index cac9613f1ad..756e72db806 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1555,7 +1555,7 @@ void Item_func_date_format::fix_length_and_dec()
{
fixed_length=0;
/* The result is a binary string (no reason to use collation->mbmaxlen */
- max_length=args[1]->max_length*10;
+ max_length=min(args[1]->max_length,MAX_BLOB_WIDTH) * 10;
set_if_smaller(max_length,MAX_BLOB_WIDTH);
}
maybe_null=1; // If wrong date