| 28744 | */ |
| 28745 | |
| 28746 | static bool |
| 28747 | cmp_buffer_with_ref(THD *thd, TABLE *table, TABLE_REF *tab_ref) |
| 28748 | { |
| 28749 | bool no_prev_key; |
| 28750 | if (!tab_ref->disable_cache) |
| 28751 | { |
| 28752 | if (!(no_prev_key= tab_ref->key_err)) |
| 28753 | { |
| 28754 | /* Previous access found a row. Copy its key */ |
| 28755 | memcpy(tab_ref->key_buff2, tab_ref->key_buff, tab_ref->key_length); |
| 28756 | } |
| 28757 | } |
| 28758 | else |
| 28759 | no_prev_key= TRUE; |
| 28760 | if ((tab_ref->key_err= cp_buffer_from_ref(thd, table, tab_ref)) || |
| 28761 | no_prev_key) |
| 28762 | return 1; |
| 28763 | return memcmp(tab_ref->key_buff2, tab_ref->key_buff, tab_ref->key_length) |
| 28764 | != 0; |
| 28765 | } |
| 28766 | |
| 28767 | |
| 28768 | bool |
no test coverage detected