Hi all,
=20
When executing the below invalid SQL statement, all the 89,867 records
in the database were updated in stead of just a couple rows.
=20
update gid set changed=3D0, link_change=3D0, response_status=3D'ACC' =
where
cni_id in (select cni_id from cni where cuscar_id=3D4274);
=20
89,867 Row(s) Updated
Query 4 of 4 elapsed time (seconds) - Total: 1,675.695, SQL query:
1,675.695, Building output: 0
=20
The cni_id column does not exist in the cni table. In stead of raising
an exception, the invalid SQL update statement was executed without the
where condition. Needless to say that updating 89,867 records with
production data did not receive a warm welcome. ;-)
=20
Can anyone explain me why this invalid query is executed in stead or
raising an error? I'm using Squirrel SQL Client Version 2.3 final with a
Oracle OCI Driver and oracle.jadbc.driver.OracleDriver from the
ojdbc14.jar.
=20
Kind regards,
=20
Mark Noten
Software engineer
Seagha cvba
=20
|