SQLite

Check-in [b1e6c02f8b]
Login

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

Overview
Comment:Fix a typo in a requirements mark on the abs() SQL function.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b1e6c02f8b9a2afaa12ac15a33e3f698c3be27d6
User & Date: drh 2014-11-20 23:21:23.554
Context
2014-11-22
12:22
Remove a redundant test case (probably a copy/paste error). Add an assert() to where.c to ensure that automatic indexes do not have there output row counts adjusted downward by supplementary constraints. (check-in: eea4793349 user: drh tags: trunk)
2014-11-21
14:37
Merge latest trunk changes with this branch. (check-in: 7ef44c5b5b user: dan tags: ota-update)
2014-11-20
23:21
Fix a typo in a requirements mark on the abs() SQL function. (check-in: b1e6c02f8b user: drh tags: trunk)
23:11
Fix a benign test error on PRAGMA collation_list introduced by a recent checkin. (check-in: 332cc9591d user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/func.c.
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
      /* IMP: R-37434-19929 Abs(X) returns NULL if X is NULL. */
      sqlite3_result_null(context);
      break;
    }
    default: {
      /* Because sqlite3_value_double() returns 0.0 if the argument is not
      ** something that can be converted into a number, we have:
      ** IMP: R-57326-31541 Abs(X) return 0.0 if X is a string or blob that
      ** cannot be converted to a numeric value. 
      */
      double rVal = sqlite3_value_double(argv[0]);
      if( rVal<0 ) rVal = -rVal;
      sqlite3_result_double(context, rVal);
      break;
    }
  }







|
|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
      /* IMP: R-37434-19929 Abs(X) returns NULL if X is NULL. */
      sqlite3_result_null(context);
      break;
    }
    default: {
      /* Because sqlite3_value_double() returns 0.0 if the argument is not
      ** something that can be converted into a number, we have:
      ** IMP: R-01992-00519 Abs(X) returns 0.0 if X is a string or blob
      ** that cannot be converted to a numeric value.
      */
      double rVal = sqlite3_value_double(argv[0]);
      if( rVal<0 ) rVal = -rVal;
      sqlite3_result_double(context, rVal);
      break;
    }
  }