Re: [Lazarus] MySQL auto commit
Thanks to I checked project with trunk version and it works if I set Transaction.Options:=[stoUseImplicit]; But there is a problem it just work with MySQLConnection and not with TSQLConnector even if you set ConnectorType to MySQL. So it seems TSQLConnector have a bug.can any one test it confirm it? Regards, Ara -- http://www.fastmail.com - Or how I learned to stop worrying and love email again -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL auto commit
mirce.vladimirov point me to commitretaining so I test it It helps to not getting "Operation can't be performed on active transaction" error but still Im searching for a better way for a auto commit way. Regards, Ara -- http://www.fastmail.com - Faster than the air-speed velocity of an unladen european swallow -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] MySQL auto commit
[Cross posted on forum so if you want answer there : http://forum.lazarus.freepascal.org/index.php/topic,30343.0.html[http://forum.lazarus.freepascal.org/index.php/topic,30097.0.html]] Is there any support for automatically commit changes for MySQL? I test it and it seems there isnt any and I should commit every time I execute a query. Here is a test version for you : SQL code for test db : > DROP TABLE IF EXISTS `testtable`; CREATE TABLE `testtable` ( `ID` > int(11) NOT NULL, `Title` varchar(255) DEFAULT NULL, PRIMARY KEY > (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; > > > INSERT INTO `testtable` VALUES ('1', null); INSERT INTO `testtable` > VALUES ('2', null); INSERT INTO `testtable` VALUES ('3', null); INSERT > INTO `testtable` VALUES ('4', null); INSERT INTO `testtable` VALUES > ('5', null); INSERT INTO `testtable` VALUES ('6', null); INSERT INTO > `testtable` VALUES ('7', null); INSERT INTO `testtable` VALUES ('8', > null); INSERT INTO `testtable` VALUES ('9', null); Code: > unit Unit1; > > {$mode objfpc}{$H+} > > interface > > uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, > sqldb, mysql55conn; > > type > > { TForm1 } > > TForm1 = class(TForm) procedure FormCreate(Sender: TObject); > private { private declarations } public end; > > var Form1: TForm1; > > implementation > > {$R *.lfm} > > { TForm1 } > > procedure TForm1.FormCreate(Sender: TObject); var Connector: > TSQLConnector; Transaction: TSQLTransaction; Query: TSQLQuery; begin > Connector := TSQLConnector.Create(nil); with Connector do begin > ConnectorType := 'MySQL 5.5'; HostName := 'localhost'; UserName > := 'root'; Password := ''; DatabaseName := 'test'; CharSet := > 'utf8'; end; Transaction := TSQLTransaction.Create(nil); > Transaction.DataBase := Connector; Query := TSQLQuery.Create(nil); > Query.DataBase := Connector; Connector.Connected := True; > Query.SQL.Text := 'SELECT * FROM testtable'; Query.Open; while not > Query.EOF do begin Connector.ExecuteDirect(Format('UPDATE > testtable SET Title="Test" WHERE > ID=%d;',[Query.FieldByName('ID').AsInteger])); > Connector.Transaction.Commit;//problem! Query.Next; end; end; > > end. If I dont do "Connector.Transaction.Commit;" changes will not save (and I want to every changes save excatly when thay post not after all changes done) and if I do "Connector.Transaction.Commit;" then Next line will give error "Operation can't be performed on active transaction". Please someone let me know what is the problem. Regards, Ara -- http://www.fastmail.com - A no graphics, no pop-ups email service -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] mysql
On 2015-07-28 13:12, Larry Dalton wrote: > Is anyone using Mysql with Lazarus 1.4.2, and if so, what version? [goofy] ~> /usr/local/bin/mysql --version /usr/local/bin/mysql Ver 14.14 Distrib 5.5.17, for FreeBSD9.0 (i386) using 5.2 Quite a lot of version numbers listed there, so not exactly sure which one is useful to your question. I don't actually use MySQL for any projects - personally I think MySQL and MariaDB is a pile of sh*t (use Firebird or PostgreSQL instead). Anyway, I set it up on my server to run tiOPF's SqlDB+MySQL unit tests against. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] mysql
SQLConnector can connect to many versions as 4 to 5.6 but I used it for 5.5. Regards, Ara -- http://www.fastmail.com - Or how I learned to stop worrying and love email again -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] mysql
Is anyone using Mysql with Lazarus 1.4.2, and if so, what version? Sent from my iPhone -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Mysql
On Wed, 29 Oct 2014, Larry Dalton wrote: Which version of mysql works best with Lazarus on windows 7? 5.5 or 5.0 would be fine. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Mysql
Which version of mysql works best with Lazarus on windows 7? Sent from my iPhone -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Mysql solve
Le 25/02/2012 22:47, Frédéric CRAPEZ a écrit : how can i resolve this TMySQL50Connection can not work with the installed MySQL client version: Expected (5.0), got (5.1.58). thanks -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus use mysql51Connection and replace localhost with 127.0.0.1 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Mysql
On Sat, 25 Feb 2012, Frédéric CRAPEZ wrote: how can i resolve this TMySQL50Connection can not work with the installed MySQL client version: Expected (5.0), got (5.1.58). Install the most recent snapshot of FPC/Lazarus. It has a TMySQL51Connection component. The version in subversion should have it. Michael.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Mysql
how can i resolve this TMySQL50Connection can not work with the installed MySQL client version: Expected (5.0), got (5.1.58). thanks -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] mysql connection problem
I tried to connect to mysql 5.1 database installed on my computer but it did not work; I tried the 2 types of connections 40 and 41 but lazarus kept telling me that it does not work with the installed version of libmusql.dll; there is nothing in the documentation about this issue!! please help!! thank you ziad dudin -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL 5.1
Thank you! Dave Copeland. On 09/18/2010 05:50 AM, Michael Van Canneyt wrote: Hello, There is a new TMySQL51Connection component that is suitable for use with MySQL 5.1. Therefor, TMySQL50Connection now no longer supports 5.1 connections. You should use the new TMySQL51Connection instead, but you'll need to recompile FPC and sqldblaz to see it on the component palette (I just committed the SQLDBlaz support for 5.1) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL 5.1
Thanks guys. That is what I was afraid of. I did notice a few changes in the declarations and had to tweak my assignments for field creation statements (inside my api) when I did the upgrade to the DBMS. At the time I was using MYSQL5 component and it did not check for 51 at the time. But now that you have the 51 dedicated component I'll switch to that. The API I designed made the assumption that the MYSQL5 component would connect to everything below that point. So the API does use generic SQL component (everywhere) however, and the specific is instantiated only at one spot in the API when they are created. The problem is that b/c I assumed backwards compatibility the enumeration only features one per kind of native driver. Which means I'm going to need to expand my API to include at least 5 and 5.1. And when that happens an array of SQL statements will need to be provided as well :-( The only good news is that SCS (product) has not been released. So no real harm done. Just more work has been realized. But thanks for the clarification and help. On Sun, Sep 19, 2010 at 6:24 AM, Michael Van Canneyt wrote: On Sun, 19 Sep 2010, Joost van der Sluis wrote: -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL 5.1
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 MyConnection:=TMySQL51Connection.Create(Application) instead of MyConnection:=TMySQL50Connection.Create(Application) 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. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL 5.1
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. That's what Ik tried to explain, and the reason you should stay away form MySQL. For 'normax' Linux distributions, this is not a problem, because they recompile everything that depends on MySQL if a new MySQL version becomes available (using the c-header file). So, you have to do that too. A MySQL program has to be compiled for exactly the same version of the MySQL client-lib. It's sad but true. Or you have to build a detection-mechanism for the client-lib-version (config-file), and use the appropriate TMySQLConnection. (If you want to know more about the reason for this: it is very well possible that a 'varchar' field has an internal number of 5, and a 'integer' field a internal number of 6 in one version of the MySQL-client-lib. While those numbers are reversed in another version. So without knowing the exact client-version-number, you can not know what kind of field a field with internal number 6 is.) > I'm hoping I don't need to expand my Database API to handle the many > flavors of MySQL. You have. It's simple though, you only need another TSQLConnection. Joost -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL 5.1
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? I'm hoping I don't need to expand my Database API to handle the many flavors of MySQL. Thanks for your insight. 2010/9/18 Michael Van Canneyt : > > Hello, > > There is a new TMySQL51Connection component that is suitable for use with > MySQL 5.1. > Therefor, TMySQL50Connection now no longer supports 5.1 connections. > > You should use the new TMySQL51Connection instead, but you'll need to > recompile FPC and sqldblaz to see it on the component palette (I just > committed the SQLDBlaz support for 5.1) > > Michael. > > On Fri, 17 Sep 2010, Andrew Brunner wrote: > >> No there was no problem a few versions ago. Someone had to change >> something that created this issue. >> >> Anyone else??? >> >> On Sep 17, 2010, at 5:07 PM, ik wrote: >> >> MySQL changes it's API call every version that is out, regardless how >> small that version is. So in order to provide the proper API you need to >> apply your >> code to specific MySQL version. >> >> Personally I recommend everyone to stay away from this database: >> http://idkn.wordpress.com/2009/03/15/why-i-find-mysql-to-be-so-bad/ >> >> Ido >> >> On Fri, Sep 17, 2010 at 23:37, Andrew Brunner >> wrote: >> Hi there, >> >> TApplication.HandleException TMySQL50Connection can not work >> with the >> installed MySQL client version: Expected (5.0), got (5.1.49). >> >> I'm getting this error when I try to connect to my db. >> >> >> Free Pascal Compiler from SVN... >> At revision 16002. >> Lazarus from SVN... >> At revision 27399. >> >> I've never had this problem before. I did recently upgrade to >> Ubuntu >> 10.10 daily though. The box I'm on is the server and the >> client. >> >> Any help would be greatly appreciated. >> >> -- >> ___ >> Lazarus mailing list >> laza...@lists.lazarus.freepascal.org >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> >> -- >> ___ >> Lazarus mailing list >> laza...@lists.lazarus.freepascal.org >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL 5.1
Hello, There is a new TMySQL51Connection component that is suitable for use with MySQL 5.1. Therefor, TMySQL50Connection now no longer supports 5.1 connections. You should use the new TMySQL51Connection instead, but you'll need to recompile FPC and sqldblaz to see it on the component palette (I just committed the SQLDBlaz support for 5.1) Michael. On Fri, 17 Sep 2010, Andrew Brunner wrote: No there was no problem a few versions ago. Someone had to change something that created this issue. Anyone else??? On Sep 17, 2010, at 5:07 PM, ik wrote: MySQL changes it's API call every version that is out, regardless how small that version is. So in order to provide the proper API you need to apply your code to specific MySQL version. Personally I recommend everyone to stay away from this database: http://idkn.wordpress.com/2009/03/15/why-i-find-mysql-to-be-so-bad/ Ido On Fri, Sep 17, 2010 at 23:37, Andrew Brunner wrote: Hi there, TApplication.HandleException TMySQL50Connection can not work with the installed MySQL client version: Expected (5.0), got (5.1.49). I'm getting this error when I try to connect to my db. Free Pascal Compiler from SVN... At revision 16002. Lazarus from SVN... At revision 27399. I've never had this problem before. I did recently upgrade to Ubuntu 10.10 daily though. The box I'm on is the server and the client. Any help would be greatly appreciated. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL 5.1
No there was no problem a few versions ago. Someone had to change something that created this issue. Anyone else??? On Sep 17, 2010, at 5:07 PM, ik wrote: > MySQL changes it's API call every version that is out, regardless how small > that version is. So in order to provide the proper API you need to apply your > code to specific MySQL version. > > Personally I recommend everyone to stay away from this database: > http://idkn.wordpress.com/2009/03/15/why-i-find-mysql-to-be-so-bad/ > > Ido > > On Fri, Sep 17, 2010 at 23:37, Andrew Brunner > wrote: > Hi there, > > TApplication.HandleException TMySQL50Connection can not work with the > installed MySQL client version: Expected (5.0), got (5.1.49). > > I'm getting this error when I try to connect to my db. > > > Free Pascal Compiler from SVN... > At revision 16002. > Lazarus from SVN... > At revision 27399. > > I've never had this problem before. I did recently upgrade to Ubuntu > 10.10 daily though. The box I'm on is the server and the client. > > Any help would be greatly appreciated. > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] MySQL 5.1
MySQL changes it's API call every version that is out, regardless how small that version is. So in order to provide the proper API you need to apply your code to specific MySQL version. Personally I recommend everyone to stay away from this database: http://idkn.wordpress.com/2009/03/15/why-i-find-mysql-to-be-so-bad/ Ido On Fri, Sep 17, 2010 at 23:37, Andrew Brunner wrote: > Hi there, > > TApplication.HandleException TMySQL50Connection can not work with the > installed MySQL client version: Expected (5.0), got (5.1.49). > > I'm getting this error when I try to connect to my db. > > > Free Pascal Compiler from SVN... > At revision 16002. > Lazarus from SVN... > At revision 27399. > > I've never had this problem before. I did recently upgrade to Ubuntu > 10.10 daily though. The box I'm on is the server and the client. > > Any help would be greatly appreciated. > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] MySQL 5.1
Hi there, TApplication.HandleException TMySQL50Connection can not work with the installed MySQL client version: Expected (5.0), got (5.1.49). I'm getting this error when I try to connect to my db. Free Pascal Compiler from SVN... At revision 16002. Lazarus from SVN... At revision 27399. I've never had this problem before. I did recently upgrade to Ubuntu 10.10 daily though. The box I'm on is the server and the client. Any help would be greatly appreciated. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] MySQL?
Just wanting to know when Lazarus is going to be supporting MySQL 5.1 in a general release? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On Wed, Mar 03, 2010 at 11:52:40AM +, Henry Vermaak wrote: > >> should link to mysqlclient.so (using the symlink, the unix way). > > > > I agree completely, and there is already a way to check the client > > library version in the mysql api. > > But what if they're dynamically loaded? Most users won't have the > libname.so symlink installed. IMHO that should be dealt with by a application specific configuration system, and left to the programmer. It is not something that IMHO the libs should try to decide for everybody. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
Joost van der Sluis escreveu: Bottom-line: don't use MySQL. And do not upgrade your MySQL-client library version. Currently i don't use client server RDMS at all. For client server i would prefer Firebird given other experiences. But the problem is that most web host companies only offer MySQL. Very few offer Firebird. Luiz -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On Tue, 2010-03-02 at 20:11 +0100, Marco van de Voort wrote: > On Tue, Mar 02, 2010 at 02:59:12PM +, Henry Vermaak wrote: > > > seems to have fallen from the air, connecting to nothing ? > > > > I presume it comes from here (in mysql.inc): > > > > const > > mysqllib = 'libmysqlclient.'+sharedsuffix; > > {$IF DEFINED(mysql50)} > > mysqlvlib = mysqllib+'.15'; > > {$ELSEIF DEFINED(mysql41)} > > mysqlvlib = mysqllib+'.14'; > > {$ELSE} > > mysqlvlib = mysqllib+'.12'; > > {$ENDIF} > > > > This probably doesn't cover all the cases. Assuming that a specific > > client library can only talk to a specific server may also be wrong. > > Debian testing also has libmysqlclient 16 and mysql-server 5.1. > > mysql version is a disaster (and one of the reasons why I avoid mysql when I > can). IMHO FPC should never hardcode the number in the first place, but > should link to mysqlclient.so (using the symlink, the unix way). That's impossible for MySQL. Because, for example, an 'integer' field in version .13 can have the id 1, but for version .14 the id 1 can be used for a 'varchar'. There is no way to know what the field-type of a column is, if you don't take the MySQL version into account. To avoid these kind of problems most distributions come with more version of the mysql-client libraries, which they call .15, .16 etc. So fpc first tries to find the right client-version (using the .15 suffix) and then the general one. Why MySQL 5.1. doesn't works is because as an extra check it checks if the version number is the number it expects. That check doesn't search for mysql 5.1 for older versions of fpc. (including 2.4.0) > Anyway, long story short, FPC has a provision for such mistakes, -XLA > > Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray. Doesn't work. The version check will fail. Bottom-line: don't use MySQL. And do not upgrade your MySQL-client library version. Joost. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On 3 March 2010 10:30, Sven Barth wrote: > > As far as I see it, it tries to load two libaries dynamically: > libmysqlclient.so.15 at first and libmysqlclient.so as fallback. On my system > (ArchLinux) libmysqlclient.so is a symlink to the current version (.16), so > the application is able to load it. Other systems (like Ubuntu and Co.) might > ommit this symlink as it is only included with development packages. > May be libmysqlclient.so.16 should be added as a SECOND accepted library > version inside the mysql50 define in mysql.inc (and also in InitialiseMysql). > Yes, the development package must be installed for the .so symlink to be created. This is o.k. for developers, but doesn't particularly help users. The .16 library needs to be added to the list, you're right, but .15 must also be there. >> Henry Vermaak wrote: >> >>P.S. Your email client strips the references header, breaking >>threaded view, or perhaps you didn't reply to my message, but composed >>a new one? > > That is a known, expected and disturbing issue ^^. > I check this mail account very seldom and so I'm using Digest Mode to not > reach the memory limit (10MB) that fast. Also I'm prefering the web view on > freepascal.org, so that I don't rely on a certain PC to read the messages > (I'm using three: work, home, UMPC). Thus replying is a bit... well... thread > breaking. If you have a good solution for this problem (modifying headers?), > I'd love to read it :) > I thought you might be using digest mode, but it's also stripping the reference. I don't think there's much you can do about it, either way. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On 3 March 2010 09:18, Henry Vermaak wrote: > On 2 March 2010 19:11, Marco van de Voort wrote: >> >> mysql version is a disaster (and one of the reasons why I avoid mysql when I >> can). IMHO FPC should never hardcode the number in the first place, but >> should link to mysqlclient.so (using the symlink, the unix way). > > I agree completely, and there is already a way to check the client > library version in the mysql api. But what if they're dynamically loaded? Most users won't have the libname.so symlink installed. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
2010/3/2 Marco van de Voort : > > Anyway, long story short, FPC has a provision for such mistakes, -XLA > > Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray. Isn't this only useful for dynamic linking at compile time, not for dynamic loading at run time? Vincent -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus & MySQL 5.1
Hi again! > Henry Vermaak wrote: > > This is good to know, but the issue was that the compiler was trying > to link against a version of a library that didn't exist on the > system. As far as I see it, it tries to load two libaries dynamically: libmysqlclient.so.15 at first and libmysqlclient.so as fallback. On my system (ArchLinux) libmysqlclient.so is a symlink to the current version (.16), so the application is able to load it. Other systems (like Ubuntu and Co.) might ommit this symlink as it is only included with development packages. May be libmysqlclient.so.16 should be added as a SECOND accepted library version inside the mysql50 define in mysql.inc (and also in InitialiseMysql). > Henry Vermaak wrote: > >P.S. Your email client strips the references header, breaking >threaded view, or perhaps you didn't reply to my message, but composed >a new one? That is a known, expected and disturbing issue ^^. I check this mail account very seldom and so I'm using Digest Mode to not reach the memory limit (10MB) that fast. Also I'm prefering the web view on freepascal.org, so that I don't rely on a certain PC to read the messages (I'm using three: work, home, UMPC). Thus replying is a bit... well... thread breaking. If you have a good solution for this problem (modifying headers?), I'd love to read it :) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On 3 March 2010 08:44, Sven Barth wrote: > > The problem is not mysqlvlib as also mysqllib is checked for. The problem is > the version string returned by the API. This is checked for in > fcl-db/src/sqldb/mysql/mysqlconn.inc/TConnectionName.DoInternalConnect. > This is good to know, but the issue was that the compiler was trying to link against a version of a library that didn't exist on the system. Henry P.S. Your email client strips the references header, breaking threaded view, or perhaps you didn't reply to my message, but composed a new one? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On 2 March 2010 19:11, Marco van de Voort wrote: > > mysql version is a disaster (and one of the reasons why I avoid mysql when I > can). IMHO FPC should never hardcode the number in the first place, but > should link to mysqlclient.so (using the symlink, the unix way). I agree completely, and there is already a way to check the client library version in the mysql api. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus & MySQL 5.1
Hi together! I'm using MySQL 5.1 without problems on my Linux machine. >I presume it comes from here (in mysql.inc): > > const >mysqllib = 'libmysqlclient.'+sharedsuffix; > {$IF DEFINED(mysql50)} >mysqlvlib = mysqllib+'.15'; > {$ELSEIF DEFINED(mysql41)} >mysqlvlib = mysqllib+'.14'; > {$ELSE} >mysqlvlib = mysqllib+'.12'; > {$ENDIF} The problem is not mysqlvlib as also mysqllib is checked for. The problem is the version string returned by the API. This is checked for in fcl-db/src/sqldb/mysql/mysqlconn.inc/TConnectionName.DoInternalConnect. Until 5 months ago this only checked for '5.0', but since then (thanks to Joost) it also checks for '5.1'. But I don't think that this is even part of the 2.4.0 release... You can also view my issue about this topic here: http://mantis.freepascal.org/view.php?id=14587 Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On Tue, 02 Mar 2010 17:37:46 -0600 "Terry A. Haimann" wrote: > How do I do this in Lazarus? Project / Project Options / Compiler / Other >[...] > > Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On 3/2/2010 18:34, Terry A. Haimann wrote: I have tried this and it doesn't work. in what way "it doesn't work"?? do you get an error or a complete failure with nothing indicating what went wrong? FWIW: "it doesn't work" is pretty poor for an analysis to work from :P ;) waldo kitty wrote: On 3/1/2010 23:18, Terry A. Haimann wrote: I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42 installed. I have installed the latest Lazarus RPM, which is 0.9.28.2 and FPC 2.2.4. My Lazarus App won't connect to the server. I have the libmysqlclient.so.16.0.0 installed. I am not sure where to get the libmysqlclient.so.15.0.0. What are my options? Please do not recommend Zeos, On my installation I have never seen it compile correctly and if I have trouble a newbie would definitly have problems. since you're on linux, what's wrong with going into the dir where your libmysqlclient is and creating a link pointing to it for the 15 version you need? ;) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
How do I do this in Lazarus? Marco van de Voort wrote: On Tue, Mar 02, 2010 at 02:59:12PM +, Henry Vermaak wrote: seems to have fallen from the air, connecting to nothing ? I presume it comes from here (in mysql.inc): const mysqllib = 'libmysqlclient.'+sharedsuffix; {$IF DEFINED(mysql50)} mysqlvlib = mysqllib+'.15'; {$ELSEIF DEFINED(mysql41)} mysqlvlib = mysqllib+'.14'; {$ELSE} mysqlvlib = mysqllib+'.12'; {$ENDIF} This probably doesn't cover all the cases. Assuming that a specific client library can only talk to a specific server may also be wrong. Debian testing also has libmysqlclient 16 and mysql-server 5.1. mysql version is a disaster (and one of the reasons why I avoid mysql when I can). IMHO FPC should never hardcode the number in the first place, but should link to mysqlclient.so (using the symlink, the unix way). Anyway, long story short, FPC has a provision for such mistakes, -XLA Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
I have tried this and it doesn't work. waldo kitty wrote: On 3/1/2010 23:18, Terry A. Haimann wrote: I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42 installed. I have installed the latest Lazarus RPM, which is 0.9.28.2 and FPC 2.2.4. My Lazarus App won't connect to the server. I have the libmysqlclient.so.16.0.0 installed. I am not sure where to get the libmysqlclient.so.15.0.0. What are my options? Please do not recommend Zeos, On my installation I have never seen it compile correctly and if I have trouble a newbie would definitly have problems. since you're on linux, what's wrong with going into the dir where your libmysqlclient is and creating a link pointing to it for the 15 version you need? ;) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On Tue, Mar 02, 2010 at 02:59:12PM +, Henry Vermaak wrote: > > seems to have fallen from the air, connecting to nothing ? > > I presume it comes from here (in mysql.inc): > > const > mysqllib = 'libmysqlclient.'+sharedsuffix; > {$IF DEFINED(mysql50)} > mysqlvlib = mysqllib+'.15'; > {$ELSEIF DEFINED(mysql41)} > mysqlvlib = mysqllib+'.14'; > {$ELSE} > mysqlvlib = mysqllib+'.12'; > {$ENDIF} > > This probably doesn't cover all the cases. Assuming that a specific > client library can only talk to a specific server may also be wrong. > Debian testing also has libmysqlclient 16 and mysql-server 5.1. mysql version is a disaster (and one of the reasons why I avoid mysql when I can). IMHO FPC should never hardcode the number in the first place, but should link to mysqlclient.so (using the symlink, the unix way). Anyway, long story short, FPC has a provision for such mistakes, -XLA Try passing -XLAlibmysqlclient.so.15=libsqlclient.so.16 and pray. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On 2 March 2010 14:48, Marco van de Voort wrote: > On Mon, Mar 01, 2010 at 10:18:48PM -0600, Terry A. Haimann wrote: >> I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42 >> installed. I have installed the latest Lazarus RPM, which is 0.9.28.2 >> and FPC 2.2.4. My Lazarus App won't connect to the server. I have the >> libmysqlclient.so.16.0.0 installed. I am not sure where to get the >> libmysqlclient.so.15.0.0. > > Where does ".15.0.0" come from in this discussion? It is a filename that > seems to have fallen from the air, connecting to nothing ? I presume it comes from here (in mysql.inc): const mysqllib = 'libmysqlclient.'+sharedsuffix; {$IF DEFINED(mysql50)} mysqlvlib = mysqllib+'.15'; {$ELSEIF DEFINED(mysql41)} mysqlvlib = mysqllib+'.14'; {$ELSE} mysqlvlib = mysqllib+'.12'; {$ENDIF} This probably doesn't cover all the cases. Assuming that a specific client library can only talk to a specific server may also be wrong. Debian testing also has libmysqlclient 16 and mysql-server 5.1. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On Mon, Mar 01, 2010 at 10:18:48PM -0600, Terry A. Haimann wrote: > I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42 > installed. I have installed the latest Lazarus RPM, which is 0.9.28.2 > and FPC 2.2.4. My Lazarus App won't connect to the server. I have the > libmysqlclient.so.16.0.0 installed. I am not sure where to get the > libmysqlclient.so.15.0.0. Where does ".15.0.0" come from in this discussion? It is a filename that seems to have fallen from the air, connecting to nothing ? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus & MySQL 5.1
On 3/1/2010 23:18, Terry A. Haimann wrote: I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42 installed. I have installed the latest Lazarus RPM, which is 0.9.28.2 and FPC 2.2.4. My Lazarus App won't connect to the server. I have the libmysqlclient.so.16.0.0 installed. I am not sure where to get the libmysqlclient.so.15.0.0. What are my options? Please do not recommend Zeos, On my installation I have never seen it compile correctly and if I have trouble a newbie would definitly have problems. since you're on linux, what's wrong with going into the dir where your libmysqlclient is and creating a link pointing to it for the 15 version you need? ;) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus & MySQL 5.1
I upgraded my laptop to Fedora Core 12, which has MySQL 5.1.42 installed. I have installed the latest Lazarus RPM, which is 0.9.28.2 and FPC 2.2.4. My Lazarus App won't connect to the server. I have the libmysqlclient.so.16.0.0 installed. I am not sure where to get the libmysqlclient.so.15.0.0. What are my options? Please do not recommend Zeos, On my installation I have never seen it compile correctly and if I have trouble a newbie would definitly have problems. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus