Hi,

take the following SQL statement:

UPDATE tableA SET column1=(SELECT column2 FROM tableB WHERE function1(column3) 
< 1 ORDER BY function1(column3) LIMIT 1);

Actually, this statement does not make sense because the ORDER BY expression 
does not fulfill the requirements of an ORDER BY expression. I wrote it by 
mistake.

Interestingly SQLite only crashes if function1 is a user supplied function 
(using sqlite3_create_function). I tried the same with the core abs() function 
but then SQLite works.
I am using SQLite 3.7.2 and the crash occurs here:

case OP_Real: {            /* same as TK_FLOAT, out2-prerelease */
  pOut->flags = MEM_Real;
  assert( !sqlite3IsNaN(*pOp->p4.pReal) ); <-- crashes here because of invalid 
pointer to p4
  pOut->r = *pOp->p4.pReal;
  break;
}


Hartwig

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

Reply via email to