Lines Matching refs:buildid

167   "        buildid integer not null,\n"
173 " foreign key (buildid) references " BUILDIDS "_buildids(id) on update cascade on delete cascade,\n"
174 " primary key (buildid, file, mtime)\n"
179 " buildid integer not null,\n"
185 " foreign key (buildid) references " BUILDIDS "_buildids(id) on update cascade on delete cascade,\n"
186 " primary key (buildid, artifactsrc, file, mtime)\n"
189 " buildid integer not null,\n"
197 " foreign key (buildid) references " BUILDIDS "_buildids(id) on update cascade on delete cascade,\n"
198 " primary key (buildid, debuginfo_p, executable_p, file, content, mtime)\n"
203 " buildid integer not null,\n"
206 " foreign key (buildid) references " BUILDIDS "_buildids(id) on update cascade on delete cascade,\n"
207 " primary key (buildid, artifactsrc)\n"
220 " b.hex as buildid, n.mtime, 'F' as sourcetype, f0.name as source0, n.mtime as mtime, null as source1\n"
222 " where b.id = n.buildid and f0.id = n.file and n.debuginfo_p = 1\n"
224 " b.hex as buildid, n.mtime, 'R' as sourcetype, f0.name as source0, n.mtime as mtime, f1.name as source1\n"
226 " where b.id = n.buildid and f0.id = n.file and f1.id = n.content and n.debuginfo_p = 1\n"
231 " b.hex as buildid, n.mtime, 'F' as sourcetype, f0.name as source0, n.mtime as mtime, null as source1\n"
233 " where b.id = n.buildid and f0.id = n.file and n.executable_p = 1\n"
235 " b.hex as buildid, n.mtime, 'R' as sourcetype, f0.name as source0, n.mtime as mtime, f1.name as source1\n"
237 " where b.id = n.buildid and f0.id = n.file and f1.id = n.content and n.executable_p = 1\n"
242 " b.hex as buildid, fs.name as artifactsrc, 'F' as sourcetype, f0.name as source0, n.mtime as mtime, null as source1, null as source0ref\n"
244 " where b.id = n.buildid and f0.id = n.file and fs.id = n.artifactsrc\n"
246 " b.hex as buildid, f1.name as artifactsrc, 'R' as sourcetype, f0.name as source0, sd.mtime as mtime, f1.name as source1, fsref.name as source0ref\n"
249 " where b.id = sr.buildid and f0.id = sd.file and fsref.id = sde.file and f1.id = sd.content\n"
250 " and sr.artifactsrc = sd.content and sde.buildid = sr.buildid\n"
319 // buildids2: normalized buildid and filenames into interning tables;
324 // buildids1: made buildid and artifacttype NULLable, to represent cached-negative
325 // lookups from sources, e.g. files or rpms that contain no buildid-indexable content
2108 const string& buildid /* unsafe */,
2140 // validate buildid
2141 if ((buildid.size() < 2) || // not empty
2142 (buildid.size() % 2) || // even number
2143 (buildid.find_first_not_of("0123456789abcdef") != string::npos)) // pure tasty lowercase hex
2144 throw reportable_exception("invalid buildid");
2147 obatched(clog) << "searching for buildid=" << buildid << " artifacttype=" << artifacttype
2159 "select mtime, sourcetype, source0, source1 from " BUILDIDS "_query_d where buildid = ? "
2162 pp->bind(1, buildid);
2167 "select mtime, sourcetype, source0, source1 from " BUILDIDS "_query_e where buildid = ? "
2170 pp->bind(1, buildid);
2179 "select mtime, sourcetype, source0, source1 from " BUILDIDS "_query_s where buildid = ? and artifactsrc in (?,?) "
2182 pp->bind(1, buildid);
2191 "select mtime, sourcetype, source0, source1, 1 as debug_p from " BUILDIDS "_query_d where buildid = ? "
2193 "select mtime, sourcetype, source0, source1, 0 as debug_p from " BUILDIDS "_query_e where buildid = ? "
2196 pp->bind(1, buildid);
2197 pp->bind(2, buildid);
2311 (const unsigned char*) buildid.c_str(),
2315 (const unsigned char*) buildid.c_str(),
2319 (const unsigned char*) buildid.c_str(),
2323 (const unsigned char*) buildid.c_str(),
2600 if (slash1 != string::npos && url1 == "/buildid")
2605 add_metric ("thread_busy", "role", "http-buildid-after-you", 1);
2607 (void) pthread_setname_np (pthread_self(), "mhd-buildid-after-you");
2615 add_metric ("thread_busy", "role", "http-buildid-after-you", -1);
2617 tmp_inc_metric m ("thread_busy", "role", "http-buildid");
2619 (void) pthread_setname_np (pthread_self(), "mhd-buildid");
2623 throw reportable_exception("/buildid/ webapi error, need buildid");
2625 string buildid = url_copy.substr(slash1+1, slash2-slash1-1);
2642 r = handle_buildid(connection, buildid, artifacttype, suffix, &fd);
2742 string buildid;
2746 buildid += "0123456789abcdef"[build_id_bytes[idx] >> 4];
2747 buildid += "0123456789abcdef"[build_id_bytes[idx] & 0xf];
2751 obatched(clog) << "Need altdebug buildid=" << buildid << endl;
2764 r = handle_buildid (0, buildid, artifacttype, "", &alt_fd);
2793 obatched(clog) << "Resolved altdebug buildid=" << buildid << endl;
2799 obatched(clog) << "Unresolved altdebug buildid=" << buildid << endl;
2893 elf_classify (int fd, bool &executable_p, bool &debuginfo_p, string &buildid, set<string>& debug_sourcefiles)
2930 buildid += "0123456789abcdef"[build_id_bytes[idx] >> 4];
2931 buildid += "0123456789abcdef"[build_id_bytes[idx] & 0xf];
3052 // (so is stored with buildid=NULL)
3059 string buildid;
3066 elf_classify (fd, executable_p, debuginfo_p, buildid, sourcefiles);
3091 if (buildid == "")
3093 // no point storing an elf file without buildid
3102 .bind(1, buildid)
3114 .bind(1, buildid)
3126 if (sourcefiles.size() && buildid != "")
3145 obatched(clog) << "recorded buildid=" << buildid << " file=" << srps
3169 .bind(1, buildid)
3187 obatched(clog) << "recorded buildid=" << buildid << " file=" << rps
3295 string buildid;
3297 elf_classify (fd, executable_p, debuginfo_p, buildid, sourcefiles);
3300 if (buildid != "") // intern buildid
3304 .bind(1, buildid)
3347 .bind(1, buildid)
3364 .bind(1, buildid)
3384 obatched(clog) << "recorded buildid=" << buildid << " rpm=" << rps << " file=" << fn
3427 // (so is stored with buildid=NULL)
3508 "(buildid, debuginfo_p, executable_p, file, mtime) "
3514 "(buildid, artifactsrc, file, mtime) "
3527 sqlite_ps ps_r_upsert_buildids (db, "rpm-buildid-intern", "insert or ignore into " BUILDIDS "_buildids VALUES (NULL, ?);");
3530 "insert or ignore into " BUILDIDS "_r_de (buildid, debuginfo_p, executable_p, file, mtime, content) values ("
3535 "insert or ignore into " BUILDIDS "_r_sref (buildid, artifactsrc) values ("
3672 the buildid database does not have relative path
3938 "where not exists (select 1 from " BUILDIDS "_f_de d where " BUILDIDS "_buildids.id = d.buildid) "
3939 "and not exists (select 1 from " BUILDIDS "_r_de d where " BUILDIDS "_buildids.id = d.buildid)");