From: Martin Gainty Date: April 7 2009 4:38pm Subject: RE: AMD64 List-Archive: http://lists.mysql.com/mysql/217029 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_faf6ebd3-de75-4076-9c84-c46069f8d5d2_" --_faf6ebd3-de75-4076-9c84-c46069f8d5d2_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MySQL converts MYSQL_TYPE_LONG to float before storing=20 http://dev.mysql.com/doc/refman/5.1/en/c-api-prepared-statement-datatypes.h= tml you may want to consider FIXED size datatypes for that requirement e.g. unsigned long *length HTH Martin=20 ______________________________________________=20 Verzicht und Vertraulichkeitanmerkung / Note de d=E9ni et de confidentialit= =E9=20 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . > Date: Tue=2C 7 Apr 2009 11:30:32 -0400 > Subject: Re: AMD64 > From: alex.katebi@stripped > To: m.tonies@stripped > CC: mysql@stripped >=20 > On Tue=2C Apr 7=2C 2009 at 11:17 AM=2C Martijn Tonies wrote: >=20 > > Alex=2C > > > > Please respond to the list instead of my personal address. >=20 > sorry I thought i was. >=20 > > > > > > > > Nevertheless=2C if MYSQL_TYPE_LONG is the datatype for a table field=2C > > it would always -have- to be the same size=2C cause different clients c= an > > connect (if not being embedded)=2C wouldn't it? >=20 >=20 > 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. >=20 >=20 >=20 > > > > With regards=2C > > > > Martijn Tonies > > Upscene Productions > > http://www.upscene.com > > > > Download Database Workbench for Oracle=2C MS SQL Server=2C Sybase SQL > > Anywhere=2C MySQL=2C InterBase=2C NexusDB and Firebird! > > > > Database questions? Check the forum: > > http://www.databasedevelopmentforum.com > > > > > > > > Hi Martijn=2C > > > > 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 se= rver > > I don't want the server to crash. So the server knows about all valid m= ysql > > connections. If a bad mysql pointer is passed in=2C 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 se= rver=2C > > 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=2C Apr 7=2C 2009 at 10:49 AM=2C Martijn Tonies > > wrote: > > > > > > > > What is the size of MYSQL_TYPE_LONG in a 64bit machine? I am tryin= g to > > save > > pointers. If this type is 4 bytes on a 32bit machine and 8 bytes o= n a > > 64bit > > machine will make it much easier. > > > > > > > > Ehm=2C wouldn't that like=2C totally fail if -saved- by a 64bit mach= ine 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=2C > > > > Martijn Tonies > > Upscene Productions > > http://www.upscene.com > > > > Download Database Workbench for Oracle=2C MS SQL Server=2C Sybase SQ= L > > Anywhere=2C MySQL=2C InterBase=2C 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=3Dalex.katebi@stripped > > > > > > > > _________________________________________________________________ Windows Live=99: Keep your life in sync. http://windowslive.com/explore?ocid=3DTXT_TAGLM_WL_allup_1a_explore_042009= --_faf6ebd3-de75-4076-9c84-c46069f8d5d2_--