Please send a test case. You can send it directly to me at
d...@sqlite.org if you like.
On 11/27/17, no...@null.net wrote:
> [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 000 00
>2 Halt 000 00
>0 Init 010 00 Start at 1
>1 OpenWrite040 00 root=4 iDb=0
>2 NewRowid 010 00 r[1]=rowid
>3 Variable 120 00 r[2]=parameter(1,)
>4 Variable 230 00 r[3]=parameter(2,)
>5 Variable 340 00 r[4]=parameter(3,)
>6 Variable 450 00 r[5]=parameter(4,)
>7 Variable 560 00 r[6]=parameter(5,)
>8 Variable 670 00 r[7]=parameter(6,)
>9 Variable 790 00 r[9]=parameter(7,)
> 10 Variable 8 100 00 r[10]=parameter(8,)
> 11 Variable 9 110 00 r[11]=parameter(9,)
> 12 HaltIfNull129922 00 if r[2]=null halt
> 13 HaltIfNull129923 00 if r[3]=null halt
> 14 HaltIfNull129924 00 if r[4]=null halt
> 15 HaltIfNull129925 00 if r[5]=null halt
> 16 HaltIfNull129926 00 if r[6]=null halt
> 17 HaltIfNull129927 00 if r[7]=null halt
> 18 HaltIfNull129929 00 if r[9]=null halt
> 19 HaltIfNull12992 10 00 if r[10]=null halt
> 20 MakeRecord 2 10 12 00 r[12]=mkrec(r[2..11])
> 21 Insert 0 121 00 intkey=r[1] data=r[12]
>0 Init 010 00 Start at 1
> CLEAR
> PUSH to 1
>1 Param 1620 00
>2 Param 2130 00
>3 Param 1240 00
>4 Param 1350 00
>5 Param 1460 00
>6 Param 1570 00
>7 Param 1780 00
>8 Param 1990 00
>9 Param 20 100 00
> POP to 0
> 10 Function0 51121 00 r[1]=func(r[2])
> CLEAR
> 11 OpenWrite0 1110 00 root=111 iDb=0
> 12 OpenWrite1 1150 00 root=115 iDb=0
> 13 Param 16 110 00
> 14 NotNull 1100 00 if r[11]!=NULL goto 0
> 15 NewRowid 0 110 00 r[11]=rowid
> 16 MustBeInt 1100 00
> 17 SoftNull1200 00 r[12]=NULL
> 18 String8 0 130 00 r[13]=''
> 19 Param 21 140 00
> 20 Param 18 150 00
> 21 NotNull 15 -40 00 if r[15]!=NULL goto -4
> PUSH to 1
> PUSH to 2
> 22 String8 0 340 00 r[34]=''
> 23 String8 0 350 00 r[35]=''
> POP to 1
> 24 Function03 34 15 00 r[15]=func(r[34])
> POP to 0
> 25 Param 19 160 00
> 26 Param 20 170 00
> PUSH to 1
> 27 String8 0 360 00 r[36]=''
> 28 Param 20 400 00
> 29 Integer 1000 410 00 r[41]=1000
> 30 Divide 41 40 39 00 r[39]=r[40]/r[41]
> 31 NotNull 39 -50 00 if r[39]!=NULL goto -5
> PUSH to 2
> PUSH to 3
> 32 String8 0 420 00 r[42]=''
> 33 String8 0 430 00 r[43]=''
> 34 String8 0 440 00 r[44]=''
> POP to 2
> 35 Function07 42 41 00 r[41]=func(r[42])
> PUSH to 3
> 36 String8 0 450 00 r[45]=''
> 37 String8 0 460 00 r[46]=''
> POP to 2
> 38 Function03 45 40 00 r[40]=func(r[45])
> 39 Subtract40 41 39 00 r[39]=r[41]-r[40]
> POP to 1
> 40 Integer 3600 400 00 r[40]=3600
> 41 Divide 40 39 37 00 r[37]=r[39]/r[40]
> 42 Cast37 680 00 affinity(r[37])
> PUSH to 2
> 43 Param 20 410 00
>