List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:December 29 1999 10:45pm
Subject:RE: Bug with old ISAM Tables starting with 3.23.6
View as plain text  

Hi!
Cool! I was still waiting for an answer and thought my email got lost.

Yes, the problem is still there and I can send you the table (hope this
works for you).

Make sure that you set the table to the "old" isam format (it does not
happen with mysql 3.23.5 or myisam tables).

The querry was:

SELECT ar_id,ar_title,ar_date,ar_desc,ar_format FROM oldformat WHERE
ar_state='PUBLIC' ORDER BY ar_date DESC LIMIT 3

Problem appears as soon as there are less than 3 rows found. But only when
the WHERE clause is used (it seems)

Error Log says: '991210 14:22:48  read_prev_with_key: Got error -1 when
reading table: oldformat'

I wish you a happy new year and hope you find the problem!

Greetings,
 Hans Raaf

<cut>

Thanks for the dump. Here is a patch that fixes the problem.  This
patch will be in 3.23.8, which will be release shortly !
(This bug only bite in some cases when using ISAM tables in 3.23 with
ORDER BY .. DESC)

*** ha_isam.cc	Thu Dec 30 00:40:18 1999
--- /my/monty/master/mysql-3.23.7-alpha/sql/ha_isam.cc	Sun Nov 28 14:14:07 1999
***************
*** 117,124 ****
  {
    thread_safe_increment(ha_read_prev_count,&LOCK_status);
    int error=nisam_rprev(file,buf, active_index);
!   table->status=error ? STATUS_NOT_FOUND: 0;
!   return !error ? 0 : my_errno ? my_errno : HA_ERR_END_OF_FILE;
  }
    
  int ha_isam::index_first(byte * buf)
--- 108,115 ----
  {
    thread_safe_increment(ha_read_prev_count,&LOCK_status);
    int error=nisam_rprev(file,buf, active_index);
!   table->status=error ? STATUS_NOT_FOUND: HA_ERR_END_OF_FILE;
!   return error;
  }
    
  int ha_isam::index_first(byte * buf)


Regards,
Monty
Thread
RE: Bug with old ISAM Tables starting with 3.23.6Michael Widenius30 Dec