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