-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclear_bsim_data.sql
More file actions
27 lines (22 loc) · 1009 Bytes
/
Copy pathclear_bsim_data.sql
File metadata and controls
27 lines (22 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-- Clear BSim data for fresh reprocessing
-- Run this before reprocessing all programs with the fixed script
\echo 'Clearing BSim data for fresh reprocessing...'
-- Clear data tables (preserves schema and functions)
DELETE FROM function_analysis;
DELETE FROM enhanced_signatures;
DELETE FROM desctable;
DELETE FROM exetable;
-- Reset sequences to start from 1
SELECT setval('exetable_id_seq', 1, false);
SELECT setval('desctable_id_seq', 1, false);
-- Verify cleanup
\echo 'Cleanup verification:'
SELECT 'exetable' as table_name, COUNT(*) as row_count FROM exetable
UNION ALL
SELECT 'desctable' as table_name, COUNT(*) as row_count FROM desctable
UNION ALL
SELECT 'function_analysis' as table_name, COUNT(*) as row_count FROM function_analysis
UNION ALL
SELECT 'enhanced_signatures' as table_name, COUNT(*) as row_count FROM enhanced_signatures;
\echo 'Database cleared and ready for reprocessing!'
\echo 'Next step: Run Step1_AddProgramToBSimDatabase.java with UPDATE_ALL mode'