Displaying 7 results from an estimated 7 matches for "str_append_str".
2004 Dec 06
0
[PATCH] passdb cache fixes
...ecot-1.0-test55.vanilla/src/auth/mech.c 2004-12-04 18:07:56.000000000 +0300
+++ dovecot-1.0-test55/src/auth/mech.c 2004-12-04 18:14:01.000000000 +0300
@@ -258,7 +258,8 @@ void auth_request_extra_finish(struct au
if (passdb_cache != NULL && cache_key != NULL) {
str = t_str_new(64);
- str_append_str(str, extra->str);
+ if (extra->str != NULL)
+ str_append_str(str, extra->str);
if (extra->request->no_failure_delay) {
if (str_len(str) > 0)
str_append_c(str, '\t');
@@ -266,7 +267,8 @@ void auth_request_extra_finish(struct au
}
auth_cache_insert(passd...
2019 May 19
3
Dict issue with PostgreSQL for last_login plugin (duplicate key)
On 19/05/2019 20:31, mabi via dovecot wrote:
>
> ??????? Original Message ???????
> On Sunday, May 19, 2019 7:36 PM, John Fawcett via dovecot
> <dovecot at dovecot.org> wrote:
>>
>> Attached is a tentative patch. I've verified no regression for mysql.
>> There should be no regression for sqlite as the code path is identical.
>>
>> Are you able to
2019 May 19
0
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...plicate_key = strcmp(driver->name, "mysql") == 0;
+ dict->has_on_conflict_do_update = strcmp(driver->name, "pgsql") == 0;
if (sql_db_cache_new(dict_sql_db_cache, &sql_set, &dict->db, error_r) < 0) {
pool_unref(&pool);
@@ -1108,12 +1110,15 @@
str_append_str(prefix, suffix);
str_append_c(prefix, ')');
- if (!dict->has_on_duplicate_key) {
+ if (dict->has_on_duplicate_key ) {
+ str_append(prefix, " ON DUPLICATE KEY UPDATE ");
+ } else if(dict->has_on_conflict_do_update) {
+ str_append(prefix, " ON CONFLICT DO UPDATE S...
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
On 19/05/2019 16:25, John Fawcett via dovecot wrote:
> INSERT INTO last_logins (last_login,username,domain) VALUES (1558273000,'user at domain.tld','domain.tld')
I don't have PostgresSql, would you be able to verify if this syntax would work:
INSERT INTO last_logins (last_login,username,domain) VALUES (1558273000,'user at domain.tld','domain.tld')
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...plicate_key = strcmp(driver->name, "mysql") == 0;
+ dict->has_on_conflict_do_update = strcmp(driver->name, "pgsql") == 0;
if (sql_db_cache_new(dict_sql_db_cache, &sql_set, &dict->db, error_r) < 0) {
pool_unref(&pool);
@@ -1108,12 +1110,15 @@
str_append_str(prefix, suffix);
str_append_c(prefix, ')');
- if (!dict->has_on_duplicate_key) {
+ if (dict->has_on_duplicate_key ) {
+ str_append(prefix, " ON DUPLICATE KEY UPDATE ");
+ } else if(dict->has_on_conflict_do_update) {
+ str_printfa(prefix, " ON CONFLICT (%s) DO UP...
2019 May 19
4
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...plicate_key = strcmp(driver->name, "mysql") == 0;
+ dict->has_on_conflict_do_update = strcmp(driver->name, "pgsql") == 0;
if (sql_db_cache_new(dict_sql_db_cache, &sql_set, &dict->db, error_r) < 0) {
pool_unref(&pool);
@@ -1108,12 +1110,15 @@
str_append_str(prefix, suffix);
str_append_c(prefix, ')');
- if (!dict->has_on_duplicate_key) {
+ if (dict->has_on_duplicate_key ) {
+ str_append(prefix, " ON DUPLICATE KEY UPDATE ");
+ } else if(dict->has_on_conflict_do_update) {
+ str_printfa(prefix, " ON CONFLICT ON CONSTRA...
2010 Apr 09
4
Patch: support URLAUTH, BURL, CATENATE
...t;fetch_ctx->urlfetched) {
+ // found no mail with that uid
+ // HERE - probably should send BAD response instead
+ if (ufctx->debug)
+ i_info("URLFETCH: \"%s\" failed: UID not found",
+ ufctx->url);
+ i_assert(str_len(ufctx->response) == 0);
+ str_append_str(ufctx->response,
+ ufctx->fetch_ctx->cur_str);
+ str_append(ufctx->response, " NIL");
+ }
+ if (imap_fetch_deinit(ufctx->fetch_ctx) < 0)
+ ufctx->fetch_ctx->failed = TRUE;
+ if (ufctx->fetch_ctx->failed)
+ ufctx->failed = TRUE;
+ ufctx-...