View Issue Details

IDProjectCategoryView StatusLast Update
0008788GNUnetnamestore servicepublic2024-05-05 13:59
Reporterulfvonbelow Assigned Toschanzen  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Platformx86-64OSGuix SystemOS Versiona1d711c92e
Product Version0.21.1 
Summary0008788: plugin_namestore_sqlite.c calls GNUNET_NAMESTORE_RecordIterator with new editor hint, not old
Descriptionsrc/include/gnunet_namestore_plugin.h:
... * The record iterator will be called with the old editor hint (if any).

Here is what src/plugin/namestore/plugin_namestore_sqlite.c calls the callback with the output from:
"UPDATE ns098records"
" SET editor_hint=?"
" FROM ns098records AS old_ns098records"
" WHERE ns098records.zone_private_key=? AND ns098records.label=?"
" RETURNING ns098records.uid,ns098records.record_count,ns098records.record_data,ns098records.label,editor_hint "

Here is what https://www.sqlite.org/lang_returning.html has to say about RETURNING:
"For INSERT and UPDATE statements, references to columns in the
 table being modified refer to the value of that column after the change
 has been applied. For DELETE statements, references to columns mean the
 value before the delete occurs."
Steps To ReproduceThis bug isn't currently caught by test_namestore_api_edit_records due to issue 8787, but after that fix has been applied, it will fail any time you run 'make check'.
Additional InformationI don't have an easy fix for this one; all information I can find says that it's going to require two separate statements.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-05-03 03:39 ulfvonbelow New Issue
2024-05-05 13:59 schanzen Assigned To => schanzen
2024-05-05 13:59 schanzen Status new => assigned