[Koha-bugs] [Bug 10517] koha-restore fails to create mysqluser at mysql_hostname so zebra update fails

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 7 02:35:46 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10517

--- Comment #24 from David Cook <dcook at prosentient.com.au> ---
(In reply to Rudolf Byker from comment #22)
> (In reply to David Cook from comment #20)
> > (In reply to Martin Renvoize from comment #16)
> > > 
> > > I am, however, pretty keen to take such an approach and drop 5.5 support
> > > with this release and so this patch is 'on hold' for now.
> > 
> > For what it's worth, I think koha-remove uses "DROP USER IF EXISTS", so we
> > already have mixed support for 5.5.
> > 
> > I ended up removing "IF EXISTS" and updating koha-remove to use --force so
> > that it could survive fatal errors.
> 
> Are you talking about the `--force` option on the MySQL command line
> utility? That smells like technical debt. Using it is the same or worse as
> using `|| true`, since you will hide lots of potential errors. We only need
> to handle one very specific error (which is not even an error, if you
> consider Idempotency to be a good programming pattern for such scripts –
> which it is). Using a catch-all to hide all errors is almost always a Bad
> Idea (TM).

Yes, the --force option for the MySQL cli utility.

I am only suggesting it as a temporary measure. Versions of Debian we support
are using MySQL server 5.5, but some Koha Debian utilities (the ones that are
aiming at being idempotent) fail on those Debian versions. Either we remove the
idempotency targeting newer versions of MySQL server, or we do a measure like
--force (which will still warn so it doesn't hide the errors it just doesn't
die on them). We really need to do one or the other. Or drop support for older
versions of Debian I suppose.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list