1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge MySQL 5.1.46 into MariaDB.

Still two test failures to be solved: main.myisam and main.subselect.
This commit is contained in:
unknown
2010-04-28 14:52:24 +02:00
1343 changed files with 951110 additions and 3875 deletions

View File

@ -1171,11 +1171,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT()
if (file)
{
range_end();
if (head->key_read)
{
head->key_read= 0;
file->extra(HA_EXTRA_NO_KEYREAD);
}
head->set_keyread(FALSE);
if (free_file)
{
DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file,
@ -1377,10 +1373,7 @@ end:
head->file= file;
/* We don't have to set 'head->keyread' here as the 'file' is unique */
if (!head->no_keyread)
{
head->key_read= 1;
head->mark_columns_used_by_index(index);
}
head->prepare_for_position();
head->file= org_file;
bitmap_copy(&column_bitmap, head->read_set);
@ -8166,7 +8159,7 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_and_merge()
DBUG_ENTER("QUICK_INDEX_MERGE_SELECT::read_keys_and_merge");
/* We're going to just read rowids. */
file->extra(HA_EXTRA_KEYREAD);
head->set_keyread(TRUE);
head->prepare_for_position();
cur_quick_it.rewind();
@ -8242,7 +8235,7 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_and_merge()
delete unique;
doing_pk_scan= FALSE;
/* index_merge currently doesn't support "using index" at all */
file->extra(HA_EXTRA_NO_KEYREAD);
head->set_keyread(FALSE);
init_read_record(&read_record, thd, head, (SQL_SELECT*) 0, 1 , 1, TRUE);
DBUG_RETURN(result);
}
@ -10629,7 +10622,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::reset(void)
int result;
DBUG_ENTER("QUICK_GROUP_MIN_MAX_SELECT::reset");
file->extra(HA_EXTRA_KEYREAD); /* We need only the key attributes */
head->set_keyread(TRUE); /* We need only the key attributes */
if ((result= file->ha_index_init(index,1)))
DBUG_RETURN(result);
if (quick_prefix_select && quick_prefix_select->reset())