Bug#848137: [Dbconfig-common-devel] Bug#848137: problem with the upgrade of tango-db

Paul Gevers elbrus at debian.org
Fri Jan 13 21:18:01 UTC 2017


Control: tags 850190 pending

Hi Frederic-Emmanuel,

On 01/13/17 16:08, PICCA Frederic-Emmanuel wrote:
>> Once I fixed 850190, 
> 
> Do you think that you will fix this bug before next week in order to
> let me enought time to fix tango and upload it.

I really hope I can upload this weekend. I have code that I believe does
what I want. I am in the process of testing it.

>> I believe that ought to work, although that is
>> still a hack. I was thinking of doing the "DROP PROCEDURE IF EXISTS *"
>> calls with the administrator credentials and the rest of the upgrade
>> script with the proper tango credentials. But probably your solution is
>> easier to implement.
> 
> I am thinking about this, and I agreed thaht it would be nice to put the fic in the postinst, just before the 
> dbc_go whcih does the upgrade.
> 
> Can you give me an example of how to execute this DROP PROCEDURES IF EXISTS *
> with the dbadmin right in this postinst

If you want to do it outside of dbconfig-common (you write "before the
dbc_go") than I am not going to advice you, because it would be too much
work to find out the proper code (and you would need to call
dbconfig-common internals or duplicate lots of code). What I meant,
instead of the mysql code that runs as user, run a script for the
upgrade (they are run with database administrator credentials) and in
that script do two things: call the DROP PROCEDURES... and then use the
user credentials to run the normal script.

> I am wondering if dbconfig-common could provide something in order to
> execute an sql script everywhen at the request of the maintainer,
> 
> dbc_dbuser = dbadmin
> dbc_custom_stript=<path/to/the/sql/script>
> dbc_go tango "runscript"
> 
> which run the script with the right database configuration extracted from the configuration phase.

Apart from this repair, do you see more use cases? The problem is that
you would need nearly all the logic that is now in dbc_go for this to
work. What I am considering is if I could guarantee the order of
script/user mysql/admin mysql (or the last two reversed). I guess that
if I would guarantee the script to always come first, it would be easier
to solve the tango-db issue at hand (which was originally created by
dbconfig-common).

Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20170113/9744f9be/attachment.sig>


More information about the debian-science-maintainers mailing list