/ Check-in [b141bae3f6]
Login

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

Overview
Comment:Remove code in the round() SQL function that became unreachable due to the optimization of check-in [e95138f5f4febde5]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b141bae3f6d16c0ebb59dac9b02086a4370839e71ade34004f647b09b1083d1d
User & Date: drh 2019-06-07 22:51:13
Context
2019-06-10
13:46
Do not attempt the LIKE optimization on a column with numeric affinity if the rhs of the operator begins with whitespace. Fix for ticket [fd76310a5e]. check-in: 94b58ab059 user: dan tags: trunk
2019-06-07
22:51
Remove code in the round() SQL function that became unreachable due to the optimization of check-in [e95138f5f4febde5] check-in: b141bae3f6 user: drh tags: trunk
22:26
When casting string values into numeric and the string has a prefix that looks like a number but total string is not a well-formed number, then take extra care that the result is either integer or real depending on what the prefix looks like. Fix for tickets [e8bedb2a184001] and [4c2d7639f076aa]. check-in: 67a68af557 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/func.c.

   393    393       r = (double)((sqlite_int64)(r+(r<0?-0.5:+0.5)));
   394    394     }else{
   395    395       zBuf = sqlite3_mprintf("%.*f",n,r);
   396    396       if( zBuf==0 ){
   397    397         sqlite3_result_error_nomem(context);
   398    398         return;
   399    399       }
   400         -    if( sqlite3AtoF(zBuf, &r, sqlite3Strlen30(zBuf), SQLITE_UTF8)<=0 ){
   401         -      assert( sqlite3_strglob("*Inf", zBuf)==0 );
   402         -      r = zBuf[0]=='-' ? -HUGE_VAL : +HUGE_VAL;
   403         -    } 
          400  +    sqlite3AtoF(zBuf, &r, sqlite3Strlen30(zBuf), SQLITE_UTF8);
   404    401       sqlite3_free(zBuf);
   405    402     }
   406    403     sqlite3_result_double(context, r);
   407    404   }
   408    405   #endif
   409    406   
   410    407   /*