SQLite4
Check-in [40b76362c9]
Not logged in

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

Overview
Comment:Display sqlite4_nums correctly when explaining query plans.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 40b76362c953de3b3112c45f657bef0b00c001b4
User & Date: peterreid 2013-07-06 03:59:39
Context
2013-07-06
04:15
Remove no-longer-used P4_REAL type for VdbeOp, which has been replaced by P4_NUM. check-in: 960d38f214 user: peterreid tags: trunk
03:59
Display sqlite4_nums correctly when explaining query plans. check-in: 40b76362c9 user: peterreid tags: trunk
2013-07-04
18:44
Copy the new version of script "like.test" from sqlite3 to this project. Then tweak it to work. check-in: 1468464069 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
...
895
896
897
898
899
900
901




902
903
904
905
906
907
908
     || defined(VDBE_PROFILE) || defined(SQLITE4_DEBUG)
/*
** Compute a string that describes the P4 parameter for an opcode.
** Use zTemp for any required temporary buffer space.
*/
static char *displayP4(Op *pOp, char *zTemp, int nTemp){
  char *zP4 = zTemp;
  assert( nTemp>=20 );
  switch( pOp->p4type ){
    case P4_KEYINFO_STATIC:
    case P4_KEYINFO: {
      int i, j;
      KeyInfo *pKeyInfo = pOp->p4.pKeyInfo;
      i = sqlite4_snprintf(zTemp, nTemp, "keyinfo(%d", pKeyInfo->nField);
      for(j=0; j<pKeyInfo->nField; j++){
................................................................................
    case P4_INT32: {
      sqlite4_snprintf(zTemp, nTemp, "%d", pOp->p4.i);
      break;
    }
    case P4_REAL: {
      sqlite4_snprintf(zTemp, nTemp, "%.16g", *pOp->p4.pReal);
      break;




    }
    case P4_MEM: {
      Mem *pMem = pOp->p4.pMem;
      if( pMem->flags & MEM_Str ){
        zP4 = pMem->z;
      }else if( pMem->flags & (MEM_Int|MEM_Real) ){
        char aOut[30];







|







 







>
>
>
>







843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
...
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
     || defined(VDBE_PROFILE) || defined(SQLITE4_DEBUG)
/*
** Compute a string that describes the P4 parameter for an opcode.
** Use zTemp for any required temporary buffer space.
*/
static char *displayP4(Op *pOp, char *zTemp, int nTemp){
  char *zP4 = zTemp;
  assert( nTemp>=30 );
  switch( pOp->p4type ){
    case P4_KEYINFO_STATIC:
    case P4_KEYINFO: {
      int i, j;
      KeyInfo *pKeyInfo = pOp->p4.pKeyInfo;
      i = sqlite4_snprintf(zTemp, nTemp, "keyinfo(%d", pKeyInfo->nField);
      for(j=0; j<pKeyInfo->nField; j++){
................................................................................
    case P4_INT32: {
      sqlite4_snprintf(zTemp, nTemp, "%d", pOp->p4.i);
      break;
    }
    case P4_REAL: {
      sqlite4_snprintf(zTemp, nTemp, "%.16g", *pOp->p4.pReal);
      break;
    }
    case P4_NUM: {
      sqlite4_num_to_text(*pOp->p4.pNum, zTemp, 0); 
      break;
    }
    case P4_MEM: {
      Mem *pMem = pOp->p4.pMem;
      if( pMem->flags & MEM_Str ){
        zP4 = pMem->z;
      }else if( pMem->flags & (MEM_Int|MEM_Real) ){
        char aOut[30];