Page 1 of 1

embedded MySQL invalid fieldtype on enum fields

Posted: Sun 03 May 2009 13:23
by AngelusB
Working with Delphi 2009, dbexpmda40.dll (version 4.40.0.15), libmysqld.dll (no version known, size 3444 kB, date 2005-03-24)

CREATE TABLE `test` (
`aId` int(11) NOT NULL auto_increment,
`aEnum` enum('N','J') NOT NULL default 'N',
PRIMARY KEY (`aId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

insert into `test` values(null,'J');

The query "select aId from test" is working correct, but "select aEnum from test " gives an error : invalid field type.
Same error when selecting all columns: "select * from test".

I got this problem while porting an application from Delphi 2007 to Delphi 2009. I didn't have problems with enum-fields in Delphi 2007.

Posted: Tue 05 May 2009 08:46
by Dimon
I can not reproduce the problem. Please specify the exact version of your Embedded server.
Please check if the problem still persists with MySQL Embedded server version 5.1.22.

Posted: Sat 23 May 2009 15:55
by AngelusB
I tried libmysqld.dll version 5.1.34. The demo in C:\Program Files\Devart\DbxMda\Demos\Win32\Embedded gives a set of error messages:
A call to an mysql_server_init failed
Access violation ... in module 'ntdll.dll" etc.

- .. data\mysql.sym : the system can't find the file
- .. data\ibdata1 : the file already exists
- .. data\ib_logfile0 : the file already exists
- .. data\ib_logfile1 : the file already exists

(some messages were in Dutch, I made a translation)

It seems this dll brings me further away.

Posted: Mon 25 May 2009 07:08
by Dimon
To solve the problem try to delete all database files (as ib_logfile0, ibdata1, etc.) and recreate the database.

Posted: Mon 25 May 2009 17:20
by AngelusB
I made a (empty) file mysql.sym in \data.
(If I don's make this file the application keeps asking for it)
I deleted ibdata1, etc.
But I still get an error message:
A call to an mysql_server_init failed
Access violation at address 7C91B21a in module 'ntdll.dll'. Write of address 00000010

Posted: Wed 27 May 2009 08:10
by Dimon
Please make sure that you use the "share" folder corresponding with the libmysqld.dll version.
Copy the "share" directory from the MySQL server directory version 5.1.34 to "Embedded".

Posted: Thu 28 May 2009 08:24
by AngelusB
For as far I can see now: this solved the problems. Thank you verry much.

Posted: Thu 28 May 2009 09:38
by Dimon
It is good to see that this problem has been solved. If any other questions come up, please contact me.