Skip to Content.
Sympa Menu

en - [sympa-users] Installation Problem

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Jobst Schmalenbach <address@concealed>
  • To: address@concealed
  • Subject: [sympa-users] Installation Problem
  • Date: Wed, 2 Apr 2008 23:14:05 +1100


I just got hold of a latest version 5.4.1

Compiling is fine (albeit a language warning).

make install works too, no problem.

sympa.pl --upgrade is a problem and I do not know how to get out of this.

[root@moya /] sympa.pl --upgrade
Configuration file read, default log level 0
Upgrade::probe_db() Table session_table created in database sympa
Upgrade::probe_db() Field 'visibility_admin' (table 'admin_table' ; database
'sympa') was NOT found. Attempting to add it...
Upgrade::probe_db() Missing expected primary key : list_admin
Upgrade::probe_db() Missing expected primary key : role_admin
Upgrade::probe_db() Missing expected primary key : user_admin
Upgrade::probe_db() Missing expected primary key : robot_admin
Upgrade::probe_db() ALTER TABLE admin_table ADD PRIMARY KEY
(robot_admin,list_admin,role_admin,user_admin)
Upgrade::probe_db() Could not set field
'robot_admin,list_admin,role_admin,user_admin' as PRIMARY KEY,
table'admin_table'.
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
Exiting.


Now if I look why this is happening its because of dual entries in the
database:
mysql> select list_admin,user_admin from admin_table;
+------------------+--------------------------------------------+
| list_admin | user_admin |
+------------------+--------------------------------------------+
| barrett-internal | address@concealed |
| barrett-internal | address@concealed |
| productupdates | address@concealed |
| productupdates | address@concealed |
| productupdates | address@concealed |
| salesblog | address@concealed |
| salesblog | address@concealed |
| salesblog | address@concealed |
| themark | address@concealed |
| themark | address@concealed |
| themark | address@concealed |
| themarktest | address@concealed |
| themarktest | address@concealed |
| themarktest | address@concealed |
+------------------+--------------------------------------------+

If you want to

ALTER TABLE admin_table ADD PRIMARY KEY
(robot_admin,list_admin,role_admin,user_admin)

that will refuse to run because there are two entries (rightly so) in the
table

| barrett-internal | address@concealed |
| barrett-internal | address@concealed |

so I took that code out in Upgrade.pm (I would not be able to install SYMPA
if I do not tak it out).

## Add primary key
# if ( $primaryKeyDropped || !$primaryKeyFound ) {
# ($Log::log_level >= 1) && &do_log('debug', "ALTER TABLE $t ADD PRIMARY
KEY ($fields)");
# unless ($dbh->do("ALTER TABLE $t ADD PRIMARY KEY ($fields)")) {
# ($Log::log_level >= 0) && &do_log('err', 'Could not set field
\'%s\' as PRIMARY KEY, table\'%s\'.', $fields, $t);
# return undef;
# }
# push @report, sprintf('Table %s, PRIMARY KEY set on %s', $t, $fields);
# ($Log::log_level >= 0) && &do_log('info', 'Table %s, PRIMARY KEY set on
%s', $t, $fields);
# }


which will get through the the UPGRADING of the database, but as soon as I
start sympa after the upgrade:

Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected
primary key : list_admin
Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected
primary key : role_admin
Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected
primary key : user_admin
Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected
primary key : robot_admin
Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected
primary key : id_session



It seems to run ... as the webinterface response and I can subscribe.

Does this matter?
Why defining the "list_admin" as a primary when that leads to "duplicate key
for XYZ"?


Jobst







--
Why is the man who invests all your money called a broker?

| |0| | Jobst Schmalenbach, address@concealed, General Manager
| | |0| Barrett Consulting Group P/L & The Meditation Room P/L
|0|0|0| +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia



Archive powered by MHonArc 2.6.19+.

Top of Page