[Lazarus] MySQL 5.1

Michael Van Canneyt michael at freepascal.org
Sun Sep 19 13:24:17 CEST 2010

On Sun, 19 Sep 2010, Joost van der Sluis wrote:

> On Sat, 2010-09-18 at 13:36 -0500, Andrew Brunner wrote:
>> Hi Michael,
>> I have a wrapper API for SQL Database access.  I support MySQL by way
>> of TMySQL50Connection.  Since my system has the client and server at
>> 5.1 and I can hard-code this new component so I don't throw the
>> exception...
>> Will an exception be thrown for all users who try to use client/server
>> 5.0 when the actual component is assigned as TMySQL51Connection?  Is
>> TMySQL51Connection backwards compatible to 5.0?
> No. That's not possible, because Mysql 5.1 isn't backwards compatible.

What matters to Andrew (I think) is that all code will recompile as it 
was, the Pascal API has not changed.  It's just a matter of doing


instead of


That is all that must be changed.

All other code will be oblivious to this change, if all code
just assumes TSQLConnection (as it should). If you hardcoded
TMySQL50Connection everywhere, then I suggest changing it to
TSQLConnection with search and replace. All the rest should 
continue to work as-is.

We have a TSQLonnector component, which works more or less 
like the zeos connection component: you specify which connection 
type must be made, and it will create the appropriate TSQLConnection 
descendent and act as a proxy for that. There is still a bug, but 
if we can get it fixed, it would solve many of these version problems.


More information about the Lazarus mailing list