From: Dan Carpenter Date: Thu, 25 Oct 2012 08:41:04 +0000 (+0300) Subject: db: don't turn RaiseError on X-Git-Tag: 1.57~202 X-Git-Url: https://repo.or.cz/w/smatch.git/commitdiff_plain/6214658800a96708d2b45146b83b6434a057dcfd db: don't turn RaiseError on This was cut and pasted in from example code in the tutorial. I actually want it to input as much as possible data instead of aborting if one line is not right. Signed-off-by: Dan Carpenter --- diff --git a/smatch_scripts/db/fill_db_call_implies.pl b/smatch_scripts/db/fill_db_call_implies.pl index 397e7b8b..90c071c7 100755 --- a/smatch_scripts/db/fill_db_call_implies.pl +++ b/smatch_scripts/db/fill_db_call_implies.pl @@ -10,7 +10,7 @@ if (!defined($warns)) { exit(1); } -my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {RaiseError => 1, AutoCommit => 0}); +my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit => 0}); $db->do("PRAGMA synchronous = OFF"); $db->do("PRAGMA cache_size = 800000"); $db->do("PRAGMA journal_mode = OFF"); diff --git a/smatch_scripts/db/fill_db_caller_info.pl b/smatch_scripts/db/fill_db_caller_info.pl index e569905b..e7b6688a 100755 --- a/smatch_scripts/db/fill_db_caller_info.pl +++ b/smatch_scripts/db/fill_db_caller_info.pl @@ -36,7 +36,7 @@ if (!defined($warns)) { get_too_common_functions($warns); -my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {RaiseError => 1, AutoCommit => 0}); +my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit => 0}); $db->do("PRAGMA synchronous = OFF"); $db->do("PRAGMA cache_size = 800000"); $db->do("PRAGMA journal_mode = OFF"); diff --git a/smatch_scripts/db/fill_db_function_ptr.pl b/smatch_scripts/db/fill_db_function_ptr.pl index decb9fb3..825a497c 100755 --- a/smatch_scripts/db/fill_db_function_ptr.pl +++ b/smatch_scripts/db/fill_db_function_ptr.pl @@ -10,7 +10,7 @@ if (!defined($warns)) { exit(1); } -my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {RaiseError => 1, AutoCommit => 0}); +my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit => 0}); $db->do("PRAGMA synchronous = OFF"); $db->do("PRAGMA cache_size = 800000"); $db->do("PRAGMA journal_mode = OFF"); diff --git a/smatch_scripts/db/fill_db_return_implies.pl b/smatch_scripts/db/fill_db_return_implies.pl index c856d276..27b13152 100755 --- a/smatch_scripts/db/fill_db_return_implies.pl +++ b/smatch_scripts/db/fill_db_return_implies.pl @@ -11,7 +11,7 @@ if (!defined($warns)) { exit(1); } -my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {RaiseError => 1, AutoCommit => 0}); +my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit => 0}); $db->do("PRAGMA synchronous = OFF"); $db->do("PRAGMA cache_size = 800000"); $db->do("PRAGMA journal_mode = OFF"); diff --git a/smatch_scripts/db/fill_db_return_states.pl b/smatch_scripts/db/fill_db_return_states.pl index 380390b2..2d6b4ba7 100755 --- a/smatch_scripts/db/fill_db_return_states.pl +++ b/smatch_scripts/db/fill_db_return_states.pl @@ -10,7 +10,7 @@ if (!defined($warns)) { exit(1); } -my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {RaiseError => 1, AutoCommit => 0}); +my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit => 0}); $db->do("PRAGMA synchronous = OFF"); $db->do("PRAGMA cache_size = 800000"); $db->do("PRAGMA journal_mode = OFF"); @@ -74,7 +74,6 @@ while () { $static = 1; } - # print("insert into return_states values ('$file', '$func', $return_id, $return_value, $static, $type, $param, '$key', '$value')\n"); $db->do("insert into return_states values ('$file', '$func', $return_id, '$return_value', $static, $type, $param, '$key', '$value')\n"); } diff --git a/smatch_scripts/db/fill_db_return_values.pl b/smatch_scripts/db/fill_db_return_values.pl index 13b683d6..ca07193d 100755 --- a/smatch_scripts/db/fill_db_return_values.pl +++ b/smatch_scripts/db/fill_db_return_values.pl @@ -10,7 +10,7 @@ if (!defined($warns)) { exit(1); } -my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {RaiseError => 1, AutoCommit => 0}); +my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit => 0}); $db->do("PRAGMA synchronous = OFF"); $db->do("PRAGMA cache_size = 800000"); $db->do("PRAGMA journal_mode = OFF"); diff --git a/smatch_scripts/db/fill_db_type_size.pl b/smatch_scripts/db/fill_db_type_size.pl index a3cccabf..b80fe99e 100755 --- a/smatch_scripts/db/fill_db_type_size.pl +++ b/smatch_scripts/db/fill_db_type_size.pl @@ -10,7 +10,7 @@ if (!defined($warns)) { exit(1); } -my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {RaiseError => 1, AutoCommit => 0}); +my $db = DBI->connect("dbi:SQLite:smatch_db.sqlite", "", "", {AutoCommit => 0}); $db->do("PRAGMA synchronous = OFF"); $db->do("PRAGMA cache_size = 800000"); $db->do("PRAGMA journal_mode = OFF");