View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006437 | Taler | mechant backend | public | 2020-07-22 16:47 | 2024-01-12 14:04 |
Reporter | Florian Dold | Assigned To | Christian Grothoff | ||
Priority | high | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.8 | Fixed in Version | 0.8 | ||
Summary | 0006437: errors in database initialization files are not reported | ||||
Description | When there is an error in, say, merchant-0001.sql, the database initialization does not fail. Only later when the merchant tries to actually access the DB, errors are raised because tables were not created. Instead, the code should already check for errors when executing merchant-0001.sql. The logs currently make it look like the changes from the sql file were executed successfully (see "Steps to Reproduce" for details). | ||||
Steps To Reproduce | Do something in merchant-0001.sql that causes the transaction to abort. The logs will contain something like this: Jul 22 20:04:28-970467 taler-merchant-dbinit-367481 INFO Applying SQL file `/home/dold/local/share/taler//sql/merchant/merchant-0001.sql' on database postgres:///talercheck Jul 22 20:04:29-145005 pq-367481 DEBUG Preparing SQL statement `COMMIT' as `end_transaction' However, running the script manually with "psql -f ..." will show that the transaction was rolled back. | ||||
Tags | No tags attached. | ||||
|
Fixed in 422e7a031..8703a0516 (gnunet.git). psql needs the "--set ON_ERROR_STOP=1" argument to actually return with a failure in case of syntax errors in the SQL. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-07-22 16:47 | Florian Dold | New Issue | |
2020-07-22 16:47 | Florian Dold | Status | new => assigned |
2020-07-22 16:47 | Florian Dold | Assigned To | => Christian Grothoff |
2020-07-22 17:05 | Christian Grothoff | Priority | normal => high |
2020-07-22 17:05 | Christian Grothoff | Severity | minor => major |
2020-07-22 21:54 | Christian Grothoff | Note Added: 0016503 | |
2020-07-22 21:54 | Christian Grothoff | Status | assigned => resolved |
2020-07-22 21:54 | Christian Grothoff | Resolution | open => fixed |
2020-07-22 21:54 | Christian Grothoff | Fixed in Version | => 0.8 |
2021-08-24 16:23 | Christian Grothoff | Status | resolved => closed |
2024-01-12 14:04 | Christian Grothoff | Category | merchant backend API (C) => mechant backend |