History log of /dovecot/src/lib-sql/sql-api-private.h
Revision Date Author Comments Expand
9f0fc74e3387d3e496fb0c8f77633e27e48cc1ff 08-Sep-2017 Timo Sirainen <timo.sirainen@dovecot.fi>

lib-sql: Add support for prepared SQL statements. This initial implementation doesn't use prepared statements in drivers, but simply generates the query string internally.

402f9bcf48cbccc17fdb5f3ea411a7967aed0fd0 17-Jul-2017 Timo Sirainen <timo.sirainen@dovecot.fi>

lib-sql: Add API support for asynchronously iterating over rows. sql_query() can already do an async lookup, but the full result needs to be available immediately. This can be inefficient for large results. Add a new SQL_RESULT_NEXT_MORE return value and sql_result_more() for asynchronously requesting more results. This changes the API a bit, but isn't done by default by any drivers yet. Also callers that can't handle this are hopefully checking for "ret < 0", which allows them to handle such an async-more request as an error instead. sql_result_next_row() will be changed to return enum in a separate commit to keep backwards compatibility in v2.2.x.

1601169d6f6004e0656238ed7691c16f3aab61aa 17-Jul-2016 Timo Sirainen <timo.sirainen@dovecot.fi>

lib-sql: Added sql_result_get_error_type(). For now the only special error type is SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN.

0dffa25d211be541ee3c953b23566a1a990789df 06-Jun-2016 Timo Sirainen <timo.sirainen@dovecot.fi>

global: unsigned int:1 -> bool:1 perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch]

