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
1ad8693a
Commit
1ad8693a
authored
Feb 28, 2020
by
Roman Nozdrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-21841 CONV() function doesn't truncate its output to 21 when uses default charset.
parent
e837a358
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
mysql-test/main/func_str.result
mysql-test/main/func_str.result
+15
-0
mysql-test/main/func_str.test
mysql-test/main/func_str.test
+11
-0
sql/item_strfunc.h
sql/item_strfunc.h
+1
-1
No files found.
mysql-test/main/func_str.result
View file @
1ad8693a
...
...
@@ -5159,6 +5159,21 @@ DROP TABLE t1, t2;
# Start of 10.4 tests
#
#
# MDEV-21841 CONV() function truncates the result type to 21 symbol.
#
CREATE TABLE t1(i BIGINT);
INSERT INTO t1 VALUES (-1);
CREATE TABLE t2 AS SELECT conv(i,16,2) from t1;
SELECT * FROM t2;
conv(i,16,2)
1111111111111111111111111111111111111111111111111111111111111111
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`conv(i,16,2)` varchar(64) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
#
# MDEV-18205 Assertion `str_length < len' failed in Binary_string::realloc_raw
#
SELECT GROUP_CONCAT( UpdateXML( '<a>new year</a>', '/a', '2019-01-01 00:00:00' ), ENCODE('text','pass') ) AS f;
...
...
mysql-test/main/func_str.test
View file @
1ad8693a
...
...
@@ -2099,6 +2099,17 @@ DROP TABLE t1, t2;
--
echo
# Start of 10.4 tests
--
echo
#
--
echo
#
--
echo
# MDEV-21841 CONV() function truncates the result type to 21 symbol.
--
echo
#
CREATE
TABLE
t1
(
i
BIGINT
);
INSERT
INTO
t1
VALUES
(
-
1
);
CREATE
TABLE
t2
AS
SELECT
conv
(
i
,
16
,
2
)
from
t1
;
SELECT
*
FROM
t2
;
SHOW
CREATE
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-18205 Assertion `str_length < len' failed in Binary_string::realloc_raw
--
echo
#
...
...
sql/item_strfunc.h
View file @
1ad8693a
...
...
@@ -1205,7 +1205,7 @@ class Item_func_conv :public Item_str_func
bool
fix_length_and_dec
()
{
collation
.
set
(
default_charset
());
max_length
=
64
;
fix_char_length
(
64
)
;
maybe_null
=
1
;
return
FALSE
;
}
...
...
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