summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2016-07-03 19:12:20 +0400
committerAlexander Barkov <bar@mariadb.org>2016-07-03 19:12:20 +0400
commit59ec3973aabbdb8f23897883c6531d44e5e91664 (patch)
treec1db944c2ee7349bd4f41a807525da47e465d434 /mysql-test
parentb258f911032a04394b8e0f8f092da799d804a205 (diff)
downloadmariadb-git-59ec3973aabbdb8f23897883c6531d44e5e91664.tar.gz
Removing duplicate code in double-to-longlong conversion.
Adding Converter_double_to_longlong and reusing it in: 1. Field_longlong::store(double nr) 2. Field_double::val_int() 3. Item::val_int_from_real() 4. Item_dyncol_get::val_int() As a good side efferct, now overflow in conversion in the mentioned val_xxx() methods return exactly the same warning.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/cast.result4
-rw-r--r--mysql-test/r/dyncol.result4
-rw-r--r--mysql-test/r/type_enum.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_func_view.result24
-rw-r--r--mysql-test/suite/funcs_1/r/memory_func_view.result24
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_func_view.result24
6 files changed, 41 insertions, 41 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index eb50d10ce4f..e196ba294d7 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -601,8 +601,8 @@ double_val cast_val
-1e30 -9223372036854775808
1e30 9223372036854775807
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1e30'
-Warning 1292 Truncated incorrect INTEGER value: '1e30'
+Warning 1916 Got overflow when converting '-1e30' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1e30' to INT. Value truncated.
DROP TABLE t1;
select isnull(date(NULL)), isnull(cast(NULL as DATE));
isnull(date(NULL)) isnull(cast(NULL as DATE))
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result
index 1c26ca16153..ad46cddb785 100644
--- a/mysql-test/r/dyncol.result
+++ b/mysql-test/r/dyncol.result
@@ -236,7 +236,7 @@ select column_get(column_create(1, 99999999999999999999999999999 AS double), 1 a
column_get(column_create(1, 99999999999999999999999999999 AS double), 1 as unsigned int)
18446744073709551615
Warnings:
-Warning 1916 Got overflow when converting '1e+29' to UNSIGNED INT. Value truncated.
+Warning 1916 Got overflow when converting '1e29' to UNSIGNED INT. Value truncated.
select column_get(column_create(1, 999.9 AS double), 1 as unsigned int);
column_get(column_create(1, 999.9 AS double), 1 as unsigned int)
1000
@@ -330,7 +330,7 @@ select column_get(column_create(1, -99999999999999999999999999999 AS double), 1
column_get(column_create(1, -99999999999999999999999999999 AS double), 1 as int)
-9223372036854775808
Warnings:
-Warning 1916 Got overflow when converting '-1e+29' to INT. Value truncated.
+Warning 1916 Got overflow when converting '-1e29' to INT. Value truncated.
select column_get(column_create(1, "-1212III" AS char), 1 as int);
column_get(column_create(1, "-1212III" AS char), 1 as int)
-1212
diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result
index f0152d08c32..14f5d97f426 100644
--- a/mysql-test/r/type_enum.result
+++ b/mysql-test/r/type_enum.result
@@ -2151,7 +2151,7 @@ CREATE TABLE t1 (a DOUBLE);
INSERT INTO t1 VALUES (9e100);
ALTER TABLE t1 MODIFY a ENUM('9e200','9e100');
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '9e100'
+Warning 1916 Got overflow when converting '9e100' to INT. Value truncated.
Warning 1265 Data truncated for column 'a' at row 1
SELECT * FROM t1;
a
diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result
index 357c8200f34..1264342fa8a 100644
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result
@@ -916,8 +916,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
0 4
-1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -931,8 +931,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
0 4
-1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
DROP VIEW v1;
@@ -2586,9 +2586,9 @@ NULL NULL 1
0 0 4
18446744073709551615 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -2603,9 +2603,9 @@ NULL NULL 1
0 0 4
18446744073709551615 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
DROP VIEW v1;
@@ -2964,8 +2964,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
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 cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2979,8 +2979,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result
index df57c83164e..c78cf163ada 100644
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result
@@ -917,8 +917,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
0 4
-1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -932,8 +932,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
0 4
-1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
DROP VIEW v1;
@@ -2587,9 +2587,9 @@ NULL NULL 1
0 0 4
18446744073709551615 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -2604,9 +2604,9 @@ NULL NULL 1
0 0 4
18446744073709551615 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
DROP VIEW v1;
@@ -2965,8 +2965,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
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 cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2980,8 +2980,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
DROP VIEW v1;
diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result
index df57c83164e..c78cf163ada 100644
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result
@@ -917,8 +917,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
0 4
-1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -932,8 +932,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e308 3
0 4
-1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
DROP VIEW v1;
@@ -2587,9 +2587,9 @@ NULL NULL 1
0 0 4
18446744073709551615 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
@@ -2604,9 +2604,9 @@ NULL NULL 1
0 0 4
18446744073709551615 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
Note 1105 Cast to unsigned converted negative integer to it's positive complement
DROP VIEW v1;
@@ -2965,8 +2965,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
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 cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2980,8 +2980,8 @@ NULL NULL 1
0 0 4
-1 -1 5
Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e308'
-Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e308'
+Warning 1916 Got overflow when converting '-1.7976931348623e308' to INT. Value truncated.
+Warning 1916 Got overflow when converting '1.7976931348623e308' to INT. Value truncated.
DROP VIEW v1;