/dovecot/src/anvil/anvil-connection.c /dovecot/src/anvil/penalty.c /dovecot/src/auth/auth-client-connection.h /dovecot/src/auth/auth-master-connection.h /dovecot/src/auth/auth-penalty.c /dovecot/src/auth/auth-postfix-connection.c /dovecot/src/auth/auth-request-handler.c /dovecot/src/auth/auth-request.h /dovecot/src/auth/auth-worker-client.c /dovecot/src/auth/auth-worker-server.c /dovecot/src/auth/db-checkpassword.c /dovecot/src/auth/db-passwd-file.h /dovecot/src/auth/db-sql.h /dovecot/src/auth/mech-digest-md5.c /dovecot/src/auth/passdb-pam.c /dovecot/src/auth/userdb-passwd.c /dovecot/src/auth/userdb-sql.c /dovecot/src/auth/userdb-static.c /dovecot/src/config/config-connection.c /dovecot/src/config/config-parser-private.h /dovecot/src/config/doveconf.c /dovecot/src/dict/dict-connection.h /dovecot/src/director/director-connection.c /dovecot/src/director/director-host.h /dovecot/src/director/director.h /dovecot/src/director/doveadm-connection.c /dovecot/src/director/login-connection.c /dovecot/src/director/mail-host.h /dovecot/src/director/user-directory.h /dovecot/src/doveadm/client-connection.h /dovecot/src/doveadm/doveadm-dsync.c /dovecot/src/doveadm/doveadm-mail-index.c /dovecot/src/doveadm/doveadm-mail-mailbox-status.c /dovecot/src/doveadm/doveadm-mail.h /dovecot/src/doveadm/doveadm-print-flow.c /dovecot/src/doveadm/doveadm-print-pager.c /dovecot/src/doveadm/doveadm-print-tab.c /dovecot/src/doveadm/doveadm-print-table.c /dovecot/src/doveadm/doveadm-stats.c /dovecot/src/doveadm/dsync/dsync-brain-private.h /dovecot/src/doveadm/dsync/dsync-ibc-private.h /dovecot/src/doveadm/dsync/dsync-ibc-stream.c /dovecot/src/doveadm/dsync/dsync-mailbox-export.c /dovecot/src/doveadm/dsync/dsync-mailbox-import.c /dovecot/src/doveadm/dsync/dsync-mailbox-tree.h /dovecot/src/doveadm/server-connection.c /dovecot/src/imap-login/imap-login-client.h /dovecot/src/imap-urlauth/imap-urlauth-client.h /dovecot/src/imap-urlauth/imap-urlauth-login.c /dovecot/src/imap-urlauth/imap-urlauth-worker.c /dovecot/src/imap/cmd-append.c /dovecot/src/imap/cmd-idle.c /dovecot/src/imap/cmd-list.c /dovecot/src/imap/cmd-select.c /dovecot/src/imap/cmd-urlfetch.c /dovecot/src/imap/imap-client.h /dovecot/src/imap/imap-fetch-body.c /dovecot/src/imap/imap-fetch.h /dovecot/src/imap/imap-notify.h /dovecot/src/imap/imap-search.h /dovecot/src/imap/imap-sync.c /dovecot/src/indexer/indexer-client.c /dovecot/src/indexer/indexer-queue.h /dovecot/src/indexer/master-connection.c /dovecot/src/indexer/worker-connection.c /dovecot/src/ipc/ipc-connection.h /dovecot/src/lib-auth/auth-client-private.h /dovecot/src/lib-auth/auth-master.c /dovecot/src/lib-auth/auth-master.h /dovecot/src/lib-auth/auth-server-connection.h /dovecot/src/lib-compression/istream-bzlib.c /dovecot/src/lib-compression/istream-lz4.c /dovecot/src/lib-compression/istream-lzma.c /dovecot/src/lib-compression/istream-zlib.c /dovecot/src/lib-compression/ostream-bzlib.c /dovecot/src/lib-compression/ostream-lzma.c /dovecot/src/lib-compression/ostream-zlib.c /dovecot/src/lib-dict/dict-client.c /dovecot/src/lib-dict/dict-private.h /dovecot/src/lib-dict/dict-sql.c /dovecot/src/lib-fs/fs-api-private.h /dovecot/src/lib-http/http-client-private.h /dovecot/src/lib-http/http-header-parser.c /dovecot/src/lib-http/http-message-parser.h /dovecot/src/lib-http/http-request-parser.c /dovecot/src/lib-http/http-request.h /dovecot/src/lib-http/http-response.h /dovecot/src/lib-http/http-server-private.h /dovecot/src/lib-http/http-transfer-chunked.c /dovecot/src/lib-http/http-url.c /dovecot/src/lib-http/http-url.h /dovecot/src/lib-imap-client/imapc-connection.c /dovecot/src/lib-imap-storage/imap-metadata.c /dovecot/src/lib-imap-storage/imap-msgpart-url.c /dovecot/src/lib-imap-storage/imap-msgpart.c /dovecot/src/lib-imap-urlauth/imap-urlauth-connection.c /dovecot/src/lib-imap-urlauth/imap-urlauth-fetch.c /dovecot/src/lib-imap-urlauth/imap-urlauth-fetch.h /dovecot/src/lib-imap-urlauth/imap-urlauth-private.h /dovecot/src/lib-imap/imap-arg.h /dovecot/src/lib-imap/imap-parser.c /dovecot/src/lib-imap/imap-url.c /dovecot/src/lib-imap/imap-url.h /dovecot/src/lib-index/mail-cache-private.h /dovecot/src/lib-index/mail-cache-transaction.c /dovecot/src/lib-index/mail-index-private.h /dovecot/src/lib-index/mail-index-strmap.c /dovecot/src/lib-index/mail-index-sync-private.h /dovecot/src/lib-index/mail-index-sync.c /dovecot/src/lib-index/mail-index-transaction-private.h /dovecot/src/lib-index/mail-index-view-private.h /dovecot/src/lib-index/mail-index-view-sync.c /dovecot/src/lib-index/mail-index.h /dovecot/src/lib-index/mail-transaction-log-private.h /dovecot/src/lib-index/mail-transaction-log-view-private.h /dovecot/src/lib-index/mail-transaction-log.h /dovecot/src/lib-lda/duplicate.c /dovecot/src/lib-lda/lmtp-client.c /dovecot/src/lib-mail/istream-binary-converter.c /dovecot/src/lib-mail/istream-dot.c /dovecot/src/lib-mail/istream-header-filter.c /dovecot/src/lib-mail/message-decoder.c /dovecot/src/lib-mail/message-header-decode.c /dovecot/src/lib-mail/message-header-parser.c /dovecot/src/lib-mail/message-header-parser.h /dovecot/src/lib-mail/message-parser.c /dovecot/src/lib-mail/message-search.c /dovecot/src/lib-master/ipc-server.c /dovecot/src/lib-master/master-instance.c /dovecot/src/lib-master/master-login-auth.c /dovecot/src/lib-master/master-login.c /dovecot/src/lib-master/master-login.h /dovecot/src/lib-master/master-service-private.h /dovecot/src/lib-master/master-service-settings-cache.c /dovecot/src/lib-master/master-service-settings.h /dovecot/src/lib-master/master-service.h /dovecot/src/lib-master/service-settings.h driver-cassandra.c driver-mysql.c driver-pgsql.c driver-sqlite.c sql-api-private.h /dovecot/src/lib-ssl-iostream/iostream-openssl.h /dovecot/src/lib-storage/index/cydir/cydir-save.c /dovecot/src/lib-storage/index/dbox-common/dbox-file.h /dovecot/src/lib-storage/index/dbox-common/dbox-save.h /dovecot/src/lib-storage/index/dbox-multi/mdbox-map-private.h /dovecot/src/lib-storage/index/dbox-multi/mdbox-map.c /dovecot/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c /dovecot/src/lib-storage/index/dbox-multi/mdbox-storage.h /dovecot/src/lib-storage/index/imapc/imapc-list.h /dovecot/src/lib-storage/index/imapc/imapc-save.c /dovecot/src/lib-storage/index/imapc/imapc-storage.h /dovecot/src/lib-storage/index/imapc/imapc-sync.h /dovecot/src/lib-storage/index/index-mail.h /dovecot/src/lib-storage/index/index-rebuild.h /dovecot/src/lib-storage/index/index-search-private.h /dovecot/src/lib-storage/index/index-search.c /dovecot/src/lib-storage/index/index-sort-string.c /dovecot/src/lib-storage/index/index-thread-finish.c /dovecot/src/lib-storage/index/index-thread-private.h /dovecot/src/lib-storage/index/index-thread.c /dovecot/src/lib-storage/index/istream-mail.c /dovecot/src/lib-storage/index/maildir/maildir-copy.c /dovecot/src/lib-storage/index/maildir/maildir-keywords.c /dovecot/src/lib-storage/index/maildir/maildir-save.c /dovecot/src/lib-storage/index/maildir/maildir-storage.h /dovecot/src/lib-storage/index/maildir/maildir-sync.c /dovecot/src/lib-storage/index/maildir/maildir-uidlist.c /dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c /dovecot/src/lib-storage/index/mbox/mbox-save.c /dovecot/src/lib-storage/index/mbox/mbox-storage.h /dovecot/src/lib-storage/index/mbox/mbox-sync-private.h /dovecot/src/lib-storage/index/pop3c/pop3c-client.c /dovecot/src/lib-storage/index/pop3c/pop3c-storage.h /dovecot/src/lib-storage/index/raw/raw-storage.h /dovecot/src/lib-storage/list/mailbox-list-fs-iter.c /dovecot/src/lib-storage/list/mailbox-list-index-notify.c /dovecot/src/lib-storage/list/mailbox-list-index-sync.h /dovecot/src/lib-storage/list/mailbox-list-index.h /dovecot/src/lib-storage/list/mailbox-list-iter.c /dovecot/src/lib-storage/list/mailbox-list-none.c /dovecot/src/lib-storage/mail-namespace.h /dovecot/src/lib-storage/mail-search-register.c /dovecot/src/lib-storage/mail-search.h /dovecot/src/lib-storage/mail-storage-private.h /dovecot/src/lib-storage/mail-storage-service.c /dovecot/src/lib-storage/mail-storage-service.h /dovecot/src/lib-storage/mail-storage.h /dovecot/src/lib-storage/mail-user.h /dovecot/src/lib-storage/mailbox-list-private.h /dovecot/src/lib-storage/mailbox-search-result-private.h /dovecot/src/lib-storage/mailbox-tree.c /dovecot/src/lib/buffer.c /dovecot/src/lib/connection.h /dovecot/src/lib/file-dotlock.c /dovecot/src/lib/file-dotlock.h /dovecot/src/lib/ioloop-private.h /dovecot/src/lib/istream-crlf.c /dovecot/src/lib/istream-file-private.h /dovecot/src/lib/istream-jsonstr.c /dovecot/src/lib/istream-mmap.c /dovecot/src/lib/istream-private.h /dovecot/src/lib/istream-tee.c /dovecot/src/lib/istream.h /dovecot/src/lib/mempool.h /dovecot/src/lib/module-dir.h /dovecot/src/lib/ostream-file-private.h /dovecot/src/lib/ostream-private.h /dovecot/src/lib/ostream.h /dovecot/src/lmtp/client.h /dovecot/src/lmtp/lmtp-proxy.c /dovecot/src/log/log-connection.c /dovecot/src/login-common/client-common.h /dovecot/src/login-common/login-proxy.c /dovecot/src/login-common/ssl-proxy-openssl.c /dovecot/src/master/service-process.h /dovecot/src/master/service.h /dovecot/src/plugins/acl/acl-api-private.h /dovecot/src/plugins/acl/acl-api.h /dovecot/src/plugins/acl/acl-backend-vfile.h /dovecot/src/plugins/acl/acl-lookup-dict.c /dovecot/src/plugins/acl/acl-mailbox-list.c /dovecot/src/plugins/expire/expire-plugin.c /dovecot/src/plugins/fts-lucene/fts-backend-lucene.c /dovecot/src/plugins/fts-solr/fts-backend-solr.c /dovecot/src/plugins/fts-solr/solr-connection.c /dovecot/src/plugins/fts-squat/squat-trie-private.h /dovecot/src/plugins/fts-squat/squat-trie.c /dovecot/src/plugins/fts-squat/squat-uidlist.c /dovecot/src/plugins/fts/fts-api-private.h /dovecot/src/plugins/fts/fts-indexer.c /dovecot/src/plugins/fts/fts-storage.c /dovecot/src/plugins/fts/fts-storage.h /dovecot/src/plugins/lazy-expunge/lazy-expunge-plugin.c /dovecot/src/plugins/pop3-migration/pop3-migration-plugin.c /dovecot/src/plugins/quota/quota-fs.c /dovecot/src/plugins/quota/quota-maildir.c /dovecot/src/plugins/quota/quota-private.h /dovecot/src/plugins/quota/quota-storage.c /dovecot/src/plugins/virtual/virtual-mail.c /dovecot/src/plugins/virtual/virtual-storage.h /dovecot/src/plugins/virtual/virtual-sync.c /dovecot/src/pop3/pop3-client.h /dovecot/src/replication/replicator/dsync-client.c /dovecot/src/replication/replicator/notify-connection.c /dovecot/src/replication/replicator/replicator-brain.c /dovecot/src/replication/replicator/replicator-queue.h
b87761f9bbef949f31dae297e619ac3f5e9c2b2e 02-Sep-2015 Timo Sirainen <tss@iki.fi>

