diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-05-05 15:00:59 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-05-05 15:00:59 +0400 |
commit | 0a032dea1f6af01dea7de96572b097b7c3c883dc (patch) | |
tree | 98979042674c76c67ccc89aa5bfb10cedc8d16b6 /mysql-test/r/null.result | |
parent | 3c93a784d415efad81065bb5dcb3f3c897374019 (diff) | |
download | mariadb-git-0a032dea1f6af01dea7de96572b097b7c3c883dc.tar.gz |
Patch for Bug#50511 (Sometimes wrong handling of user variables containing NULL).
The bug happened under the following condition:
- there was a user variable of type REAL, containing NULL value
- there was a table with a NOT_NULL column of any type but REAL, having
default value (or auto increment);
- a row was inserted into the table with the user variable as value.
A warning was emitted here.
The problem was that handling of NULL values of REAL type was not properly
implemented: it didn't expect that REAL NULL value can be assigned to other
data type.
Basically, the problem was that set_field_to_null() was used instead of
set_field_to_null_with_conversions().
The fix is to use the right function, or more generally, to allow conversion of
REAL NULL values to other data types.
Diffstat (limited to 'mysql-test/r/null.result')
-rw-r--r-- | mysql-test/r/null.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 1cdc48e6552..585d7a14ce9 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -94,7 +94,7 @@ Warnings: Warning 1265 Data truncated for column 'd' at row 1 UPDATE t1 SET d=1/NULL; Warnings: -Warning 1265 Data truncated for column 'd' at row 1 +Warning 1048 Column 'd' cannot be null UPDATE t1 SET d=NULL; Warnings: Warning 1048 Column 'd' cannot be null |