summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2020-02-10 13:18:56 +0100
committerhorchi <vdr@jwendel.de>2020-02-10 13:18:56 +0100
commitbaa7e59f5243fae0efa88410368b3500075d8951 (patch)
treef1bc481570eb52ab4674cb28fbc2d24a20c1fe1c
parent527e08a3d8d21ba170154ec4bb6c2f4264a26ea8 (diff)
downloadvdr-epg-daemon-baa7e59f5243fae0efa88410368b3500075d8951.tar.gz
vdr-epg-daemon-baa7e59f5243fae0efa88410368b3500075d8951.tar.bz2
2020-02-10: version 1.1.152 (horchi)\n - bugfix: Fixed problem with detection of table changes\n\n1.1.152
-rw-r--r--HISTORY.h9
-rw-r--r--lib/db.c10
2 files changed, 12 insertions, 7 deletions
diff --git a/HISTORY.h b/HISTORY.h
index 9a9c391..93d54a8 100644
--- a/HISTORY.h
+++ b/HISTORY.h
@@ -4,8 +4,8 @@
* -----------------------------------
*/
-#define _VERSION "1.1.151"
-#define VERSION_DATE "09.02.2020"
+#define _VERSION "1.1.152"
+#define VERSION_DATE "10.02.2020"
#define DB_API 7
#ifdef GIT_REV
@@ -17,7 +17,10 @@
/*
* ------------------------------------
*
- *
+
+2020-02-10: version 1.1.152 (horchi)
+ - bugfix: Fixed problem with detection of table changes
+
2020-02-09: version 1.1.151 (horchi)
- bugfix: Added missing commit after timer cleanup
- added: Debug messages for alter table
diff --git a/lib/db.c b/lib/db.c
index 41c8d68..12cbcae 100644
--- a/lib/db.c
+++ b/lib/db.c
@@ -923,8 +923,8 @@ int cDbTable::validateStructure(int allowAlter)
while ((row = mysql_fetch_row(result)))
{
fields[row[0]].columnFormat = row[1];
- fields[row[0]].description = row[2];
- fields[row[0]].def = row[6] ? row[6] : "";
+ fields[row[0]].description = row[2] ? row[2] : "";
+ fields[row[0]].def = row[6] ? strcasecmp(row[6], "NULL") == 0 ? "" : row[6] : "";
}
mysql_free_result(result);
@@ -953,10 +953,12 @@ int cDbTable::validateStructure(int allowAlter)
(strcasecmp(fieldInfo->def.c_str(), getField(i)->getDefault()) != 0 && !(getField(i)->getType() & ftPrimary)))
{
if (strcasecmp(fieldInfo->columnFormat.c_str(), colType) != 0)
- tell(4, "Debug: Format of '%s' changed from '%s' to '%s'", getField(i)->getDbName(), fieldInfo->columnFormat.c_str(), colType);
+ tell(5, "Debug: Format of '%s' changed from '%s' to '%s'", getField(i)->getDbName(),
+ fieldInfo->columnFormat.c_str(), colType);
if (strcasecmp(fieldInfo->description.c_str(), getField(i)->getDescription()) != 0)
- tell(4, "Debug: Description of '%s' changed from '%s' to '%s'", getField(i)->getDbName(), fieldInfo->description.c_str(), getField(i)->getDescription());
+ tell(5, "Debug: Description of '%s' changed from '%s' to '%s'", getField(i)->getDbName(),
+ fieldInfo->description.c_str(), getField(i)->getDescription());
alterModifyField(getField(i));
}