SQLite

Check-in [c7f0813c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Correctly preserve the collating sequence for a column when changing its datatype. Fix for the problem reported by forum post 36be3d3a08da9d92. Test cases in TH3.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c7f0813cabf9d8ab367bead5ba8cf20132b8bb9274d8e47b76ad66a10517dd2a
User & Date: drh 2021-08-24 17:07:44
Original Comment: Correctly preserve the collating sequence for a column when changing its datatype. Fix for the problem reported by forum post e5c76b738e. Test cases in TH3.
Context
2021-08-26
18:31
Add the --safe to the CLI. Also the --nonce option and the .nonce command. (check-in: c76870cb user: drh tags: trunk)
2021-08-24
17:07
Correctly preserve the collating sequence for a column when changing its datatype. Fix for the problem reported by forum post 36be3d3a08da9d92. Test cases in TH3. (check-in: c7f0813c user: drh tags: trunk)
2021-08-23
15:56
Fix a typo in a comment. No changes to code. (check-in: d953646a user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
      if( pCol->zCnName ){
        memcpy(&pCol->zCnName[n+1], zType, m+1);
        pCol->colFlags |= COLFLAG_HASTYPE;
      }
    }
    if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff;
    pColl = sqlite3ExprCollSeq(pParse, p);
    if( pColl && (pCol->colFlags & COLFLAG_HASCOLL)==0 ){
      assert( pTab->pIndex==0 );
      sqlite3ColumnSetColl(db, pCol, pColl->zName);
    }
  }
  pTab->szTabRow = 1; /* Any non-zero value works */
}








|







2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
      if( pCol->zCnName ){
        memcpy(&pCol->zCnName[n+1], zType, m+1);
        pCol->colFlags |= COLFLAG_HASTYPE;
      }
    }
    if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff;
    pColl = sqlite3ExprCollSeq(pParse, p);
    if( pColl ){
      assert( pTab->pIndex==0 );
      sqlite3ColumnSetColl(db, pCol, pColl->zName);
    }
  }
  pTab->szTabRow = 1; /* Any non-zero value works */
}