On Tue, Aug 14, 2001 at 12:05:08PM +0200, Leos Bitto wrote:
> Hello,
> 
> I am currently changing a simple PHP4-based application from
> PostgreSQL 7.1 to MySQL 3.23.

Welcome to MySQL, then. :-)

> I have some tables in the database which I would like to create as
> TYPE=HEAP in MySQL. Because I have read the MySQL manual (applause
> here, please!) I know that auto_increment cannot be used there.
> This hurts me a lot, and given that MySQL doesn't support sequences,
> it nearly prohibits the usage of heap tables in my application.

You do know that HEAP tables exist only in memory, right?

> However, I am still not giving up, so here's the question: how
> difficult would it be to get rid of that restriction for
> auto_increment in heap tables? The ideal answer I am hoping for is
> 'yeah, that's easy - wait for 3.23.42' or 'try this patch and let us
> know if it works for you'.

I don't think it's easy, but I know only bits about the internals so
far.

My understanding is that the AUTO_INCREMENT feature is tied to the
index in some way.  And HEAP tables use a hash-based index for primary
keys rather than a tree-based index.  That's not to say it's
impossible--it's not.  There are ways it could work (in theory).  I
suspect, though, that it's not a quick patch.

Jeremy
-- 
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.29: up 60 days, processed 570,381,272 queries (108/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to