Delphi XE 5 - 'TMysqlShutdownLevel' has no type info

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
Bookshie
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 02.04.2014, 19:08

Delphi XE 5 - 'TMysqlShutdownLevel' has no type info

Post 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. :(
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

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

Post by miab3 »

Bookshie,

Try:

Code: Select all

SHUTDOWN_WAIT_CRITICAL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE shl 1) +1,
Michal
Bookshie
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 02.04.2014, 19:08

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

Post 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
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

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

Post 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..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
LEDfoot
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 05.11.2015, 15:44

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

Post 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.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

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

Post 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..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply