diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2009-10-09 15:34:07 +0200 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2009-10-09 15:34:07 +0200 |
commit | 220d9b8c4abed2feaa1523e2146e6d472f1c1627 (patch) | |
tree | 244b3938a0b73a7f8aafae46e073c77f5bf6acdd /mysql-test/suite/funcs_1/r/ndb_views.result | |
parent | 5ca59914ce2ebf11700c5d47fbdf9cbb293ae489 (diff) | |
download | mariadb-git-220d9b8c4abed2feaa1523e2146e6d472f1c1627.tar.gz |
This is a backport of the two patches for Bug #28299:
To-number conversion warnings work differenly with CHAR
and VARCHAR sp variables.
The original revision-IDs are:
staale.smedseng@sun.com-20081124095339-2qdvzkp0rn1ljs30
staale.smedseng@sun.com-20081125104611-rtxic5d12e83ag2o
The patch provides ER_TRUNCATED_WRONG_VALUE warning messages
for conversion of VARCHAR to numberic values, in line with
messages provided for CHAR conversions. Conversions are
checked for success, and the message is emitted in case
failure.
The tests are amended to accept the added warning messages,
and explicit conversion of ON/OFF values is added for
statements checking system variables. In test
rpl.rpl_switch_stm_row_mixed checking for warnings is
temporarily disabled for one statement, as this generates
warning messages for strings that vary between executions.
sql/field.cc:
The pushing of the truncation warning is now done in a
separate static function, and used in various places.
Diffstat (limited to 'mysql-test/suite/funcs_1/r/ndb_views.result')
-rw-r--r-- | mysql-test/suite/funcs_1/r/ndb_views.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/suite/funcs_1/r/ndb_views.result b/mysql-test/suite/funcs_1/r/ndb_views.result index b75f4955986..ac166233126 100644 --- a/mysql-test/suite/funcs_1/r/ndb_views.result +++ b/mysql-test/suite/funcs_1/r/ndb_views.result @@ -22843,6 +22843,10 @@ SELECT * FROM v1 order by 2; f1 my_sqrt ABC 0 ABC 1.73205080756888 ++ Warnings: ++ Warning 1292 Truncated incorrect DOUBLE value: 'DEF' ++ Warning 1292 Truncated incorrect DOUBLE value: 'DEF' + SELECT SQRT('DEF'); SQRT('DEF') 0 @@ -22863,7 +22867,12 @@ SELECT * FROM v2 order by 2; f1 my_sqrt ABC 0 ABC 1.73205080756888 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'DEF' +Warning 1292 Truncated incorrect DOUBLE value: 'DEF' CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'DEF' SELECT * FROM t2 order by 2; f1 ABC my_sqrt 0 @@ -22871,6 +22880,8 @@ f1 ABC my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v1; +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'DEF' SELECT * FROM t2 order by 2; f1 ABC my_sqrt 0 @@ -22878,6 +22889,8 @@ f1 ABC my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v2; +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'DEF' SELECT * FROM t2 order by 2; f1 ABC my_sqrt 0 |