Strange behavior on a simple Delete/Truncate Statements
Hello!
I'm using CF8 and Oracle 11g and In one of my app., I applied 4 simple delete/truncate statements.
These statements are used to clean up 4 temporary tables everytime this app. starts.
For a few weeks I have not seen anything wrong with it until one day the result produced by this app show duplicates data.
On my investigation I found out that 4 of my Truncate statements did not truncate the data, so previous data were process again and again...
Then I made some changes:
FROM:
<cfquery name="OriginalQuery" datasource="mytestDB">
Truncate table temp_table1
Truncate table temp_table2
Truncate table temp_table3
Truncate table temp_table4
</cfquery>
INTO:
<cfquery name="OriginalQuery1" datasource="mytestDB">
Truncate table temp_table1
</cfquery>
<cfquery name="OriginalQuery2" datasource="mytestDB">
Truncate table temp_table2
</cfquery>
<cfquery name="OriginalQuery3" datasource="mytestDB">
Truncate table temp_table3
</cfquery>
<cfquery name="OriginalQuery4" datasource="mytestDB">
Truncate table temp_table4
</cfquery>
Then I got the correct result again but only for a few weeks before the same problem coming back again.
Obviously, my statements are correct because I got the right data for weeks before it stopped working.
When I did delete statement directly in Oracle SQL Developer, I need to apply COMMIT;
such as:
Delete from Table A;
commit;
But when using Truncate I was told I don't need to use commit.
I changed the 4 statements in my CF application from truncate to delete and I got the same result.
In the first few weeks, I got the right result but it comes back.
Has anyone experience this? please help!
