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

Get the "DEFAULT true" and "DEFAULT false" phrases working correctly in

CREATE TABLE.

FossilOrigin-Name: 8002f87d96b3f885cd208e7d204907a33ba60c4057ce2338b71e2de41215b0e5
This commit is contained in:
drh
2018-02-26 20:15:54 +00:00
parent 3432821192
commit 171d16bb21
7 changed files with 54 additions and 16 deletions

View File

@@ -432,15 +432,13 @@ static int lookupName(
** fields are not changed in any context.
*/
if( cnt==0 && zTab==0 ){
assert( pExpr->op==TK_ID );
if( ExprHasProperty(pExpr,EP_DblQuoted) ){
pExpr->op = TK_STRING;
pExpr->pTab = 0;
return WRC_Prune;
}
if( sqlite3StrICmp(zCol, "true")==0 || sqlite3StrICmp(zCol, "false")==0 ){
pExpr->op = TK_TRUEFALSE;
pExpr->iTable = zCol[4]==0;
pExpr->pTab = 0;
if( sqlite3ExprIdToTrueFalse(pExpr) ){
return WRC_Prune;
}
}