1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-8466 CAST works differently for DECIMAL/INT vs DOUBLE for empty strings

MDEV-8468 CAST and INSERT work differently for DECIMAL/INT vs DOUBLE for a string with trailing spaces
This commit is contained in:
Alexander Barkov
2015-09-17 11:05:07 +04:00
parent c69cf93bfb
commit d9b25ae3db
60 changed files with 2779 additions and 390 deletions

View File

@@ -2098,8 +2098,9 @@ IS NOT TRUE <---------1000 characters-------------------------------------------
IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning 1292 Truncated incorrect DOUBLE value: ' ---<EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>*$-- '
Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varbinary_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2113,8 +2114,9 @@ IS NOT TRUE <---------1000 characters-------------------------------------------
IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning 1292 Truncated incorrect DOUBLE value: ' ---<EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>*$-- '
Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;
@@ -2166,8 +2168,9 @@ IS NOT TRUE <---------1000 characters-------------------------------------------
IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning 1292 Truncated incorrect DOUBLE value: ' ---<EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>*$-- '
Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(`t1_values`.`my_varchar_1000`,'IS TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2181,8 +2184,9 @@ IS NOT TRUE <---------1000 characters-------------------------------------------
IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning 1292 Truncated incorrect DOUBLE value: ' ---<EFBFBD><EFBFBD><EFBFBD><EFBFBD>@<40>*$-- '
Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
DROP VIEW v1;
@@ -2198,6 +2202,7 @@ IS NOT TRUE <--------30 characters-------> 3
IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' '
Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1;
@@ -2213,6 +2218,7 @@ IS NOT TRUE <--------30 characters-------> 3
IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' '
Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
DROP VIEW v1;