SQLite

Changes On Branch tkt-55746f9e
Login

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

Changes In Branch tkt-55746f9e Excluding Merge-Ins

This is equivalent to a diff from 1a0d7d3d to f03fbf37

2014-05-07
18:23
Make sure the group_concat() function returns an empty string, not a NULL, if it has at least one input row. Fix for ticket [55746f9e65f8587]. (check-in: d01cedaa user: drh tags: trunk)
18:21
Ensure that the sqlite3StrAccumAppend() routine is never called with a NULL second argument. Doing so is harmless when N==0, but it causes an assert() to fail that was placed to quiet static analyzers. (Closed-Leaf check-in: f03fbf37 user: drh tags: tkt-55746f9e)
17:19
Make sure the group_concat() function returns an empty string, not a NULL, if it has at least one input row. Fix for ticket [55746f9e65f8587]. (check-in: 0deac873 user: drh tags: tkt-55746f9e)
15:46
Add the SQLITE_IOCAP_IMMUTABLE bit as a possible return value from the xDeviceCharacteristics method in the VFS. Add the "nolock" and "immutable" query parameters to URI filenames. (check-in: 1a0d7d3d user: drh tags: trunk)
15:32
Fix nolock and immutable so that they work even if READONLY is requested. (Closed-Leaf check-in: e193aced user: drh tags: win32-none)
2014-05-06
21:37
Update the template VSIX package file as well. (check-in: 99d96765 user: mistachkin tags: trunk)

Changes to src/func.c.

1537
1538
1539
1540
1541
1542
1543

1544


1545
1546
1547
1548
1549
1550
1551
1537
1538
1539
1540
1541
1542
1543
1544

1545
1546
1547
1548
1549
1550
1551
1552
1553







+
-
+
+







        zSep = ",";
        nSep = 1;
      }
      if( nSep ) sqlite3StrAccumAppend(pAccum, zSep, nSep);
    }
    zVal = (char*)sqlite3_value_text(argv[0]);
    nVal = sqlite3_value_bytes(argv[0]);
    if( nVal || (zVal="", firstTerm) ){
    if( nVal ) sqlite3StrAccumAppend(pAccum, zVal, nVal);
      sqlite3StrAccumAppend(pAccum, zVal, nVal);
    }
  }
}
static void groupConcatFinalize(sqlite3_context *context){
  StrAccum *pAccum;
  pAccum = sqlite3_aggregate_context(context, 0);
  if( pAccum ){
    if( pAccum->accError==STRACCUM_TOOBIG ){

Changes to test/func.test.

1190
1191
1192
1193
1194
1195
1196












1197
1198
1199
1200
1201
1202
1203
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215







+
+
+
+
+
+
+
+
+
+
+
+







} {software}
do_test func-24.12 {
  execsql {
    SELECT group_concat(CASE t1 WHEN 'this' THEN ''
                          WHEN 'program' THEN null ELSE t1 END) FROM tbl1
  }
} {,is,free,software}
# Tests to verify ticket http://www.sqlite.org/src/tktview/55746f9e65f8587c0
do_test func-24.13 {
  execsql {
    SELECT typeof(group_concat(x)) FROM (SELECT '' AS x);
  }
} {text}
do_test func-24.14 {
  execsql {
    SELECT typeof(group_concat(x,''))
      FROM (SELECT '' AS x UNION ALL SELECT '');
  }
} {text}


# Use the test_isolation function to make sure that type conversions
# on function arguments do not effect subsequent arguments.
#
do_test func-25.1 {
  execsql {SELECT test_isolation(t1,t1) FROM tbl1}