mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Do filesort if handler has the HA_NOT_READ_PREFIX_LAST flag set.
This commit is contained in:
parent
663b983fb7
commit
a937a4fa5f
2 changed files with 5 additions and 1 deletions
|
@ -115,11 +115,15 @@ int my_realpath(char *to, const char *filename, myf MyFlags)
|
||||||
(!lstat(filename,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
|
(!lstat(filename,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
|
||||||
{
|
{
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
DBUG_PRINT("info",("executing realpath"));
|
||||||
if ((ptr=realpath(filename,buff)))
|
if ((ptr=realpath(filename,buff)))
|
||||||
|
{
|
||||||
strmake(to,ptr,FN_REFLEN-1);
|
strmake(to,ptr,FN_REFLEN-1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Realpath didn't work; Use original name */
|
/* Realpath didn't work; Use original name */
|
||||||
|
DBUG_PRINT("error",("realpath failed with errno: %d", errno));
|
||||||
my_errno=errno;
|
my_errno=errno;
|
||||||
if (MyFlags & MY_WME)
|
if (MyFlags & MY_WME)
|
||||||
my_error(EE_REALPATH, MYF(0), filename, my_errno);
|
my_error(EE_REALPATH, MYF(0), filename, my_errno);
|
||||||
|
|
|
@ -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.
|
with key part (A) and then traverse the index backwards.
|
||||||
*/
|
*/
|
||||||
if (table->file->table_flags() & HA_NOT_READ_PREFIX_LAST)
|
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_first_record= join_read_last_key;
|
||||||
tab->read_record.read_record= join_read_prev_same;
|
tab->read_record.read_record= join_read_prev_same;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
|
Loading…
Reference in a new issue