lib-sql: Implemented sql_escape_blob()

4ee00532a265bdfb38539d811fcd12d51210ac35 19-Aug-2012 Timo Sirainen <tss@iki.fi>

Array API changed: ARRAY_DEFINE(name, type) -> ARRAY(type) name Easy way to update your existing code: perl -i -pe 's:ARRAY_DEFINE\(([^,]+), *([^)]+)\);:ARRAY($2) $1;:' **/*.[ch]

/dovecot/src/auth/auth-request-handler.c /dovecot/src/auth/auth-settings.c /dovecot/src/auth/auth-settings.h /dovecot/src/auth/auth-worker-server.c /dovecot/src/auth/auth.c /dovecot/src/auth/db-ldap.h /dovecot/src/auth/main.c /dovecot/src/auth/passdb-template.c /dovecot/src/auth/passdb.c /dovecot/src/auth/userdb-template.c /dovecot/src/auth/userdb.c /dovecot/src/config/config-parser-private.h /dovecot/src/config/config-parser.c /dovecot/src/dict/dict-connection.h /dovecot/src/dict/dict-settings.h /dovecot/src/director/director-test.c /dovecot/src/director/director.h /dovecot/src/director/mail-host.c /dovecot/src/director/main.c /dovecot/src/director/user-directory.c /dovecot/src/doveadm/doveadm-dump.c /dovecot/src/doveadm/doveadm-kick.c /dovecot/src/doveadm/doveadm-mail-altmove.c /dovecot/src/doveadm/doveadm-mail-fetch.c /dovecot/src/doveadm/doveadm-mail.h /dovecot/src/doveadm/doveadm-print-flow.c /dovecot/src/doveadm/doveadm-print-pager.c /dovecot/src/doveadm/doveadm-print-table.c /dovecot/src/doveadm/doveadm-print.c /dovecot/src/doveadm/doveadm-server.h /dovecot/src/doveadm/doveadm-settings.h /dovecot/src/doveadm/doveadm-stats.c /dovecot/src/doveadm/doveadm-who.c /dovecot/src/doveadm/doveadm.c /dovecot/src/doveadm/dsync/dsync-mailbox-export.c /dovecot/src/doveadm/dsync/dsync-mailbox-import.c /dovecot/src/doveadm/dsync/dsync-mailbox-tree-private.h /dovecot/src/doveadm/dsync/dsync-mailbox-tree-sync.c /dovecot/src/doveadm/dsync/dsync-slave-pipe.c /dovecot/src/imap/cmd-list.c /dovecot/src/imap/imap-client.h /dovecot/src/imap/imap-commands-util.c /dovecot/src/imap/imap-commands.c /dovecot/src/imap/imap-fetch.c /dovecot/src/imap/imap-fetch.h /dovecot/src/imap/imap-notify.h /dovecot/src/imap/imap-search.h /dovecot/src/indexer/worker-connection.c /dovecot/src/ipc/ipc-connection.h /dovecot/src/ipc/ipc-group.c /dovecot/src/lib-auth/auth-server-connection.h /dovecot/src/lib-dict/dict-memcached-ascii.c /dovecot/src/lib-dict/dict-redis.c /dovecot/src/lib-dict/dict-sql-settings.c /dovecot/src/lib-dict/dict-sql-settings.h /dovecot/src/lib-dict/dict-sql.c /dovecot/src/lib-dict/dict-transaction-memory.h /dovecot/src/lib-dict/dict.c /dovecot/src/lib-imap-client/imapc-client-private.h /dovecot/src/lib-imap-client/imapc-connection.c /dovecot/src/lib-index/mail-cache-compress.c /dovecot/src/lib-index/mail-cache-lookup.c /dovecot/src/lib-index/mail-cache-transaction.c /dovecot/src/lib-index/mail-index-modseq.c /dovecot/src/lib-index/mail-index-private.h /dovecot/src/lib-index/mail-index-strmap.c /dovecot/src/lib-index/mail-index-sync-private.h /dovecot/src/lib-index/mail-index-sync.c /dovecot/src/lib-index/mail-index-transaction-export.c /dovecot/src/lib-index/mail-index-transaction-private.h /dovecot/src/lib-index/mail-index-transaction-view.c /dovecot/src/lib-index/mail-index-view-private.h /dovecot/src/lib-index/mail-transaction-log-view-private.h /dovecot/src/lib-lda/lmtp-client.c /dovecot/src/lib-lda/mail-deliver.h /dovecot/src/lib-mail/istream-attachment-connector.c /dovecot/src/lib-mail/istream-header-filter.c /dovecot/src/lib-mail/rfc2231-parser.c /dovecot/src/lib-mail/test-istream-attachment.c /dovecot/src/lib-master/anvil-client.c /dovecot/src/lib-master/ipc-client.c /dovecot/src/lib-master/master-instance.c /dovecot/src/lib-master/master-service-settings.c /dovecot/src/lib-master/mountpoint-list.c /dovecot/src/lib-settings/settings-parser.c driver-pgsql.c driver-sqlpool.c sql-api-private.h /dovecot/src/lib-storage/index/dbox-common/dbox-file.h /dovecot/src/lib-storage/index/dbox-multi/mdbox-map-private.h /dovecot/src/lib-storage/index/dbox-multi/mdbox-save.c /dovecot/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c /dovecot/src/lib-storage/index/dbox-multi/mdbox-storage.h /dovecot/src/lib-storage/index/dbox-single/sdbox-save.c /dovecot/src/lib-storage/index/imapc/imapc-storage.h /dovecot/src/lib-storage/index/index-mail-binary.c /dovecot/src/lib-storage/index/index-mail-headers.c /dovecot/src/lib-storage/index/index-mail.h /dovecot/src/lib-storage/index/index-search-private.h /dovecot/src/lib-storage/index/index-storage.c /dovecot/src/lib-storage/index/index-sync-changes.c /dovecot/src/lib-storage/index/index-thread-finish.c /dovecot/src/lib-storage/index/maildir/maildir-keywords.c /dovecot/src/lib-storage/index/maildir/maildir-save.c /dovecot/src/lib-storage/index/mbox/mbox-sync-private.h /dovecot/src/lib-storage/list/mailbox-list-fs-iter.c /dovecot/src/lib-storage/list/mailbox-list-index-notify.c /dovecot/src/lib-storage/list/mailbox-list-maildir.c /dovecot/src/lib-storage/mail-search-register-human.c /dovecot/src/lib-storage/mail-search-register.c /dovecot/src/lib-storage/mail-storage-hooks.c /dovecot/src/lib-storage/mail-storage-private.h /dovecot/src/lib-storage/mail-storage-settings.h /dovecot/src/lib-storage/mail-user.h /dovecot/src/lib-storage/mailbox-keywords.c /dovecot/src/lib-storage/mailbox-list-iter.c /dovecot/src/lib-storage/mailbox-list-private.h /dovecot/src/lib-storage/mailbox-list.c /dovecot/src/lib-storage/mailbox-tree.c /dovecot/src/lib/array-decl.h /dovecot/src/lib/array.h /dovecot/src/lib/ioloop-epoll.c /dovecot/src/lib/ioloop-kqueue.c /dovecot/src/lib/ioloop-private.h /dovecot/src/lib/lib.h /dovecot/src/lib/module-context.h /dovecot/src/lib/priorityq.c /dovecot/src/lib/test-aqueue.c /dovecot/src/lib/test-array.c /dovecot/src/lib/var-expand.c /dovecot/src/lmtp/client.h /dovecot/src/lmtp/lmtp-proxy.c /dovecot/src/log/log-connection.c /dovecot/src/master/service-listen.c /dovecot/src/master/service-process-notify.c /dovecot/src/master/service.h /dovecot/src/plugins/acl/acl-backend-vfile.h /dovecot/src/plugins/acl/acl-cache.c /dovecot/src/plugins/expire/doveadm-expire.c /dovecot/src/plugins/expire/expire-set.c /dovecot/src/plugins/fts-lucene/fts-backend-lucene.c /dovecot/src/plugins/fts-lucene/lucene-wrapper.cc /dovecot/src/plugins/fts-solr/fts-backend-solr-old.c /dovecot/src/plugins/fts-solr/fts-backend-solr.c /dovecot/src/plugins/fts-solr/solr-connection.c /dovecot/src/plugins/fts-squat/squat-trie.c /dovecot/src/plugins/fts-squat/squat-uidlist.c /dovecot/src/plugins/fts/fts-api.c /dovecot/src/plugins/fts/fts-parser-script.c /dovecot/src/plugins/fts/fts-storage.h /dovecot/src/plugins/pop3-migration/pop3-migration-plugin.c /dovecot/src/plugins/quota/quota-private.h /dovecot/src/plugins/quota/quota-storage.c /dovecot/src/plugins/quota/quota.c /dovecot/src/plugins/trash/trash-plugin.c /dovecot/src/plugins/virtual/virtual-mail.c /dovecot/src/plugins/virtual/virtual-search.c /dovecot/src/plugins/virtual/virtual-storage.h /dovecot/src/plugins/virtual/virtual-sync.c /dovecot/src/plugins/virtual/virtual-transaction.h /dovecot/src/pop3/pop3-client.c /dovecot/src/pop3/pop3-client.h /dovecot/src/replication/replicator/replicator-brain.c /dovecot/src/replication/replicator/replicator-queue.c /dovecot/src/ssl-params/main.c
44e5c39db5002ab15db142dda6c42e0422a17437 15-Sep-2011 Timo Sirainen <tss@iki.fi>

lib-sql: Dropped connect timeout to 5 seconds. Postfix is using 10 second auth timeout and this needs to be less than that.

4c9c55e15f35474f53f11659e796c63b1c34e884 28-May-2010 Timo Sirainen <tss@iki.fi>

lib-sql: Don't try to reconnect on deinit or intentional disconnect. Fixes a timeout leak. --HG-- branch : HEAD

6b2738c39a868ff9291867138c55029fc40cf105 04-May-2010 Timo Sirainen <tss@iki.fi>

lib-sql: Use generic sql connection pooling code for mysql/pgsql. It's possible to give multiple host settings to do load balancing / HA. If one host is down, another one is tried. All queries are automatically retried in another host if they fail in first one. Since PostgreSQL support async queries, Dovecot can create multiple connections to the database as needed, so it can do lookups in parallel. The number of connections can be changed with maxconns=n in connect_query, the default is 5. --HG-- branch : HEAD

bfdf0fd7b6186f64cbdcbf1cb2bf9c42a9007b77 07-Sep-2009 Timo Sirainen <tss@iki.fi>

lib-sql: Added sql_update_get_rows(). --HG-- branch : HEAD

3656c91dcb8336814bebd4500e81c3dde25233e6 13-May-2009 Timo Sirainen <tss@iki.fi>

SQL API change: SQL results can be now refed/unrefed. --HG-- branch : HEAD

0ae010139a1bb3b29fbf117c5da1a6a6c6b7b5a0 22-Sep-2007 Timo Sirainen <tss@iki.fi>

Added module_contexts to struct sql_db. --HG-- branch : HEAD

c25356d5978632df6203437e1953bcb29e0c736f 16-Sep-2007 Timo Sirainen <tss@iki.fi>

Changed .h ifdef/defines to use <NAME>_H format. --HG-- branch : HEAD

/dovecot/src/auth/auth-cache.h /dovecot/src/auth/auth-client-connection.h /dovecot/src/auth/auth-client-interface.h /dovecot/src/auth/auth-master-connection.h /dovecot/src/auth/auth-master-interface.h /dovecot/src/auth/auth-master-listener.h /dovecot/src/auth/auth-request-handler.h /dovecot/src/auth/auth-request.h /dovecot/src/auth/auth-stream.h /dovecot/src/auth/auth-worker-client.h /dovecot/src/auth/auth-worker-server.h /dovecot/src/auth/auth.h /dovecot/src/auth/common.h /dovecot/src/auth/db-ldap.h /dovecot/src/auth/db-passwd-file.h /dovecot/src/auth/db-sql.h /dovecot/src/auth/mech.h /dovecot/src/auth/mycrypt.h /dovecot/src/auth/otp-skey-common.h /dovecot/src/auth/passdb-blocking.h /dovecot/src/auth/passdb-cache.h /dovecot/src/auth/passdb.h /dovecot/src/auth/password-scheme.h /dovecot/src/auth/plain-common.h /dovecot/src/auth/userdb-blocking.h /dovecot/src/auth/userdb-static.h /dovecot/src/auth/userdb-vpopmail.h /dovecot/src/auth/userdb.h /dovecot/src/deliver/auth-client.h /dovecot/src/deliver/deliver.h /dovecot/src/deliver/duplicate.h /dovecot/src/deliver/mail-send.h /dovecot/src/deliver/smtp-client.h /dovecot/src/dict/dict-cache.h /dovecot/src/dict/dict-server.h /dovecot/src/imap-login/client-authenticate.h /dovecot/src/imap-login/client.h /dovecot/src/imap-login/imap-proxy.h /dovecot/src/imap/client.h /dovecot/src/imap/commands-util.h /dovecot/src/imap/commands.h /dovecot/src/imap/common.h /dovecot/src/imap/imap-expunge.h /dovecot/src/imap/imap-fetch.h /dovecot/src/imap/imap-messageset.h /dovecot/src/imap/imap-search.h /dovecot/src/imap/imap-sort.h /dovecot/src/imap/imap-status.h /dovecot/src/imap/imap-sync.h /dovecot/src/imap/imap-thread.h /dovecot/src/lib-auth/auth-client.h /dovecot/src/lib-auth/auth-server-connection.h /dovecot/src/lib-auth/auth-server-request.h /dovecot/src/lib-charset/charset-utf8.h /dovecot/src/lib-dict/dict-client.h /dovecot/src/lib-dict/dict-private.h /dovecot/src/lib-dict/dict-sql.h /dovecot/src/lib-dict/dict.h /dovecot/src/lib-imap/imap-base-subject.h /dovecot/src/lib-imap/imap-bodystructure.h /dovecot/src/lib-imap/imap-date.h /dovecot/src/lib-imap/imap-envelope.h /dovecot/src/lib-imap/imap-match.h /dovecot/src/lib-imap/imap-parser.h /dovecot/src/lib-imap/imap-quote.h /dovecot/src/lib-imap/imap-util.h /dovecot/src/lib-index/mail-cache-private.h /dovecot/src/lib-index/mail-cache.h /dovecot/src/lib-index/mail-hash.h /dovecot/src/lib-index/mail-index-private.h /dovecot/src/lib-index/mail-index-sync-private.h /dovecot/src/lib-index/mail-index-transaction-private.h /dovecot/src/lib-index/mail-index-view-private.h /dovecot/src/lib-index/mail-index.h /dovecot/src/lib-index/mail-transaction-log-private.h /dovecot/src/lib-index/mail-transaction-log.h /dovecot/src/lib-index/mailbox-list-index-private.h /dovecot/src/lib-index/mailbox-list-index.h /dovecot/src/lib-mail/istream-header-filter.h /dovecot/src/lib-mail/mail-types.h /dovecot/src/lib-mail/message-address.h /dovecot/src/lib-mail/message-date.h /dovecot/src/lib-mail/message-decoder.h /dovecot/src/lib-mail/message-header-decode.h /dovecot/src/lib-mail/message-header-parser.h /dovecot/src/lib-mail/message-id.h /dovecot/src/lib-mail/message-parser.h /dovecot/src/lib-mail/message-part-serialize.h /dovecot/src/lib-mail/message-search.h /dovecot/src/lib-mail/message-send.h /dovecot/src/lib-mail/message-size.h /dovecot/src/lib-mail/quoted-printable.h /dovecot/src/lib-mail/rfc822-parser.h /dovecot/src/lib-ntlm/ntlm-byteorder.h /dovecot/src/lib-ntlm/ntlm-des.h /dovecot/src/lib-ntlm/ntlm-encrypt.h /dovecot/src/lib-ntlm/ntlm-flags.h /dovecot/src/lib-ntlm/ntlm-message.h /dovecot/src/lib-ntlm/ntlm-types.h /dovecot/src/lib-ntlm/ntlm.h /dovecot/src/lib-otp/otp-dictionary.h /dovecot/src/lib-otp/otp-hash.h /dovecot/src/lib-otp/otp-parity.h /dovecot/src/lib-otp/otp-parse.h /dovecot/src/lib-otp/otp.h /dovecot/src/lib-settings/settings.h sql-api-private.h sql-api.h /dovecot/src/lib-storage/index/cydir/cydir-storage.h /dovecot/src/lib-storage/index/cydir/cydir-sync.h /dovecot/src/lib-storage/index/dbox/dbox-file.h /dovecot/src/lib-storage/index/dbox/dbox-index.h /dovecot/src/lib-storage/index/dbox/dbox-storage.h /dovecot/src/lib-storage/index/dbox/dbox-sync.h /dovecot/src/lib-storage/index/index-mail.h /dovecot/src/lib-storage/index/index-sort.h /dovecot/src/lib-storage/index/index-storage.h /dovecot/src/lib-storage/index/index-sync-changes.h /dovecot/src/lib-storage/index/maildir/maildir-filename.h /dovecot/src/lib-storage/index/maildir/maildir-keywords.h /dovecot/src/lib-storage/index/maildir/maildir-storage.h /dovecot/src/lib-storage/index/maildir/maildir-sync.h /dovecot/src/lib-storage/index/maildir/maildir-uidlist.h /dovecot/src/lib-storage/index/mbox/istream-raw-mbox.h /dovecot/src/lib-storage/index/mbox/mbox-file.h /dovecot/src/lib-storage/index/mbox/mbox-from.h /dovecot/src/lib-storage/index/mbox/mbox-lock.h /dovecot/src/lib-storage/index/mbox/mbox-md5.h /dovecot/src/lib-storage/index/mbox/mbox-storage.h /dovecot/src/lib-storage/index/mbox/mbox-sync-private.h /dovecot/src/lib-storage/list/index-mailbox-list.h /dovecot/src/lib-storage/list/mailbox-list-fs.h /dovecot/src/lib-storage/list/mailbox-list-maildir.h /dovecot/src/lib-storage/list/mailbox-list-subscriptions.h /dovecot/src/lib-storage/list/subscription-file.h /dovecot/src/lib-storage/mail-copy.h /dovecot/src/lib-storage/mail-error.h /dovecot/src/lib-storage/mail-namespace.h /dovecot/src/lib-storage/mail-search.h /dovecot/src/lib-storage/mail-storage-private.h /dovecot/src/lib-storage/mail-storage.h /dovecot/src/lib-storage/mailbox-list-private.h /dovecot/src/lib-storage/mailbox-list.h /dovecot/src/lib-storage/mailbox-tree.h /dovecot/src/lib/array-decl.h /dovecot/src/lib/array.h /dovecot/src/lib/backtrace-string.h /dovecot/src/lib/base64.h /dovecot/src/lib/bsearch-insert-pos.h /dovecot/src/lib/buffer.h /dovecot/src/lib/close-keep-errno.h /dovecot/src/lib/compat.h /dovecot/src/lib/crc32.h /dovecot/src/lib/data-stack.h /dovecot/src/lib/env-util.h /dovecot/src/lib/failures.h /dovecot/src/lib/fd-close-on-exec.h /dovecot/src/lib/fd-set-nonblock.h /dovecot/src/lib/fdpass.h /dovecot/src/lib/file-cache.h /dovecot/src/lib/file-copy.h /dovecot/src/lib/file-dotlock.h /dovecot/src/lib/file-lock.h /dovecot/src/lib/file-set-size.h /dovecot/src/lib/hash.h /dovecot/src/lib/hex-binary.h /dovecot/src/lib/hex-dec.h /dovecot/src/lib/hmac-md5.h /dovecot/src/lib/home-expand.h /dovecot/src/lib/hostpid.h /dovecot/src/lib/imem.h /dovecot/src/lib/ioloop-internal.h /dovecot/src/lib/ioloop-iolist.h /dovecot/src/lib/ioloop-notify-fd.h /dovecot/src/lib/ioloop.h /dovecot/src/lib/iostream-internal.h /dovecot/src/lib/istream-internal.h /dovecot/src/lib/istream-seekable.h /dovecot/src/lib/istream-tee.h /dovecot/src/lib/istream.h /dovecot/src/lib/lib-signals.h /dovecot/src/lib/lib.h /dovecot/src/lib/macros.h /dovecot/src/lib/md4.h /dovecot/src/lib/md5.h /dovecot/src/lib/mempool.h /dovecot/src/lib/mkdir-parents.h /dovecot/src/lib/mmap-util.h /dovecot/src/lib/module-context.h /dovecot/src/lib/module-dir.h /dovecot/src/lib/mountpoint.h /dovecot/src/lib/network.h /dovecot/src/lib/nfs-workarounds.h /dovecot/src/lib/ostream-crlf.h /dovecot/src/lib/ostream-internal.h /dovecot/src/lib/ostream.h /dovecot/src/lib/primes.h /dovecot/src/lib/printf-format-fix.h /dovecot/src/lib/process-title.h /dovecot/src/lib/randgen.h /dovecot/src/lib/read-full.h /dovecot/src/lib/restrict-access.h /dovecot/src/lib/restrict-process-size.h /dovecot/src/lib/safe-memset.h /dovecot/src/lib/safe-mkdir.h /dovecot/src/lib/safe-mkstemp.h /dovecot/src/lib/sendfile-util.h /dovecot/src/lib/seq-range-array.h /dovecot/src/lib/sha1.h /dovecot/src/lib/str-find.h /dovecot/src/lib/str-sanitize.h /dovecot/src/lib/str.h /dovecot/src/lib/strescape.h /dovecot/src/lib/strfuncs.h /dovecot/src/lib/unichar.h /dovecot/src/lib/unix-socket-create.h /dovecot/src/lib/unlink-directory.h /dovecot/src/lib/unlink-lockfiles.h /dovecot/src/lib/utc-mktime.h /dovecot/src/lib/utc-offset.h /dovecot/src/lib/var-expand.h /dovecot/src/lib/write-full.h /dovecot/src/login-common/client-common.h /dovecot/src/login-common/common.h /dovecot/src/login-common/login-proxy.h /dovecot/src/login-common/master.h /dovecot/src/login-common/sasl-server.h /dovecot/src/login-common/ssl-proxy.h /dovecot/src/master/askpass.h /dovecot/src/master/auth-process.h /dovecot/src/master/capabilities.h /dovecot/src/master/child-process.h /dovecot/src/master/common.h /dovecot/src/master/dict-process.h /dovecot/src/master/dup2-array.h /dovecot/src/master/listener.h /dovecot/src/master/log.h /dovecot/src/master/login-process.h /dovecot/src/master/mail-process.h /dovecot/src/master/master-login-interface.h /dovecot/src/master/master-settings.h /dovecot/src/master/ssl-init.h /dovecot/src/master/syslog-util.h /dovecot/src/plugins/acl/acl-api-private.h /dovecot/src/plugins/acl/acl-api.h /dovecot/src/plugins/acl/acl-backend-vfile.h /dovecot/src/plugins/acl/acl-cache.h /dovecot/src/plugins/acl/acl-plugin.h /dovecot/src/plugins/convert/convert-plugin.h /dovecot/src/plugins/convert/convert-storage.h /dovecot/src/plugins/expire/auth-client.h /dovecot/src/plugins/expire/expire-env.h /dovecot/src/plugins/expire/expire-plugin.h /dovecot/src/plugins/fts-lucene/fts-lucene-plugin.h /dovecot/src/plugins/fts-lucene/lucene-wrapper.h /dovecot/src/plugins/fts-squat/fts-squat-plugin.h /dovecot/src/plugins/fts-squat/squat-trie-private.h /dovecot/src/plugins/fts-squat/squat-trie.h /dovecot/src/plugins/fts-squat/squat-uidlist.h /dovecot/src/plugins/fts/fts-api-private.h /dovecot/src/plugins/fts/fts-api.h /dovecot/src/plugins/fts/fts-plugin.h /dovecot/src/plugins/imap-quota/imap-quota-plugin.h /dovecot/src/plugins/lazy-expunge/lazy-expunge-plugin.h /dovecot/src/plugins/mail-log/mail-log-plugin.h /dovecot/src/plugins/mbox-snarf/mbox-snarf-plugin.h /dovecot/src/plugins/quota/quota-fs.h /dovecot/src/plugins/quota/quota-plugin.h /dovecot/src/plugins/quota/quota-private.h /dovecot/src/plugins/quota/quota.h /dovecot/src/plugins/trash/trash-plugin.h /dovecot/src/plugins/zlib/istream-zlib.h /dovecot/src/plugins/zlib/zlib-plugin.h /dovecot/src/pop3-login/client-authenticate.h /dovecot/src/pop3-login/client.h /dovecot/src/pop3-login/pop3-proxy.h /dovecot/src/pop3/capability.h /dovecot/src/pop3/client.h /dovecot/src/pop3/commands.h /dovecot/src/pop3/common.h
1ac19c5c2b66a12f5598792aad15114ee3eb62e2 03-Apr-2007 Timo Sirainen <tss@iki.fi>

Added sql_result_setup_fetch() which makes it easier to fetch rows into structures. Added sql_result_get_field_value_binary(), which is currently not implemented for MySQL. --HG-- branch : HEAD

13a8c553f293349248b161ff851743498916e26e 01-Jul-2006 Timo Sirainen <tss@iki.fi>

sql_escape_string() should return const char *, not char *. --HG-- branch : HEAD

8d80659e504ffb34bb0c6a633184fece35751b18 28-Jun-2006 Timo Sirainen <tss@iki.fi>

Array API redesigned to work using unions. It now provides type safety without having to enable DEBUG, as long as the compiler supports typeof(). Its API changed a bit. It now allows directly accessing the array contents, although that's not necessarily recommended. Changed existing array usage to be type safe in a bit more places. Removed array_t completely. Also did s/modifyable/modifiable/. --HG-- branch : HEAD

/dovecot/src/auth/auth-master-listener.c /dovecot/src/auth/auth-master-listener.h /dovecot/src/auth/auth-request-handler.c /dovecot/src/auth/auth-worker-server.c /dovecot/src/auth/mech-gssapi.c /dovecot/src/auth/userdb-static.c /dovecot/src/dict/dict-server.c /dovecot/src/imap/client.h /dovecot/src/imap/cmd-list.c /dovecot/src/imap/commands-util.c /dovecot/src/imap/commands-util.h /dovecot/src/imap/commands.c /dovecot/src/imap/imap-fetch.c /dovecot/src/imap/imap-fetch.h /dovecot/src/lib-auth/auth-client.c /dovecot/src/lib-dict/dict.c /dovecot/src/lib-imap/imap-base-subject.c /dovecot/src/lib-index/mail-cache-compress.c /dovecot/src/lib-index/mail-cache-lookup.c /dovecot/src/lib-index/mail-cache-private.h /dovecot/src/lib-index/mail-cache-transaction.c /dovecot/src/lib-index/mail-index-private.h /dovecot/src/lib-index/mail-index-sync-ext.c /dovecot/src/lib-index/mail-index-sync-private.h /dovecot/src/lib-index/mail-index-sync-update.c /dovecot/src/lib-index/mail-index-sync.c /dovecot/src/lib-index/mail-index-transaction-private.h /dovecot/src/lib-index/mail-index-transaction-view.c /dovecot/src/lib-index/mail-index-transaction.c /dovecot/src/lib-index/mail-index-view-private.h /dovecot/src/lib-index/mail-index-view-sync.c /dovecot/src/lib-index/mail-index-view.c /dovecot/src/lib-index/mail-index.c /dovecot/src/lib-index/mail-index.h /dovecot/src/lib-index/mail-transaction-log-append.c /dovecot/src/lib-mail/mail-types.h /dovecot/src/lib-mail/message-body-search.c /dovecot/src/lib-mail/message-header-search.c driver-mysql.c sql-api-private.h sql-api.c /dovecot/src/lib-storage/index/dbox/dbox-keywords.c /dovecot/src/lib-storage/index/dbox/dbox-save.c /dovecot/src/lib-storage/index/dbox/dbox-storage.h /dovecot/src/lib-storage/index/dbox/dbox-sync-expunge.c /dovecot/src/lib-storage/index/dbox/dbox-sync-full.c /dovecot/src/lib-storage/index/dbox/dbox-sync.c /dovecot/src/lib-storage/index/dbox/dbox-sync.h /dovecot/src/lib-storage/index/dbox/dbox-uidlist.c /dovecot/src/lib-storage/index/dbox/dbox-uidlist.h /dovecot/src/lib-storage/index/index-mail-headers.c /dovecot/src/lib-storage/index/index-mail.c /dovecot/src/lib-storage/index/index-mail.h /dovecot/src/lib-storage/index/index-sort.c /dovecot/src/lib-storage/index/index-storage.h /dovecot/src/lib-storage/index/index-sync.c /dovecot/src/lib-storage/index/maildir/maildir-keywords.c /dovecot/src/lib-storage/index/maildir/maildir-save.c /dovecot/src/lib-storage/index/maildir/maildir-storage.c /dovecot/src/lib-storage/index/maildir/maildir-storage.h /dovecot/src/lib-storage/index/maildir/maildir-sync.c /dovecot/src/lib-storage/index/maildir/maildir-uidlist.c /dovecot/src/lib-storage/index/mbox/mbox-save.c /dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c /dovecot/src/lib-storage/index/mbox/mbox-sync-private.h /dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c /dovecot/src/lib-storage/index/mbox/mbox-sync-update.c /dovecot/src/lib-storage/index/mbox/mbox-sync.c /dovecot/src/lib-storage/mail-storage-private.h /dovecot/src/lib-storage/mail-storage.c /dovecot/src/lib-storage/mail-storage.h /dovecot/src/lib/array-decl.h /dovecot/src/lib/array.h /dovecot/src/lib/buffer.c /dovecot/src/lib/buffer.h /dovecot/src/lib/ioloop-epoll.c /dovecot/src/lib/istream.c /dovecot/src/lib/istream.h /dovecot/src/lib/lib.h /dovecot/src/lib/module-dir.c /dovecot/src/lib/seq-range-array.c /dovecot/src/lib/seq-range-array.h /dovecot/src/lib/str.c /dovecot/src/lib/str.h /dovecot/src/master/mail-process.c /dovecot/src/master/master-settings.h /dovecot/src/plugins/acl/acl-backend-vfile.c /dovecot/src/plugins/acl/acl-cache.c /dovecot/src/plugins/acl/acl-mailbox.c /dovecot/src/plugins/acl/acl-plugin.h /dovecot/src/plugins/quota/quota-dirsize.c /dovecot/src/plugins/quota/quota-private.h /dovecot/src/plugins/quota/quota-storage.c /dovecot/src/plugins/quota/quota.c /dovecot/src/plugins/trash/trash-plugin.c /dovecot/src/plugins/zlib/zlib-plugin.c
24ce0c343cefe54af841871fa39dbc3464028b06 31-May-2006 Timo Sirainen <tss@iki.fi>

Added sql_escape_string() --HG-- branch : HEAD

0371406d952fe51367c7be91703e5634b7d9d225 26-Jan-2006 Timo Sirainen <tss@iki.fi>

Added support for dynamically building SQL drivers. --HG-- branch : HEAD

40f89fe7ec1898770d4d960ac3b6e5267c8aa3ea 22-Jan-2006 Timo Sirainen <tss@iki.fi>

SQLite support. Patch by Jakob Hirsch. --HG-- branch : HEAD

dc9de21d4375faeedbe5b7e941502ac578650da9 10-Dec-2005 Timo Sirainen <tss@iki.fi>

Added support for transactions and synchronous SQL queries. --HG-- branch : HEAD

a0b89f3b1df99b3a32f44623f13ad1893118825b 09-Jun-2005 Timo Sirainen <tss@iki.fi>

Added sql_connect() to do explicit connecting. sql_init() no longer does. --HG-- branch : HEAD

ccffb125d94adff0ad776de5a96e22f864d6fb0a 27-Feb-2005 Timo Sirainen <tss@iki.fi>

Added sql_get_flags() function, currently returning only SQL_DB_FLAG_BLOCKING. --HG-- branch : HEAD

6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0 16-Oct-2004 Timo Sirainen <tss@iki.fi>

Created generic asynchronous SQL API and implemented MySQL and PostgreSQL drivers. MySQL is implemented synchronously because it's API doesn't provide async way to do it. Replaced pgsql and mysql userdb/passdb with generic sql userdb/passdb. --HG-- branch : HEAD