Bug #109115 | prepared VALUES ROW in subquery with only string params returns empty | ||
---|---|---|---|
Submitted: | 16 Nov 2022 20:53 | Modified: | 23 Nov 2022 12:53 |
Reporter: | Sean Fraser | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Prepared statements | Severity: | S3 (Non-critical) |
Version: | 8.0.23 | OS: | Ubuntu |
Assigned to: | CPU Architecture: | Any |
[16 Nov 2022 20:53]
Sean Fraser
[17 Nov 2022 12:47]
MySQL Verification Team
Hi Mr. Fraser, Thank you for your bug report. We can't repeat it with our latest release, 8.0.31: ysql> PREPARE stmt1 FROM 'SELECT column_0 as id FROM (VALUES ROW(?), ROW(?)) '> AS sub'; Query OK, 0 rows affected (0.00 sec) Statement prepared mysql> SET @a = "b"; Query OK, 0 rows affected (0.00 sec) mysql> SET @b = "a"; Query OK, 0 rows affected (0.00 sec) mysql> EXECUTE stmt1 USING @a, @b; +------+ | id | +------+ | b | | a | +------+ 2 rows in set (0.01 sec) mysql> DEALLOCATE PREPARE stmt1; Query OK, 0 rows affected (0.00 sec) mysql> PREPARE stmt2 FROM 'SELECT column_0 as id FROM (VALUES ROW(?), ROW(?)) '> AS sub'; Query OK, 0 rows affected (0.00 sec) Statement prepared mysql> SET @a = "1"; Query OK, 0 rows affected (0.00 sec) mysql> SET @b = "2"; Query OK, 0 rows affected (0.00 sec) mysql> EXECUTE stmt2 USING @a, @b; +------+ | id | +------+ | 1 | | 2 | +------+ 2 rows in set (0.00 sec) mysql> DEALLOCATE PREPARE stmt2; Query OK, 0 rows affected (0.00 sec) Can't repeat, as it is already fixed.
[22 Nov 2022 16:24]
Sean Fraser
I just tested on a docker container with the latest version and can confirm that it appears to be fixed in that version. Thank you, This can be closed.
[23 Nov 2022 12:53]
MySQL Verification Team
Mr Fraser, You are truly welcome.