Why asterisk don't allow me to remove this dead registrer?

Strange situation

database show

/registrar/contact/1000;@ef12a019a33b89d6cf1876741929b0bb: {"via_addr":"192.168.0.2","qualify_timeout":"3.000000","call_id":"zsrusFssPO","reg_server":"","prune_on_boot":"no","path":"","endpoint":"1000","via_port":"5060","authenticate_qualify":"no","uri":"sip:1000@192.168.0.2;transport=udp","qualify_frequency":"30","user_agent":"Linphone/3.11.2 (belle-sip/1.6.1)","expiration_time":"1737231278","outbound_proxy":""}
2 results found.
asterisk1*CLI> database deltree registrar/contact 1000;@ef12a019a33b89d6cf1876741929b0bb
Database entries do not exist.
[Jan 19 15:30:05] WARNING[2992]: db.c:590 ast_db_deltree: Couldn't execute stmt: SQL logic error

Why don’t allow me to remove if exist as database show said?

Solution found: database permission problems, I run asterisk as non-root user.
I fix it with
chown -Rc asterisk:asterisk /var/lib/asterisk