pkg

Check-in [1339d6ff08]
Login

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

Overview
Comment:Do not use '||' in WHERE clauses.
Timelines: family | ancestors | descendants | both | trunk | gsoc2013
Files: files | file ages | folders
SHA1: 1339d6ff08a20aa1e9ac42be0439d49a4fd5f0b2
User & Date: vsevolod@highsecure.ru 2014-06-11 22:54:17
Context
2014-06-12
08:59
Fix misprint. Pointed by: infracaninophile check-in: a108fb1b18 user: vsevolod@highsecure.ru tags: trunk, gsoc2013
2014-06-11
22:54
Do not use '||' in WHERE clauses. check-in: 1339d6ff08 user: vsevolod@highsecure.ru tags: trunk, gsoc2013
18:26
pkg check -d: Fix double locking errors Rather than lock/release in fix_deps, let the caller handle the upgrade on the lock it already holds. Rather than releasing the lock completely after each action just downgrade it to ADVISORY again so that the next action can upgrade it again. This is mostly noticeable when passing multiple patterns to pkg-check. check-in: c6280bd2b6 user: bryan@shatow.net tags: trunk, gsoc2013
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to libpkg/pkgdb.c.

1926
1927
1928
1929
1930
1931
1932
1933

1934
1935
1936
1937
1938

1939
1940
1941
1942
1943
1944
1945
	const char	*uniqueid;
	const char	*reponame = NULL;
	char		 sql[BUFSIZ];
	const char	*mainsql = ""
		"SELECT p.name, p.origin, p.version, p.locked "
		"FROM main.packages AS p "
		"INNER JOIN main.deps AS d ON p.id = d.package_id "
		"WHERE d.name || '~' || d.origin = ?1;";

	const char	*reposql = ""
		"SELECT p.name, p.origin, p.version, 0 "
		"FROM %Q.packages AS p "
		"INNER JOIN %Q.deps AS d ON p.id = d.package_id "
		"WHERE d.name || '~' || d.origin = ?1;";


	assert(db != NULL && pkg != NULL);

	if (pkg->flags & PKG_LOAD_RDEPS)
		return (EPKG_OK);

	if (pkg->type == PKG_REMOTE) {







|
>




|
>







1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
	const char	*uniqueid;
	const char	*reponame = NULL;
	char		 sql[BUFSIZ];
	const char	*mainsql = ""
		"SELECT p.name, p.origin, p.version, p.locked "
		"FROM main.packages AS p "
		"INNER JOIN main.deps AS d ON p.id = d.package_id "
		"WHERE WHERE d.name = SPLIT_UID('name', ?1) AND "
		"d.origin = SPLIT_UID('origin', ?1);";
	const char	*reposql = ""
		"SELECT p.name, p.origin, p.version, 0 "
		"FROM %Q.packages AS p "
		"INNER JOIN %Q.deps AS d ON p.id = d.package_id "
		"WHERE d.name = SPLIT_UID('name', ?1) AND "
		"d.origin = SPLIT_UID('origin', ?1);";

	assert(db != NULL && pkg != NULL);

	if (pkg->flags & PKG_LOAD_RDEPS)
		return (EPKG_OK);

	if (pkg->type == PKG_REMOTE) {