summaryrefslogtreecommitdiff
path: root/mysql-test/r/compare.result
diff options
context:
space:
mode:
authorgkodinov/kgeorge@macbook.gmz <>2006-11-28 15:44:11 +0200
committergkodinov/kgeorge@macbook.gmz <>2006-11-28 15:44:11 +0200
commit42cd956752be97efe01ed83825e5b320b98d56a3 (patch)
treefa4c02c70637d0f12ec543e10f073cc0738788a3 /mysql-test/r/compare.result
parent5198354584e56682e5d5b87ee680582aac44ea61 (diff)
downloadmariadb-git-42cd956752be97efe01ed83825e5b320b98d56a3.tar.gz
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.
Diffstat (limited to 'mysql-test/r/compare.result')
-rw-r--r--mysql-test/r/compare.result4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result
index da0ca8ddba1..c141b255716 100644
--- a/mysql-test/r/compare.result
+++ b/mysql-test/r/compare.result
@@ -46,6 +46,10 @@ create table t1 (a tinyint(1),b binary(1));
insert into t1 values (0x01,0x01);
select * from t1 where a=b;
a b
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
select * from t1 where a=b and b=0x01;
a b
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
drop table if exists t1;