summaryrefslogtreecommitdiff
path: root/mysql-test/suite/funcs_1
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/suite/funcs_1
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/suite/funcs_1')
-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
3 files changed, 36 insertions, 36 deletions
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;