List:General Discussion« Previous MessageNext Message »
From:Martin Gainty Date:April 7 2009 4:38pm
Subject:RE: AMD64
View as plain text  
MySQL converts MYSQL_TYPE_LONG to float before storing 
http://dev.mysql.com/doc/refman/5.1/en/c-api-prepared-statement-datatypes.html

you may want to consider FIXED size datatypes for that requirement e.g.
unsigned long *length

HTH
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so
bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer
Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und
entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous
n'êtes pas le destinataire prévu, nous te demandons avec bonté que
pour satisfaire informez l'expéditeur. N'importe quelle diffusion non
autorisée ou la copie de ceci est interdite. Ce message sert à
l'information seulement et n'aura pas n'importe quel effet légalement obligatoire.
Étant donné que les email peuvent facilement être sujets à la
manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu
fourni.






> Date: Tue, 7 Apr 2009 11:30:32 -0400
> Subject: Re: AMD64
> From: alex.katebi@stripped
> To: m.tonies@stripped
> CC: mysql@stripped
> 
> On Tue, Apr 7, 2009 at 11:17 AM, Martijn Tonies <m.tonies@stripped>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.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
> >
> >
> >
> >

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
Thread
AMD64Alex Katebi7 Apr
  • Re: AMD64Martijn Tonies7 Apr
  • Re: AMD64Martijn Tonies7 Apr
    • Re: AMD64Alex Katebi7 Apr
      • RE: AMD64Martin Gainty7 Apr
  • Re: AMD64Martijn Tonies8 Apr