extern struct query Queries[];
/* Put this in a variable so that we can patch it if necessary */
-int max_row_count = 4096;
+int max_row_count = 8192;
int mr_verify_query(client *cl, struct query *q, int argc, char *argv_ro[]);
int do_retrieve(struct query *q, char *pqual,
while (*fmt)
{
- if (!like && !arg)
+
+ if ((!like && !arg) || argc == 0)
{
/* only plain text remains */
strcpy(res, fmt);
if (*fr)
return MR_ARG_TOO_LONG;
*to = '\0';
-
- if (to > Argv[i] && *--to == '\\')
- return MR_BAD_CHAR;
}
- /* check initial query access, unless we're acting as a proxy */
- if (!cl->proxy_id)
- {
- status = check_query_access(q, Argv, cl);
- if (status != MR_SUCCESS && status != MR_PERM)
- return status;
- if (status == MR_SUCCESS)
- privileged++;
- }
+ /* Check initial query access. If we're acting as a proxy, only allow
+ * access if the query has "default" as a capacl.
+ */
+ status = check_query_access(q, Argv, cl);
+ if (status != MR_SUCCESS && status != MR_PERM)
+ return status;
+ if (status == MR_SUCCESS && (!cl->proxy_id || q->everybody))
+ privileged++;
/* validate arguments */
if (v && v->valobj)
}
EXEC SQL SELECT string_id INTO :j FROM strings WHERE string = :iname;
break;
+ case CONTAINERS_TABLE:
+ EXEC SQL SELECT cnt_id INTO :j FROM containers WHERE LOWER(name) =
+ LOWER(:iname);
+ break;
default:
return MR_INTERNAL;
}
case STRINGS_TABLE:
EXEC SQL SELECT string INTO :iname FROM strings WHERE string_id = :j;
break;
+ case CONTAINERS_TABLE:
+ EXEC SQL SELECT name INTO :iname FROM containers WHERE cnt_id = :j;
+ break;
default:
return MR_INTERNAL;
}