SQLite

Check-in [037da798fa]
Login

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

Overview
Comment:Do not place arbitrary restrictions on the length of the failure message for a uniqueness constraint.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 037da798fa5510ba7c776831ebcd683a85dca28e25bc657ff17bb2b08c3d406e
User & Date: drh 2019-04-10 00:58:07.720
Context
2019-04-10
12:02
Change the name of some internal testing interfaces to avoid a name conflict in AIX. (check-in: c1cae7e7f0 user: drh tags: trunk)
00:58
Do not place arbitrary restrictions on the length of the failure message for a uniqueness constraint. (check-in: 037da798fa user: drh tags: trunk)
2019-04-09
21:37
New test case for SQLITE_TOOBIG errors. (check-in: 4c77fbbe5d user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/build.c.
4394
4395
4396
4397
4398
4399
4400
4401


4402
4403
4404
4405
4406
4407
4408
4394
4395
4396
4397
4398
4399
4400

4401
4402
4403
4404
4405
4406
4407
4408
4409







-
+
+







  Index *pIdx       /* The index that triggers the constraint */
){
  char *zErr;
  int j;
  StrAccum errMsg;
  Table *pTab = pIdx->pTable;

  sqlite3StrAccumInit(&errMsg, pParse->db, 0, 0, 200);
  sqlite3StrAccumInit(&errMsg, pParse->db, 0, 0, 
                      pParse->db->aLimit[SQLITE_LIMIT_LENGTH]);
  if( pIdx->aColExpr ){
    sqlite3_str_appendf(&errMsg, "index '%q'", pIdx->zName);
  }else{
    for(j=0; j<pIdx->nKeyCol; j++){
      char *zCol;
      assert( pIdx->aiColumn[j]>=0 );
      zCol = pTab->aCol[pIdx->aiColumn[j]].zName;