5 messages in com.mysql.lists.bugsRe: Bug with heap table ??| From | Sent On | Attachments |
|---|---|---|
| Sinisa Milivojevic | 02 Mar 2002 07:46 | |
| Fournier Jocelyn [Presence-PC] | 02 Mar 2002 07:46 | |
| Michael Widenius | 11 Mar 2002 02:04 | |
| Fournier Jocelyn [Presence-PC] | 11 Mar 2002 03:16 | |
| Michael Widenius | 11 Mar 2002 15:46 |
| Subject: | Re: Bug with heap table ??![]() |
|---|---|
| From: | Fournier Jocelyn [Presence-PC] (jo...@presence-pc.com) |
| Date: | 03/11/2002 03:16:34 AM |
| List: | com.mysql.lists.bugs |
Hi,
It seems Sinisa already fixed this bug with the following patch :
diff -Nru a/heap/hp_rfirst.c b/heap/hp_rfirst.c --- a/heap/hp_rfirst.c Mon Mar 11 12:12:52 2002 +++ b/heap/hp_rfirst.c Mon Mar 11 12:12:52 2002 @@ -21,6 +21,11 @@ int heap_rfirst(HP_INFO *info, byte *record) { DBUG_ENTER("heap_rfirst"); + if (!(info->s->records)) + { + my_errno=HA_ERR_END_OF_FILE; + DBUG_RETURN(my_errno); + } info->current_record=0; info->current_hash_ptr=0; info->update=HA_STATE_PREV_FOUND;
Need I still apply your patch ?
Regards,
Jocelyn Fournier
----- Original Message ----- From: "Michael Widenius" <mon...@mysql.com> To: "Fournier Jocelyn [Presence-PC]" <jo...@presence-pc.com> Cc: <bu...@lists.mysql.com> Sent: Monday, March 11, 2002 11:05 AM Subject: Re: Bug with heap table ??
Hi!
"Fournier" == Fournier Jocelyn <[Presence-PC]"
<jo...@presence-pc.com>> writes:
Fournier> Hi, Fournier> Oups sorry, I messed up with the online1 table, is was not a HEAP TABLE :) Fournier> (seems hard to produce a dump as long as it's a HEAP table and so I have Fournier> only the frm file) Fournier> Here is the testcase :
Fournier> CREATE TABLE online ( Fournier> pseudo char(35) NOT NULL, Fournier> date int(10) unsigned DEFAULT '0' NOT NULL, Fournier> cat tinyint(4) unsigned DEFAULT '0' NOT NULL, Fournier> forum tinyint(3) unsigned DEFAULT '0' NOT NULL, Fournier> PRIMARY KEY (pseudo), Fournier> KEY date (date), Fournier> KEY forum (forum)) TYPE=HEAP;
Fournier> INSERT INTO online SELECT * FROM online2; Fournier> SELECT * FROM online; Fournier> DELETE FROM online WHERE date < 10151111111; Fournier> SELECT * FROM online;
Fournier> I uploaded a myisam format of the table online2 in Fournier> /support.mysql.com/pub/mysql/secret/testcase.tar.gz
Sorry for the delay regarding this.
Here is a patch for this problem.
((/my/mysql-4.0/sql)) bk diffs -c ===== handler.cc 1.77 vs edited ===== *** /tmp/handler.cc-1.77-25891 Mon Feb 11 13:34:17 2002 --- edited/handler.cc Mon Mar 11 11:38:42 2002 *************** *** 542,548 **** If there is very few deleted rows in the table, find the first row by scanning the table. */ ! if (deleted < 10 || primary_key >= MAX_KEY) { (void) rnd_init(); while ((error= rnd_next(buf)) == HA_ERR_RECORD_DELETED) ; --- 542,549 ---- If there is very few deleted rows in the table, find the first row by scanning the table. */ ! if (deleted < 10 || primary_key >= MAX_KEY || ! !(option_flag() & HA_READ_ORDER)) { (void) rnd_init(); while ((error= rnd_next(buf)) == HA_ERR_RECORD_DELETED) ;
Regards, Monty
--------------------------------------------------------------------- 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 bugs...@lists.mysql.com To unsubscribe, e-mail <bugs...@lists.mysql.com>




