|
|
@ -5,6 +5,12 @@ my $pass = ${'qpsmtpd'}{'DbPassword'} || 'secret'; |
|
|
|
|
|
|
|
|
|
|
|
my $dbstruct = `rpm -qd smeserver-qpsmtpd-log2sql | grep smtp_log.sql`; |
|
|
|
my $dbstruct = `rpm -qd smeserver-qpsmtpd-log2sql | grep smtp_log.sql`; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
my $convertInnoDB = ''; |
|
|
|
|
|
|
|
foreach my $table qw(messages message_headers message_body rcpts){ |
|
|
|
|
|
|
|
$convertInnoDB .= "ALTER TABLE $table ENGINE=InnoDB;\n" |
|
|
|
|
|
|
|
if (-e "/var/lib/mysql/$db/$table.MYD"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$OUT .= <<"END"; |
|
|
|
$OUT .= <<"END"; |
|
|
|
#! /bin/sh |
|
|
|
#! /bin/sh |
|
|
|
if [ ! -d /var/lib/mysql/$db ]; then |
|
|
|
if [ ! -d /var/lib/mysql/$db ]; then |
|
|
@ -43,11 +49,7 @@ REPLACE INTO db ( |
|
|
|
FLUSH PRIVILEGES; |
|
|
|
FLUSH PRIVILEGES; |
|
|
|
|
|
|
|
|
|
|
|
USE smtp_log; |
|
|
|
USE smtp_log; |
|
|
|
|
|
|
|
$convertInnoDB |
|
|
|
ALTER TABLE messages ENGINE=InnoDB; |
|
|
|
|
|
|
|
ALTER TABLE message_headers ENGINE=InnoDB; |
|
|
|
|
|
|
|
ALTER TABLE message_body ENGINE=InnoDB; |
|
|
|
|
|
|
|
ALTER TABLE rcpts ENGINE=InnoDB; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EOF |
|
|
|
EOF |
|
|
|
END |
|
|
|
END |
|
|
|