View Issue Details

IDProjectCategoryView StatusLast Update
0006437Talermerchant backendpublic2024-01-12 13:04
ReporterFlorian Dold Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityhighSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006437: errors in database initialization files are not reported
DescriptionWhen 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 ReproduceDo 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.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2020-07-22 19:54

manager   ~0016503

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.

Issue History

Date ModifiedUsernameFieldChange
2020-07-22 14:47Florian DoldNew Issue
2020-07-22 14:47Florian DoldStatusnew => assigned
2020-07-22 14:47Florian DoldAssigned To => Christian Grothoff
2020-07-22 15:05Christian GrothoffPrioritynormal => high
2020-07-22 15:05Christian GrothoffSeverityminor => major
2020-07-22 19:54Christian GrothoffNote Added: 0016503
2020-07-22 19:54Christian GrothoffStatusassigned => informing
2020-07-22 19:54Christian GrothoffResolutionopen => fixed
2020-07-22 19:54Christian GrothoffFixed in Version => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend