/ Check-in [71e3b715]
Login

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

Overview
Comment:If a virtual table xColumn method sets an error message using sqlite3_result_error(), use that message in preference to any error message left in the sqlite3_vtab object.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:71e3b715ad36c2132a587b84221be6359c31d7a17c3fba201b7ed3baf17922f1
User & Date: dan 2018-01-30 18:33:23
Context
2018-01-31
01:38
Changes to the autoconf tarball so that it does not try to use system() when building on iOS. check-in: 32ed9c10 user: drh tags: trunk
2018-01-30
18:33
If a virtual table xColumn method sets an error message using sqlite3_result_error(), use that message in preference to any error message left in the sqlite3_vtab object. check-in: 71e3b715 user: dan tags: trunk
17:43
Add tests cases for the zipfile extension. check-in: 13b786da user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

  6752   6752       pDest->u.nZero = 0;
  6753   6753     }else{
  6754   6754       MemSetTypeFlag(pDest, MEM_Null);
  6755   6755     }
  6756   6756     rc = pModule->xColumn(pCur->uc.pVCur, &sContext, pOp->p2);
  6757   6757     sqlite3VtabImportErrmsg(p, pVtab);
  6758   6758     if( sContext.isError>0 ){
         6759  +    sqlite3VdbeError(p, "%s", sqlite3_value_text(pDest));
  6759   6760       rc = sContext.isError;
  6760   6761     }
  6761   6762     sqlite3VdbeChangeEncoding(pDest, encoding);
  6762   6763     REGISTER_TRACE(pOp->p3, pDest);
  6763   6764     UPDATE_MAX_BLOBSIZE(pDest);
  6764   6765   
  6765   6766     if( sqlite3VdbeMemTooBig(pDest) ){

Changes to test/zipfile2.test.

   148    148   set blob [blob $archive2]
   149    149   do_execsql_test 4.0 {
   150    150     SELECT name,mtime,data,method FROM zipfile($blob)
   151    151   } {
   152    152     a.txt 1000000 aaaaaaaaaaaaaaaaaaaaaaa 8
   153    153   }
   154    154   
   155         -breakpoint
   156    155   set L [findall 17000000 $archive2]
   157    156   set a $archive2
   158    157   foreach i $L { set a [string replace $a $i [expr $i+7] 16000000] }
   159    158   set blob [blob $a]
   160    159   do_catchsql_test 4.1 {
   161    160     SELECT name,mtime,data,method FROM zipfile($blob)
   162         -} {1 {SQL logic error}}
   163         -
          161  +} {1 {inflate() failed (0)}}
   164    162   
   165    163   
   166    164   finish_test
   167    165