1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Correctly preserve the collating sequence for a column when changing

its datatype.  Fix for the problem reported by
[forum:/forumpost/e5c76b738e|forum post e5c76b738e].  Test cases
in TH3.

FossilOrigin-Name: c7f0813cabf9d8ab367bead5ba8cf20132b8bb9274d8e47b76ad66a10517dd2a
This commit is contained in:
drh
2021-08-24 17:07:44 +00:00
parent 0ccda5294f
commit 5ced0a914e
3 changed files with 8 additions and 8 deletions

View File

@@ -2193,7 +2193,7 @@ void sqlite3SelectAddColumnTypeAndCollation(
}
if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff;
pColl = sqlite3ExprCollSeq(pParse, p);
if( pColl && (pCol->colFlags & COLFLAG_HASCOLL)==0 ){
if( pColl ){
assert( pTab->pIndex==0 );
sqlite3ColumnSetColl(db, pCol, pColl->zName);
}