summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Loh <denis.loh@gmail.com>2009-10-30 11:12:05 +0100
committerDenis Loh <denis.loh@gmail.com>2009-10-30 11:12:05 +0100
commit7d596d673c1918eb962acf296a518ac5e50815fc (patch)
tree739b796f8b766e9321dd13686133386f2708c076
parent6b3a6ab4182e9468dfcf5ff8aae85f9b2b4bbb6a (diff)
downloadvdr-plugin-upnp-7d596d673c1918eb962acf296a518ac5e50815fc.tar.gz
vdr-plugin-upnp-7d596d673c1918eb962acf296a518ac5e50815fc.tar.bz2
Fixed issue due changing statement parsing
-rw-r--r--database/database.cpp6
-rw-r--r--database/database.h4
-rw-r--r--database/metadata.cpp2
3 files changed, 5 insertions, 7 deletions
diff --git a/database/database.cpp b/database/database.cpp
index 4355cbd..b3d11b2 100644
--- a/database/database.cpp
+++ b/database/database.cpp
@@ -127,10 +127,8 @@ cRow::cRow(){
}
cRow::~cRow(){
- for(int i=0;i<this->ColCount;i++){
- delete Columns[i];
- delete Values[i];
- }
+ delete [] this->Columns;
+ delete [] this->Values;
this->Columns = NULL;
this->Values = NULL;
}
diff --git a/database/database.h b/database/database.h
index ecd43e4..041772e 100644
--- a/database/database.h
+++ b/database/database.h
@@ -129,7 +129,7 @@
"OR "\
"((SELECT " SQLITE_COL_OBJECTID " FROM " SQLITE_TABLE_OBJECTS " "\
"WHERE " SQLITE_COL_OBJECTID "=NEW." SQLITE_COL_OBJECTID " "\
- "AND " SQLITE_COL_CLASS " LIKE '" Class "%') IS NULL) "\
+ "AND " SQLITE_COL_CLASS " LIKE '" Class "%%') IS NULL) "\
") THEN "\
"RAISE(" SQLITE_TRANSACTION_TYPE ", "\
"'INSERT on table " TableB " failed due constraint violation "\
@@ -146,7 +146,7 @@
"WHEN ("\
"((SELECT " SQLITE_COL_OBJECTID " FROM " TableA " "\
"WHERE " SQLITE_COL_OBJECTID "=NEW." SQLITE_COL_OBJECTID " "\
- "AND " SQLITE_COL_CLASS " LIKE '" Class "%') IS NULL)"\
+ "AND " SQLITE_COL_CLASS " LIKE '" Class "%%') IS NULL)"\
") THEN "\
"RAISE(" SQLITE_TRANSACTION_TYPE ", "\
"'UPDATE on table " TableB " failed due constraint violation "\
diff --git a/database/metadata.cpp b/database/metadata.cpp
index ebe530b..3316522 100644
--- a/database/metadata.cpp
+++ b/database/metadata.cpp
@@ -94,7 +94,7 @@ unsigned int cMediaDatabase::getSystemUpdateID(){
}
cUPnPObjectID cMediaDatabase::getNextObjectID(){
- cString Statement, Column, Value;
+ cString Column, Value;
if(this->mDatabase->execStatement("SELECT Key FROM %s WHERE KeyID=%Q",
SQLITE_TABLE_PRIMARY_KEYS,
PK_OBJECTS)){