aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-10-04 15:30:21 +0000
committerdrh <drh@noemail.net>2013-10-04 15:30:21 +0000
commitfdaac671b8004ee478961ec6a22db4ffa4eaaab2 (patch)
tree0738ea0f6fb6912cf49bc5e4cc37070cbe7d2ab5 /src/expr.c
parentd9e3cad2f8d1f8cad8d4925daff5248b9964ba18 (diff)
downloadsqlite-fdaac671b8004ee478961ec6a22db4ffa4eaaab2.tar.gz
sqlite-fdaac671b8004ee478961ec6a22db4ffa4eaaab2.zip
Improved estimates of the relative speed of index scans based on declared
datatypes of columns in the table. Add "r" column to PRAGMA index_info, showing the estimated relative scan rate. FossilOrigin-Name: 07462bb6059f023c22a6c84a4a02afbd84e69255
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c
index b8b0eb731..eb2f54563 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -41,7 +41,7 @@ char sqlite3ExprAffinity(Expr *pExpr){
#ifndef SQLITE_OMIT_CAST
if( op==TK_CAST ){
assert( !ExprHasProperty(pExpr, EP_IntValue) );
- return sqlite3AffinityType(pExpr->u.zToken);
+ return sqlite3AffinityType(pExpr->u.zToken, 0);
}
#endif
if( (op==TK_AGG_COLUMN || op==TK_COLUMN || op==TK_REGISTER)
@@ -2461,7 +2461,7 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
int aff, to_op;
inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
assert( !ExprHasProperty(pExpr, EP_IntValue) );
- aff = sqlite3AffinityType(pExpr->u.zToken);
+ aff = sqlite3AffinityType(pExpr->u.zToken, 0);
to_op = aff - SQLITE_AFF_TEXT + OP_ToText;
assert( to_op==OP_ToText || aff!=SQLITE_AFF_TEXT );
assert( to_op==OP_ToBlob || aff!=SQLITE_AFF_NONE );
@@ -3128,7 +3128,7 @@ void sqlite3ExplainExpr(Vdbe *pOut, Expr *pExpr){
case TK_CAST: {
/* Expressions of the form: CAST(pLeft AS token) */
const char *zAff = "unk";
- switch( sqlite3AffinityType(pExpr->u.zToken) ){
+ switch( sqlite3AffinityType(pExpr->u.zToken, 0) ){
case SQLITE_AFF_TEXT: zAff = "TEXT"; break;
case SQLITE_AFF_NONE: zAff = "NONE"; break;
case SQLITE_AFF_NUMERIC: zAff = "NUMERIC"; break;