summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 52dfa70)
raw | patch | inline | side by side (parent: 52dfa70)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Feb 2009 15:26:46 +0000 (15:26 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Feb 2009 15:26:46 +0000 (15:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13470 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/tests/sqlite-check-concurrency.pl | patch | blob | history |
index dfd258340ea17aaf73650517fc06ca64c071519d..9f03c66c7d5a9d30da6600a35bc1d9e12be2693a 100755 (executable)
my $count= 10;
my $db_name= "./test.sqlite";
my $lock = $db_name.".si.lock";
-if(stat($lock)) {
- unlink($lock);
-}
-if(stat($db_name)) {
- unlink($db_name)
-}
+#if(stat($lock)) {
+# unlink($lock);
+#}
+#
+#if(stat($db_name)) {
+# unlink($db_name)
+#}
for(my $i=0;$i<$count;$i++) {
$threads{$i}= threads->create(\&check_database);
sub run_test {
my $self= shift;
my $table_name= shift;
- my $sql= "CREATE TABLE IF NOT EXISTS $table_name (id INTEGER, value VARCHAR(255))";
+ my $sql= "CREATE TABLE IF NOT EXISTS $table_name (id INTEGER PRIMARY KEY, status VARCHAR(255) DEFAULT 'none')";
$self->lock();
eval {
$self->{dbh}->do($sql);
$self->unlock();
for(my $i=0;$i<100;$i++) {
- $sql= "INSERT INTO $table_name VALUES ($i, 'test $i')";
+ $sql= "INSERT INTO $table_name (id, status) VALUES (null, 'test $i')";
$self->lock();
eval {
$self->{dbh}->do($sql);