diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-10-21 04:31:17 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-10-21 04:31:17 +0200 |
commit | 7e426913cee72ef5e65289f5374b0e17274bf5aa (patch) | |
tree | 1a1c7b908dc69678c3909bc8f421bd6e4e60fd01 | |
parent | a0d88973b2b4be3dfbc5dec750756aa449149ce0 (diff) |
auditor: fix SQL syntax and semantic errors
-rw-r--r-- | src/auditordb/plugin_auditordb_postgres.c | 16 | ||||
-rw-r--r-- | src/exchange-lib/curl_defaults.c | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c index 65acf637d..6af6cf0fa 100644 --- a/src/auditordb/plugin_auditordb_postgres.c +++ b/src/auditordb/plugin_auditordb_postgres.c @@ -366,18 +366,20 @@ postgres_create_tables (void *cls) we must check that the exchange reported these properly. */ GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS deposit_confirmations " "(master_pub BYTEA NOT NULL CHECK (LENGTH(master_pub)=32)" - ",h_contract_terms BYTEA PRIMARY KEY CHECK (LENGTH(h_contract_terms_hash)=64)" - ",h_wire BYTEA PRIMARY KEY CHECK (LENGTH(h_wire)=64)" + ",h_contract_terms BYTEA CHECK (LENGTH(h_contract_terms)=64)" + ",h_wire BYTEA CHECK (LENGTH(h_wire)=64)" ",timestamp INT8 NOT NULL" ",refund_deadline INT8 NOT NULL" ",amount_with_fee_val INT8 NOT NULL" ",amount_with_fee_frac INT4 NOT NULL" ",amount_with_fee_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL" - ",coin_pub BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" - ",merchant BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" - ",exchange_sig BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" - ",exchange_pub BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" - ",master_sig BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" + ",coin_pub BYTEA CHECK (LENGTH(coin_pub)=32)" + ",merchant_pub BYTEA CHECK (LENGTH(merchant_pub)=32)" + ",exchange_sig BYTEA CHECK (LENGTH(exchange_sig)=64)" + ",exchange_pub BYTEA CHECK (LENGTH(exchange_pub)=32)" + ",master_sig BYTEA CHECK (LENGTH(master_sig)=64)" + ",PRIMARY KEY (h_contract_terms, h_wire, coin_pub, " + " merchant_pub, exchange_sig, exchange_pub, master_sig)" ")"), /* Table with historic business ledger; basically, when the exchange operator decides to use operating costs for anything but wire diff --git a/src/exchange-lib/curl_defaults.c b/src/exchange-lib/curl_defaults.c index b46507b91..ca4a221c8 100644 --- a/src/exchange-lib/curl_defaults.c +++ b/src/exchange-lib/curl_defaults.c @@ -58,7 +58,7 @@ TEL_curl_easy_get (char *url) { /* With POST requests, we do not want to wait for the "100 Continue" response, as our request bodies are usually - small and directy sending them saves us a round trip. + small and directy sending them saves us a round trip. Clearing the expect header like this disables libcurl's default processing of the header. |