1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

When an index is based on a text representation of a numeric column in the

original table, make sure the indexed value uses the canonical text 
representation of the numeric value in the table.
Proposed fix for ticket [343634942dd54ab57b70].

FossilOrigin-Name: 88e2ce916791d488076584f3795a89eb4277fcb812af9e4c2f383815d55ff6f1
This commit is contained in:
drh
2018-02-01 01:13:33 +00:00
parent f8c3a2f3cf
commit 06b3bd5b7a
4 changed files with 35 additions and 10 deletions

View File

@@ -264,6 +264,11 @@ static void applyNumericAffinity(Mem *pRec, int bTryForInt){
pRec->flags |= MEM_Real;
if( bTryForInt ) sqlite3VdbeIntegerAffinity(pRec);
}
/* TEXT->NUMERIC is many->one. Hence, it is important to invalidate the
** string representation after computing a numeric equivalent, because the
** string representation might not be the canonical representation for the
** numeric value. Ticket [343634942dd54ab57b7024] 2018-01-31. */
pRec->flags &= ~MEM_Str;
}
/*