View Issue Details

IDProjectCategoryView StatusLast Update
0008788GNUnetnamestore servicepublic2024-10-29 13:19
Reporterulfvonbelow Assigned Toschanzen  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Platformx86-64OSGuix SystemOS Versiona1d711c92e
Product Version0.21.1 
Target Version0.23.0 
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

schanzen

2024-08-29 15:03

administrator   ~0023104

Hmm it seems I applied 0008787 but the tests do not fail. I need to investigate this again for 0.22.1

schanzen

2024-08-30 12:21

administrator   ~0023116

The reason why after fixing 8787 this is not happening is because we had to disable the tests since testing API was changed. Certainly the statement looks incorrect.

schanzen

2024-10-29 13:19

administrator   ~0023616

Will not be able to handle this properly until new testing is usable.

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
2024-08-29 15:03 schanzen Note Added: 0023104
2024-08-29 15:03 schanzen Target Version => 0.22.1
2024-08-30 12:21 schanzen Note Added: 0023116
2024-09-23 14:45 schanzen Target Version 0.22.1 => 0.22.2
2024-10-29 13:19 schanzen Target Version 0.22.2 => 0.23.0
2024-10-29 13:19 schanzen Note Added: 0023616