Commit 030f0913 authored by monty@mysql.com's avatar monty@mysql.com

Field_geom should have same max_length as Field_blob

Updated tests
After merge fix
parent d69a36d1
......@@ -533,6 +533,8 @@ date_add(date,INTERVAL "1 1:1:1" DAY_SECOND)
select date_add(time,INTERVAL 1 SECOND) from t1;
date_add(time,INTERVAL 1 SECOND)
NULL
Warnings:
Warning 1264 Data truncated; out of range for column 'time' at row 1
drop table t1;
select last_day('2000-02-05') as f1, last_day('2002-12-31') as f2,
last_day('2003-03-32') as f3, last_day('2003-04-01') as f4,
......
......@@ -3380,7 +3380,10 @@ bool Field_time::get_date(TIME *ltime, uint fuzzydate)
long tmp;
if (!fuzzydate)
{
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE);
push_warning_printf(table->in_use, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DATA_OUT_OF_RANGE,
ER(ER_WARN_DATA_OUT_OF_RANGE), field_name,
table->in_use->row_count);
return 1;
}
tmp=(long) sint3korr(ptr);
......@@ -5984,7 +5987,7 @@ uint32 Field_blob::max_length()
case 3:
return 16777215;
case 4:
return (uint32)4294967295;
return (uint32) 4294967295U;
default:
DBUG_ASSERT(0); // we should never go here
return 0;
......
......@@ -1089,7 +1089,6 @@ class Field_geom :public Field_blob {
void get_key_image(char *buff,uint length, CHARSET_INFO *cs,imagetype type);
void set_key_image(char *buff,uint length, CHARSET_INFO *cs);
uint32 max_length() { return field_length; }
field_cast_enum field_cast_type() { return FIELD_CAST_GEOM; }
};
#endif /*HAVE_SPATIAL*/
......
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