soot-oss / soot

Soot - A Java optimization framework
GNU Lesser General Public License v2.1
2.89k stars 710 forks source link

release-4.5.0 has line_number bug #2087

Open gai410388544 opened 5 months ago

gai410388544 commented 5 months ago

3A86F4AE-747E-45C5-EC40-67B9A337C885 C804C262-27A4-4AB2-D6FF-C6AF40A9C457

line 44 wrong mark as 46

Saikiran8844 commented 4 months ago

Hi @gai410388544 looks like your updating existing table. The error in your query is due to the incorrect syntax for an INSERT statement. In SQL, you cannot have a WHERE clause with an INSERT statement. If you intend to insert a new record, the correct syntax. you can try the below

String query = "UPDATE users SET status = :status WHERE name = :name";
int result = session.createQuery(query)
                             .setParameter("status", "updated")
                             .setParameter("name", "data")
                             .executeUpdate();