1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Do not all REPLACE to sneak a NULL value into a NOT NULL column. Detect that

situation and ABORT instead.  Fix for ticket [e6f1f2e34dceeb1ed61531c7e98].

FossilOrigin-Name: db8d1d12f5c1673404b2afb5426d5ea3afe3b69d01f8f2bc47ffdf70684fdf24
This commit is contained in:
drh
2018-12-22 01:13:25 +00:00
parent a42325e731
commit 9bfb079409
5 changed files with 40 additions and 21 deletions

View File

@@ -2112,7 +2112,9 @@ int sqlite3ExprIsInteger(Expr *p, int *pValue){
*/
int sqlite3ExprCanBeNull(const Expr *p){
u8 op;
while( p->op==TK_UPLUS || p->op==TK_UMINUS ){ p = p->pLeft; }
while( p->op==TK_UPLUS || p->op==TK_UMINUS ){
p = p->pLeft;
}
op = p->op;
if( op==TK_REGISTER ) op = p->op2;
switch( op ){