SQLite

Check-in [3ce804e99b]
Login

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

Overview
Comment:Avoid computing a zero offset of a null pointer, which though this is technically harmless, is upsetting to pedantic run-time checkers.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3ce804e99bbef83d49ec309157448a7c1422725606516cef904e6122aadd3922
User & Date: drh 2019-12-03 02:51:50.852
Context
2019-12-03
03:31
Avoid a harmless zero offset of a null pointer in FTS3, so as to not provoke unnecessary warnings from run-time checkers. (check-in: 85d95abec4 user: drh tags: trunk)
02:51
Avoid computing a zero offset of a null pointer, which though this is technically harmless, is upsetting to pedantic run-time checkers. (check-in: 3ce804e99b user: drh tags: trunk)
2019-11-30
19:29
Do not allow a term in the WHERE clause of the query to qualify a partial index on the right table of a LEFT JOIN. Ticket [7f39060a24b47353] (check-in: 4066a34da7 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbemem.c.
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
  flags = pMem->flags;
  if( flags & (MEM_Int|MEM_IntReal) ){
    testcase( flags & MEM_IntReal );
    return pMem->u.i;
  }else if( flags & MEM_Real ){
    return doubleToInt64(pMem->u.r);
  }else if( flags & (MEM_Str|MEM_Blob) ){
    assert( pMem->z || pMem->n==0 );
    return memIntValue(pMem);
  }else{
    return 0;
  }
}

/*







|
<







586
587
588
589
590
591
592
593

594
595
596
597
598
599
600
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
  flags = pMem->flags;
  if( flags & (MEM_Int|MEM_IntReal) ){
    testcase( flags & MEM_IntReal );
    return pMem->u.i;
  }else if( flags & MEM_Real ){
    return doubleToInt64(pMem->u.r);
  }else if( (flags & (MEM_Str|MEM_Blob))!=0 && pMem->z!=0 ){

    return memIntValue(pMem);
  }else{
    return 0;
  }
}

/*