Commit a937a4fa authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Do filesort if handler has the HA_NOT_READ_PREFIX_LAST flag set.

parent 663b983f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -115,11 +115,15 @@ int my_realpath(char *to, const char *filename, myf MyFlags)
      (!lstat(filename,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
  {
    char *ptr;
    DBUG_PRINT("info",("executing realpath"));
    if ((ptr=realpath(filename,buff)))
    {
      strmake(to,ptr,FN_REFLEN-1);
    }
    else
    {
      /* Realpath didn't work;  Use original name */
      DBUG_PRINT("error",("realpath failed with errno: %d", errno));
      my_errno=errno;
      if (MyFlags & MY_WME)
	my_error(EE_REALPATH, MYF(0), filename, my_errno);
+1 −1
Original line number Diff line number Diff line
@@ -5577,7 +5577,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
	    with key part (A) and then traverse the index backwards.
	  */
	  if (table->file->table_flags() & HA_NOT_READ_PREFIX_LAST)
	    DBUG_RETURN(1);
	    DBUG_RETURN(0);			// Use filesort
	  tab->read_first_record=       join_read_last_key;
	  tab->read_record.read_record= join_read_prev_same;
	  /* fall through */