Bug #116787 erro en funciones mysql
Submitted: 26 Nov 17:25 Modified: 26 Nov 19:01
Reporter: Robert Salvatierra Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S5 (Performance)
Version:Server version: 8.0.40-0ubuntu0.24.04.1 OS:Ubuntu
Assigned to: CPU Architecture:Any

[26 Nov 17:25] Robert Salvatierra
Description:
In the functions I created, I don't think the indexes are being used correctly, which makes the query slow. When it's a SELECT with an INNER JOIN like this:

sql
Copiar código
SELECT url_img, tip_url
INTO vl_url_img, vl_tip_url
FROM web_imagen_producto AS wip
INNER JOIN plz_detalleprod AS pd ON pd.serie = wip.serie
WHERE pd.PN = vp_parnumber AND wip.tipo_img_prod = 1 AND wip.est_img_prod = 1
ORDER BY wip.fecha DESC
LIMIT 1;
This is the query that may be slow due to the indexes not being used properly.

How to repeat:
so that the functions can use the indexes correctly, since the same select works quickly in a stored procedure

Suggested fix:
so that the functions can use the indexes correctly, since the same select works quickly in a stored procedure
[26 Nov 19:01] MySQL Verification Team
Hi Mr. Salvatierra,

Thank you for your bug report.

Let us inform you about the purpose of this forum.

This forum is dedicated to the reports with fully repeatable test cases. Each of the test cases consists of a set SQL statements that always lead to the problem that is reported.

We did not receive such a test case from you, so we cannot proceed. Once we receive a full test case, we shall process your report.

Can't repeat.