Bug #8084 Fields get truncated when using subqueries and concat

Submitted: 21 Jan 2005 23:39 Modified: 18 May 2005 20:58
Reporter: Frank Maas (Basic Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.6 OS:Windows (WinXP Pro SP2)
Assigned to: MySQL Verification Team CPU Architecture:Any

[21 Jan 2005 23:39] Frank Maas
Description:
When running a query with a sub-query in the FROM clause and this sub-query uses the CONCAT funcation, then the result of that field is incorrect. It is truncated and only part of it is shown. Running the query in the server/commandline environment works fine.

How to repeat:
Use this simple query as an example:

select * from ( select concat(1,0,1) as s ) as x

MQB show column 's' with one row showing value '1', where it should be '101'.

Suggested fix:
Sorry...
[22 Jan 2005 1:52] MySQL Verification Team
Thank you for the bug report.
[7 Feb 2005 21:54] Frank Maas
Just found out that the problem might not be due to the concat, but to the subselect. See the following excerpt:

select code, count(*) as cnt, max(dur) as max from (
  select code, timediff(eind,start) as dur from (
    select "a" as code, "00:00:00" as start, "00:00:59" as eind
  ) as x
) as y group by code

This yields

code;cnt;max
a;1;00:00:5

So again the last byte is chopped off...

HTH
[12 Apr 2005 4:44] MySQL Verification Team
With QB version 1.1.6 I I wasn't able to repeat anymore. Could your please
test that version.
Thanks in advance.
[18 Apr 2005 7:26] Frank Maas
Installed 1.1.6 and tried the two examples I previously gave. Same results, the problem persists:

select * from ( select concat(1,0,1) as s ) as x
+---+
| s  |
+---+
| '1' |
+---+
(the |+- are my doing)

BTW: "select * from (select '101' as s) as x"  yields the correct result as does "select concat(1,0,1) as s".
[18 May 2005 9:49] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[18 May 2005 11:48] Frank Maas
Bug system complained about not giving feedback. But feedback was entered: with version 1.1.6 the problem still remains (see entry of April 18 in comment log)

HTH
[18 May 2005 12:40] MySQL Verification Team
Re-open
[18 May 2005 20:58] MySQL Verification Team
I was unable to repeat the behavior reported with QB 1.1.9 and
server 4.1.11.
[19 May 2005 20:13] Frank Maas
Same here. Got confused 'cause dev.mysql.com shows 1.1.7 as the latest QB version, but 1.1.9 was on the download page. problem solved, thanks!

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.059 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.