On Mon Oct 18, 2004 at 11:56:02 +1000, Michael Kraus wrote: >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).
Well, I'm sure it is stored differently on disk, but in memory it is going to be an int. Unless they want things to be really slow. >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.) Well, since sizeof(pid_t) gives you 4, why not use an int in your database? Benno -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
