1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)

When implicitly converting string fields to numbers the 
 string-to-number conversion error was not sent to the client.
 Added code to send the conversion error as warning.
 
 We also need to prevent generation of warnings from the places
 where val_xxx() methods are called for the sole purpose of updating
 the Item::null_value flag.
 To achieve that a special function is added (and called) : 
 update_null_value(). This function will set the no_errors flag and
 will call val_xxx(). The warning generation in Field_string::val_xxx()
 will use the flag when generating the conversion warnings.
This commit is contained in:
gkodinov/kgeorge@macbook.gmz
2006-11-28 15:44:11 +02:00
parent 5198354584
commit 42cd956752
13 changed files with 183 additions and 24 deletions

View File

@ -355,3 +355,9 @@ public:
return (s->alloced && Ptr >= s->Ptr && Ptr < s->Ptr + s->str_length);
}
};
static inline bool check_if_only_end_space(CHARSET_INFO *cs, char *str,
char *end)
{
return str+ cs->cset->scan(cs, str, end, MY_SEQ_SPACES) == end;
}