]> andersk Git - sql.git/blame - sbin/repair
backups: keep less monthlys
[sql.git] / sbin / repair
CommitLineData
1cc0573f
JP
1#!/bin/bash
2
3E=`mysql -e 'show slave status;' | grep 'Incorrect key file' | head -n1 | cut -f20 | sed -r -e "s/^.*\/(.*)\.MYI.*Default database: '([^']*)'.*$/\2 \1/"`
4DN=`echo $E | cut -d\ -f1`
5TN=`echo $E | cut -d\ -f2`
6
7if [ ! -z "$DN" ]; then
8 if [ ! -z "$TN" ]; then
9 mysql -e "repair table $TN; slave start;" $DN
10 fi
11fi
This page took 0.212783 seconds and 5 git commands to generate.