mariadb/mysql_upgrade-exit-status.patch
OBS User autobuild 9301fefeac Accepting request 39217 from server:database
Copy from server:database/mariadb based on submit request 39217 from user -miska-

OBS-URL: https://build.opensuse.org/request/show/39217
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mariadb?expand=0&rev=1
2010-05-05 21:42:29 +00:00

32 lines
999 B
Diff

returning non-zero exit status in this case is not nice to scripts using
mysql_upgrade (eg. our init script)
---
client/mysql_upgrade.c | 4 +++-
mysql-test/t/mysql_upgrade.test | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
--- client/mysql_upgrade.c.orig
+++ client/mysql_upgrade.c
@@ -758,7 +758,9 @@ int main(int argc, char **argv)
printf("This installation of MySQL is already upgraded to %s, "
"use --force if you still need to run mysql_upgrade\n",
MYSQL_SERVER_VERSION);
- die(NULL);
+ free_used_memory();
+ my_end(MY_CHECK_ERROR);
+ exit(0);
}
/*
--- mysql-test/t/mysql_upgrade.test.orig
+++ mysql-test/t/mysql_upgrade.test
@@ -19,7 +19,7 @@ file_exists $MYSQLTEST_VARDIR/master-dat
--echo Run it again - should say already completed
--replace_result $MYSQL_SERVER_VERSION VERSION
---error 1
+--error 0
--exec $MYSQL_UPGRADE --skip-verbose 2>&1
# It should have created a file in the MySQL Servers datadir