List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:April 7 2009 3:17pm
Subject:Re: AMD64
View as plain text  
Alex,

Please respond to the list instead of my personal address.


Nevertheless, if MYSQL_TYPE_LONG is the datatype for a table field,
it would always -have- to be the same size, cause different clients can
connect (if not being embedded), wouldn't it?

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com



  Hi Martijn,

  I made an embedded mysql server. The API for the clients to my server use the standard
mysql client C API. If clients pass bad pointers to the server I don't want the server to
crash. So the server knows about all valid mysql connections. If a bad mysql pointer is
passed in, it can detect that. So when I save valid pointers when a connection is made I
like to save it as a MYSQL_TYPE_LONG. The client and the server has to run on similar
type machines. 64bit client with 64bit server and 32bit client with 32bit server, no
mismatch. The Long size in a 32bit machine is 4 bytes but in a 64bit machine is 8 bytes.
So I wanted to avoid conditionals for building for a 64bit machine.


  On Tue, Apr 7, 2009 at 10:49 AM, Martijn Tonies <m.tonies@stripped> wrote:



      What is the size of MYSQL_TYPE_LONG in a 64bit machine? I am trying to save
      pointers. If this type is 4 bytes on a 32bit machine and 8 bytes on a 64bit
      machine will make it much easier.



    Ehm, wouldn't that like, totally fail if -saved- by a 64bit machine and -read- by
    a 32bit machine if that were the case?

    Perhaps you should explain in more detail what you're trying to do?

    With regards,

    Martijn Tonies
    Upscene Productions
    http://www.upscene.com

    Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
    Anywhere, MySQL, InterBase, NexusDB and Firebird!

    Database questions? Check the forum:
    http://www.databasedevelopmentforum.com 

    -- 
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe:    http://lists.mysql.com/mysql?unsub=1




Thread
AMD64Alex Katebi7 Apr
  • Re: AMD64Martijn Tonies7 Apr
  • Re: AMD64Martijn Tonies7 Apr
    • Re: AMD64Alex Katebi7 Apr
      • RE: AMD64Martin Gainty7 Apr
  • Re: AMD64Martijn Tonies8 Apr