[version sqlite-snapshot-201711181730]

I am seeing an error when attempting to insert a row with
SQLITE_DEBUG enabled:

    assertion "0" failed: file "sqlite3.c", line 72132, function: valueFromExpr

Running "PRAGMA vdbe_addoptrace=ON" immediately before the insert
produces the following 

   1 Expire           0    0    0               00 
   2 Halt             0    0    0               00 
   0 Init             0    1    0               00 Start at 1
   1 OpenWrite        0    4    0               00 root=4 iDb=0
   2 NewRowid         0    1    0               00 r[1]=rowid
   3 Variable         1    2    0               00 r[2]=parameter(1,)
   4 Variable         2    3    0               00 r[3]=parameter(2,)
   5 Variable         3    4    0               00 r[4]=parameter(3,)
   6 Variable         4    5    0               00 r[5]=parameter(4,)
   7 Variable         5    6    0               00 r[6]=parameter(5,)
   8 Variable         6    7    0               00 r[7]=parameter(6,)
   9 Variable         7    9    0               00 r[9]=parameter(7,)
  10 Variable         8   10    0               00 r[10]=parameter(8,)
  11 Variable         9   11    0               00 r[11]=parameter(9,)
  12 HaltIfNull    1299    2    2               00 if r[2]=null halt
  13 HaltIfNull    1299    2    3               00 if r[3]=null halt
  14 HaltIfNull    1299    2    4               00 if r[4]=null halt
  15 HaltIfNull    1299    2    5               00 if r[5]=null halt
  16 HaltIfNull    1299    2    6               00 if r[6]=null halt
  17 HaltIfNull    1299    2    7               00 if r[7]=null halt
  18 HaltIfNull    1299    2    9               00 if r[9]=null halt
  19 HaltIfNull    1299    2   10               00 if r[10]=null halt
  20 MakeRecord       2   10   12               00 r[12]=mkrec(r[2..11])
  21 Insert           0   12    1               00 intkey=r[1] data=r[12]
   0 Init             0    1    0               00 Start at 1
CLEAR
PUSH to 1
   1 Param           16    2    0               00 
   2 Param           21    3    0               00 
   3 Param           12    4    0               00 
   4 Param           13    5    0               00 
   5 Param           14    6    0               00 
   6 Param           15    7    0               00 
   7 Param           17    8    0               00 
   8 Param           19    9    0               00 
   9 Param           20   10    0               00 
POP  to 0
  10 Function0      511    2    1               00 r[1]=func(r[2])
CLEAR
  11 OpenWrite        0  111    0               00 root=111 iDb=0
  12 OpenWrite        1  115    0               00 root=115 iDb=0
  13 Param           16   11    0               00 
  14 NotNull         11    0    0               00 if r[11]!=NULL goto 0
  15 NewRowid         0   11    0               00 r[11]=rowid
  16 MustBeInt       11    0    0               00 
  17 SoftNull        12    0    0               00 r[12]=NULL
  18 String8          0   13    0               00 r[13]=''
  19 Param           21   14    0               00 
  20 Param           18   15    0               00 
  21 NotNull         15   -4    0               00 if r[15]!=NULL goto -4
PUSH to 1
PUSH to 2
  22 String8          0   34    0               00 r[34]=''
  23 String8          0   35    0               00 r[35]=''
POP  to 1
  24 Function0        3   34   15               00 r[15]=func(r[34])
POP  to 0
  25 Param           19   16    0               00 
  26 Param           20   17    0               00 
PUSH to 1
  27 String8          0   36    0               00 r[36]=''
  28 Param           20   40    0               00 
  29 Integer       1000   41    0               00 r[41]=1000
  30 Divide          41   40   39               00 r[39]=r[40]/r[41]
  31 NotNull         39   -5    0               00 if r[39]!=NULL goto -5
PUSH to 2
PUSH to 3
  32 String8          0   42    0               00 r[42]=''
  33 String8          0   43    0               00 r[43]=''
  34 String8          0   44    0               00 r[44]=''
POP  to 2
  35 Function0        7   42   41               00 r[41]=func(r[42])
PUSH to 3
  36 String8          0   45    0               00 r[45]=''
  37 String8          0   46    0               00 r[46]=''
POP  to 2
  38 Function0        3   45   40               00 r[40]=func(r[45])
  39 Subtract        40   41   39               00 r[39]=r[41]-r[40]
POP  to 1
  40 Integer       3600   40    0               00 r[40]=3600
  41 Divide          40   39   37               00 r[37]=r[39]/r[40]
  42 Cast            37   68    0               00 affinity(r[37])
PUSH to 2
  43 Param           20   41    0               00 
  44 Integer       1000   48    0               00 r[48]=1000
  45 Divide          48   41   47               00 r[47]=r[41]/r[48]
  46 NotNull         47   -6    0               00 if r[47]!=NULL goto -6
PUSH to 3
PUSH to 4
  47 String8          0   49    0               00 r[49]=''
  48 String8          0   50    0               00 r[50]=''
  49 String8          0   51    0               00 r[51]=''
POP  to 3
  50 Function0        7   49   48               00 r[48]=func(r[49])
PUSH to 4
  51 String8          0   52    0               00 r[52]=''
  52 String8          0   53    0               00 r[53]=''
POP  to 3
  53 Function0        3   52   41               00 r[41]=func(r[52])
  54 Subtract        41   48   47               00 r[47]=r[48]-r[41]
