AnyDAC
ContentsIndexHome
PreviousUpNext
MySQL Server Questions

The list of questions and answers related to MySQL Server.

Group
Links
QY1: Is there any way to use MySQL C API function mysql_thread_id from AnyDAC?

A: Yes, although a bit cryptic:

  • ADConnection1.ConnectionIntf.Driver.CliObj - returns reference to TMySQLLib;
  • ADConnection1.ConnectionIntf.CliObj - returns reference to TMySQLSession, which has MySQL property;
  • alltogether:

 

uses
  uADPhysMySQLCli, uADPhysMySQLWrapper;
...
  with ADConnection1.ConnectionIntf do
    TMySQLLib(Driver.CliObj).mysql_thread_id(TMySQLSession(CliObj).MySQL);

 

QY2: Update blob field with data greater then 512KB on MySQL cause "MySQL server has gone away" error.

A: Please, check: http://dev.mysql.com/doc/refman/5.0/en/gone-away.html and at first the item, which suggest to increase max_allowed_packet. 

 

QY3: Is it possible to establish SSL connection to a MySQL server ?

A: Yes, it is possible. For that set UseSSL=True for a connection definition. Then specify SSL_key, SSL_cert, SSL_ca, SSL_capath and SSL_cipher parameters. For the parameters meaning, please, read: http://dev.mysql.com/doc/refman/5.1/en/ssl-options.html. Note, that you can also use the my.cnf configuration file. 

 

QY4: Why application hangs on for few second at exiting ? I am using only MySQL connection.

A: If your application creates threads, this issue (AD-58) is possible with libmysql.dll v 5.x. Please, read http://bugs.mysql.com/bug.php?id=37226 for details. As workaround try to terminate all threads before terminating the application.

What do you think about this topic? Send feedback!