summaryrefslogtreecommitdiff
path: root/src/mysql.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-20 19:05:56 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-20 19:05:56 +0000
commit1b265bf2910685780020353447023a12739c1144 (patch)
tree32ee09d3448eb981ee25a6071184994f16f515ab /src/mysql.c
parentac279a1637c0627c9beee5a3b5f0272c2f0e1c7e (diff)
Using SQL with RDB will now automatically fix databases affected by the bug fixed in r2386
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2712 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/mysql.c')
-rw-r--r--src/mysql.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mysql.c b/src/mysql.c
index cfc16a51d..3bec30864 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -1862,6 +1862,16 @@ int db_mysql_load_ns_dbase(void)
}
}
+ /* Versions previous to 1.8.3 have a problem with saving nick access lists to sql
+ * because of the way the table is set up, causing nc->accesscount to be higher
+ * than what is in the database, which causes numerious problems including crashes. - Adam
+ */
+ if (nc->accesscount > i)
+ {
+ nc->accesscount = i;
+ nc->access = srealloc(nc->access, sizeof(char *) * nc->accesscount);
+ }
+
mysql_free_result(res);
}
}