Fix sakila.sql so it loads on 5.0. Only wait 60s for replication for test-env start.

This commit is contained in:
Daniel Nichter
2012-12-03 20:06:47 +00:00
parent 6282ee8796
commit 6c9f4c0722
6 changed files with 140 additions and 498 deletions

File diff suppressed because one or more lines are too long

View File

@@ -246,6 +246,11 @@ set_mysql_version() {
fi
}
_seq() {
local i="$1"
awk "BEGIN { for(i=1; i<=$i; i++) print i; }"
}
# ###########################################################################
# Sanity check the cmd line options.
# ###########################################################################
@@ -326,13 +331,18 @@ case $opt in
/tmp/12345/use -e "create table percona_test.sentinel(id int primary key, ping varchar(64) not null default '')"
/tmp/12345/use -e "insert into percona_test.sentinel(id, ping) values(1, '$ping')";
echo -n "Waiting for replication to finish..."
while true; do
for i in $(_seq 60); do
pong=$(/tmp/12347/use -ss -e 'select ping from percona_test.sentinel where id=1' 2>/dev/null)
[ "$ping" = "$pong" ] && break
echo -n '.'
sleep 1
done
echo ' OK'
if [ "$ping" = "$pong" ]; then
echo " OK"
else
echo " FAILED"
exit_status=$((exit_status | 1))
fi
fi
fi
if [ $exit_status -eq 0 ]; then

View File

@@ -7,7 +7,7 @@ ERRORS DIFFS ROWS SKIPPED TABLE
0 0 809 0 mysql.help_relation
0 0 422 0 mysql.help_topic
0 0 0 0 mysql.host
0 0 6 0 mysql.proc
0 0 0 0 mysql.proc
0 0 0 0 mysql.procs_priv
0 0 0 0 mysql.tables_priv
0 0 0 0 mysql.time_zone

View File

@@ -10,7 +10,7 @@ ERRORS DIFFS ROWS SKIPPED TABLE
0 0 0 0 mysql.host
0 0 0 0 mysql.ndb_binlog_index
0 0 0 0 mysql.plugin
0 0 6 0 mysql.proc
0 0 0 0 mysql.proc
0 0 0 0 mysql.procs_priv
0 0 2 0 mysql.proxies_priv
0 0 0 0 mysql.servers

View File

@@ -7,7 +7,7 @@ ERRORS DIFFS ROWS CHUNKS SKIPPED TABLE
0 0 809 1 0 mysql.help_relation
0 0 422 1 0 mysql.help_topic
0 0 0 1 0 mysql.host
0 0 6 1 0 mysql.proc
0 0 0 1 0 mysql.proc
0 0 0 1 0 mysql.procs_priv
0 0 0 1 0 mysql.tables_priv
0 0 0 1 0 mysql.time_zone

View File

@@ -10,7 +10,7 @@ ERRORS DIFFS ROWS CHUNKS SKIPPED TABLE
0 0 0 1 0 mysql.host
0 0 0 1 0 mysql.ndb_binlog_index
0 0 0 1 0 mysql.plugin
0 0 6 1 0 mysql.proc
0 0 0 1 0 mysql.proc
0 0 0 1 0 mysql.procs_priv
0 0 2 1 0 mysql.proxies_priv
0 0 0 1 0 mysql.servers