On Tue, Apr 7, 2009 at 11:17 AM, Martijn Tonies <m.ton...@upscene.com>wrote:

> Alex,
>
> Please respond to the list instead of my personal address.

sorry I thought i was.

>
>
>
> 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?


Yes if 64bit clients and 32bit servers or 32bit clients and 64bit servers
can talk to each other.
Do they? I found it much too complicated to go that route for my
client/server design. In my case the answer is no.



>
> 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.ton...@upscene.com>
> 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=alex.kat...@gmail.com
>
>
>
>

Reply via email to