ENGINE-140 #comment fixed some bugs in new SQL statements - now passes pEpEngine tests ENGINE-140-reloaded
authorEdouard Tisserant <edouard@pep-project.org>
Tue, 15 Nov 2016 16:44:45 +0100
branchENGINE-140-reloaded
changeset 1395c999b8c26dd1
parent 1394 8659157b681f
child 1401 ed3616afb3fb
ENGINE-140 #comment fixed some bugs in new SQL statements - now passes pEpEngine tests
src/pEpEngine.c
     1.1 --- a/src/pEpEngine.c	Tue Nov 15 15:56:18 2016 +0100
     1.2 +++ b/src/pEpEngine.c	Tue Nov 15 16:44:45 2016 +0100
     1.3 @@ -226,7 +226,7 @@
     1.4                  "create table if not exists own_keys (\n"
     1.5                  "   address text,\n"
     1.6                  "   user_id text,\n"
     1.7 -                "   pgp_keypair_fpr text not null\n"
     1.8 +                "   fpr text not null\n"
     1.9                  "       references pgp_keypair (fpr)\n"
    1.10                  "       on delete cascade,\n"
    1.11                  "   foreign key (address, user_id)\n"
    1.12 @@ -354,7 +354,7 @@
    1.13  
    1.14          sql_unset_identity_flags = 
    1.15                                   "update identity set flags = "
    1.16 -                                 "    (((?1 & 255) ^ 65535) & (select flags from identity"
    1.17 +                                 "    ( ~(?1 & 255) & (select flags from identity"
    1.18                                   "                   where address = ?2 and user_id = ?3)) "
    1.19                                   "where address = ?2 and user_id = ?3 ;";
    1.20