Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bdc1134d
Commit
bdc1134d
authored
Jul 06, 2022
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-29041 Redundant truncation warning on CAST(string_column AS DECIMAL)
parent
63137022
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
3 additions
and
97 deletions
+3
-97
mysql-test/main/func_math.result
mysql-test/main/func_math.result
+0
-2
mysql-test/main/type_num_innodb.result
mysql-test/main/type_num_innodb.result
+0
-17
mysql-test/main/type_varchar.result
mysql-test/main/type_varchar.result
+0
-1
mysql-test/main/warnings.result
mysql-test/main/warnings.result
+0
-1
mysql-test/suite/funcs_1/r/innodb_func_view.result
mysql-test/suite/funcs_1/r/innodb_func_view.result
+0
-24
mysql-test/suite/funcs_1/r/memory_func_view.result
mysql-test/suite/funcs_1/r/memory_func_view.result
+0
-24
mysql-test/suite/funcs_1/r/myisam_func_view.result
mysql-test/suite/funcs_1/r/myisam_func_view.result
+0
-24
sql/field.cc
sql/field.cc
+3
-3
storage/tokudb/mysql-test/tokudb/r/type_varchar.result
storage/tokudb/mysql-test/tokudb/r/type_varchar.result
+0
-1
No files found.
mysql-test/main/func_math.result
View file @
bdc1134d
...
...
@@ -426,9 +426,7 @@ SELECT b DIV 900 y FROM t1 GROUP BY y;
y
0
Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'str1'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'str2'
SELECT c DIV 900 y FROM t1 GROUP BY y;
y
...
...
mysql-test/main/type_num_innodb.result
View file @
bdc1134d
...
...
@@ -46,39 +46,22 @@ ALTER TABLE t1 MODIFY a DECIMAL(10,0);
SELECT * FROM t1,t2 WHERE a=d;
a b c pk d e
Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'g'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'k'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'o'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'u'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'w'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'y'
ALTER TABLE t1 MODIFY a DOUBLE;
SELECT * FROM t1,t2 WHERE a=d;
...
...
mysql-test/main/type_varchar.result
View file @
bdc1134d
...
...
@@ -476,7 +476,6 @@ a (a DIV 2)
t 0
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '1a'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 't '
SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a;
a CAST(a AS SIGNED)
...
...
mysql-test/main/warnings.result
View file @
bdc1134d
...
...
@@ -327,7 +327,6 @@ select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
CAST(a AS DECIMAL(13,5))
0.00000
Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ''
create table t1 (a integer unsigned);
insert into t1 values (1),(-1),(0),(-2);
...
...
mysql-test/suite/funcs_1/r/innodb_func_view.result
View file @
bdc1134d
No preview for this file type
mysql-test/suite/funcs_1/r/memory_func_view.result
View file @
bdc1134d
No preview for this file type
mysql-test/suite/funcs_1/r/myisam_func_view.result
View file @
bdc1134d
No preview for this file type
sql/field.cc
View file @
bdc1134d
...
...
@@ -7280,7 +7280,7 @@ my_decimal *Field_string::val_decimal(my_decimal *decimal_value)
THD
*
thd
=
get_thd
();
Converter_str2my_decimal_with_warn
(
thd
,
Warn_filter_string
(
thd
,
this
),
E_DEC_FATAL_ERROR
,
E_DEC_FATAL_ERROR
&
~
E_DEC_BAD_NUM
,
Field_string
::
charset
(),
(
const
char
*
)
ptr
,
field_length
,
decimal_value
);
...
...
@@ -7692,7 +7692,7 @@ my_decimal *Field_varstring::val_decimal(my_decimal *decimal_value)
ASSERT_COLUMN_MARKED_FOR_READ
;
THD
*
thd
=
get_thd
();
Converter_str2my_decimal_with_warn
(
thd
,
Warn_filter
(
thd
),
E_DEC_FATAL_ERROR
,
E_DEC_FATAL_ERROR
&
~
E_DEC_BAD_NUM
,
Field_varstring
::
charset
(),
(
const
char
*
)
get_data
(),
get_length
(),
decimal_value
);
...
...
@@ -8524,7 +8524,7 @@ my_decimal *Field_blob::val_decimal(my_decimal *decimal_value)
THD
*
thd
=
get_thd
();
Converter_str2my_decimal_with_warn
(
thd
,
Warn_filter
(
thd
),
E_DEC_FATAL_ERROR
,
E_DEC_FATAL_ERROR
&
~
E_DEC_BAD_NUM
,
Field_blob
::
charset
(),
blob
,
length
,
decimal_value
);
return
decimal_value
;
...
...
storage/tokudb/mysql-test/tokudb/r/type_varchar.result
View file @
bdc1134d
...
...
@@ -446,7 +446,6 @@ a (a DIV 2)
t 0
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '1a'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 't '
SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a;
a CAST(a AS SIGNED)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment