/ Check-in [2467eb68]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sure that sqlite3ValueFromExpr() sets the "type" field of the sqlite3_value object correctly when the value is a floating point number.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2467eb68ace46f6185fd14758446a5c887caffe3
User & Date: drh 2009-08-19 22:14:17
Context
2009-08-20
02:34
All the sqlite3GetCollSeq() function to specify an arbitrary text encoding. (check-in: 4ee44322 user: drh tags: trunk)
2009-08-19
22:14
Make sure that sqlite3ValueFromExpr() sets the "type" field of the sqlite3_value object correctly when the value is a floating point number. (check-in: 2467eb68 user: drh tags: trunk)
17:17
Change the way an Expr that has been converted to TK_REGISTER stores its original opcode. The previous method, overloading Expr.iColumn, did not work in all cases. (check-in: 71ea9d0e user: dan tags: trunk)
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbemem.c.

  1008   1008       if( pVal==0 ) goto no_mem;
  1009   1009       if( ExprHasProperty(pExpr, EP_IntValue) ){
  1010   1010         sqlite3VdbeMemSetInt64(pVal, (i64)pExpr->u.iValue);
  1011   1011       }else{
  1012   1012         zVal = sqlite3DbStrDup(db, pExpr->u.zToken);
  1013   1013         if( zVal==0 ) goto no_mem;
  1014   1014         sqlite3ValueSetStr(pVal, -1, zVal, SQLITE_UTF8, SQLITE_DYNAMIC);
         1015  +      if( op==TK_FLOAT ) pVal->type = SQLITE_FLOAT;
  1015   1016       }
  1016   1017       if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_NONE ){
  1017   1018         sqlite3ValueApplyAffinity(pVal, SQLITE_AFF_NUMERIC, SQLITE_UTF8);
  1018   1019       }else{
  1019   1020         sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
  1020   1021       }
  1021   1022       if( enc!=SQLITE_UTF8 ){