mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
5.1-security -> 5.5-security merge
This commit is contained in:
@ -5890,6 +5890,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
|
||||
}
|
||||
keyuse++;
|
||||
} while (keyuse->table == table && keyuse->key == key);
|
||||
DBUG_ASSERT(length > 0 && keyparts != 0);
|
||||
} /* not ftkey */
|
||||
|
||||
/* set up fieldref */
|
||||
@ -13698,6 +13699,9 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
|
||||
DBUG_ENTER("test_if_skip_sort_order");
|
||||
LINT_INIT(ref_key_parts);
|
||||
|
||||
/* Check that we are always called with first non-const table */
|
||||
DBUG_ASSERT(tab == tab->join->join_tab + tab->join->const_tables);
|
||||
|
||||
/*
|
||||
Keys disabled by ALTER TABLE ... DISABLE KEYS should have already
|
||||
been taken into account.
|
||||
@ -13779,7 +13783,8 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
|
||||
while (keyuse->key != new_ref_key && keyuse->table == tab->table)
|
||||
keyuse++;
|
||||
if (create_ref_for_key(tab->join, tab, keyuse,
|
||||
tab->join->const_table_map))
|
||||
(tab->join->const_table_map |
|
||||
OUTER_REF_TABLE_BIT)))
|
||||
DBUG_RETURN(0);
|
||||
|
||||
pick_table_access_method(tab);
|
||||
|
Reference in New Issue
Block a user