| 28766 | |
| 28767 | |
| 28768 | bool |
| 28769 | cp_buffer_from_ref(THD *thd, TABLE *table, TABLE_REF *ref) |
| 28770 | { |
| 28771 | enum_check_fields org_count_cuted_fields= thd->count_cuted_fields; |
| 28772 | MY_BITMAP *old_map= dbug_tmp_use_all_columns(table, &table->write_set); |
| 28773 | bool result= 0; |
| 28774 | key_part_map map= 1; |
| 28775 | |
| 28776 | thd->count_cuted_fields= CHECK_FIELD_IGNORE; |
| 28777 | for (store_key **copy=ref->key_copy ; *copy ; copy++, map <<= 1) |
| 28778 | { |
| 28779 | while (map & ref->const_ref_part_map) // skip const ref parts |
| 28780 | map <<= 1; // no store_key objects for them |
| 28781 | if ((*copy)->copy(thd) & 1 || |
| 28782 | ((ref->null_rejecting & map) && (*copy)->null_key)) |
| 28783 | { |
| 28784 | result= 1; |
| 28785 | break; |
| 28786 | } |
| 28787 | } |
| 28788 | thd->count_cuted_fields= org_count_cuted_fields; |
| 28789 | dbug_tmp_restore_column_map(&table->write_set, old_map); |
| 28790 | return result; |
| 28791 | } |
| 28792 | |
| 28793 | |
| 28794 | /***************************************************************************** |
no test coverage detected