Bug #81427 Connector uses a slow INFORMATION_SCHEME.ROUTINES

Submitted: 16 May 2016 6:52 Modified: 16 May 2016 7:47
Reporter: Andrey L Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.9.8 OS:Windows
Assigned to: CPU Architecture:Any

[16 May 2016 6:52] Andrey L
Description:
For each request connector refers to the table INFORMATION_SCHEMA.ROUTINES to check for metadata. Table INFORMATION_SCHEMA.ROUTINES contains more 40K and query  SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA LIKE 'dev' AND ROUTINE_NAME LIKE 'proc1' takes time 90 seconds. This is very slow.

How to repeat:
use Connector/NET to call stored procedures and enable log the SQL issued. Wee see SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA LIKE 'dev' AND ROUTINE_NAME LIKE 'proc1', but expect to see SELECT * FROM mysql.proc WHERE 1=1 AND db LIKE 'dev' AND name LIKE 'proc1';

Suggested fix:
MySqlConnectionStringBuilder.cs

public MySqlConnectionStringBuilder(string connStr)
      : base()
    {
      lock (this)
      {
        ConnectionString = connStr;
      }
    }
change to
public MySqlConnectionStringBuilder(string connStr)
      : this()
    {
      lock (this)
      {
        ConnectionString = connStr;
      }
    }
[16 May 2016 7:47] Chiranjeevi Battula
Hello  Андрей rsvgsrdsrgvrsv,

Thank you for the bug report.
This is most likely duplicate of Bug #74116, please see Bug #74116.

Thanks,
Chiranjeevi.

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

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