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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4a668f95
Commit
4a668f95
authored
Jan 21, 2004
by
vva@eagle.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test for bug #2290 "output truncated with ELT when using DISTINCT"
parent
f982614a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+7
-0
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+9
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-1
No files found.
mysql-test/r/func_str.result
View file @
4a668f95
...
...
@@ -266,3 +266,10 @@ CONCAT("</a>",RPAD("",(55 - LENGTH(title)),"."))
NULL
</a>..........................
DROP TABLE t1;
CREATE TABLE t1 (i int, j int);
INSERT INTO t1 VALUES (1,1),(2,2);
SELECT DISTINCT i, ELT(j, '345', '34') FROM t1;
i ELT(j, '345', '34')
1 345
2 34
DROP TABLE t1;
mysql-test/t/func_str.test
View file @
4a668f95
...
...
@@ -154,3 +154,12 @@ INSERT INTO t1 VALUES ('House passes the CAREERS bill');
SELECT
CONCAT
(
"</a>"
,
RPAD
(
""
,(
55
-
LENGTH
(
title
)),
"."
))
from
t1
;
DROP
TABLE
t1
;
#
# test for Bug #2290 "output truncated with ELT when using DISTINCT"
#
CREATE
TABLE
t1
(
i
int
,
j
int
);
INSERT
INTO
t1
VALUES
(
1
,
1
),(
2
,
2
);
SELECT
DISTINCT
i
,
ELT
(
j
,
'345'
,
'34'
)
FROM
t1
;
DROP
TABLE
t1
;
\ No newline at end of file
sql/item_strfunc.cc
View file @
4a668f95
...
...
@@ -1507,7 +1507,7 @@ void Item_func_elt::fix_length_and_dec()
{
max_length
=
0
;
decimals
=
0
;
for
(
uint
i
=
1
;
i
<
arg_count
;
i
++
)
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
// first number argument isn't in list!
{
set_if_bigger
(
max_length
,
args
[
i
]
->
max_length
);
set_if_bigger
(
decimals
,
args
[
i
]
->
decimals
);
...
...
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