[solved] Mysql database interface problem with Sympa Debian upgrade to 5.3.2
I upgraded the Sympa mailing list manager to 5.2.3-2 using the Debian package from the “Testing” repository. The database part of the upgrade procedure was a bit fussy so instead of solving its problems I simply backed up the tables, dropped them, ran the upgrade procedure and restored them. That workaround worked fine for making the Debian packaging system happy.
But Sympa itself was definitely not happy. On starting Sympa I got the following logs in /var/log/sympa.log :
Apr 25 17:02:39 kivu sympa[657]: Could not create table admin_table in
database sympa : Table ‘admin_table’ already exists
Apr 25 17:02:39 kivu sympa[657]: Could not create table user_table in
database sympa : Table ‘user_table’ already exists
Apr 25 17:02:39 kivu sympa[657]: Could not create table subscriber_table
in database sympa : Table ‘subscriber_table’ already exists
Apr 25 17:02:39 kivu sympa[657]: Could not create table netidmap_table
in database sympa : Table ‘netidmap_table’ already exists
Apr 25 17:02:39 kivu sympa[657]: Unable to execute SQL query : You have
an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near ‘.`admin_table’ at
line 1
Apr 25 17:02:39 kivu sympa[657]: Database sympa defined in sympa.conf
has not the right structure or is unreachable. If you don’t use any
database, comment db_xxx parameters in sympa.conf
Apr 25 17:02:39 kivu sympa[657]: Exiting.
Apr 25 17:02:39 kivu sympa[657]: Sympa not setup to use DBI
With no database access, Sympa was not operational. Double plus ungood !
The very strange thing is that the database is fine : the right tables with the right fields and the right records are all present. It even worked with the preceding version of Sympa. It looked like Sympa itself was unable to recognize that my database setup was correct, subsequently reported those errors and thereafter refused to run with it at all.
With a little rummaging inside the Sympa-users mailing list I quickly found a report of something looking suspiciously like my problem. It is probably a bug and Olivier Berger proposed a patch that looked to me like a workable solution : according to Olivier, a faulty regex was the cause of Sympa‘s failure to recognize it’s own.
After making a backup copy of /usr/lib/sympa/bin/List.pm I promptly applied his patch :
17:04 root@kivu /usr/lib/sympa/bin# diff List.pm.dist List.pm
10750a10751
> $t =~ s/^([^.]+\.)?(.+)$/\2/;
I restarted Sympa and it worked fine ever after. Thank you Olivier !
The only problem is that while Sympa was down, people wondered why the messages did not go through and resent some of their messages. None of those messages were lost – they were just piling up in a queue. So when Sympa restarted many duplicates were sent.
But at least now it’s working. So for now I’m going to use dselect to freeze the Sympa Debian package at its current version so that it is kept back next time I upgrade my system.
5 responses to “[solved] Mysql database interface problem with Sympa Debian upgrade to 5.3.2”
Leave a Reply
You must be logged in to post a comment.
Hmmm… your patch looks strange here i’m afraid… not the conventional style and strange zsh error… copy/paste problem ?
And that’s actually not really a regex problem but something which changed in un underlying lib maybe.
See also the proposed correction here : http://listes.cru.fr/sympa/arc/sympa-dev/2007-04/msg00008.html
Regards,
Yes, I just copy pasted the diff output… I was too lazy to produce a proper patch. I have now removed the ugly zsh error message.
Thank you for the pointer, I shall soon try what is suggested at http://sourcesup.cru.fr/viewvc/viewvc/branches/sympa-5.2-branch/src/List.pm?root=sympa&r1=4244&r2=4377
This web page saved my a**, many thanks !
After upgrading from a mix of Mandriva 2006.0/2007.0 to Mandriva 2007.1, my Sympa was completely broke. patching List.pm as suggested by Olivier immediately solved the issue.
Thanks again for having taken the time to write this down here !
FYI, the patch was integrated by the Debian packager.
Regards,
Olivier said :
> FYI, the patch was integrated by the Debian packager.
That is excellent news. Thanks for notifying us !