Fossil

Check-in [a758144e26]
Login

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

Overview
Comment:The name_to_rid() routine returns record-IDs even if they do not appear in the EVENT table.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a758144e26883464a7e0510c61fb25b965a01196
User & Date: drh 2012-10-15 14:41:21.305
Context
2012-10-15
15:10
Avoid entering a ticket-change artifact that does not specify any changes. check-in: 7097562813 user: drh tags: trunk
14:41
The name_to_rid() routine returns record-IDs even if they do not appear in the EVENT table. check-in: a758144e26 user: drh tags: trunk
14:31
Add a prototype "test-orphans" command. Does not yet work exactly right. check-in: 1ec715ae34 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/name.c.
251
252
253
254
255
256
257



258
259
260
261
262

263
264
265
266
267
268
269
    zTag, zType
  );
  if( rid>0 ) return rid;

  /* Undocumented:  numeric tags get translated directly into the RID */
  for(i=0; fossil_isdigit(zTag[i]); i++){}
  if( zTag[i]==0 ){



    rid = db_int(0, 
      "SELECT event.objid"
      "  FROM event"
      " WHERE event.objid=%s"
      "   AND event.type GLOB '%q'", zTag, zType);

  }
  return rid;
}


/*
** This routine takes a user-entered UUID which might be in mixed







>
>
>
|
|
|
|
|
>







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
    zTag, zType
  );
  if( rid>0 ) return rid;

  /* Undocumented:  numeric tags get translated directly into the RID */
  for(i=0; fossil_isdigit(zTag[i]); i++){}
  if( zTag[i]==0 ){
    if( strcmp(zType,"*")==0 ){
      rid = atoi(zTag);
    }else{
      rid = db_int(0, 
        "SELECT event.objid"
        "  FROM event"
        " WHERE event.objid=%s"
        "   AND event.type GLOB '%q'", zTag, zType);
    }
  }
  return rid;
}


/*
** This routine takes a user-entered UUID which might be in mixed