TruncateIndexValues truncates the index values created using only the leading part of column values.
(tblInfo *model.TableInfo, idxInfo *model.IndexInfo, indexedValues []types.Datum)
| 1766 | |
| 1767 | // TruncateIndexValues truncates the index values created using only the leading part of column values. |
| 1768 | func TruncateIndexValues(tblInfo *model.TableInfo, idxInfo *model.IndexInfo, indexedValues []types.Datum) { |
| 1769 | for i := 0; i < len(indexedValues); i++ { |
| 1770 | idxCol := idxInfo.Columns[i] |
| 1771 | tblCol := tblInfo.Columns[idxCol.Offset] |
| 1772 | TruncateIndexValue(&indexedValues[i], idxCol, tblCol) |
| 1773 | } |
| 1774 | } |
| 1775 | |
| 1776 | // TruncateIndexValue truncate one value in the index. |
| 1777 | func TruncateIndexValue(v *types.Datum, idxCol *model.IndexColumn, tblCol *model.ColumnInfo) { |
no test coverage detected