POP  to 2
POP  to 1
  55 Function0        1   47   39               00 r[39]=func(r[47])
PUSH to 2
  56 Param           20   56    0               00 
  57 Integer       1000   57    0               00 r[57]=1000
  58 Divide          57   56   55               00 r[55]=r[56]/r[57]
  59 NotNull         55   -7    0               00 if r[55]!=NULL goto -7
PUSH to 3
PUSH to 4
  60 String8          0   58    0               00 r[58]=''
  61 String8          0   59    0               00 r[59]=''
  62 String8          0   60    0               00 r[60]=''
POP  to 3
  63 Function0        7   58   57               00 r[57]=func(r[58])
PUSH to 4
  64 String8          0   61    0               00 r[61]=''
  65 String8          0   62    0               00 r[62]=''
POP  to 3
  66 Function0        3   61   56               00 r[56]=func(r[61])
  67 Subtract        56   57   55               00 r[55]=r[57]-r[56]
POP  to 2
POP  to 1
  68 Function0        1   55   54               00 r[54]=func(r[55])
  69 Integer       3600   56    0               00 r[56]=3600
  70 Divide          56   54   48               00 r[48]=r[54]/r[56]
  71 Cast            48   68    0               00 affinity(r[48])
  72 Integer       3600   56    0               00 r[56]=3600
  73 Multiply        56   48   41               00 r[41]=r[56]*r[48]
  74 Subtract        41   39   40               00 r[40]=r[39]-r[41]
  75 Integer         60   41    0               00 r[41]=60
  76 Divide          41   40   38               00 r[38]=r[40]/r[41]
POP  to 0
  77 Function0        7   36   18               00 r[18]=func(r[36])
  78 Null             0   19    0               00 r[19]=NULL
  79 Integer         -1   20    0               00 r[20]=-1
  80 Null             0   21    0               00 r[21]=NULL
  81 Param           12   22    0               00 
  82 Param           13   23    0               00 
  83 Param           14   24    0               00 
  84 Param           15   25    0               00 
  85 Null             0   26    0               00 r[26]=NULL
  86 Null             0   27    0               00 r[27]=NULL
  87 Param           17   28    0               00 
  88 Null             0   29    0               00 r[29]=NULL
  89 Null             0   30    0               00 r[30]=NULL
  90 HaltIfNull    1299    2   13               00 if r[13]=null halt
  91 HaltIfNull    1299    2   15               00 if r[15]=null halt
  92 HaltIfNull    1299    2   16               00 if r[16]=null halt
  93 HaltIfNull    1299    2   17               00 if r[17]=null halt
  94 HaltIfNull    1299    2   22               00 if r[22]=null halt
  95 HaltIfNull    1299    2   23               00 if r[23]=null halt
  96 HaltIfNull    1299    2   24               00 if r[24]=null halt
  97 HaltIfNull    1299    2   25               00 if r[25]=null halt
  98 HaltIfNull    1299    2   28               00 if r[28]=null halt
  99 NotNull         20   -9    0               00 if r[20]!=NULL goto -9
PUSH to 1
 100 NotNull         21   -8    0               00 if r[21]!=NULL goto -8
POP  to 0
PUSH to 1
 101 IsNull          20  -10    0               00 if r[20]==NULL goto -10
PUSH to 2
 102 IsNull          21   -8    0               00 if r[21]==NULL goto -8
POP  to 1
POP  to 0
 103 Halt           275    2    0               00 
 104 NotExists        0  -11   11               00 intkey=r[11]
 105 Halt          1555    2    0               00 
 106 Affinity        12   19    0               00 affinity(r[12..30])
 107 Null             0   31    0               00 r[31]=NULL
 108 String8          0   41    0               00 r[41]=''
 109 Eq              41  -12   13               00 if r[13]==r[41] goto -12
 110 SCopy           13   32    0               00 r[32]=r[13]
 111 IntCopy         11   33    0               00 r[33]=r[11]
 112 MakeRecord      32    2   31               00 r[31]=mkrec(r[32..33])
 113 NoConflict       1  -12   32               00 key=r[32]
 114 Halt          2067    2    0               00 
 115 IsNull          14  -13    0               00 if r[14]==NULL goto -13
 116 SCopy           14   41    0               00 r[41]=r[14]
 117 MustBeInt       41    0    0               00 
 118 Eq              11  -13   41               00 if r[41]==r[11] goto -13
 119 OpenRead         2  111    0               00 root=111 iDb=0
 120 NotExists        2    0   41               00 intkey=r[41]
 121 Goto             0  -13    0               00 
 122 FkCounter        0    1    0               00 fkctr[0]+=1
 123 Close            2    0    0               00 
 124 IsNull          20  -14    0               00 if r[20]==NULL goto -14
 125 SCopy           20   41    0               00 r[41]=r[20]
 126 MustBeInt       41    0    0               00 
 127 OpenRead         3  153    0               00 root=153 iDb=0
 128 NotExists        3    0   41               00 intkey=r[41]
 129 Goto             0  -14    0               00 
 130 FkCounter        1    1    0               00 fkctr[1]+=1
 131 Close            3    0    0               00 
 132 FkIfZero         0    0    0               00 if fkctr[0]==0 goto 0

The error looks like it occurs inside a trigger statement. The database
schema is perhaps a bit large for the mailing list, but I'm happy to
email the database directly to the developers if that is useful.

Anything else I can provide to troubleshoot this further?

-- 
Mark Lawrence
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to