[sr-dev] pua module db query bug

Juha Heinanen jh at tutpro.com
Sun Oct 12 10:56:47 CEST 2014


Daniel-Constantin Mierla writes:

> Based on above, the function update_record_puadb() should return without 
> doing the db update if pres->etag.s is not set. It should end up in an 
> insert if pres->etag.s is not set.

i'm not sure, since publ_cback_func() does make insert explicitly if
record is not found.  but it does not get that far, because for some
reason, i see that this test succeeds:

	if (pua_dbf.affected_rows != NULL || dbmode != PUA_DB_ONLY)
	{
		INFO("find_and_update_record\n");
		if (find_and_update_record(hentity, hash_code, lexpire, &etag) > 0)
			goto done;
	}

what query is pua_dbf.affected_rows here referring to?  i have not found
in the function any db queries before the test.

-- juha



More information about the sr-dev mailing list