Bug #108545 | Erroneous MYSQL_TYPE_INVALID data type | ||
---|---|---|---|
Submitted: | 19 Sep 2022 21:19 | Modified: | 17 Oct 2022 19:16 |
Reporter: | diego dupin (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Prepared statements | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | 243 data type |
[19 Sep 2022 21:19]
diego dupin
[20 Sep 2022 12:14]
MySQL Verification Team
Hi Mr. dupin, Thank you for your bug report. However, we do not have enough information from you in order to process your bug report. Also, your expectations are not in tune with SQL:2016, which is the current and valid SQL standard. The true types can not be returned with PREPARE, but with EXECUTE ..... Particularly when all the parameters are yet to be supplied with EXECUTE ...... WITH ....... If you can provide an example with EXECUTE returning invalid type(s), then please send all the other info required, like table structure and contents etc ,,, so that we can try to repeat it fully. Also, we do not need a hexdump, since types can be obtained with metadata ........ Can't repeat ....
[22 Sep 2022 11:50]
MySQL Verification Team
Hi Mr. Dupin, We have analysed this case further and discovered that you are actually quite right. Problem is when we have more than one parameter. With one parameter, there is no problem. Hence, we have decided to fix the problem. Verified as reported.
[17 Oct 2022 19:16]
Jon Stephens
Documented fix as follows in the MySQL 8.0.32 changelog: The deduction of data types for dynamic parameters passed as parameters to a user-defined SQL function was correct only for a single parameter; with more than one parameter, no such deduction was performed for the second and following parameters, with the result that their types were always reported erroneously to clients as MYSQL_TYPE_INVALID. Closed.
[18 Oct 2022 11:35]
MySQL Verification Team
Thank you, Jon, very much, For documenting the fix and closing this bug.