G'day...

Not necessarily, MEDIUMINT is probably (I don't know I haven't checked
the code) stored as its own defined type, and may be stored differently
on disk and in memory than an INT value (which is 2^32).

I expect that MySQL has either implemented some difference and hence
that is why they provide a variety of data structures. Being the good
database student that I was, I'm wanting to use the most appropriate
integer structure for my purpose.

The base data types implemented in a language (in this case we are
referring to C, however I can't say if MySQL is programmed completely in
C, but I could take a look at the source if I really needed to know)
influence rather than dictate the data types used by the program
(MySQL). (Especially when we are talking about C as it's a language that
allows you to define your own datatypes and how they are handled.)

So, I neither think that MEDIUMINTS are handled internally as a 2^32 (or
if it is, the other 8 bits may be used snazzily for something else) nor
that the MySQL developers are on crack. (Who knows, maybe it gives them
the ability to think in high level abstraction, but I somehow doubt it!)

Regards,

 

Michael S. E. Kraus
Software Developer/Technical Support Specialist
Wild Technology Pty Ltd
[EMAIL PROTECTED]
Direct Line 02-8306-0007 
________________________________

ABN 98 091 470 692
Level 4 Tiara, 306/9 Crystal Street, Waterloo NSW 2017, Australia
Telephone 1300-13-9453 |  Facsimile 1300-88-9453
http://www.wildtechnology.net

 
The information contained in this email message and any attachments may
be confidential information and may also be the subject of client legal
- legal professional privilege. If you are not the intended recipient,
any use, interference with, disclosure or copying of this material is
unauthorised and prohibited.   This email and any attachments are also
subject to copyright.  No part of them may be reproduced, adapted or
transmitted without the written permission of the copyright owner.  If
you have received this email in error, please immediately advise the
sender by return email and delete the message from your system.


-----Original Message-----
From: Benno [mailto:[EMAIL PROTECTED] 
Sent: Monday, 18 October 2004 11:17 AM
To: Michael Kraus
Cc: Robert Collins; Glen Turner; [EMAIL PROTECTED]
Subject: Re: [SLUG] Maximum process ID

On Mon Oct 18, 2004 at 11:06:34 +1000, Michael Kraus wrote:
>G'day...
>
>Whilst this discussion is pretty great - I would like to note that the 
>practical purpose of knowing the size of a PID is so that I can store 
>the current processes' PID in an MySQL database, and the process is a 
>Perl script.
>
>Based on the discussion so far, I'm making a pretty safe bet that a 
>MEDIUMINT value (2^24) unsigned (0 - 16,777,215) will be more than 
>sufficient. I don't know of a /running/ process that could have a 
>negative value for its PID. (Any reasons why this wouldn't be
>sufficient?)
>

Why not just use an int (2^32). It's storage requirement are going to be
no different to those required by (2^24) anyway. Internally 2^24 are
going to be implemented as int anyway. (Assuming the MySQL developers
weren't on crack.)

Benno
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to