Page 1 of 1

Delphi XE 5 - 'TMysqlShutdownLevel' has no type info

Posted: 02.04.2014, 19:38
by Bookshie
Zeos install is done, under Delphi XE 5. I built my application and got this error message:

[dcc32 Error] ZPlainMySqlDriver.pas(439): E2134 Type 'TMysqlShutdownLevel' has no type info

[dcc32 Fatal Error] ZDbcMySql.pas(546): F2063 Could not compile used unit 'ZPlainMySqlDriver.pas'


I think, that there is a bug in ZPlainMysqlConstants.pas:

TMysqlShutdownLevel = (
SHUTDOWN_DEFAULT = 0,
SHUTDOWN_WAIT_CONNECTIONS = MYSQL_SHUTDOWN_KILLABLE_CONNECT,
SHUTDOWN_WAIT_TRANSACTIONS = MYSQL_SHUTDOWN_KILLABLE_TRANS,
SHUTDOWN_WAIT_UPDATES = MYSQL_SHUTDOWN_KILLABLE_UPDATE,
SHUTDOWN_WAIT_ALL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE shl 1),
SHUTDOWN_WAIT_CRITICAL_BUFFERS,
KILL_QUERY = 254,
KILL_CONNECTION = 255
);

But I don't know what is the solution. :(

Re: Delphi XE 5 - 'TMysqlShutdownLevel' has no type info

Posted: 03.04.2014, 11:22
by miab3
Bookshie,

Try:

Code: Select all

SHUTDOWN_WAIT_CRITICAL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE shl 1) +1,
Michal

Re: Delphi XE 5 - 'TMysqlShutdownLevel' has no type info

Posted: 03.05.2014, 16:51
by Bookshie
It doesn't work. :(
miab3 wrote:Bookshie,

Try:

Code: Select all

SHUTDOWN_WAIT_CRITICAL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE shl 1) +1,
Michal

Re: Delphi XE 5 - 'TMysqlShutdownLevel' has no type info

Posted: 27.06.2014, 23:11
by EgonHugeist
Is it possible you're mixing some deprecated dcu's or *.bpl's?

I don't have a XE5 but i can't see a logic issue here. IMO is everything fine. If Zeos did successfully comile and install then it looks to me like the Linker try's to bind mixed compiled files. Could you check this please? Clean up ALL old Z*.dcu's etc.. Compile everything again and tell me what happens. There are others who do use Zeos with XE5 and XE6..

Re: Delphi XE 5 - 'TMysqlShutdownLevel' has no type info

Posted: 05.11.2015, 16:21
by LEDfoot
Apologies for bringing an old thread back from the dead but I recently ran into the same issue and figured I should chime in.

The reason for this error is that when using RTTI, Delphi cannot generate type info for enumerations that does not start with 0 or are not contiguous.

One way of solving this is to pad the enumerated types so that they are contiguous, something like this:

TMysqlShutdownLevel = (
SHUTDOWN_DEFAULT = 0,
SHUTDOWN_WAIT_CONNECTIONS = MYSQL_SHUTDOWN_KILLABLE_CONNECT,
SHUTDOWN_WAIT_TRANSACTIONS = MYSQL_SHUTDOWN_KILLABLE_TRANS,
SHUTDOWN_WAIT_UPDATES = MYSQL_SHUTDOWN_KILLABLE_UPDATE,
SHUTDOWN_UNUSED_4,
SHUTDOWN_UNUSED_5,
SHUTDOWN_UNUSED_6,
SHUTDOWN_UNUSED_7,
SHUTDOWN_WAIT_ALL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE shl 1),
SHUTDOWN_WAIT_CRITICAL_BUFFERS,
.
. {lots of dummy entries}
.
KILL_QUERY = 254,
KILL_CONNECTION = 255


But unfortunately you run into a lot of other RTTI incompatible issues.

Depending on the drivers you need to use, I suggest editing Zeos.inc to disable the ones you do not need, that should cut down on the amount of fixing you need to do if your project needs RTTI.

Re: Delphi XE 5 - 'TMysqlShutdownLevel' has no type info

Posted: 12.11.2015, 08:25
by EgonHugeist
Hi LEDFoot,

seems like your'e tracking the root of the reported issue.

Would it help to add these defines to the D2009+ section?

Code: Select all

{ Reduce EXE size by disabling as much of RTTI as possible (delphi 2009/2010) }
{$IF CompilerVersion >= 21.0}
  {$WEAKLINKRTTI ON}
  {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
{$IFEND}
currently i'm using XE5/6 too for a project but i didn't run into this issue because i'm just using the generic RTTI..