Bug #112151 Wrong query output type

Submitted: 23 Aug 2023 5:50 Modified: 31 Aug 2023 10:49
Reporter: Pedro Ferreira Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:8.1.0, 8.0.34 OS:Ubuntu (22.04)
Assigned to: CPU Architecture:x86 (x86_64)
Tags: SELECT

[23 Aug 2023 5:50] Pedro Ferreira
Description:
Run the following queries:

CREATE TABLE t1 (c0 SMALLINT);
CREATE TABLE t2 (c0 INT);
INSERT INTO t1(c0) VALUES (1);
INSERT INTO t2(c0) VALUES (1);

Then on MySQL client with the option `--column-type-info` run this query:

SELECT c0 FROM (SELECT DISTINCT (SELECT DISTINCT (SELECT DISTINCT t1.c0 FROM t1)) FROM t2) t0 (c0) ORDER BY c0;

The query output type is LONG, while I expect it to be SHORT. Is this a bug? if not, please close this.

The compilation parameters are the same as issue 108148:

-DWITH_DEBUG=1 -DWITH_ASAN=ON -DWITH_UBSAN=ON and boost library version 1.77

How to repeat:
Run the queries above.
[31 Aug 2023 10:49] MySQL Verification Team
Hello Pedro Ferreira,

Thank you for the report and feedback.

regards,
Umesh

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

Page generated in 0.040 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.